Digital Core Design

The Power of Intellectual Property

DCAN

Configurable CAN Bus Controller

    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:

    Subskrybuj mój kanał w YouTube


    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)
    dmr (31:0) 
    waddrmr (3:0) 
    raddrmr (3:0) 
    enrmr 
    enwmr 
    sclk 
     rxd
    txd 
     be (3:0)
     addr (4:0)
     datai (31:0)
     rd
     wr
     cs
    int 
    datao (31:0) 
     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
    rxdinputCAN receive data
    be (3:0)inputHost byte enable - set accprdig to Data bus size
    addr (4:0)inputHost Address bus
    datai (31:0)inputHost output Data bus - configurable 8, 16, 32 bits wide
    rdinputRead Data strobe
    wrinputWrite data strobe
    csinputChip select
    qmt (31:0)inputTX DPRAM data output - configurable 8, 16, 32 bits wide
    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
    sclkoutputSCLK Clock output
    txdoutputCAN Transmit data
    intoutputInterrupt request signal
    datao (31:0)outputHost input data bus - configurable 8, 16, 32 bits wide
    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

    Receive FIFOReceive FIFO controller.
    RX RAM InterfaceInterface to external dual port memory used by the DCAN core, to store received frames.
    dmr (31:0)
    waddrmr (3:0)
    raddrmr (3:0)
    enrmr
    enwmr
    qmr (31:0)
    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.
    txd
    rxd
    EML Error Management LogicEML is responsible for fault confinement handling.
    IML Interface Management LogicInterprets commands from the CPU, provides interrupt and status indication.
    be (3:0)
    addr (4:0)
    datai (31:0)
    int
    datao (31:0)
    rd
    wr
    cs
    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

    Units

    Receive FIFO
    Receive FIFO controller.
    RX RAM Interface
    Interface to external dual port memory used by the DCAN core, to store received frames.
    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.
    IML Interface Management Logic
    Interprets commands from the CPU, provides interrupt and status indication.
    TX RAM Interface
    Interface to external dual port memory used by the DCAN core to store transmitted frames.