GRCANFD is a VHDL IP core implementing a CAN-FD controller compatible with both CAN 2.0 and CAN-FD. It consists of an internal CAN-FD codec and a top layer handling the configuration and control of the IP. GRCANFD features a generic bus master interface to fetch and store frames from/to external memory. Wrappers for adapting the generic bus master to AMBA 2.0 AHB and AXI4 are available. The IP core also features an AMBA 2.0 APB slave interface for accessing the configuration registers.
The codec is compliant with the ISO standard for CAN-FD: 11898-1:2015 (2nd edition). It implements the functionality related to the PL and MAC sub-layers of the protocol: transmission, reception and acknowledgment of frames, bit synchronization, CRC calculation, error detection and signaling, arbitration control, frame encoding, etc. It supports both classical CAN and CAN-FD frames, including all the types (Data, Remote, Error and Overload Frames) and formats (CBFF, CEFF, FBFF and FEFF) specified in the standard.
The Transmit and Receive Channels operate separately. GRCANFD includes a FIFO for each channel in order to temporarily buffer frames; the size of these FIFOs can be individually configured via VHDL generics. For the Transmit Channel, GRCANFD fetches frames from the external memory and stores them internally into the TX FIFO; frames are then transmitted by the codec according to the CAN-FD standard. For the Receive Channel, the codec verifies and acknowledges the frames, and GRCANFD filters and stores them into the RX FIFO; once a full frame is available, GRCANFD writes it to the external memory. The communication with the external memory is handled by an autonomous DMA engine transferring frames over the generic bus master interface.