DCAN
Configurable CAN Bus Controller
Documentation
The DCAN is a standalone controller for the Controller Area Network (CAN), which is commonly used in automotive and industrial applications. What's most important, the DCAN conforms to the Bosch CAN 2.0B specification (2.0B Active). The Core has a simple CPU interface (8/16/32 bit configurable data width), with little or big endian addressing scheme. The DCAN supports both standard (11 bit identifier) and extended (29 bit identifier) frames. Hardware message filtering and 64 byte receive FIFO, enable a back-to-back message reception with a minimum CPU load. The DCAN is described at RTL level, allowing target use in FPGA or ASIC technologies.
Watch the DCAN presentation on DCD's You Tube:
Performance
Each core has been tested in variety of FPGA and ASIC technologies. Its implementation results are summarized below.
| Implementation |
Speed grade |
Utilized Area [LC] |
Frequency [MHz] |
|---|---|---|---|
| APEX20KC | -7 | 1956 | 94 |
| CYCLONE | -6 | 1956 | 123 |
| CYCLONE-II | -6 | 1899 | 137 |
| STRATIX | -5 | 1956 | 130 |
| STRATIX-II | -3 | 1529 | 188 |
| STRATIX-GX | -5 | 1956 | 131 |
8-bit DCAN implementation results in ALTERA devices.
| Implementation |
Speed grade |
Utilized Area [Slices] |
Frequency [MHz] |
|---|---|---|---|
| SPARTAN-IIIE | -4 | 1049 | 62 |
| SPARTAN-III | -5 | 1033 | 77 |
| SPARTAN-IIE | -7 | 1055 | 60 |
| VIRTEX-E | -8 | 1057 | 72 |
| VIRTEX-II | -6 | 1032 | 103 |
| VIRTEX-II pro | -7 | 1034 | 124 |
| VIRTEX-IV | -11 | 1032 | 124 |
8-bit DCAN implementation results for XILINX devices.
Info
The Controller Area Network (CAN) is a advanced serial communications protocol developed by Robert Bosch GmbH. CAN protocol uses Data Link Layer and the Physical Layer in the ISO-OSI model. The CAN bus uses multi-master bus scheme with one logic bus line and equal nodes. The number of nodes is not limited by the protocol.
Nodes do not have specific addresses. Instead, message identifiers are used, indicating the message content and priority of message. This also means that multicasting and broadcasting is supported by CAN.
Number of nodes may be changed at run-time without disturbing the communication of the other nodes.
CAN provides sophisticated error detection and error handling mechanisms and, due to differential transmission, high immunity against electromagnetic interference. Frames with errors are automatically retransmitted (except single shot transmission feature implemented in the DCAN core).
Maximum data transfer rate is 1Mbps at maximum 40 m bus length when using a twisted wire pair.
The bus is handled with Carrier Sense Multiple Access / Collision Detection with Non-Destructive Arbitration. This means that collision of messages is avoided by bitwise arbitration, without loss of time.
CAN controller is connected to host/CPU and CAN bus transceiver, which directly connects to CAN bus line (2-wire).
Key Features
- Conforms to Bosch CAN 2.0B Active
- 8/16/32-bit CPU slave interface with little or big endianess
- Simple interface allows easy connection to CPU
- Data rate up to 1 Mbps
- Hardware message filtering (dual/single filter)
- 64 byte receive FIFO
- One transmit buffer
- No overload frames are generated
- Normal & Listen Only Mode
- Single Shot transmission
- Ability to abort transmission
- Readable error counters
- Last Error Code
- Available system interface wrappers:
- AMBA - APB Bus
- Altera Avalon Bus
- Xilinx OPB Bus
- Fully synthesizable
- Static synchronous design
- Positive edge clocking and no internal tri-states
- Scan test ready
Applications
- Automotive, industrial
- Embedded communication systems
Symbol
qmr (31:0)





rxd
be (3:0)
addr (4:0)
datai (31:0)
rd
wr
cs

qmt (31:0)




Pins description
| Pin | Type | Description |
|---|---|---|
| qmr (31:0) | input | RX DPRAM data output - configurable 8, 16, 32 bits wide |
| rxd | input | CAN receive data |
| be (3:0) | input | Host byte enable - set accprdig to Data bus size |
| addr (4:0) | input | Host Address bus |
| datai (31:0) | input | Host output Data bus - configurable 8, 16, 32 bits wide |
| rd | input | Read Data strobe |
| wr | input | Write data strobe |
| cs | input | Chip select |
| qmt (31:0) | input | TX DPRAM data output - configurable 8, 16, 32 bits wide |
| dmr (31:0) | output | RX DPRAM data input |
| waddrmr (3:0) | output | RX DPRAM write address |
| raddrmr (3:0) | output | RX DPRAM read address |
| enrmr | output | RX DPRAM read access |
| enwmr | output | RX DPRAM write enable |
| sclk | output | SCLK Clock output |
| txd | output | CAN Transmit data |
| int | output | Interrupt request signal |
| datao (31:0) | output | Host input data bus - configurable 8, 16, 32 bits wide |
| dmt (31:0) | output | TX DPRAM data input - configurable 8, 16, 32 bits wide |
| waddrmt (1:0) | output | TXDPRAM write address |
| raddrmt (1:0) | output | TX DPRAM read address |
| enrmt | output | TXDPRAM read enable |
| enwmt | output | TX DPRAM write enable |
Block Diagram
| Receive FIFOReceive FIFO controller. |
| RX RAM InterfaceInterface to external dual port memory used by the DCAN core, to store received frames. |






| ACF Acceptance filterDecides whether incoming messages are accepted or not based upon filter registers settings. |
| BRP Baud Rate PrescalerDefines the length of time quantum. |
sclk
| BSP Bit Stream ProcessorTranslates messages into frames and vice versa. |
| BTL Bit Timing LogicProcesses the bit time, calculates position of the sample point and performs synchronization. |


| EML Error Management LogicEML is responsible for fault confinement handling. |
| IML Interface Management LogicInterprets commands from the CPU, provides interrupt and status indication. |








| TX RAM InterfaceInterface to external dual port memory used by the DCAN core to store transmitted frames. |
dmt (31:0)
waddrmt (1:0)
raddrmt (1:0)
enrmt
enwmt
qmt (31:0)
| Control bus DCAN internal control bus |
| Data Bus DCAN Internal data bus |