MLDesign Technologies, Inc.

Mainnavigation

Subnavigation

BORDER

 
 
 

Pagecontent

A CAN Bus Model

A simple CAN (Control Area Network) bus system

The Model

The top-level CAN model is shown below. It consist of two major components

Top-level CAN bus model
Top-level CAN bus model

CAN MAC Node Details

This module represents a node of the CAN bus. All incoming packages from port "PacketToSend" saved into a FIFO-queue. After transmitting, a package will put to the "ReceivedPacket" output port of every Node excluded the transmitter node. The time from entering the queue and transmitting successfully is calculated an put to "TransmitTime".

CAN MAC module
CAN MAC module

Bus Controller Module

The CAN Simulation Bus Controller module controls the operation of the bus. The controller module starts by determining the number of nodes. Once the number of nodes has been determined, the controller shifts to a loop pattern called bus cycle that is repeated until the simulation stops. One bus cycle consists of following iterations over the nodes. The first iteration determines the node, which is dominating the others. After calculating the length of the message the next iteration leads to the result, whether one node detected an error or not. Then all nodes are informed by another iteration about that result. The model generates several dynamics reports, such as those shown below. Other reports (dynamic and summary) are easily added.

CAN Simulation Bus Controller module
CAN Simulation Bus Controller module
Bus load (dynamic display)
Bus load (dynamic display)
Response time for high priority sensor
Response time for high priority sensor
Response time for low priority sensor 1
Response time for low priority sensor 1
Transmission time for the constant source
Transmission time for the constant source