Skip to content

A CAN IP core is a pre-built hardware block that implements the CAN communication protocol. This block can be integrated into a Field-Programmable Gate Array (FPGA) or an Application-Specific Integrated Circuit (ASIC) to enable communication with other devices using the CAN protocol.

Notifications You must be signed in to change notification settings

Samuelbec025/CAN-IPCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

CAN Bus Transceiver Core (Verilog) Flowchart:

Start

  1. Define Requirements:

    • Specify CAN bus bit rate (e.g., 500 kbps, 1 Mbps).
    • Choose a CAN transceiver IC (e.g., MCP2515, SN65HVD23x).
  2. Design CAN Controller Modules:

    • Bit Timing Module:
      • Calculate Baud Rate Prescaler (BRP) and Synchronization Jump Width (SJW) based on requirements.
      • Generate control signals for Transmit and Receive logic based on bit timing.
    • Frame Handling Module:
      • Parse standard/extended IDs from received frames.
      • Handle data field (up to 8 bytes) for data frames.
      • Implement CRC (Cyclic Redundancy Check) calculation.
      • Perform bit stuffing and destuffing.
    • Transmit Logic Module:
      • Manage data transmission onto the CAN bus.
      • Implement CSMA/CD (Carrier Sense Multiple Access with Collision Detection) for arbitration.
      • Handle retransmission logic for errors.
      • Interface with CAN Transceiver Interface Module.
    • Receive Logic Module:
      • Capture data from the CAN bus.
      • Perform bit unstuffing.
      • Verify CRC of received data.
      • Extract information from the frame (ID, data, type).
  3. Design CAN Transceiver Interface Module:

    • Transceiver Control Module:
      • Manage control pins of the CAN transceiver IC (mode, loopback, etc.).
    • Data Exchange Module:
      • Read data from CAN transceiver receive pins (CANH, CANL).
      • Send data to CAN transceiver transmit pins (CANH, CANL).
  4. Develop Test Bench:

    • Stimulate CAN controller modules with test vectors (frames).
    • Verify module functionality (ID parsing, CRC, data handling).
  5. Integration and Verification:

    • Integrate modules with CAN Transceiver Interface Module (initially simulated).
    • Connect modules with appropriate signals.
    • Refine design based on test bench results.
  6. FPGA Implementation:

    • Synthesize Verilog code to generate FPGA configuration file.
    • Program the FPGA with the configuration file.
    • Integrate physical CAN transceiver IC with the FPGA board.
  7. Testing and Validation:

    • Test the CAN transceiver core on a real CAN bus network.
    • Validate data transmission and reception functionality.
    • Verify error handling mechanisms.
  8. Optimization (Optional):

    • Consider pipelining and state encoding for performance improvement.
    • Analyze resource utilization and optimize code if necessary.

End

About

A CAN IP core is a pre-built hardware block that implements the CAN communication protocol. This block can be integrated into a Field-Programmable Gate Array (FPGA) or an Application-Specific Integrated Circuit (ASIC) to enable communication with other devices using the CAN protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published