The Xilinx® LogiCORE™ IP CAN with Flexible
Data Rate (CAN FD) core is ideally suited for
automotive and industrial applications such as
automotive body control units, automotive test
equipment, instrument clusters, sensor
controls, and industrial networks. The core can
be used in standalone mode or connected to
Xilinx MicroBlaze™ processors or the Arm
Cortex-A9 processors in Zynq
®
-7000 SoCs.
®
Features
•Designed to ISO 11898-1/2015
specification [Ref 1]
•Supports both CAN and CAN FD frames
•Supports the CAN FD frame format
specified in the ISO 11898:2015
specification [Ref 1]
•Supports up to 64 byte CAN FD frames
•Supports flexible data rates up to 8 Mb/s
•Supports nominal data rates up to 1Mb/s
•Up to three data bit transmitter delay
compensation
•TX and RX mailbox buffers with
configurable depth
•Two 64-deep RX FIFOs with 32 ID
Filter-Mask pairs
•Message with lowest ID transmitted first
•Supports TX message cancellation
IMPORTANT: It is required to have a valid Bosch CAN
FD protocol license before selling a device containing
the Xilinx CAN FD IP core.
LogiCORE™ IP Facts Table
Core Specifics
UltraScale+™
Supported
Device Family
Supported User
Interfaces
ResourcesPerformance and Resource Utilization web page
(1)
Zynq UltraScale+ MPSoC Architecture
Zynq
®
UltraScale™
-7000 SoC, 7 Series,
AXI4-Lite, APB
Provided with Core
Design FilesEncrypted RTL
Example DesignVerilog
Test BenchVerilog
Constraints FileXDC
Simulation
Model
Supported
S/W Driver
(2)
Tested Design Flows
Design EntryVivado® Design Suite
Simulation
SynthesisVivado Synthesis
For supported simulators, see the
Xilinx Design Tools: Release Notes Guide.
Not Provided
Standalone and Linux
(3)
Support
Provided by Xilinx at the Xilinx Support web page
Notes:
1. For a complete listing of supported devices, see the Vivado IP
catalog
.
2. Standalone driver details can be found in the SDK directory
(\Xilinx\SDK\<release_version>\data\embeddedsw\XilinxPro
cessorIPLib\drivers\canfd_version). Linux OS and driver
support information is available from the Linux CAN FD
Driver Page.
3. For the supported versions of the tools, see the
Xilinx Design Tools: Release Notes Guide.
•Separate error logging for fast data rate
CAN FD v2.04
PG223 December 5, 2018www.xilinx.comProduct Specification
Other Features
SendFeedback
•Timestamp for transmitted and received messages
•Supports transmit event FIFO
•Supports the following modes:
Disable Auto-Retransmission (DAR) mode
°
Snoop (Bus Monitoring) mode
°
Sleep mode with Wake-Up Interrupt
°
Internal Loopback mode
°
Bus-Off Recovery mode
°
-Auto-Recovery
-User intervention for Auto-Recovery
Disable Protocol Exception Event mode
°
IP Facts
CAN FD v2.05
PG223 December 5, 2018www.xilinx.com
Overview
CAN FD Core
Host
Control
Object Layer/LLC
AXI4-Lite
I/F
TX Block
RAM
TBMM
Register Module
RX Block
RAM
RBMM
CDC
Sync
AXI Clock Domain
CAN FD Protocol Engine
Transfer Layer/MAC
CAN Clock Domain
PHY
CAN Bus
TX
RX
AXI4-Lite Bus
X14811-081418
SendFeedback
This product guide describes features of the CAN FD core and the functionality of the
various registers in the design. In addition, the core interface and its customization options
are defined in this document. Information on the CAN or CAN FD protocol is outside the
scope of this document, and knowledge of the relevant CAN and CAN FD specifications is
assumed. Figure 1-1 illustrates the high-level architecture of the CAN FD core and provides
the interface connectivity.
X-Ref Target - Figure 1-1
Chapter 1
CAN FD v2.06
PG223 December 5, 2018www.xilinx.com
Note:
Figure 1-1:CAN FD Core Layered Architecture and Connectivity
The core requires an external PHY to be connected to communicate on the CAN bus.
Chapter 1: Overview
SendFeedback
Core Description
The core functions are divided into two independent layers as shown in Figure 1-1. The
object layer interfaces with the host control through the AXI4-Lite/APB interface and works
in the AXI4-Lite/APB clock domain. The transfer layer interfaces with the external PHY and
operates in the CAN clock domain. Information exchange between the two layers is done
through the CDC synchronizers. The CAN FD object layer provides a state-of-the-art
transmission and reception method to manage message buffers.
Object Layer (Logical Link Layer)
The object layer is divided into the following submodules:
•Register Module – This module allows for read and write access to the registers
interfaces with the CAN FD protocol engine to provide storage for message reception
from the CAN bus. It manages the host access to the RX block RAM.
Transfer Layer (Medium Access Control Layer)
The transfer layer provides the following main functions:
•Initiation of the transmission process after recognizing bus idle (compliance with
inter-frame space)
Serialization of the frame
°
Bit stuffing
°
Arbitration and passing into receive mode in case of loss of arbitration
°
ACK check
°
Presentation of a serial bitstream to PHY for transmission
°
CRC sequence calculation including stuff bit count for FD frames
°
Bit rate switching
°
CAN FD v2.07
PG223 December 5, 2018www.xilinx.com
•Reception of a serial bitstream from the PHY
Deserialization and recompiling of the frame structure
°
Bit destuffing
°
Chapter 1: Overview
SendFeedback
Transmission of ACK
°
Bit rate switching
°
•Bit timing functions
•Error detection and signaling
•Recognition of an overload condition and reaction
Licensing and Ordering
IMPORTANT: It is required to have a valid Bosch CAN FD protocol license before selling a device
containing the Xilinx CAN FD IP core.
License Checkers
If the IP requires a license key, the key must be verified. The Vivado® design tools have
several license checkpoints for gating licensed IP through the flow. If the license check
succeeds, the IP can continue generation. Otherwise, generation halts with error. License
checkpoints are enforced by the following tools:
•Vivado synthesis
•Vivado implementation
•write_bitstream (Tcl command)
IMPORTANT: IP license level is ignored at checkpoints. The test confirms a valid license exists. It does
not check IP license level.
License Type
The core is provided under the terms of the CAN FD LogiCORE™ IP License Agreement for
Automotive or Non-Automotive applications. Click here for more information about
obtaining a CAN FD license.
For more information, visit the CAN FD product web page.
Information about other Xilinx LogiCORE IP modules is available at the Xilinx Intellectual
Property page. For information on pricing and availability of other Xilinx LogiCORE IP
modules and tools, contact your local Xilinx sales representative.
CAN FD v2.08
PG223 December 5, 2018www.xilinx.com
Product Specification
SendFeedback
Standards
The CAN FD core conforms to the ISO-11898-1/2015 standard specification [Ref 1].
Performance
For full details about performance, visit the Performance and Resource Utilization web
page.
Chapter 2
Resource Utilization
For full details about resource utilization, visit the Performance and Resource Utilization
web page.
Port Descriptions
The host interface of the CAN FD core is either the AXI4-Lite or the APB interface,
depending on the parameter selected in the Vivado™ IDE. Ta bl e 2-1 defines the core
interface signaling.
can_clk_x2ClockI-This is fully synchronous to the CAN clock and is
I–
CAN clock input. Oscillator frequency tolerance
according to the standard specification.
a multiple by 2 in frequency.
APB Interface Signals
apb_clkClockI-APB clock.
apb_resetnResetI-Active-Low synchronous reset.
apb_pwdata[31:0]APBI-Write data bus.
apb_paddr[14:0]I-Address bus.
apb_pwriteI-Read or Write signaling:
• 0 for Read Transaction.
• 1 for Write Transaction.
apb_pselI-Active-High select.
apb_penableI-Active-High enable.
apb_prdata[31:0]O0x0Read Data bus.
apb_preadyO0x0Active-High ready signal.
apb_perrorAPBO0x0Active-High R/W er ro r s ignal. Re served fo r f ut ure
use.
Notes:
1. The core does not support the wstrb signal on the AXI4-Lite interface.
2. The interrupt line is level-sensitive. Interrupts are indicated by the transition of the interrupt line logic from 0 to 1.
3. The AXI4-Lite interface signals and ip2bus_intrevent are synchronous to the s_axi_aclk clock.
Register Space
The CAN FD core requires a 32 KB memory mapped space to be allocated in the system
memory. Division of this addressable space within the core is shown in Tab le 2 -2.
Note:
and is not impacted by the AXI Write Data Strobe (*_wstrb) signal. For write access, both the AXI
Write Address Valid (*_awvalid) and AXI Write Data Valid (*_wvalid) signals should be asserted
together.
The AXI4-Lite write access register is updated by the 32-bit AXI Write Data (*_wdata) signal,
CAN FD v2.010
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
Table 2-2:CAN FD Address Space Division
Start Address End AddressSectionNotes
0x00000x00FFCore Registers Space
0x01000x1FFFTX Message Space
0x20000x7FFFRX Message Space
This space is implemented with flip-flops. See
Tabl e 2- 3 and Ta ble 2 -4.
This space is implemented with TX block RAM
and provides storage for a maximum 32 TX
buffers. For RX Sequential buffer mode (FIFO
mode), it also
provides storage for 32 ID Filter-Mask pairs. See
Tabl e 2- 30 .
This space is implemented with RX block RAM.
For RX Sequential buffer mode (FIFO mode), it
provides storage for two 64-deep message RX
FIFO's. See Table 2- 37 and Table 2 -38.
It provides storage for 32 deep TX Event FIFO.
See Tabl e 2- 34 .
For RX Ma il box buff er mo de, it provides storage
for maximum 48 RX Buffers and respective ID
Masks. See Ta bl e 2 -44.
Table 2-3:CAN FD Core Register Address Map
Start
Address
0x0000SRRRead, WriteSoftware Reset Register
NameAccessDescriptionNotes
0x0004MSRRead, WriteMode Select Register
0x0008BRPRRead, Write
0x000CBTRRead, WriteArbitration Phase Bit Register
Registers present in
both RX Mailbox
and RX Sequential/
FIFO buffer modes.
Registers present
only in RX Mailbox
buffer mode.
Otherwise reserved.
0x00E4Reserved–
0x00E8FSRRead, WriteRX FIFO Status Register
0x00ECWMRRead, WriteRX FIFO Watermark Register
0x00F00x00FF
Reserved–
Core Register Descriptions
Tab le 2 -4 shows the CAN FD core register space. The thick ruling represents the RX Mailbox
specific register bits and the gray represents the RX FIFO specific register bits. Register bits
tha t are us ed in both RX Ma ilbox a nd RX FI FO mode and dif fer in d escription a re show n with
a / separator.
Writing to the Software Reset register (SRR) places the core in Configuration mode. In
Configuration mode, the core drives recessive on the bus line and does not transmit or
receive messages. During power-up, the CEN and SRST bits are 0 and the CONFIG bit in the
Status register (SR) is 1. The Transfer Layer Configuration registers can be changed only
when the CEN bit in the SRR is 0. Mode Select register bits (except SLEEP and SBR) can be
changed only when the CEN bit is 0. If the CEN bit is changed during core operation, Xilinx
recommends resetting the core so that operation starts over.
Name
(Reset
Val ue)
Table 2-5:Software Reset Register
BitsNameAccess
31:2Reserved–0Reserved.
1CENR/W0
0SRSTWO0
Default
Value
CAN Enable.
This is the Enable bit for the core.
• 1 = The core is in Loopback, Sleep, Snoop, or Normal mode,
depending on the LBACK, SLEEP, and SNOOP bits in the MSR.
• 0 = The core is in Configuration mode.
Note:
If the CEN bit is cleared during core operation, Xilinx recommends
resetting the core so that operation starts over.
Reset.
This is the software reset bit for the core.
• 1 = Core is reset.
If a 1 is written to this bit, all core configuration registers
(including the SRR) are reset. Reads to this bit always return 0.
After performing a soft or hard reset, wait for 16 AXI4-Lite/APB
Note:
clock cycles before initiating next AXI4-Lite/APB transaction.
Mode Select Register (Address Offset + 0x0004)
Description
CAN FD v2.015
PG223 December 5, 2018www.xilinx.com
Writing to the Mode Select register (MSR) enables the core to enter Snoop, Sleep,
Loopback, or Normal modes. In Normal mode, the core participates in normal bus
communication. If the SLEEP bit is set to 1, the core enters Sleep mode. If the LBACK bit is
set to 1, the core enters Loopback mode. If the SNOOP mode is set to 1, the core enters
Snoop mode and does not participate in bus communication but only receives messages.
Chapter 2: Product Specification
SendFeedback
IMPORTANT: LBACK, SLEEP, and SNOOP bits should never be set to 1 at the same time. At any given
point, the core can either be in Loopback, Sleep, or Snoop mode. When all three bits are set to 0, the
core can enter Normal mode subject to other conditions.
Table 2-6:Mode Select Register
BitsNameAccess
31:16Reserved–0Reserved.
15:8Reserved–0Reserved.
7ABRR/W0
6SBRR/W0
5DPEER/W 0
Default
Value
Auto Bus-Off Recovery Request.
• 1 = Auto Bus-Off Recovery request.
• 0 = No such request.
If this bit is set, the node does auto Bus-Off Recovery
irrespective of the SBR bit setting in this register. This bit can be
written only when the CEN bit in SRR is 0.
Start Bus-Off Recovery Request.
• 1 = Start Bus-Off Recovery request.
• 0 = No such request.
Node stays i n Bus-Of f state until th e SBR bi t is set to 1 (pro viding
that the ABR bit in this register is not set).
This bit can be written only when node is in Bus-Off state.
This bit auto clears after node completes the Bus-Off Recovery
or leaves Bus-Off state due to hard/soft reset or CEN
deassertion.
• 1 = Disable Protocol Exception Event detection/generation by
CAN FD receiver if “res” bit in CAN FD frame is detected as 1.
In this case, CAN FD receiver generates Form error.
• 0 = PEE detection/generation is enabled. If the CAN FD
receiver detects th e res bit as 1, it go es to Bus In teg rat ion state
(PEE_config) and waits for Bus Idle condition (11 consecutive
nominal recessive bits). The error counter remains unchanged.
This bit can be written only when the CEN bit in SRR is 0.
Description
CAN FD v2.016
PG223 December 5, 2018www.xilinx.com
Disable Auto-Retransmission.
• 1 = Disable auto retransmission on the CAN bus to provide
4DARR/W0
• 0 = Auto retransmission enabled.
This bit can be written only when the CEN bit in SRR is 0.
CAN FD Bit Rate Switch Disable Override.
• 1 = Makes the core transmit CAN FD frames only in nominal
3BRSDR/W 0
• 0 = Makes the core transmit CAN FD frames as per BRS bit in
This bit can be written only when the CEN bit in SRR is 0.
single shot transmission.
bit rate (by overriding the TX Message element BRS bit
setting).
the TX Message element.
Table 2-6:Mode Select Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
2SNOOPR/W0
1LBACKR/W 0
Default
Value
Description
SNOOP Mode Select/Request.
This is the Snoop mode request bit.
• 1 = Request core to be in Snoop mode.
• 0 = No such request.
This bit can be written only when CEN bit in SRR is 0.
Make sure that Snoop mode is programmed only after system
reset or software reset. For the core to enter Snoop mode, LBACK
and SLEEP bits in this register should be set to 0. The features of
Snoop mode are as follows:
• The core transmits recessive bits onto the CAN bus.
• The core receives messages that are transmitted by other
node s but do es not AC K. St o res re ceived message s in RX b lock
RAM based on programmed ID filtering.
• Error counters are disabled and cleared to 0. Reads to the error
counter register return zero.
Loopback Mode Select/Request.
This is the Loopback mode request bit.
• 1 = Request core to be in Loopback mode.
• 0 = No such request.
This bit can be written only when the CEN bit in SRR is 0. For the
core to enter Loopback mode, SLEEP and SNOOP bits in this
register should be set to 0.
Sleep Mode Select/Request.
This is the Sleep mode request bit.
• 1 = Request core to be in Sleep mode.
0SLEEPR/W 0
• 0 = No such request.
Th is bit is cleare d when the core wakes up fr om Sleep m ode. Fo r
the core to enter Sleep mode, LBACK and SNOOP bits in this
register should be set to 0.
Arbitration Phase (Nominal) Baud Rate Prescaler.
These bits indicate the prescaler value.
The a c tual v alue is o ne more than the value w ritten t o the re gister.
These bits can be written only when the CEN bit in SRR is 0.
CAN FD v2.017
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
Arbitration Phase (Nominal) Bit Timing Register (Address Offset + 0x000C)
Table 2-8:Arbitration Phase Bit Register
BitsNameAccess
31:23Reserved–0Reserved.
22:16SJW[6:0]R/W0
15Reserved–0Reserved.
14:8TS2[6:0]R/W0
7:0TS1[7:0]R/W0
Default
Value
Synchronization Jump Width.
Indicates the Synchronization Jump Width as specified in the
standard for Nominal Bit Timing.
The actual value is one more than the value written to the register.
These bits can be written only when the CEN bit in SRR is 0.
Time Segment 2
Indicates the Phase Segment 2 as specified in the standard for
Nominal Bit Timing.
The actual value is one more than the value written to the register.
These bits can be written only when the CEN bit in SRR is 0.
Time Segment 1
Indicates the Sum of Propagation Segment and Phase Segment 1
as specified in the standard for Nominal Bit Timing.
The actual value is one more than the value written to the register.
These bits can be written only when the CEN bit in SRR is 0.
Error Count Register (Address Offset + 0x0010)
Description
The ECR is a read-only register. Writes to the ECR have no effect. The values of the error
counters in the register reflect the values of the transmit and receive error counters in the
core. The following conditions reset the Transmit and Receive Error counters:
•When 1 is written to the SRST bit in the SRR.
•When 0 is written to the CEN bit in the SRR.
•When the core enters Bus-Off state.
•During Bus-Off recovery until the core enters Error Active state (after 128 occurrences
of 11 consecutive recessive bits).
IMPORTANT: When in Bus-Off recovery, the Receive Error counter is advanced/incremented by 1 when
a sequence of 11 consecutive nominal recessive bits is seen.
Note: In SNOOP mode, error counters are disabled and cleared to 0. Reads to the Error Counter
register return 0.
CAN FD v2.018
PG223 December 5, 2018www.xilinx.com
.
SendFeedback
Table 2-9:Error Counter Register
Chapter 2: Product Specification
BitsNameAccess
31:16Reserved–0Reserved.
15:8REC[7:0]R0
7:0TEC[7:0]R0
Default
Value
Description
Receive Error Count.
Indicates the value of Receive Error Counter.
Transmit Error Count.
Indicates the value of Transmit Error Counter.
Error Status Register (Address Offset + 0x0014)
The Error Status register (ESR) indicates the type of error that has occurred on the bus. If
more than one error occurs, all relevant error flag bits are set in this register. The ESR is a
write 1 to clear register. Writes to this register do not set any bits, but clear the bits that are
set.
Table 2-10:Error Status Register
BitsName
31:12Reserved0Reserved
11F_BERR0
Default
Value
Description
Bit Error in CAN FD Data Phase
• 1 = Indicates a bit error occurred in Data Phase (Fast) data rate.
• 0 = Indicates a b it error h as not occurred in Data Phase (Fast) data rate
after the last write to this bit.
If this bit is set, writing a 1 clears it.
(1)
.
Stuff Error in CAN FD Data Phase.
• 1 = Indicates stuff error occurred in Data Phase (Fast) data rate.
10F_STER0
9F_FMER 0
8F_CRCER 0
7:5Reserved0Reserved.
• 0 = Ind icate s stu f f err o r has not occurred in Data Phase (Fast) data rate.
after the last write to this bit.
If this bit is set, writing a 1 clears it.
Form Error in CAN FD Data Phase.
• 1 = Indicates form error occurred in Data Phase (Fast) data rate.
• 0 = Indicates form error has not occurred in Data Phase (Fast) da ta rate .
after the last write to this bit.
If this bit is set, writing a 1 clears it.
CRC Error in CAN FD Data Phase.
• 1 = Indicates CRC error occurred in Data Phase (Fast) data rate.
• 0 = Indicates CRC error has not occurred in Data Phase (Fast) data rate
after the last write to this bit.
If this bit is set, writing a 1 clears it.
CAN FD v2.019
PG223 December 5, 2018www.xilinx.com
Table 2-10:Error Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsName
4ACKER 0
3BERR 0
2STER 0
Default
Value
Description
ACK Error.
Indicates an acknowledgment error.
• 1 = Indicates an acknowledgment error has occurred.
• 0 = Indicates an acknowledgment error has not occurred on the bus
after the last write to this bit.
If this bit is set, writing a 1 clears it.
Bit Error.
Indicates the received bit is not the same as the transmitted
bit during bus communication.
• 1 = Indicates a bit error has occurred.
• 0 = I ndi cat es a bit error ha s not oc cur red on t he b us after the last write
to this bit.
If this bit is set, writing a 1 clears it.
Stuff Error.
Indicates an error if there is a stuffing violation.
• 1 = Indicates a stuff error has occurred.
• 0 = Indicates a stuff error has not occurred on the bus after the last
write to this bit.
If this bit is set, writing a 1 clears it.
Form Error.
Indicates an error in one of the fixed form fields in the message frame.
1FMER 0
0CRCER 0
Notes:
1. In transmitter delay compensation phase, any error is reported as fast bit error (by the transmitter).
2. Fixed stuff bit errors are reported as form error.
3. In case of a CRC Error and a CRC delimiter corruption, only the FMER bit is set.
• 1 = Indicates a form error has occurred.
• 0 = Indicates a form error has not occurred on the bus after the last
write to this bit.
If this bit is set, writing a 1 clears it.
CRC Error
Indicates a CRC error has occurred.
• 1 = Indicates a CRC error has occurred.
• 0 = Indicates a CRC error has not occurred on the bus after the last
write to this bit.
If this bit is set, writing a 1 clears it.
(3)
.
CAN FD v2.020
PG223 December 5, 2018www.xilinx.com
Status Register (Address Offset + 0x0018)
SendFeedback
Table 2-11:Status Register
Chapter 2: Product Specification
BitsNameAccess
31:21Reserved–0Reserved.
22:16TDCV[6:0]R0
15:13Reserved–0Reserved.
12SNOOPR0
11Reserved–0Reserved.
10BSFR_CONFIGR0
9PEE_CONFIG R0
Default
Value
Transmitter Delay Compensation Value.
This field gives the position of secondary sample point
(d efined as sum of TDCOFF a nd measured del ay for FDF to
res bit falling edge from TX to RX in CAN FD frame) in CAN
clocks. This field is for status purposes.
Snoop Mode.
• 1 = Indicates controller is in Snoop mode provided
Normal mode bit is also set in this register.
Bus-Off Recovery Mode Indicator.
• 1 = Indicates the core is in Bus-Off Recovery mode (Bus
Integration State).
When this bit is set, the BBSY and NORMAL status bits in
this register do not mean anything.
PEE Mode Indicator.
• 1 = Indicates the core is in PEE mode (Bus Integration
State).
When this bit is set, the BBSY and NORMAL status bits in
this register do not mean anything.
Description
8:7ESTAT[1:0]R0
6ERRWRNR0
5BBSY R0
Error Status.
Indicates the error status of the core.
• 00 = Indicates Configuration mode (CONFIG = 1). Error
state is undefined.
• 01 = Indicates error active state.
• 11 = Indicates error passive state.
• 10 = Indicates Bus-Off state.
Error Warning.
Indicates that either the Transmit Error counter or the
Receive Error counter has exceeded a value of 96.
• 1 = one or more error counters have a value of 96.
• 0 = neither of the error counters has a value of 96.
Indicates the CAN bus status.
• 1 = Indicates that the core is either receiving a message
or transmitting a message.
• 0 = Indicates that the core is either in Configuration
mode or the bus is idle.
CAN FD v2.021
PG223 December 5, 2018www.xilinx.com
Table 2-11:Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
4BIDLE R 0
3NORMAL R0
2SLEEP R 0
1LBACK R 0
0CONFIG R 1
Default
Value
Description
Bus Idle.
Indicates the CAN bus status.
• 1 = Indicates no bus communication is taking place.
• 0 = In dica tes t he co re is eit her in Configuration mode or
the bus is busy.
Normal Mode.
Indicates that the core is in Normal mode.
• 1 = Indicates that the core is in Normal mode.
• 0 = Indicates that the core is not in Normal mode.
Sleep Mode.
Indicates that the core is in Sleep mode.
• 1 = Indicates that the core is in Sleep mode.
• 0 = Indicates that the core is not in Sleep mode.
Loopback Mode.
Indicates that the core is in Loopback mode.
• 1 = Indicates that the core is in Loopback mode.
• 0 = Indicates that the core is not in Loopback mode.
Configuration Mode Indicator.
Indicates that the core is in Configuration mode.
• 1 = Indicates that the core is in Configuration mode.
• 0 = Indicates that the core is not in Configuration mode.
Interrupt Status Register (Address Offset + 0x001C)
Interrupt status bits in the ISR can be cleared by writing to the Interrupt Clear register. For
all bits in the ISR, a set condition takes priority over the clear condition and the bit
continues to remain 1.
Table 2-12:Interrupt Status Register
BitsNameAccess
31TXEWMFLLR0
30TXEOFLWR0
Default
Value
Description
TX Event FIFO Watermark Full Interrupt.
• 1 = Indicates that TX Event FIFO is full based on watermark
programming.
The interrupt continues to assert as long as the TX Event FIFO Fill Level
is above TX Event FIFO Full watermark. This bit can be cleared by
writing to the respective bit in the ICR.
TX Event FIFO Overflow Interrupt.
• 1 = Indicates that a message has been lost. This condition occurs
when the core has successfully transmitted a message for which an
event store is requested but the TX Event FIFO is full.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
CAN FD v2.022
PG223 December 5, 2018www.xilinx.com
Table 2-12:Interrupt Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
29:24RXBOFLW_BIR0
23:18RXLRM_BIR0
17RXMNFR0
Default
Value
Description
RX Buffer Index for Overflow Interrupt (Mailbox mode).
Gives RX Buffer index for which overflow event is generated. This field
is automatically cleared to default if RXBOFLW bit is cleared in this
register. In case more than one overflow event happens (before Host
could clear RXBOFLW), RXBOFLW_BI shows the overflow index for the
last event. This field has meaning only if the overflow interrupt
RXBOFLW bit is set. This field is also cleared at hard/soft reset or when
a 0 is written to the CEN bit in the SRR.
RX Buffer Index for Last Received Message (Mailbox mode).
Gives the RX Buffer index for the last received message. This field has
meaning only if the RXOK bit is set in this register. This field is cleared
at hard/soft reset or when a 0 is written to the CEN bit in the SRR.
RX Match Not Finished.
• 1 = Indicates that Match process did not finish until the start of sixth
bit in EOF field and frame was discarded.
This bit can be cleared by writing to the respective bit in the ICR.
RX Buffer Overflow Interrupt (Mailbox mode).
• 1 = Indicates that a message has been lost due to buffer overflow
condition. Buffer index is captured in RXBOFLW_BI field.
This bit can be cleared by writing to the respective bit in the ICR.
16
15
14TXCRSR0
RXBOFLW/
RXFWMFLL_1
RXRBF/
RXFOFLW_1
R0
R0
RX FIFO 1 Watermark Full Interrupt (Sequential/FIFO Mode).
• 1 = Indicates that RX FIFO-1 is full based on watermark
programming.
This interrupt is only available when RX FIFO-1 is enabled.
Note:
The interrupt continues to assert as long as the RX FIFO-1 Fill Level is
above the RX FIFO-1 Full watermark.
This bit can be cleared by writing to the respective bit in the ICR.
RX Buffer Full Interrupt (Mailbox mode).
• 1 = Indicates that a receive buffer has received a message and
become full.
This bit can be cleared by writing to the respective bit in the ICR.
• 1 = Indicates that a message has been lost. This condition occurs
when a new message with ID matching to Receive FIFO 1 is received
and the Receive FIFO 1 is full.
This interrupt is only available when RX FIFO-1 is enabled.
Note:
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
TX Cancellation Request Served Interrupt.
• 1 = Indicates that a cancellation request was cleared.
This bit can be cleared by writing to the respective bit in the ICR.
CAN FD v2.023
PG223 December 5, 2018www.xilinx.com
Table 2-12:Interrupt Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
13TXRRSR0
12RXFWMFLLR0
11WKUPR0
10SLPR0
9BSOFFR0
Default
Value
Description
TX Buffer Ready Request Served Interrupt.
• 1 = Indicates that a Buffer Ready request was cleared.
This bit can be cleared by writing to the respective bit in the ICR.
RX FIFO-0 Watermark Full Interrupt (Sequential/FIFO Mode).
• 1 = Indicates that RX FIFO-0 is full based on watermark
programming.
The interrupt continues to assert as long as the RX FIFO-0 Fill Level is
above RX FIFO-0 Full watermark.
This bit can be cleared by writing to the respective bit in the ICR.
Wake-Up Interrupt
• 1 = Indicates that the core entered Normal mode from Sleep mode.
This bit can be cleared by writing to the respective bit in the ICR. This
bit is also cleared when a 0 is written to the CEN bit in the SRR.
Sleep Interrupt.
• 1 = Indicates that the CAN core entered Sleep mode.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
Bus-Off Interrupt.
• 1 = Indicates that the CAN core entered the Bus-Off state.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
Error Interrupt.
• 1 = Indicates that an error occurred during message transmission or
8ERRORR0
7Reserved–0Reserved.
6RXFOFLWR 0
5TSCNT_OFLWR0
4RXOK(1)R0
reception.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
• 1 = Indicates that a message has been lost. This condition occurs
when a new message with ID matching to RX FIFO-0 is received and
the RX FIFO-0 is full.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
Timestamp Counter Overflow Interrupt.
• 1 = Indicates that Timestamp counter rolled over (from 0xffff to 0x0).
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
New Message Received Interrupt
• 1 = Indicates that a message was received successfully and stored
into the RX FIFO-0 or RX FIFO-1 or RX Mailbox buffer.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
CAN FD v2.024
PG223 December 5, 2018www.xilinx.com
Table 2-12:Interrupt Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
3BSFRDR0
2PEER0
1TXOK(1)R0
0ARBLSTR0
Notes:
1. In Loopback mode, both TXOK and RXOK bits are set. The RXOK bit is set before the TXOK bit.
Default
Value
Description
Bus-Off Recovery Done Interrupt.
• 1 = Indicates that the core recovered from Bus-Off state.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
Protocol Exception Event Interrupt.
• 1 = Indicates that the core (CAN FD receive r) has detected PEE event.
This bit can be cleared by writing to the respective bit in the ICR.
This bit is also cleared when a 0 is written to the CEN bit in the SRR.
Transmission Successful Interrupt.
• 1 = Indicates that a message was transmitted successfully.
This bit can be cleared by writing to the respective bit in the ICR. This
bit is also cleared when a 0 is written to the CEN bit in the SRR.
Arbitration Lost Interrupt.
• 1 = Indicates that arbitration was lost during message transmission.
This bit can be cleared by writing to the respective bit in the ICR. This
bit is also cleared when a 0 is written to the CEN bit in the SRR.
The Interrupt Clear register (ICR) is used to clear interrupt status bits in the ISR register.
Table 2-14:Interrupt Clear Register
BitsNameAccess
31CTXEWMFLLW0
30CTXEOFLWW0
17CRXMNFW0
16
CRXBOFLW/
CRXFWMFLL_1
Default
Value
W0
Description
• 1 = Clears TX Event FIFO Watermark Full interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears TX Event FIFO Overflow interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears RX Match Not Finished interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Cle ars RX Buffer Overflow inte rrupt statu s bit (Mailbox mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears RX FIFO-1 Watermark Full interrupt status bit
(Sequential/FIFO Mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
CAN FD v2.027
PG223 December 5, 2018www.xilinx.com
Table 2-14:Interrupt Clear Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
15
14CTXCRSW0
13CTXRRSW0
12CRXFWMFLLW0
11CWKUPW0
CRXRBF/
CRXFWMFLL_1
Default
W0
Value
Description
• 1 = Clears RX Buffer Bull Interrupt status bit (Mailbox mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears RX FIFO-1 Overflow interrupt status bit (Sequential/
FIFO Mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears TX Cancellation Request Served Interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears TX Buffer Ready Request Served Interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears RX FIFO-0 Watermark Full interrupt status bit
(Sequential/FIFO Mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Wake-Up interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Sleep interrupt status bit.
10CSLPW0
9CBSOFFW0
8CERRORW0
7Reserved–0Reserved.
6CRFXOFLWW0
5ETSCNT_OFLWW 0
4CRXOKW0
3CBSFRDW0
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Bus-Off interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Error interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears RX FIFO-0 Overflow interrupt status bit (Sequential/
FIFO Mode).
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Timestamp Counter Overflow Interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads always 0.
• 1 = Clears New Message Received interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Bus-Off Recovery Done interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
CAN FD v2.028
PG223 December 5, 2018www.xilinx.com
Table 2-14:Interrupt Clear Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
2CPEEW0
1CTXOKW0• 1 = Clears Transmission Successful interrupt status bit.
0CARBLOSTW0
Default
Value
Description
• 1 = Clears Protocol Exception Event interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
• 1 = Clears Arbitration Lost interrupt status bit.
Writing a 1 to this bit clears the respective bit in the ISR. Reads
always 0.
Timestamp Register (Address Offset + 0x0028)
A 16-bit free running counter increments once every sixteen CAN clock cycles. A timestamp
is captured after the SOF bit; that is, when the ID field starts on the CAN bus. It is stamped
in DLC field of the message element when frame is successfully received or transmitted. The
timestamp counter can be reset by software. There is no register bit to indicate counter
rollover.
Table 2-15:Timestamp Register
BitsNameAccess
Default
Value
Description
Timestamp Counter Value.
31:16TIMESTAMP_CNT[15:0]R0
15:1Reserved–0Reserved
0CTSW0
This Status field gives running value of the timestamp counter.
This field is cleared when a 0 is written to the CEN bit in the
SRR.
Clear Timestamp Counter.
Internal free running counter is cleared to 0 when CTS = 1.
This bit only needs to be written once with a 1 to clear the
counter.
The bit always reads as 0.
Data Phase Baud Rate Prescaler Register (Address Offset + 0x0088)
IMPORTANT: The following boundary conditions are imposed on sum of measured loop delay and TDC
Offset:
Measured loop delay + TDCOFF < 3 bit times in the data phase
Default
Value
Description
Transmitter Delay Compensation Offset
Thi s offs et is s peci f ied i n CAN c lock c ycles and i s adde d to th e measured
transmitter delay to place the Secondary Sample Point (SSP) at
appropriate position (for example, set this to half data bit time in terms
of CAN clock cycles to place SSP in the middle of the data bit).
This bit can be written only when CEN bit in SRR is 0.
Data Phase Baud Rate Prescaler
These bits indicate the prescaler value for Data Bit Timing as specified
in the CAN FD standard.
The actual value is one more than the value written to the register.
This bit can be written only when CEN bit in SRR is 0.
Ensure that the boundary condition is respected while programming the offset and data
phase bit rate. In case this sum exceeds 127 CAN clock periods, the maximum value of 127
CAN clock periods is used by the core for transmitter delay compensation.
Note:
If loop delay is < 1 data phase bit time, then TDC/SSP method is not needed.
Data Phase Bit Timing Register (Address Offset + 0x008C)
Table 2-17:Data Phase Bit Timing Register
BitsNameAccess
31:20Reserved–0Reserved
19:16DP_SJW[3:0]R/W0
15:12Reserved–0Reserved
11:8DP_TS2[3:0]R/W0
Default
Val ue
Data Phase Synchronization Jump Width
Indicates the Synchronization Jump Width as specified in the CAN FD
standard for Data Bit Timing.
The actual value is one more than the value written to the register.
This bit can be written only when CEN bit in SRR is 0.
Data Phase Time Segment 2
Indicates the Phase Segment 2 as specified in the CAN FD standard for
Data Bit Timing.
The actual value is one more than the value written to the register.
This bit can be written only when CEN bit in SRR is 0.
Description
CAN FD v2.030
PG223 December 5, 2018www.xilinx.com
Table 2-17:Data Phase Bit Timing Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
7:5Reserved–0Reserved
4:0DP_TS1[4:0]R/W0
Default
Val ue
Data Phase Time Segment 1
Indicates the Sum of Propagation Segment and Phase Segment 1 as
specified in the CAN FD standard for Data Bit Timing.
The actual value is one more than the value written to the register.
This bit can be written only when CEN bit in SRR is 0.
These bits exist based on the number of TX buffers.
Note:
TX Buffer_0 Ready Request
This is control bit corresponds to TB0 message in TX block
RAM.
Host writes 1 to indicate buffer is ready for transmission.
Core clears this bit when:
• Buffer transmission is completed on CAN Bus
• If core is in DAR mode, then after one transmission
attempt on the CAN bus [either successful or
unsuccessful (that is, arbitration lost or error)]
• If message is cancelled due to cancellation request
• Any combination of the above three.
Host writes to this bit are ignored when this bit is 1.
Note:
This register remains in reset when SNOOP mode is
enabled.
Notes:
1. Host can set transmission requests for multiple buffers in one write to this register.
2. Write with any value to this register triggers buffer scheduler to redo the scheduling round to find winning buffer
(exceptions: when Transfer Layer is in 3-bit Intermission space without locked buffer or if previous scheduling round is
already running. In those situation, buffer scheduler trigger is postponed till the event is over).
CAN FD v2.031
PG223 December 5, 2018www.xilinx.com
IMPORTANT: Unnecessary writes to this register might reduce core throughput on the CAN bus. Ensure
this register is written only when it is required.
These bits exist based on the number of TX buffers.
Description
These bits exist based on the number of TX buffers.
Note:
7CR7
6CR6
5CR5
4CR4
3CR3
2CR2
1CR1
0CR0
Notes:
1. Host can set cancellation requests for multiple buffers in one write to this register.
R/W, Host writes 1
and core clears
TX Buffer_0 Cancel Request
This is cancellation request bit corresponds to RR0 bit in TRR
register.
Host writes 1 to indicate cancellation request of corresponding
buffer ready request (that is, RR0 bit in TRR register). The core
clears this bit when cancellation request is completed.
Host writes to this bit are ignored if CR0 is 1 or RR0 bit of TRR
register is 0.
If the b uffe r is alre ady l ocke d for transmission by Transfer Layer
0
then cancellation is performed at the end of transmission cycle
irrespective whether frame transmitted successfully or failed.
Tha t is, i f mess age is faile d due t o arb i trat ion lo ss or a ny err or,
then the message is cancelled (no retransmission attempt) and
cancellation request is cleared. Along with RR0 bit this is
cleared.
If message is transmitted successfully, then RR0 bit clears and
cancellation request is cleared anyway.
If internal buffer scheduling round is in progress, then
Note:
cancellation consideration is postponed till it is over.
CAN FD v2.032
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
IMPORTANT: Performing unnecessary cancellation of TX buffers might reduce core throughput on the
CAN bus. Ensure that buffer cancellation is requested only when it is required.
TX Event FIFO Full Watermark
TX Event FIFO generates FULL interrupt based on
the value programmed in this field.
Set it within (1-31) range.
The TX FIFO Full Watermark interrupt in the ISR
register continues to assert as long as the TX Event
FIFO Fill Level is above TX Event FIFO Full
watermark.
This field can be written to only when CEN bit in
SRR is 0.
CAN FD v2.034
PG223 December 5, 2018www.xilinx.com
31:5Reserved-0Reserved.
RX Buffer Control Status Register 0 (Address Offset + 0x00B0) (0 to 15 RX
SendFeedback
Mailbox Buffers)
Table 2-24:RX Buffer Control Status Register 0
Chapter 2: Product Specification
BitsNameAccess
31CSB15
::
18CSB2
17CSB1
16CSB0
15HCB15
::
2HCB2
1HCB1
0HCB0
Write 1
to Clear
R/W0
Default
Value
0
DescriptionCombined Meaning of CSBx:HCBx
Core Status bit for RX Buffer0
1 = Indicates buffer is full,
that is the core has received
message in this buffer
0 = buffer is not full
Host clears this bit by writing
1.
This description is valid for
CSB0.
For CSB1 to CSB15,
description similar to CSB0.
Host Control bit for RX
Buffer0
1 = Indicates buffer is active,
that is ID Field of RB0 buffer
and corresponding Mask
register are programmed by
Host and this buffer can
receive message.
0 = buffer is inactive
Host might change this bit
anytime.
This description is valid for
HCB0.
For HCB1 to HCB15,
description similar to HCB0.
CSBx:HCBx = “00” ->
Buffer is inactive (it is not considered in ID
match process).
CSBx:HCBx = “01” ->
Buffer is active (it can receive message if
receive ID matches with buffer ID).
CSBx:HCBx = “11” ->
Buffer is full (it has received message)
CSBx:HCBx = “10” ->
Buffer is invalid. This condition can happen
when core updates CS0 bit to indicate
Buffer is full and at t he s ame time Host tries
to make Buffer Inactive.
When changing status of a Buffer from
Note:
active to inactive, Host should verify the update
by read back (to check if buffer status has
changed to Invalid due to core indicating buffer
full at the same time).
Note: Full(11) -> Active(01) or Inactive(00) can
or c ann ot b e ta ken into acc oun t in cur ren t ma tch
process if running.
Note: Inactive(00) -> Active(01) can or cannot
be tak en int o acco unt in current match process if
running.
Note: Invalid buffers do not participate in ID
match process.
Notes:
1. This register space is reserved for RX sequential/FIFO buffer mode. Write has no effect and read returns 0.
CAN FD v2.035
PG223 December 5, 2018www.xilinx.com
RX Buffer Control Status Register 1 (Address Offset + 0x00B4) (16 to 31 RX
Mailbox Buffers)
Description similar to Table2-24, page35.
Note:
buffers are 16. When reserved, write has no effect and read returns 0.
This register space is reserved for RX Sequential/FIFO mode or when number of RX mailbox
Chapter 2: Product Specification
SendFeedback
RX Buffer Control Status Register 2 (Address Offset + 0x00B8) (32 to 48 RX
Mailbox Buffers)
Description similar as Table2-24, page35.
Note:
mailbox buffers is 16/32. When reserved, write has no effect and read returns 0.
This register space is reserved for RX Sequential/FIFO mode or when the number of RX
In RX Sequential/FIFO buffer mode, the Acceptance Filter (Control) register (AFR) defines
which acceptance filters to use. Each Acceptance Filter ID register (AFIR) and Acceptance
Filter Mask register (AFMR) pair is associated with a UAF bit.
•When the UAF bit is 1, the corresponding acceptance filter pair is used for acceptance
filtering. When the UAF bit is 0, the corresponding acceptance filter pair is not used for
acceptance filtering.
•To modify an acceptance filter pair in Normal mode, the corresponding UAF bit in this
register must be set to 0.
•After the acceptance filter is modified, the corresponding UAF bit must be set to 1.
•If all UAF bits are set to 0, the received messages are not stored in the RX Sequential/
FIFO buffers.
•If the UAF bits are changed from a 1 to 0 during reception of a message, then that
message might or might not be stored.
Table 2-27:Acceptance Filter (Control) Register
BitsNameAccess
31UAF31R/W0
30UAF30R/W0
29UAF29R/W0
28UAF28R/W0
27UAF27R/W0
Default
Value
Description
Use Acceptance Filter Mask Pair 31.
Description same as UAF0.
Use Acceptance Filter Mask Pair 30.
Description same as UAF0.
Use Acceptance Filter Mask Pair 29.
Description same as UAF0.
Use Acceptance Filter Mask Pair 28.
Description same as UAF0.
Use Acceptance Filter Mask Pair 27.
Description same as UAF0.
Use Acceptance Filter Mask Pair 7.
Description same as UAF0.
Use Acceptance Filter Mask Pair 6.
Description same as UAF0.
Use Acceptance Filter Mask Pair 5.
Description same as UAF0.
Use Acceptance Filter Mask Pair 4.
Description same as UAF0.
Use Acceptance Filter Mask Pair 3.
Description same as UAF0.
Use Acceptance Filter Mask Pair 2.
Description same as UAF0.
Use Acceptance Filter Mask Pair 1.
Description same as UAF0.
Use Acceptance Filter Mask Pair 0.
Enables the use of acceptance filter mask pair 0.
• 1 = Indicates Acceptance Filter Mask register 0 (AFMR0 or
M0) and Acceptance Filter ID register 0 (AFID0 or F0) pair is
used for acceptance filtering.
• 0 = Indicates AFMR0 and AFID0 pair is not used for
acceptance filtering.
Notes:
1. This register space is reserved for RX Mailbox buffer mode. Write has no effect and read returns 0.
RX FIFO Status Register (Address Offset + 0x00E8)
Table 2-28:RX FIFO Status Register
BitsNameAccess
31Reserved–0Reserved.
30:24FL_1[6:0]R0
Default
Val ue
Description
RX FIFO-1 Fill Level (0-64).
Note:
This field is reserved if RX FIFO-1 is not enabled.
Number of stored messages in RX FIFO-1 starting from the
read index (RI) given in this register.
For example, if FL = 0x5 and RI = 0x2 then RX FIFO-1 has five
messages starting from Read Index 2 (Start address 0x4190).
FL is maintained if CEN bit is cleared.
FL gets reset to 0 if soft or hard reset is asserted.
CAN FD v2.039
PG223 December 5, 2018www.xilinx.com
Table 2-28:RX FIFO Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
23IRI_1W0
22Reserved–0Reserved.
21:16RI_1[5:0]R0
Default
Val ue
RX FIFO-1 Increment Read Index by 1.
Note:
Wi th each Host writes set tin g th is bit as 1, core increments the
Read Index (RI) field by 1 and updates the fill level (that is,
decrements it by 1). If the FILL level is 0, setting this bit has no
effect. The FILL level might remain unchanged when IRI is
written if the core is finishing a successful receive and is
incrementing the internal write index.
This bit always read as 0.
RX FIFO-1 Read Index (0 to 63).
Note:
Each time the IRI bit is set, the core increments the read index
by + 1 (provided FILL level is not 0) and maintains it for Host
to access next available message.
• RI = 0x0 -> Next message read starts from location =
0x4100.
• RI = 0x1 -> Next message read starts from location =
0x4148.
RI is maintained if CEN bit is cleared.
RI gets reset to 0 if soft or hard reset is asserted.
Description
This field is reserved if RX FIFO-1 is not enabled.
This field is reserved if RX FIFO-1 is not enabled.
15Reserved–0Reserved.
RX FIFO-1 Fill Level (0 to 64).
The number of stored messages in Receive FIFO 0 starting
from the RI (Read Index) is given in this register.
14:8FL[6:0]R0
7IRI W0
6Reserved–0Reserved.
For example, if FL = 0x5 and RI = 0x2, then RX FIFO-0 has five
messages starting from Read Index 2 (Start address 0x4190).
FL is maintained if CEN bit is cleared.
FL is reset to 0 if a soft or hard reset is asserted.
RX FIFO-0 Increment Read Index by 1.
Wi th each Host writes set tin g th is bit as 1, the core increme nts
the Read Index (RI field) by 1 and updates fill level (that is,
decrement by 1).
If FILL level is 0, setting this bit has no effect. The FILL level
might remain unchanged when IRI is written if core is just
finishing a successful receive and incrementing internal write
index.
This bit always read as 0.
CAN FD v2.040
PG223 December 5, 2018www.xilinx.com
Table 2-28:RX FIFO Status Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsNameAccess
5:0RIR0
Notes:
1. This register space is reserved for RX Mailbox buffer mode. Write has no effect and read returns 0.
Default
Val ue
Description
RX FIFO-0 Read Index (0 to 63).
Each time IRI bit is set, core increments read index by + 1
(provided FILL level is not 0) and maintains it for Host to access
next available message.
• RI = 0x0 -> Next message read starts from location =
0x2100.
• RI = 0x1 -> Next message read starts from location =
0x2148.
RI is maintained if CEN bit is cleared.
RI gets reset to 0 if soft or hard reset is asserted.
0x0A04F0/AFIR0Read, WriteAcceptance Filter ID Registers
Reserved if number of TX
buffers = 8 or 16. In this case,
core does not allow any write
access to this address space
and read access returns 0.
ID Filter Mask pair 0
CAN FD v2.044
PG223 December 5, 2018www.xilinx.com
Table 2-30:CAN FD TX Message Space (Cont’d)
SendFeedback
Chapter 2: Product Specification
Start
Address
0x0A08M1/AFMR1Read, Write
0x0A0CF1/AFIR1Read, Write
0x0A10-
0x0AFC
Notes:
1. Read from uninitialized memory location might return X or invalid data. Asserting a soft or hard reset does not
clear block RAM locations.
2. Each TB is linked to a bit in TRR register. Core a ccess TB elements inside TX block RAM only if respective TRR bit is
se t. After se tt ing TRR b it , Host shou ld not acce ss the TX me ss age elements until TRR is cleared by the core to avoid
memory collision issues.
25ReservedN/AN/AReserved. Write to this field should be 0.
24EFCControlN/A
Control/
Status
Default
Value
Description
Data Length Code
This is the data length code of the control field of the CAN
and CAN FD frame.
Extended Data Length/FD Frame Format
This bit distinguishes between CAN format and CAN FD
format frames.
• 1 = CAN FD format frame.
• 0 = CAN format frame.
Bit Rate Switch
The BRS bit decides whether the bit rat e is switched inside a
CAN FD format frame or not (pr ovided BRS D bit is not se t in
MSR register).
• 1 = Bit rate is switched from the standard bit rate of the
Arbitration phase to the preconfigured alternate bit rate
of the Data phase inside a CAN FD frame.
• 0 = Bit rate is not switched inside a CAN FD frame.
Note:
BRS does not exist in CAN format frames and should be set
to 0.
Event FIFO Control.
• 0 = Don't store TX events.
• 1 = Store TX Events.
CAN FD v2.046
PG223 December 5, 2018www.xilinx.com
Table 2-32:TB DLC Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsName
23:16MMControlN/A
15:0ReservedN/AN/AReserved. Write to this field should be 0.
Control/
Status
Default
Value
Description
Written by CPU during TX Buffer configuration. Copied into
Tx Event FIFO element for identification of TX message
status.
Standard Message ID.
The Identifier portion for a Standard Frame is 11 bits.
These bits indicate the Standard Frame ID.
Th is field i s valid for both CAN and CA N FD Stan dard and
Extended Frames.
20SRR/RTR/RRSStatusN/A
19IDEStatusN/A
Substitute Remote Transmission Request
For Extended CAN frames and Extended CAN FD frame
this bit is transmitted at SRR position of the respective
frame and must be set as 1. For Standard CAN FD frames,
this bit is transmitted at the RRS position of the frame
and must be set as 0. This bit differentiates between
standard CAN data frames and standard CAN remote
frames as the following:
• 1 = Indicates that the message frame is a Standard
Remote CAN Frame.
• 0 = Indicates that the message frame is a Standard
Data CAN Frame.
There are no CAN FD remote frames.
Note:
Identifier Extension
This bit differentiates between frames using the Standard
Identifier and those using the Extended Identifier.
Valid for both CAN and CAN FD Standard and Extended
Frames.
• 1 = Indicates the use of an Extended Message
Identifier.
• 0 = Indicates the use of a Standard Message Identifier.
CAN FD v2.048
PG223 December 5, 2018www.xilinx.com
Table 2-35:TXE FIFO TB ID Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsName
18:1ID[17:0]StatusN/A
0RTR/RRSStatusN/A
Control/
Status
Default
Value
Description
Extended Message ID.
This
f
ield indicates the Extended
Valid only for Extended CAN and CAN FD frames.
Fo r Standard CAN and CAN FD fra mes, writes to this
should be 0.
Remote Transmission Request.
This bit differentiates between CAN extended data
frames and CAN extended remote frames.
• 1 = Indicates the message frame is a CAN Remote
Frame.
• 0 = Indicates the message frame is a CAN Data Frame.
For Ex te nd ed CAN FD fr am es this bit i s t ra nsmitted at RR S
position of the frame and must be set as 0.
For Standard CAN and CAN FD frames, writes to this bit
Data Length Code.
This is the data length code of the control field of the CAN
and CAN FD frame.
Extended Data Length/FD Frame Format.
This bit distinguishes between CAN format and CAN FD
format frames.
• 1 = CAN FD format frame.
• 0 = CAN format frame.
Bit Rate Switch.
The BRS bit decides whether the bit rate is switched inside a
CAN FD format frame or not (provided the BRSD bit is not
set in the MSR register).
• 1 = Bit rate is switched from the standard bit rate of the
Arbitration phase to the preconfigured alternate bit rate
of the Data phase inside a CAN FD frame
• 0 = Bit rate is not switched inside a CAN FD frame.
Note:
BRS does not exist in CAN format frames and should be set
to 0.
CAN FD v2.049
PG223 December 5, 2018www.xilinx.com
Table 2-36:TXE FIFO TB DLC Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsName
25:24ETStatusN/A
23:16MMStatusN/A
15:0TimestampStatusN/A
Control/
Status
Default
Value
Description
Event Type.
• 11 -> Transmitted.
• 01 -> Transmitted in spite of cancellation request or DAR
mode transmissions.
• 00 -> Reserved.
• 10 -> Reserved.
Message Marker.
Written by CPU during TX Buffer configuration. Copied into
Tx Event FIFO element for identification of TX message
status.
Tim estam p capt ured a fter S OF bi t . Thi s is wr itten by the core
for status purpose for successfully transmitted message.
CAN FD RX Message Space (Sequential/FIFO Buffers-RX FIFO-0)
Register Descriptions
Data Length Code
Received data length code of the control field of the CAN
and CAN FD frame.
Extended Data Length/FD Frame Format
This bit distinguishes between CAN format and CAN FD
format frames.
• 1 = Received frame is a CAN FD format frame.
• 0 = Received frame is a CAN format frame.
CAN FD v2.054
PG223 December 5, 2018www.xilinx.com
Table 2-40:RB DLC Register (Cont’d)
SendFeedback
Chapter 2: Product Specification
BitsName
26BRSStatusN/A
25ESIStatusN/A
24:21ReservedN/AN/AReserved. Read from this field return 0.
20:16
Matched_Filter
_Index[4:0]
Control/
Status
StatusN/A
Default
Value
Description
Bit Rate Switch
The BRS bit provides status whether the bit rate was
switched inside the received CAN FD format frame or not.
• 1 = Bit rate was switched from the standard bit rate of
th e ARBITRATION PHASE to the preconfi gured alt ernate
bit rate of the DATA PHASE inside the received CAN FD
frame.
• 0 = Bit rate w as no t swit c hed i nside the re ceiv e d CAN FD
frame.
This bit has no meaning if received frame is CAN frame.
Error State Indicator/
The ESI bit provides the error status of the sender/
transmitter of the message.
• 1 = Received frame was sent by error passive transmitter
• 0 = Received frame was sent by error active transmitter
This bit has no meaning if the received frame is a CAN
frame.
This status field is written by the core in RX FIFO mode to
provide the matched filter index for received message.
Note:
This field is Reserved in RX Mailbox mode and read from
this field returns 0.
15:0TimestampStatusN/A
Timestamp captured after SOF bit. This is written by the
core for status purpose for successfully received message.
Only required DW locations needs to be read as per FDF and DLC field for a given message.
Acceptance Filters
There are 32 acceptance filters in RX Sequential/FIFO mode. Each acceptance filter has an
Acceptance Filter Mask register and an Acceptance Filter ID register (which is controlled by
the Acceptance Filter (Control) register bits described in Table2-27, page37).
Acceptance Filtering when RX FIFO-1 is absent or disabled
Acceptance filtering is performed in this sequence:
1. The incoming
2. The Acceptance Filter ID register is also masked with the bits in the Acceptance Filter
Mask register.
3. Both resulting values are compared.
4. If both these values are equal, the message is stored in RX FIFO-0.
5. Acceptance
passes through any acceptance
Note:
RXFP as 'd31 (in the RX FIFO Watermark register).
RX FIFO-1 can be disabled (that is, stop routing messages to RX FIFO-1) by programming
Identif
f
iltering is processed by each of the
ier is masked with the bits in the Acceptance Filter Mask register.
f
ilter, the message is stored in RX FIFO-0.
def
ined filters. If the incoming
identif
ier
Acceptance Filtering when RX FIFO-1 is enabled
In this case, the RXFP field (in the RX FIFO Watermark register) along with the Acceptance
Filter (Control) register determines whether received messages are stored in RX FIFO-0 or
RX FIFO-1. In this case, the RXFP field should be less than 'd31. The incoming Identifier is
masked with the bits in the Acceptance Filter Mask register.
CAN FD v2.056
PG223 December 5, 2018www.xilinx.com
6. The Acceptance Filter ID register is also masked with the bits in the Acceptance Filter
Mask register.
8. If both these values are equal and the matched filter index is less than or equal to the
RXFP field, the message is stored in RX FIFO-0.
9. Else, if both the se values are equal and the ma tched filter index is greater than the RXFP
field, the message is stored in RX FIFO-1.
The ID match process is a sequential process. It starts from the lowest enabled filter and
stops at the first match. Therefore, if an incoming message fulfills condition 4 but RX FIFO-0
is full, the message is dropped (irrespective of RX FIFO-1 status) and RX FIFO-0 overflow is
indicated.
Similarly, if the incoming message fulfills condition 5 and RX FIFO-1 is full, the message is
dropped (irrespective of RX FIFO-0 status) and RX FIFO-1 overflow is indicated. See
Figure 2-3:Message Drop (RX FIFO-0 Fulland Match = Yes)
Figure 2-4:Message Drop (RX FIFO-1 Full and Match = Yes)
Note: If all UAF bits are set to 0, then the received messages are not stored in any RX FIFO.
IMPORTANT: Ensure proper programming of the IDE bit for standard and extended frames in the Mask
register and ID register. If you set the IDE bit in the Mask register as 0, it is considered to be a standard
frame ID check only and therefore if Standard ID bits of the incoming message match with the
respective bits of Filter ID (after applying Mask register bits), the message is stored.
The Acceptance Filter ID registers (AFIR) contain Identifier bits, which are used for
acceptance filtering. All bit fields (AIID[28:18], AISRR, AIIDE, AIID[17:0], and AIRTR) need to
be defined for Extended frames.
ier.
CAN FD v2.059
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
Only AIID[28:18], AISRR, and AIIDE need to be defined for Standard frames. AIID[17:0] and
AIRTR should be written as 0 for Standard frames.
Table 2-43:Acceptance Filter ID Registers
BitsNameAccess
31:21AIID [28:18]R/W0Standard Message ID. Standard
20AISRRR/W0
19AIIDER/W0
18:1AIID[17:0]R/W0Extended Message ID. Extended
0AIRTRR/W0Remote Transmission Request. RTR bit for Extended frames.
Default
Value
Description
Identif
ier.
Substitute Remote Transmission Request. Indicates the
Remote Transmission Request bit for Standard frames.
Identif
ier Extension.
Differentiates between Standard and Extended frames.
Identif
ier.
CAN FD RX Message Space (Mailbox Buffers) Register
Descriptions
Table 2-44:CAN FD RX Message Space (Mailbox Buffers)
Start
Address
0x2100RB0-IDRead, WriteSee RB ID Register.
0x2104RB0-DLCRead, WriteSee RB DLC Register.
NameAccessDescriptionNotes
Mailbox Buffer Space
0x2108RB0-DW0Read, Write
0x210CRB0-DW1Read, Write
0x2110RB0-DW2Read, Write
0x2114RB0-DW3Read, Write
0x2118RB0-DW4Read, Write
0x211CRB0-DW5Read, Write
0x2120RB0-DW6Read, Write
0x2124RB0-DW7Read, Write
0x2128RB0-DW8Read, Write
0x212CRB0-DW9Read, Write
0x2130RB0-DW10Read, Write
0x2134RB0-DW11Read, Write
0x2138RB0-DW12Read, Write
0x213CRB0-DW13Read, Write
0x2140RB0-DW14Read, Write
0x2144RB0-DW15Read, Write
See RB DW0 Register.
RB0 Message space inside
memory mapped RX block
RAM.
Only required DW locations
for a given message needs to
be read (as per DLC field).
IMPORTANT: Ensure no
unintended writes are done
from Host interface to RX
block RAM space (core does
not block writes to RX block
RAM locations).
CAN FD v2.060
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
Table 2-44:CAN FD RX Message Space (Mailbox Buffers) (Cont’d)
Start
Address
0x2148-
0x218C
0x2190-
0x21D4
:
:
0x2538-
0x257C
0x2580-
0x25C4
0x25C8-
0x260C
:
:
0x29B8-
0x29FC
NameAccessDescriptionNotes
RB1 to RB15 Message Space
RB1Read, Write
RB2Read, Write
RB15Read, Write
RB16 to RB31 Message Space
RB16Read, Write
RB17Read, Write
RB31Read, Write
Reserved if number of RX
buffers = 16. In this case,
core does not allow any write
access to this address space
and read access returns 0.
0x2A00-
0x2A44
0x2A48-
0x2A8C
:
:
0x2E38-
0x2E7C
RB32 to RB47 Message Space
RB32Read, Write
RB33Read, Write
RB47Read, Write
Reserved if number of RX
buffers = 16 or 32. In this
case, core does not allow any
write access to this address
space and read access
returns 0.
CAN FD v2.061
PG223 December 5, 2018www.xilinx.com
Chapter 2: Product Specification
SendFeedback
Table 2-44:CAN FD RX Message Space (Mailbox Buffers) (Cont’d)
Start
Address
0x2F00MRB0Read, Write
0x2F04MRB1Read, Write
0x2F08MRB2Read, Write
0x2F0CMRB3Read, Write
0x2F10-
0x2FBC
0x2FC0-
0x2FFF
Notes:
1. Read from uninitialized memory location might return X or invalid data. Asserting a soft or hard reset does not
clear block RAM locations.
2. Message Buffer element resides in RX block RAM. Host should respect read access rules to avoid memory
collisions.
NameAccessDescriptionNotes
See Acceptance Filter Mask
Register
Mask for mailbox buffer RB0.
See Acceptance Filter Mask
MRB4-MRB47Read, Write
Reserved–
Register
Mask for mailbox buffer RB1.
See Acceptance Filter Mask
Register
Mask for mailbox buffer RB2.
See Acceptance Filter Mask
Register
Mask for mailbox buffer RB3.
See Acceptance Filter Mask
Register
Mask for mailbox buffer RB4
to RB47.
Reserved space. Write has no
effect. Read always returns 0.
MRB16 to MRB47 are valid
based on number of RX
buffers.
When R X bu ff ers is chosen as
16 or 32, core does not allow
any write access outside the
respective address space and
read access returns 0.
1. X-Control bit don’t care. Status bit does not mean anything.
2. Transition to Bus-Off state depends on Transmit Error Count value as per standard specification. Recovery from Bus-Off state
depends on SBR and ABR bit settings in the MSR register (as per respective bit behavior description). Bus-Off Recovery can
be tra cked t hro ug h st atus b it B SFR_CON FIG in SR r egi ster a nd R EC fie ld in E CR r egist er. Entry and exit f rom Bu s-O ff sta te c an
also generate interrupt.
3. Transition to CAN FD Protocol Exception State (PEE) depends on the DPEE bit in MSR register. The core enters and exits PEE
state as per ISO standard specification and this is reflected by status bit PEE_CONFIG in the SR register. Entry to PEE state
can also generate interrupt.
0100 0 001 0 0Sleep
1
1000 0 010 0 0Loopback
0X0 0 1 000 X 0
0XX0 0 100 X XPEE
Bus-Off
Recovery
(2)
(3)
Configuration Mode
The core enters Configuration mode, irrespective of the operation mode, when any of the
following actions are performed:
•Writing a 0 to the CEN bit in the SRR register.
CAN FD v2.065
PG223 December 5, 2018www.xilinx.com
•Writing a 1 to the SRST bit in the SRR register.
•Driving a 0 on the Reset input.
After reset, the core exits Configuration mode after the CEN bit is set and 11 consecutive
nominal recessive bits are seen on the CAN bus.
Chapter 3: Designing with the Core
SendFeedback
Configuration Mode Characteristics
The CAN FD core has the following Configuration mode characteristics:
•The Controller loses synchronization with the CAN bus and drives a constant recessive
bit on the TX line.
•The Error Counter register is reset.
•The Error Status register is reset.
•The BTR and BRPR registers can be modified.
•The CONFIG bit in the status register is 1.
•The core does not receive any new messages.
•The core does not transmit any messages.
•All configuration registers are accessible.
•If there are messages pending for transmission when CEN is written 0, they are
preserved (unless cancelled) and transmitted when normal operation is resumed.
•Message cancellation is permitted.
•New messages can be added for transmission (provided the SNOOP bit is not set in the
MSR register).
•If there are new received messages available, they are preserved until the host reads
them.
•The Interrupt Status register bits ARBLST, TXOK, RXOK, RXOFLW, RXOFLW_1, ERROR,
BSOFF, SLP, and WKUP are cleared.
•Interrupt Status register bits TXTRS and TXCRS can be set due to cancellation.
•Interrupts are generated if the corresponding bits in the IER are 1.
•When in Configuration mode, the Controller stays in this mode until the CEN bit in the
SRR register is set to 1.
•After the CEN bit is set to 1, the Controller waits for a sequence of 11 nominal recessive
bits before exiting Configuration mode.
•CAN FD enters Normal, Loopback, Snoop or Sleep modes from Configuration mode,
depending on the LBACK, SNOOP, and SLEEP bits in the MSR Register.
CAN FD v2.066
PG223 December 5, 2018www.xilinx.com
Chapter 3: Designing with the Core
SendFeedback
Normal Mode
IMPORTANT: The core can enter Normal mode only if Sleep, Loopback, and Snoop bits are 0 in the MSR
register.
In Normal mode, the core participates in bus communication by transmitting and receiving
messages.
Note:
In Normal mode, core does not store its own transmitted messages.
(Internal) Loopback Mode
IMPORTANT: This mode is used for diagnostic purposes.
In Loopback mode, the core rece ives any messages that it transmits by an internal loopback
to the RX line and acknowledges them. Received messages are stored in receive buffers
based on ID match result. The core stores its own transmitted message (based on ID match
result) in mailbox buffers or sequential/FIFO buffers in Loopback mode.
It does not participate in normal bus communication and does not receive any messages
transmitted by other CAN nodes (the external TX line is ignored). It drives a recessive
bitstream on the CAN bus (external TX line).
Sleep Mode
The core enters Sleep mode from Configuration or Normal mode when the SLEEP bit is 1
in the MSR register, the CAN bus is idle, and there are no pending transmission requests.
The core enters Configuration mode when any configuration condition is satisfied. The core
enters Normal mode (clearing the SLEEP request bit in the MSR register and also clearing
the corresponding status bit) under the following (wake-up) conditions:
CAN FD v2.067
PG223 December 5, 2018www.xilinx.com
•Whenever the SLEEP bit is set to 0.
•Whenever the SLEEP bit is 1, and bus activity is detected.
•Whenever there is a new message for transmission.
Interrupts are generated when the core enters Sleep mode or wakes up from Sleep mode.
Chapter 3: Designing with the Core
SendFeedback
Snoop (Bus Monitoring) Mode
IMPORTANT: This mode is used for diagnostic purposes.
The features of Snoop mode are as follows:
•The core transmits recessive bits onto the CAN bus.
•The core receives messages that are transmitted by other nodes but does not ACK.
Stores received messages based on programmed ID filtering.
•Error counters are disabled and cleared to 0. Reads to the Error Counter Register to
return 0.
RECOMMENDED: Xilinx recommends that Snoop mode is programmed only after system reset or
software reset.
Protocol Exception State
The CAN FD enters CAN FD Protocol Exception (PEE) state if it receives the res bit to be
recessive in the CAN FD frame (provided the DPEE bit is not set in the MSR register). It
comes out of this state after detecting a sequence of 11 nominal recessive bits on the CAN
bus and, as per protocol specification, transmit and receive error count remains unchanged
in this state.
Bus-Off Recovery State
The CAN FD enters Bus-Off state if the Transmit Error count reaches or exceeds its terminal
point. Recovery from Bus-Off states is governed by the auto-recovery (ABR) or manual
recovery (SBR) bit setting in the MSR register and is done according to protocol
specification.
Programming Model
This section covers the various configuration steps that must be performed to program the
CAN FD for operation. The following key configuration steps are detailed in this section:
1. Programming configuration registers to initialize the CAN FD based on the operating
mode.
CAN FD v2.068
PG223 December 5, 2018www.xilinx.com
2. Message transmission, cancellation, and reception.
Chapter 3: Designing with the Core
SendFeedback
Register Configuration Sequence
The following are steps to configure the CAN FD when the core is powered on or after
system or software reset.
1. Choose the operating mode:
Normal – Write 0s to the LBACK, SNOOP, and SLEEP bits in the MSR. Write required
°
value for BRS and DAR fields in the MSR register.
Sleep – Write 1 to the SLEEP bit in the MSR and 0 to the LBACK and SNOOP bits in
°
the MSR. Write required value for BRS and DAR fields in the MSR register.
Loopback – Write 1 to the LBACK bit in the MSR and 0 to the SLEEP and SNOOP
°
bits in the MSR. Write required value for BRS fields in the MSR register.
Snoop – Write 1 to the SNOOP bit in the MSR and 0 to the LBACK and SLEEP bits in
°
the MSR register.
2. Configure the Transfer Layer Configuration registers.
IMPORTANT: For proper operations, ensure that all CAN FD nodes in the network are programmed to
have the same Arbitration Phase bit rate, Data Phase bit rate, Arbitration Phase sample point position,
and Data Phase sample point position.
Program the Arbitration Phase (Nominal) Baud Rate Prescaler register and
°
Arbitration Phase (Nominal) Bit Timing register with the value calculated for the
particular arbitration phase bit rate.
Program the Data Phase Baud Rate Prescaler register and Data Phase Bit Timing
°
register with the value to achieve desired data phase bit rate.
-The Data Phase Bit Timing register also contains TDC control fields.
Note:
configured for the arbitration phase. The Transfer Layer Configuration Registers can be
changed only when the CEN bit in the SRR Register is 0.
IMPORTANT: Step 3 is only for Receive Sequential/FIFO mode.
The bit rate configured for the data phase must be higher than or equal to the bit rate
3. Configure the Acceptance Filter registers (AFR, AFMR, AFIR) to the following:
Write a 0 to the UAF bit in the register corresponding to the Acceptance Filter Mask
°
and the ID register pair to be configured.
Write the required mask information to the Acceptance Filter Mask register.
°
Write required ID information to the Acceptance Filter ID register.
°
Write 1 to the UAF bit corresponding to the Acceptance Filter Mask and ID register
°
pair.
CAN FD v2.069
PG223 December 5, 2018www.xilinx.com
Repeat the steps for each Acceptance Filter Mask and ID register pair.
°
Chapter 3: Designing with the Core
SendFeedback
If you want to enable RX FIFO-1, you need to arrange the Filter Mask and ID register
°
as per the requirement. The RXFP field in RX FIFO Watermark register also needs to
be set accordingly to a value less than 'd31.
IMPORTANT: Step #4 is only for Receive Mailbox mode.
4. Configure the Mask registers (MRB) for RX Mailbox buffers. Configure the RB-ID register
of the respective buffer and set the control bit in the RCS register to make the buffer
status Active.
5. Program the Interrupt Enable registers as per requirements.
6. Enable protocol controller by writing a 1 to the CEN bit in the SRR register.
After the occurrence of 11 consecutive recessive bits, the CAN FD clears the CONFIG bit
in the Status register to 0 and sets the appropriate Mode Status bit in the Status register.
RECOMMENDED: If the CEN bit is cleared during core operation, Xilinx recommends resetting the core
so that operation starts afresh. Also, the LBACK, SLEEP, and SNOOP bits should never be set to 1 at the
same time.
Message Transmission, Cancellation, and Reception
Transmission
All messages written in the TX buffer must follow the required message format for the ID,
DLC, and DW fields described earlier. Each RR bit of the TX Buffer Ready Request (TRR)
register corresponds to a message element in the TX block RAM.
TX – Host Actions
1. Poll the TRR register to check current pending transmission requests.
2. If all bits of the TRR register are set, a new transmission request can only be added if:
a. One or more buffer transmission requests are cancelled, or
b. One or more buffer transmissions complete.
3.If one or mo r e bits of t he TRR reg i ster are u nset/cle a r, a new transmission request can be
added as follows:
a. First, prepare one or more message elements in the TX block RAM (by writing valid
ID, DLC, and DW fields of each message element of the respective TX Buffer). If you
require event logging for this message element, set the EFC bit in the DLC field.
CAN FD v2.070
PG223 December 5, 2018www.xilinx.com
b. Enable interrupt generation as required.
c.Set corresponding TRR bit(s) to enable buffer ready requests. The Host can enable
many transmission requests in one write to the TRR register.
Chapter 3: Designing with the Core
SendFeedback
d. Wait for interrupt (if enabled) or poll the TRR register to gather the request status.
4. The CAN FD clears the TRR bit when a respective buffer request is completed (either due
to transmission, or to cancellation, or due to DAR mode transmission).
5. The Host might read the TX Event FIFO to know the message timestamps and the order
of transmissions.
Note:
bit in the ISR is set if the CAN FD loses bus arbitration while transmitting a message. The ERROR
bit in the ISR is set if the message transmission encountered any error.
The TXOK bit i n the ISR is set af ter the core success fully trans mits a message. The ARBLST
TX – Core Actions
1. The CAN FD figures out the next highest priority buffer to be transmitted. If two buffers
have the same ID, the buffer with the lower index is selected.
2. If enabled, it copies the ID and DLC fields to the TX Event FIFO and adds a message
timestamp and event type.
3. It clears the respective TRR bit when the transmission request is served (either by
successful transmission on the CAN bus, or due to Cancellation, or due to DAR-based
transmission).
4. If enabled through the IETRS and IER, the TXRRS bit is set in the ISR register and
interrupt is generated.
Notes
The CAN FD accesses message element space of a buffer in TX block RAM only if the
respective TRR bit is set. The Host must respect access rules to avoid memory collisions,
that is, after the Host sets a buffer ready request through the TRR register, it should not read
or write the respective message element space until the respective RR bit is in a clear/unset
state.
CAN FD v2.071
PG223 December 5, 2018www.xilinx.com
Transmit Cancellation
Each CR bit of the TX Buffer Cancel Request (TCR) register corresponds to a message
element in the TX block RAM (and therefore corresponds to an RR bit of the TRR register).
TC – Host Actions
1. Poll the TRR register to check current pending transmission requests.
2. Poll the TCR register to check current pending cancellation requests.
a. Transmit Cancellation for a buffer (TXB_i) can be requested only if there is a
corresponding pending transmission request set in TRR register.
b.If there is already a pending cancellation request for TXB_i, no action is required and
the Host should wait (by poll/interrupt) until the core serves a cancellation request
for TXB_i.
Chapter 3: Designing with the Core
SendFeedback
3. If the TXB_i buffer has a pending transmission request but no pending cancellation
request, Transmit Cancellation can be requested as follows:
a. Enable interrupt generation if/as required.
b. Set the required CR bit/bits of the TCR register. T h e H ost can request th e c a n cellation
of many buffers in one write to the TCR register.
c.Wait for interrupt or poll the TCR register to check the cancellation status.
4. The CAN FD clears the bit in the TCR register when the respective buffer transmit
cancellation request is completed.
5. The CAN FD also clears the corresponding bit in the TRR register when cancellation is
performed.
TC – Core Actions
1. The CAN FD performs the cancellation of a buffer immediately, except in the following
conditions:
a. When the buffer is locked by the Transfer Layer for transmission on the CAN bus. In
this case, cancellation is performed at the end of transmission irrespective of
whether the transmission succeeds or fails (arbitration loss or error).
b. When the core is performing a scheduling round to find out the next buffer for
transmission. In this case, cancellation is performed after the scheduling round is
over.
2. The CAN FD clears respective bits in the TCR and TRR registers when cancellation is
done.
3. If enabled through IETCS and IER, the TXRCS bit is set in the ISR register (when the core
clears the bit in the TCR register) and interrupt is generated.
Reception (Sequential Buffer/FIFO Mode)
Whenever a new message (that passes the required filtering) is stored into RX FIFOs, the
core updates the respective Fill Level field of the FSR register and sets the RXOK bit in the
ISR register.
RX – Host Actions
1. As per requirement, program the RX FIFO Watermark register to set Full Watermarks and
RXFP field (RX FIFO Watermark Register can be set/changed only when CEN = 0).
2. If required, enable RXOK and RX Overflow interrupt generation.
3. New message availability can be found by polling FSR register or by Watermark Full
interrupts indication.
CAN FD v2.072
PG223 December 5, 2018www.xilinx.com
4. Read a new message (from RX FIFO-0 or RX FIFO-1) starting from its respective Read
Index location (given in FSR register field).
Chapter 3: Designing with the Core
SendFeedback
5. After reading the message, write the FSR register by setting the respective IRI bit to 1.
This enables the core to increment the respective Read Index field by +1 and updates
the corresponding Fill Level in the FSR register. If Fill level is 0, setting IRI bit has no
effect.
6. Repeat steps 3 through 5 until all messages are read from either RX FIFO-0 or RX
FIFO-01.
RX – Core Actions
1. When a message is successfully received, the core writes the timestamp and matched
filtered index field of the received message element.
2. The CAN FD increments the Fill Level of its respective RX FIFO in the FSR register by 1
after every successful receive (without error and message passes filtering scheme).
3. The Fill Level is also updated by the core after the Host writes the IRI bit of respective RX
FIFO in the FSR register.
Filtering
Each acceptance filter pair has an Acceptance Filter Mask register and an Acceptance Filter
ID register. Each filter pair a has corresponding UAF bit to control enable/disable.
Filtering when RX FIFO-1 is absent or disabled
Filtering is performed in the following sequence:
1. The incoming
2. The Filter ID register is also masked with the bits in the Acceptance Filter Mask register.
3. Both resulting values are compared.
4. If both these values are equal, then the message is stored in RX FIFO-0.
F
iltering is processed by each of the
5.
through any
Note:
RXFP as 'd31 (in RX FIFO Watermark register). See Register description for more detail.
RX FIFO-1 can be disabled (that is, stop routing messages to RX FIFO-1) by programming
Identif
f
ilter, the message is stored in RX FIFO-0.
ier is masked with the bits in the Acceptance Filter Mask register.
def
ined filters. If the incoming
identif
ier passes
Filtering when RX FIFO-1 is enabled
In this case, the RXFP field (in the RX FIFO Watermark register) along with the Filter
(Control) register determines whether received messages are stored in RX FIFO-0 or RX
FIFO-1. In this case, the RXFP field must be less than 'd31.
CAN FD v2.073
PG223 December 5, 2018www.xilinx.com
1. The incoming Identifier is masked with the bits in the Acceptance Filter Mask register.
2. The Filter ID register is also masked with the bits in the Acceptance Filter Mask register.
Chapter 3: Designing with the Core
SendFeedback
3. Both resulting values are compared.
4. If both these values are equal and matched filter index is less than equal to the RXFP
field, the message is stored in RX FIFO-0.
5. Else, if both the se values are equal and the ma tched filter index is greater than the RXFP
field, the message is stored in RX FIFO-1.
The ID match process is a sequential process. It starts from the lowest enabled filter and
stops at the first match. Therefore, if the incoming message fulfills condition 4 but RX
FIFO-0 is full, the message is dropped (irrespective of RX FIFO-1 status) and RX FIFO-0
overflow is indicated.
Similarly, if incoming message fulfills condition 5 but RX FIFO-1 is full, the message is
dropped (irrespective of RX FIFO-0 status) and RX FIFO-1 overflow is indicated. See
Figure 2-1 to Figure 2-4, page 58 for details.
Note:
If all UAF bits are set to 0, the received messages are not stored in any RX FIFO.
a. Filter pair registers are stored in the block RAM memory. Host has to ensure each
used filter pair is properly initialized. Asserting a software reset or system reset does
not clear these register contents.
b. Host must initialize/update/change filter pair only when the corresponding UAF is 0.
IMPORTANT: Ensure proper programming of the IDE bit for standard and extended frames in the Mask
register and ID register. If you set the IDE bit in the Mask register as 0, it is considered to be a standard
frame ID check only and therefore if Standard ID bits of the incoming message match with the
respective bits of Filter ID (after applying Mask register bits), the message is stored.
Reception (Mailbox Mode)
Each receive message element in the RX block RAM has two bits. The HCBx bit gives the
Host control to make a Buffer Active or Inactive and CSBx bit gives the core status (Buffer
is Full). Together, these two bits give the buffer status as Inactive, Active, Full, or Invalid.
These bits are described in detail in the Receive Buffer Control Status (RCS) registers. Each
receive message element also has one ID Mask Register in the RX block RAM.
CAN FD v2.074
PG223 December 5, 2018www.xilinx.com
Chapter 3: Designing with the Core
SendFeedback
RX – Host Actions
1. The Host prepares one or more receive buffers for message reception as follows:
a. If a Buffer is Inactive:
-Write the required ID into the ID field of the Receive Buffer_i element in the
block RAM.
-Write the corresponding Mask register for the Receive Buffer_i element in the
block RAM.
b. If a Buffer is in Active/Full/Invalid state and the Host wants to change its ID/Mask:
-Change the buffer state to Inactive.
-Write the required ID into the ID field of the Receive Buffer_i element in the
block RAM.
-Write the corresponding Mask register for the Receive Buffer_i element in the
block RAM.
2. Enable interrupt generation as required.
3. Change the buffer status from Inactive to Active. The Host can change Inactive to
Active status for many buffers in one write to the RCS register.
4. Wait for interrupt, or poll the RCS registers to know the buffer status.
5. The Host can read messages from the RX block RAM which has Full status. After the
read, the Host can change the buffer status back to Active (if you wish to continue with
the same ID/Mask) or Inactive (if you wish to reprogram the ID/Mask).
Note:
Host should not change the Buffer ID when status is Full.
The CAN FD can read the ID field of the Full buffer for the current match process so the
6. If required, the Host can discard the message without reading by changing the status
from Full to Active/Inactive.
Note:
RXOK bit is set in the ISR register and the RXLRM_BI field captures the mailbox index where the
message was stored. There is a provision to get interrupt for any selective buffer or buffers. In case
of overflow, the RXOFLW bit is set in the ISR. The RXOFLW_BI field in the ISR register captures the
overflow index corresponding to the last overflow event and maintains it until the RXOFLW bit is
cleared.
Whenever a new message is received successfully and written in any of the receive buffers, the
RX – Core Actions
1. The CAN FD searches Active buffers starting from the lowest index to match the
incoming message ID. When no match is found in Active Empty buffers but a match is
found in a Full buffer, the overflow condition is generated and th e matchin g buffer i n dex
is captured in the ISR. When there is also no match in the full buffers, the message is
discarded without indication.
CAN FD v2.075
PG223 December 5, 2018www.xilinx.com
Chapter 3: Designing with the Core
SendFeedback
2. The CAN FD changes the buffer status to Full when the message is received without
errors and is timestamped. In case of errors (for example, CRC error), the buffer status
remains Active.
3.If enabled through IERBF and IER, the RXRBF bit is set in the ISR register (when the core
changes the RCS buffer status to Full) and interrupt is generated.
Notes
The CAN FD accesses the RX block RAM message element space of a buffer based on the
buffer status.
a. Active: Read access for ID and Mask. Write access for the received message. Read
and Write access for the timestamp.
b. Full: Read access for ID and Mask to find overflow condition.
The host should respect access rules to avoid memory collisions. For example,
a. If the buffer status is Active, do not access the corresponding block RAM space.
b. If the buffer status is Full, do not change the respective ID and Mask.
IMPORTANT: Because ID and Mask registers are in the block RAM, asserting a software reset or system
reset does not clear these register contents. Host has to properly initialize them before use.
Notes on the ID Match Process
1. It is expected that the AXI4-Lite/APB clock frequency is sufficiently fast that the match
process finishes before the frame reception is completed on the CAN bus.
2.If the core is not able to complete the match process before the EOF sixth bit, it sets the
RX MNF bit in the ISR register.
3. The RX Mailbox control logic in the Object layer waits for the Transfer layer to signal
RXOK (EOF sixth bit) before setting the corresponding RCSx(i) bit to indicate that the RX
Buffer is full.
4. It is possible for the CAN bus to encounter an error after the Data field of the current
frame (the sixth bit of the EOF field). In this situation, the Mailbox control logic does not
set the RCSx(i) bit to indicate that the RX Buffer is full. The RX block RAM matched
element might show a partial or full data update.
5. The ID received with the message is written into the ID field of the Mailbox buffer.
CAN FD v2.076
PG223 December 5, 2018www.xilinx.com
Example 1:
Host programmed ID & Mask:
ID reg : 0x1234_5678
Mask reg : 0xFFFF_FF00
Incoming IDs 0x1234_56xx will match this mailbox buffer.
Chapter 3: Designing with the Core
SendFeedback
Incoming message had the ID 0x1234_56AB.
Then after message reception, ID reg will be as:
ID reg : 0x1234_56AB
Mask reg : 0xFFFF_FF00
Example 2:
Host programmed ID & Mask:
ID reg : 0xABCD_1234
Mask reg : 0000_0000
Because the mask is 0x0, any incoming IDs would match this buffer.
Incoming message had the ID 0x5678_4321.
Then after message reception, ID reg will be as:
ID reg : 0x5678_4321
Mask reg : 0x0000_0000
Clocking
CAN FD has two clocks: the CAN clock and the AXI4-Lite/APB clock. These two clocks
The
can be asyn chronous or synchro nous to each other. When the two clocks are asynchronous,
it is required that the AXI4-Lite/APB clock has a greater frequency than the CAN clock.
•The CAN clock frequency can be 8 to 80 MHz.
•The AXI4-Lite/APB clock frequency can be 8 to 200 MHz.
The core has another clock, can_clk_x2, which is fully synchronous to can_clk and is a
multiple by two of can_clk in frequency. The can_clk_x2 clock is used to drive two CAN
interface flops.
Note:
clock at 20, 40, or 80 MHz. For more information, see Robustness of a CAN FD Bus System – About
Oscillator Tolerance and Edge Deviations [Ref 5].
IMPORTANT: The CAN clock must be compliant with the oscillator tolerance range given in the
relevant standards.
When implementing the protocol in hardware, Robert Bosch recommends using the CAN
Resets
The CAN FD can be reset by using the system (hard) reset input port or through the
software controlled reset provided in the SRST bit in the SRR register. Both system and
software reset sources reset the complete CAN FD core (that is, both the Object layer and
the Transfer layer).
CAN FD v2.077
PG223 December 5, 2018www.xilinx.com
The Transfer layer remains in reset as long as the CEN (CAN enable) bit in the SRR register
is 0 (that is, the CEN bit is the third source of reset for the Transfer layer). If the CEN bit is
Chapter 3: Designing with the Core
SendFeedback
cleared during core operation, Xilinx recommends resetting the core so that operation
starts over.
The Object layer is reset synchronously with respect to the above mentioned two sources
(that is, internal reset assertion and deassertion to Object layer is done synchronous to
AXI4-Lite/APB clock).
The Transfer layer is reset asynchronously with respect to the above mentioned three
sources (that is, internal reset assertion to the Transfer layer is asynchronous whereas reset
deassertion is achieved synchronously with respect to the CAN clock). When the Transfer
layer is reset, the core loses synchronization with the CAN bus and drives the recessive bit
on the TX line.
System (Hard) Reset
The system (hard) reset can be enabled by driving a 0 on the reset input port. All of the
configuration registers are reset to their default values. Read/write transactions cannot be
performed when the reset input is 0. When system reset is applied, the ongoing AXI4-Lite/
APB transaction might terminate abruptly. In general, the system reset pulse should be
greater than at least two CAN clock cycles.
IMPORTANT: Because the Transfer layer is reset asynchronously, ensure that the reset line is glitch-free.
Software Reset
The software reset can be enabled by writing a 1 to the SRST bit in the SRR register. When
a software reset is asserted, all the configuration registers including the SRST bit in the SRR
register are reset to their default values. Read/write transactions can be performed starting
at the next valid transaction window (which starts after sixteen AXI4-Lite/APB clock cycles
after asserting the software reset).
IMPORTANT: The contents of the TX block RAM and RX block RAM are not cleared when any reset is
applied.
Interrupts
The core has a single interrupt output to indicate an interrupt. Interrupts are indicated by
asserting the ip2bus_intrevent line (transition of the line from a logic 0 to a logic 1).
Interrupt assertion and deassertion is synchronous to the AXI4-Lite/APB clock.
CAN FD v2.078
PG223 December 5, 2018www.xilinx.com
Events such as errors on the bus line, message transmission and reception, and various
other conditions can generate interrupts. During power on, the interrupt line is driven Low.
Chapter 3: Designing with the Core
SendFeedback
The Interrupt Status register (ISR) indicates the interrupt status bits. These bits are set and
cleared regardless of the status of the corresponding bit in the Interrupt Enable register
(IER). The IER handles the interrupt-enable functionality. The clearing of a status bit in the
ISR is handled by writing a 1 to the corresponding bit in the Interrupt Clear register (ICR).
Two conditions cause the interrupt line to be asserted:
•If a bit in the ISR is 1 and the corresponding bit in the IER is 1.
•Changing an IER bit from a 0 to 1 when the corresponding bit in the ISR is already 1.
Two conditions cause the interrupt line to be deasserted:
•Clearing a 1 bit in the ISR (by writing a 1 to the corresponding bit in the ICR provided
the corresponding bit in the IER is 1).
•Changing an IER bit from 1 to 0 when the corresponding bit in the ISR is 1.
When both deassertion and assertion conditions occur simultaneously, the interrupt line is
deasserted first, and is reasserted if the assert condition remains TRUE.
CAN FD v2.079
PG223 December 5, 2018www.xilinx.com
Design Flow Steps
SendFeedback
This chapter describes customizing and generating the core, constraining the core, and the
simulation, synthesis and implementation steps that are specific to this IP core. More
detailed information about the standard Vivado
can be found in the following Vivado Design Suite user guides:
•Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994)
[Ref 8]
•Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6]
•Vivado Design Suite User Guide: Getting Started (UG910) [Ref 9]
•Vivado Design Suite User Guide: Logic Simulation (UG900) [Ref 10]
Chapter 4
®
design flows and the Vivado IP integrator
Customizing and Generating the Core
This section includes information about using Xilinx® tools to customize and generate the
core in the Vivado Design Suite.
If you are customizing and generating the core in the IP integrator, see the Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994) [Ref 8] for detailed
information. IP integrator might auto-compute certain configuration values when
validating or generating the design. To view the parameter value you can run the
validate_bd_design command in the Tcl console.
You can customize the IP for use in your design by specifying values for the various
parameters associated with the core using the following steps:
1. Select the IP from the Vivado IP catalog.
2. Double-click the selected IP or select the Customize IP command from the toolbar or
right-click menu.
For details, see the Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6] and
the Vivado Design Suite User Guide: Getting Started (UG910) [Ref 9].
Note:
Environment (IDE). This layout might vary from the current version.
Figure in this chapter is an illustration of the CAN FD in the Vivado Integrated Design
CAN FD v2.080
PG223 December 5, 2018www.xilinx.com
X-Ref Target - Figure 4-1
SendFeedback
Chapter 4: Design Flow Steps
Figure 4-1 shows the main CAN FD customization screen, which is used to set the
component name and core options, described in the following sections.
CAN FD v2.081
PG223 December 5, 2018www.xilinx.com
Figure 4-1:Customize IP Screen
•Component Name – The component name is the base name of the output files
generated for this core.
IMPORTANT: The name must begin with a letter and be composed of the following characters: a to z,
A to Z, 0 to 9, and "_."
•Processor Interface – This parameter determines if the AXI4-Lite or APB interface is
used to communicate with processor.
•TX Buffers – This parameter decides the number of TX buffers to be present in the
current IP instance. Valid values are 8, 16, and 32.
•RX Mode – This parameter decides the message reception mode used in the current IP
instance. Valid values are as follows:
Chapter 4: Design Flow Steps
SendFeedback
-Sequential (First-In-First-Out) – The core stores received messages in RX block
RAM in a sequential manner in a 32-deep message space based on the program
ID matching and provides sequential access to the host.
-Mailbox – Received messages are stored in buffers based on the ID
programmed in the respective buffer. ID match search starts from RX buffers 0
and incoming messages can be stored in any receive buffers based on the ID
match result. The host can access stored messages in any random order.
•RX Buffers – This parameter decides the number of RX buffers enabled for the current
IP instance and is valid and applicable when the RX mode is selected as Mailbox. Valid
values are 16, 32, and 48.
•RX FIFO-0 Depth – This parameter defines the depth of RX Buffer FIFO-0. It is valid and
applicable only when selected RX Mode is Sequential.
•Enable RX FIFO-1 – This parameter determines if the IP has a second RX FIFO. It is valid
and applicable only when the selected RX Mode is Sequential.
•RX FIFO-1 Depth – This parameter defines the depth of RX Buffer FIFO-1. It is valid and
applicable only when the selected RX Mode is Sequential.
User Parameters
Tab le 4 -1 shows the relationship between the fields in the Vivado IDE and the User
Parameters (which can be viewed in the Tcl console).
Table 4-1:Vivado IDE Parameter to User Parameter Relationship
Vivado IDE Parameter/ValueUser Parameter/ValueDefault Value
Processor Interfaces
Valid values are 0 and 1.
TX Buffers
Valid values are 8, 16, and 32.
RX Mode
Valid values are:
• Sequential
• MailBox
RX Buffers
Valid values are 16, 32, and 48.
RX FIFO-0 Depth
Valid values are 32 and 64.
C_EN_APB
Valid values are 0 and 1.
NUM_OF_TX_BUF
Valid values are 8, 16, and 32.
RX_MODE
Valid values are:
• 0 = Sequential
• 1 = MailBox
NUM_OF_RX_MB_BUF
Valid values are 16, 32, and 48.
C_RX_FIFO_0_DEPTH
Valid values are 32 and 64.
1
8
0
16
This parameter is valid for
Note:
RX MailBox mode.
64
Note:
This parameter is valid only
when the IP is in FIFO/Sequential
mode.
CAN FD v2.082
PG223 December 5, 2018www.xilinx.com
Chapter 4: Design Flow Steps
SendFeedback
Table 4-1:Vivado IDE Parameter to User Parameter Relationship (Cont’d)
Vivado IDE Parameter/ValueUser Parameter/ValueDefault Value
true
Enable RX FIFO-1
Valid values are true and false.
RX FIFO-1 Depth
Valid values are 32 and 64.
EN_RX_FIFO_1
Valid values are true and false.
C_RX_FIFO_1_DEPTH
Valid values are 32 and 64.
Note:
This parameter is valid only
when the IP is in FIFO/Sequential
mode and RX FIFO-1 is enabled.
64
Note:
This parameter is valid only
when the IP is in FIFO/Sequential
mode and RX FIFO-1 is enabled.
Output Generation
For details, see the Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6].
Constraining the Core
This section contains information about constraining the core in the Vivado Design Suite.
Required Constraints
CAN and AXI4 clocks are treated as asynchronous to each other and the core writes out
appropriate clock domain crossing constraints. Tabl e 4 - 2 shows the files delivered in the
<project_name>/<project_name>.srcs/source_1/ip/<component_name>/
directory for core constraints.
Table 4-2:Core Constraint Files
NameDescription
<component_name>.xdcCore constraints
Device, Package, and Speed Grade Selections
This section is not applicable for this IP core.
Clock Frequencies
The CAN clo ck and AXI4 clock can be asynchronous or clocked from the same source. When
both clocks are asynchronous to each other, the AXI4 clock is required to run at a higher
frequency.
CAN FD v2.083
PG223 December 5, 2018www.xilinx.com
•The CAN clock frequency can be 8 to 80 MHz.
•The AXI4 clock frequency can be 8 to 200 MHz.
Clock Management
SendFeedback
This section is not applicable for this IP core.
Clock Placement
This section is not applicable for this IP core.
Banking
This section is not applicable for this IP core.
Transceiver Placement
This section is not applicable for this IP core.
I/O Standard and Placement
Chapter 4: Design Flow Steps
This section is not applicable for this IP core.
Simulation
For comprehensive information about Vivado simulation components, as well as
information about using supported third-party tools, see the Vivado Design Suite User Guide: Logic Simulation (UG900) [Ref 10].
IMPORTANT: For cores targeting 7 series or Zynq-7000 SoC devices, UNIFAST libraries are not
supported. Xilinx IP is tested and qualified with UNISIM libraries only.
Synthesis and Implementation
For details about synthesis and implementation, see the Vivado Design Suite User Guide:
Designing with IP (UG896) [Ref 6].
CAN FD v2.084
PG223 December 5, 2018www.xilinx.com
Example Design
Clock Generator
Driver/Checker
DUT
CAN FD
Partner
X14810-081418
SendFeedback
Overview
This chapter contains information about the example design provided in the Vivado®
Design Suite environment. The top module instantiates all components of the core and
example design that are needed to implement the design in hardware, as shown in
Figure 5-1. This includes clock generator, traffic generator, and checker modules.
X-Ref Target - Figure 5-1
Chapter 5
CAN FD v2.085
PG223 December 5, 2018www.xilinx.com
Figure 5-1:Example Design
This example design includes the following modules:
•Clock Generator – The clocking wizard is used to generate two clocks, one for the
register interface (AXI4-Lite) and the other for the CAN FD clock.
•Driver/Checker – An AXI4 traffic generator in system test mode is used to configure
the DUT and PARTNER to program and to check the status.
•CAN FD Partner – The CAN FD IP in default mode to transmit and receive the packets
to and from DUT.
Chapter 5: Example Design
SendFeedback
IMPORTANT: The XDC delivered with the example design is configured for the KC705 board. The I/O
constraints are commented by default. Remove the comments before implementing the example design
on the KC705 board.
Simulating the Example Design
For more information on Simulation, see the Vivado Design Suite User Guide: Logic
Simulation (UG900) [Ref 10].
Simulation Results
The simulation script compiles the CAN FD example design and supporting simulation files.
It then runs the simulation and checks to ensure that it completed successfully.
If the test passes, the following message is displayed:
Test Completed Successfully
If the test fails, the following message is displayed:
ERROR: Test Failed
If the test hangs, the following message is displayed:
ERROR: Test did not complete (timed-out)
Example Sequence
The demonstration test bench performs the following tasks:
•Writes the Baud Rate Prescaler register and Bit Timing registers for DUT and Partner.
•Programs ID Filter and Masks in Partner.
•Programs ID Filters and Masks in DUT (the programming sequence varies according to
FIFO or Mailbox mode).
•Acceptance filter is enabled in both nodes (applicable to DUT if configured in FIFO
mode).
•Enables the required interrupts in both CAN FD nodes.
CAN FD v2.086
PG223 December 5, 2018www.xilinx.com
•The Software Reset register is written to enable the CEN bit, which enables the DUT and
Partner.
•Writes two packets into DUT TX buffers (one CAN and one CAN FD). This demonstrates
the transmission packet priority in the core.
Chapter 5: Example Design
SendFeedback
•Programs Partner to transmit two packets (one CAN and one CAN FD with extended
IDs).
•Enables respective bits in the TRR register in DUT and Partner. This demonstrates
arbitration on the CAN bus.
•Waits for Partner to receive two packets, and compares data for correct reception (DUT
packets are of higher priority than Partner).
•Waits for DUT to receive two packets.
•If DUT is configured in FIFO mode, the packets are read from sequential locations of
the RX buffers and the packet comparison is done.
•If DUT is configured in Mailbox mode, the packets are read from buffers enabled and
compared for correct reception.
Note:
CAN FD frames are transmitted with a dual bit rate.
CAN FD v2.087
PG223 December 5, 2018www.xilinx.com
Test B ench
<component_name>_tb
Clock Reset
Generation
Test Status
Checker
Example Design
done
status
reset
clk_in1_p
clk_in1_n
X14809-081418
SendFeedback
This chapter contains information about the test bench provided in the Vivado® Design
Suite. Figure 6-1 shows the test bench for the CAN FD example design. The top-level test
bench generates a 200 MHz clock and drives an initial reset to the example design.
X-Ref Target - Figure 6-1
Chapter 6
CAN FD v2.088
PG223 December 5, 2018www.xilinx.com
Figure 6-1:Test Bench
Verification, Compliance, and
SendFeedback
Interoperability
Compliance Testing
The Xilinx® LogiCORE™ CAN FD IP core v2.0 has passed ISO 16845-1:2016 conformance
tests [Ref 2]. The conformance tests were done using the default parameter configuration in
the Vivado™ IDE.
IMPORTANT: For proper interoperation, all of the CAN FD nodes in the network must be programmed
to have the following:
a.Same Arbitration Phase bit rate
Appendix A
b.Same Data Phase bit rate
c.Same Arbitration Phase Sample Point Position
d.Same Data Phase Sample Point Position
Requirements (c) and (d) come from the fact that CAN FD nodes perform bit rate switching at the
respective sample point. For more information on the CAN FD protocol and other recommendations,
see the standard specification and other white paper references in the References, page 97.
If any of the listed requirements are not met, various frame errors can be seen when performing the
CAN FD communication.
CAN FD v2.089
PG223 December 5, 2018www.xilinx.com
Upgrading
SendFeedback
This appendix contains information about upgrading to a recent version of the core.
Upgrading in the Vivado Design Suite
Parameter Changes
On the Customize IP screen, the Processor Interface parameter allows you to determine if
the AXI4-Lite or APB interface communicates with the processor.
When Sequential RX mode is selected, you can use the Enable RX FIFO-1 parameter to
determine if the IP should have a second RX FIFO. The RX FIFO-0 Depth and RX FIFO-1 Depth parameters define the depths of RX Buffer FIFO-0 and RX Buffer FIFO-1 respectively.
Appendix B
Port Changes
See Tab le B -1 for a list of new and changed ports in v2.0.
.
Table B-1:New Ports
Port NameNotes
can_clk_x2
apb_clk
apb_resetn
apb_pwdata[31:0]
apb_paddr[14:0]
apb_pwrite
apb_psel
apb_penable
apb_prdata[31:0]
apb_pready
apb_perror
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
See Port Descriptions for details.
CAN FD v2.090
PG223 December 5, 2018www.xilinx.com
Debugging
SendFeedback
This appendix includes details about resources available on the Xilinx® Support website
and debugging tools.
TIP: If the IP generation halts with an error, Please verify if it is a license issue. See License Checkers in
Chapter 1 for more details.
Finding Help on Xilinx.com
To help in the design and debug process when using the CAN FD, the Xilinx Support web
page contains key resources such as product documentation, release notes, answer records,
information about known issues, and links for obtaining further product support.
Appendix C
Documentation
This product guide is the main document associated with the CAN FD. This guide, along
with documentation related to all products that aid in the design process, can be found on
the Xilinx Support web page or by using the Xilinx Documentation Navigator.
Download the Xilinx Documentation Navigator from the Downloads page. For more
information about this tool and the features available, open the online help after
installation.
Answer Records
Answer Records include information about commonly encountered problems, helpful
information on how to resolve these problems, and any known issues with a Xilinx product.
Answer Records are created and maintained daily ensuring that users have access to the
most accurate information available.
CAN FD v2.091
PG223 December 5, 2018www.xilinx.com
Appendix C: Debugging
SendFeedback
Answer Records for this core can be located by using the Search Support box on the main
Xilinx support web page. To maximize your search results, use proper keywords such as:
•Product name
•Tool message(s)
•Summary of the issue encountered
A filter search is available after results are returned to further target the results.
Master Answer Recordfor the CAN FD
AR: 65142
Technical Support
Xilinx provides technical support at the Xilinx Support web page for this LogiCORE™ IP
product when used as described in the product documentation. Xilinx cannot guarantee
timing, functionality, or support if you do any of the following:
•Implement the solution in devices that are not defined in the documentation.
•Customize the solution beyond that allowed in the product documentation.
•Change any section of the design labeled DO NOT MODIFY.
To contact Xilinx Technical Support, navigate to the Xilinx Support web page.
CAN FD v2.092
PG223 December 5, 2018www.xilinx.com
Appendix C: Debugging
SendFeedback
Debug Tools
There are many tools available to address CAN FD design issues. It is important to know
which tools are useful for debugging various situations.
Vivado Design Suite Debug Feature
The Vivado® Design Suite debug feature inserts logic analyzer and virtual I/O cores directly
into your design. The debug feature also allows you to set trigger conditions to capture
application and integrated block port signals in hardware. Captured signals can then be
analyzed. This feature in the Vivado IDE is used for logic debugging and validation of a
design running in Xilinx devices.
The Vivado logic analyzer is used with the logic debug LogiCORE IP cores, including:
•ILA 2.0 (and later versions)
•VIO 2.0 (and later versions)
See the Vivado Design Suite User Guide: Programming and Debugging (UG908) [Ref 12].
Hardware Debug
These are some common issues that might be encountered.
1. The desired baud rate is not seen on the TX/RX lines.
Action: Ensure that the desired values are written to the BRPR and BTR registers. The
actual value is one more than the value written into the registers.
2. The core is not achieving CONFIG state after it is enabled.
Action: After the occurrence of 11 consecutive recessive bits, the CAN FD core clears the
CONFIG bit and sets the appropriate bit in the Status register. Ensure that 11
consecutive recessive bits are seen by the core.
3. The core is enabled and the desired BRPR/BTR values are written but the lines are not
toggling.
CAN FD v2.093
PG223 December 5, 2018www.xilinx.com
Action: Ensure that the can_clk port is connected to the desired clock source.
4. CAN FD core is generating various frame errors in the network with other nodes when
CAN FD frames are used.
Appendix C: Debugging
SendFeedback
Action: Ensure the following for proper inter-operation. All CAN FD nodes in the
network must be programmed to have the following:
a. Same Arbitration Phase bit rate
b. Same Data Phase bit rate
c.Same Arbitration Phase Sample Point Position
d. Same Data Phase Sample Point Position
Requirements (c) and (d) come from the fact that CAN FD nodes perform bit rate
switching at the respective sample point. For more information on the CAN FD protocol
and other recommendations, see the standard specification and other white paper
references in the References, page 97.
If any of the listed requirements are not met, various frame errors can be seen when
performing the CAN FD communication.
Interface Debug
AXI4-Lite Interfaces
Read from a register that does not have all 0s as a default to verify that the interface is
functional. See Figure C-1for a read timing diagram.
Note:
an example, and delays are not guaranteed to be the same as shown in the figure.
X-Ref Target - Figure C-1
Signals are compliant with AXI4-Lite protocol. The timing shown in Figure C-1 is provided as
Output s_axi_arready asserts when the read address is valid, and output
s_axi_rvalid asserts when the read data/response is valid. If the interface is
unresponsive, ensure that the following conditions are met:
•The s_axi_aclk and can_clk inputs are connected and toggling.
•The interface is not being held in reset, and s_axi_areset is an active-Low reset.
•The interface is enabled, and s_axi_aclken is active-High (if used).
•The main core clocks are toggling and that the enables are also asserted.
•If the simulation has been run, verify in simulation and/or in the Vivado Design Suite
debug feature capture that the waveform is correct for accessing the AXI4-Lite
interface.
CAN FD v2.095
PG223 December 5, 2018www.xilinx.com
Appendix D
SendFeedback
Additional Resources and Legal Notices
IMPORTANT: It is required to have a valid Bosch CAN FD protocol license before selling a device
containing the Xilinx CAN FD IP core.
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see Xilinx
Support.
Documentation Navigator and Design Hubs
Xilinx® Documentation Navigator provides access to Xilinx documents, videos, and support
resources, which you can filter and search to find information. To open the Xilinx
Documentation Navigator (DocNav):
•From the Vivado® IDE, select Help > Documentation and Tutorials.
Xilinx Design Hubs provide links to documentation organized by design tasks and other
topics, which you can use to learn key concepts and address frequently asked questions. To
access the Design Hubs:
•In the Xilinx Documentation Navigator, click the Design Hubs View tab.
•On the Xilinx website, see the Design Hubs page.
Note:
on the Xilinx website.
For more information on Documentation Navigator, see the Documentation Navigator page
CAN FD v2.096
PG223 December 5, 2018www.xilinx.com
Appendix D: Additional Resources and Legal Notices
SendFeedback
References
These documents provide supplemental material useful with this product guide:
1. ISO 11898-1:2015: Road vehicles -- Controller Area Network (CAN) conformance test plan – Part 1: Data link layer and physical signalling (https://www.iso.org/standard/
63648.html)
2. ISO 16845-1:2016: Road vehicles -- Controller Area Network (CAN) conformance test plan – Part 1: Data link layer and physical signalling (https://www.iso.org/standard/
59166.html)
3. CANwith Flexible Data-Rate Specification version v1.0, Robert Bosch GmbH
4. CAN version 2.0A and B Specification, Robert Bosch GmbH
5. Mutter, Dr. Arthur. Robustness of a CAN FD Bus System – About Oscillator Tolerance and Edge Deviations, Proceedings of the 14
2013
6. Vivado Design Suite User Guide: Designing with IP (UG896)
7. Vivado AXI Reference Guide (UG1037)
8. Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994)
9. Vivado Design Suite User Guide: Getting Started (UG910)
10. Vivado Design Suite User Guide: Logic Simulation (UG900)
11. ISE to Vivado Design Suite Migration Guide (UG911)
12. Vivado Design Suite User Guide: Programming and Debugging (UG908)
13. Vivado Design Suite User Guide: Implementation (UG904)
th
International CAN Conference, Paris, France,
CAN FD v2.097
PG223 December 5, 2018www.xilinx.com
Appendix D: Additional Resources and Legal Notices
SendFeedback
Revision History
The following table shows the revision history for this document.
SectionRevision Summary
12/5/2018 Version 2.0
Compliance Testing in Appendix AAdded information about ISO 16845-1:2016 conformance tests.
Tabl e 2- 1Added APB Interface Signals to CAN FD Core I/O Signals table.
Added details for can_clk_x2.
Figure 4-1Added explanations of new parameters in the Customize IP screen.
10/5/2016 Version 1.0
General updates• Added a note in Register Space section under Chapter 2,
Product Specification.
• Updated Automotive Applications Disclaimer in Please Read:
Important Legal Notices section.
11/18/2015 Version 1.0
N/AInitial Xilinx release.
Please Read: Important Legal Notices
The information disclosed to you hereunder (the "Materials") is provided solely for the selection and use of Xilinx produc ts. To t he
maximum extent permitted by applicable law: (1) Materials are made available "AS IS" and with all faults, Xilinx hereby DISCLAIMS
ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2) Xilinx shall not be liable (whether
in co nt ract or t or t, in cluding ne gl ig en ce , o r under a ny other theory of liability) for any loss or damage of any kind or nature related
to, arising under, or in connection with, the Materials (including your use of the Materials), including for any direct, indirect,
special, incidental, or consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage
suffered as a result of any action brought by a third party) even if such damage or loss was reasonably foreseeable or Xilinx had
been advised of the possibility of the same. Xilinx assumes no obligation to correct any errors contained in the Materials or to
notify you of updates to the Materials or to product specifications. You may not reproduce, modify, distribute, or publicly display
the Materials without prior written consent. Certain products are subject to the terms and conditions of Xilinx's limited warranty,
please refer to Xilinx's Terms of Sale which can be viewed at https://www.xilinx.com/legal.htm#tos; IP cores may be subject to
warranty and support terms contained in a license issued to you by Xilinx. Xilinx products are not designed or intended to be
fail-safe or for use in any application requiring fail-safe performance; you assume sole risk and liability for use of Xilinx products
in such critical applications, please refer to Xilinx's Terms of Sale which can be viewed at https://www.xilinx.com/legal.htm#tos.
AUTOMOTIVE APPLICATIONS DISCLAIMER
AUTOMOTIVE PRODUCTS (IDENTIFIED AS “XA” IN THE PART NUMBER) ARE NOT WARRANTED FOR USE IN THE DEPLOYMENT OF
AIRBAGS OR FOR USE IN APPLICATIONS THAT AFFECT CONTROL OF A VEHICLE (“SAFETY APPLICATION”) UNLESS THERE IS A
SAFETY CONCEPT OR REDUNDANCY FEATURE CONSISTENT WITH THE ISO 26262 AUTOMOTIVE SAFETY STANDARD (“SAFETY
DESIGN”). CUSTOMER SHALL, PRIOR TO USING OR DISTRIBUTING ANY SYSTEMS THAT INCORPORATE PRODUCTS, THOROUGHLY
TEST SUCH SYSTEMS FOR SAFETY PURPOSE S. USE OF P ROD UC TS IN A SAF ETY APPLICATION WITHOUT A SAFETY DESIGN IS FULLY
AT THE RISK OF CUSTOMER, SUBJECT ONLY TO APPLICABLE LAWS AND REGULATIONS GOVERNING LIMITATIONS ON PRODUCT
LIABILITY.