Documentation
DCAN-Ava

Configurable CAN Bus Controller with Avalon interface


The DCAN-Avalon is a stand-alone controller for the Controller Area Network (CAN) widely used in automotive and industrial applications. DCAN-Avalon conforms to Bosch CAN 2.0B specification (2.0B Active). The Core has Avalon interface. The DCAN-Avalon supports both standard (11 bit identifier) and extended (29 bit identifier) frames. Hardware message filtering and 64 byte receive FIFO enables back-to-back message reception with minimum CPU load. The DCAN-Avalon is described at RTL level allowing target use in FPGA or ASIC technologies.



CAN Overview

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-Avalon 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).



For more information about the CAN Bus protocol please see....



Key Features

Applications

  • Compliant with Avalon interface specification, Revision 1.0
  • Conforms to Bosch CAN 2.0B Active
  • 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
  • Fully synthesizable
  • Static synchronous design
  • Positive edge clocking and no internal tri-states
  • Scan test ready
  • Automotive, industrial
  • Embedded communication systems


Symbol

irq 
 qmr (31:0)
dmr (31:0) 
waddrmr (3:0) 
raddrmr (3:0) 
enrmr 
enwmr 
 writedata (31:0)
 write
 read
 chipselect
readdata (31:0) 
sclk 
 rxd
txd 
 qmt (31:0)
dmt (31:0) 
waddrmt (1:0) 
raddrmt (1:0) 
enrmt 
enwmt 

Pins description

PinTypeDescription
qmr (31:0)inputRX DPRAM data output - configurable 8, 16, 32 bits wide
writedata (31:0)inputAvalon write data bus
writeinputAvalon write control
readinputAvalon read control
chipselectinputAvalon chip select
rxdinputCAN receive data
qmt (31:0)inputTX DPRAM data output - configurable 8, 16, 32 bits wide
irqoutputInterrupt request
dmr (31:0)outputRX DPRAM data input
waddrmr (3:0)outputRX DPRAM write address
raddrmr (3:0)outputRX DPRAM read address
enrmroutputRX DPRAM read access
enwmroutputRX DPRAM write enable
readdata (31:0)outputAvalon read data bus
sclkoutputSCLK Clock output
txdoutputCAN Transmit data
dmt (31:0)outputTX DPRAM data input - configurable 8, 16, 32 bits wide
waddrmt (1:0)outputTXDPRAM write address
raddrmt (1:0)outputTX DPRAM read address
enrmtoutputTXDPRAM read enable
enwmtoutputTX DPRAM write enable

Block diagram

RX RAM Interface
dmr (31:0)
waddrmr (3:0)
raddrmr (3:0)
enrmr
enwmr
qmr (31:0)
Receive FIFO
Avalon Interface
writedata (31:0)
readdata (31:0)
write
read
chipselect
ACF Acceptance filter
BRP Baud Rate Prescaler
sclk
BSP Bit Stream Processor
BTL Bit Timing Logic
txd
rxd
EML Error Management Logic
TX RAM Interface
dmt (31:0)
waddrmt (1:0)
raddrmt (1:0)
enrmt
enwmt
qmt (31:0)
irq

Units

RX RAM Interface

Interface to external dual port memory used by the DCAN core to store received frames.

Receive FIFO

Receive FIFO controller

Avalon Interface

Avalon Interface performs the interface functions between DCAN internal blocks and Avalon bus. Allows easy connection of the core to existing Avalon systems.

ACF Acceptance filter

Decides whether incoming messages are accepted or not based upon filter registers settings.

BRP Baud Rate Prescaler

Defines the length of time quantum.

BSP Bit Stream Processor

Translates messages into frames and vice versa.

BTL Bit Timing Logic

Processes the bit time, calculates position of the sample point and performs synchronization.

EML Error Management Logic

EML is responsible for fault confinement handling.

TX RAM Interface

Interface to external dual port memory used by the DCAN core to store transmitted frames.

Performance


Each core has been tested in variety of FPGA and ASIC technologies. Its implementation's results are summarized below.

ImplementationSpeed
grade
Utilized Area
[LC]
Frequency
[MHz]
APEX20KC-7195694
CYCLONE-61956123
CYCLONE-II-61899137
STRATIX-51956130
STRATIX-II-31529188
STRATIX-GX-51956131

8-bit DCAN-Avalon implementation results inALTERA devices.