Development of a CAN Slave Module with SystemC. Igor Sachs Shang Qihua

Similar documents
Introduction to Controller Area Network (CAN)

Today. Last Time. Motivation. CAN Bus. More about CAN. What is CAN?

Communication Networks for the Next-Generation Vehicles

The Controller Area Network (CAN) Interface

CAN Protocol Implementation

Recommended readings

CAN-FD Flexible Data Rate CAN

Course Introduction. Purpose. Objectives. Content. Learning Time

Operating Systems, Concurrency and Time. real-time communication and CAN. Johan Lukkien

Design and Implementation of CAN Bus Controller on FPGA

Additional Slides (informative)

Controller area network

BOSCH. CAN Specification. Version , Robert Bosch GmbH, Postfach , D Stuttgart

CAN with Flexible Data-Rate

CAN protocol enhancement

The House Intelligent Switch Control Network based On CAN bus

Basics of UART Communication

ACC, a Next Generation CAN Controller

An Introduction to CAN by Peter Bagschik (I+ME ACTIA)

Data Link Layer Technologies

A Framework Of Milk Dairy Automation Using CAN Protocol

Figure 1. ECU Access to CAN bus

FlexRay and Automotive Networking Future

Ch 7. Network Interface

UNDERSTANDING THE CONTROLLER AREA NETWORK (CAN)

CAN bus and NMEA2000 1

Serial Buses in Industrial and Automotive Applications

EE445M/EE380L.12, Lecture 10 4/2/2018. EE445M/EE360L.6 Embedded and Real-Time Systems/ Real-Time Operating Systems. Lecture 10

EE445M/EE380L.6, Lecture 10 4/3/2016. EE445M/EE360L.6 Embedded and Real-Time Systems/ Real-Time Operating Systems. Lecture 10

in Mainz (Germany) Sponsored by Allen Bradley National Semiconductor Philips Semiconductors Organized by

DEFINITION AND IMPLEMENTATION OF AN ARCHITECTURAL CONCEPT FOR CONFIGURING A CAN NETWORK

THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

Implementation of CAN Bus Protocol

STUDY, DESIGN AND SIMULATION OF FPGA BASED USB 2.0 DEVICE CONTROLLER

Controller Area Network

Pretty Good Protocol - Design Specification

What is needed on top of TLM-2 for bigger Systems?

DCB1M - Transceiver for Powerline Communication

Systems. Roland Kammerer. 10. November Institute of Computer Engineering Vienna University of Technology. Communication Protocols for Embedded

EP A1 (19) (11) EP A1 (12) EUROPEAN PATENT APPLICATION. (43) Date of publication: Bulletin 2012/45

or between microcontrollers)

Using CAN Arbitration for Electrical Layer Testing

Controller Area Network (CAN)

Links. CS125 - mylinks 1 1/22/14

IMPLEMENTATION OF CONTROLLER AREA NETWORK FOR AUTOMOTIVE APPLICATIONS

Sri Vidya College of Engineering and Technology. EC6703 Embedded and Real Time Systems Unit IV Page 1.

CHAPTER 6 FPGA IMPLEMENTATION OF ARBITERS ALGORITHM FOR NETWORK-ON-CHIP

Implementation and validation of SAE J1850 (VPW) protocol solution for diagnosis application

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

CAN in Space workshop

(Controller Area Network)

Lab 8 (ETH): Control Area Network

Design & Implementation of AHB Interface for SOC Application

Enhanced Error-Recovery CAN Bus System Using Reed-Solomon Codec

Digital communication technology for teaching automatic control: the level control case

INTER INTRA VEHICULAR COMMUNICATION

Grundlagen der Automatisierungstechnik. 10. Signale und Kommunikation in der Automatisierungstechnik

FlexRay International Workshop. Protocol Overview

FPGA Implementation Of SPI To I2C Bridge

Debugging CAN, LIN, and FlexRay Automotive Buses with an Oscilloscope

DESIGN AND IMPLEMENTATION OF I2C SINGLE MASTER ON FPGA USING VERILOG

A System Evaluation of CAN Transceivers

Design of an Efficient FSM for an Implementation of AMBA AHB in SD Host Controller

TSS463C. VAN Data Link Controller with Serial Interface. Features. Description

Data Link Layer: Overview, operations

Serial Communication. Spring, 2018 Prof. Jungkeun Park

CLAN A technology-independent synthesizable CAN controller

Lecture 5: Data Link Layer Basics

Lecture 2. Basics of networking in automotive systems: Network. topologies, communication principles and standardised protocols

Laboratory Finite State Machines and Serial Communication

Field buses (part 2): time triggered protocols

Timing in the TTCAN Network

CAN Connected To FlexRay

Developing and Testing Networked Avionics Systems and Devices By Troy Troshynski, Avionics Interface Technologies

Automotive and industrial use cases for CAN FD

IMPLEMENTATION OF INTER AND INTRA VEHICULAR COMMUNICATION SYSTEM

New Generation of CAN Controllers Optimized for 8-bit MCUs

An Introduction to FlexRay as an Industrial Network

Comparison of CAN Gateway Modules for Automotive and Industrial Control Applications

I 2 C Bus Interface - Slave ver 3.08

AMC data sheet. PMC Module with four CAN bus Nodes ARINC825 compliant for Testing & Simulation of Avionic CAN bus Systems

Design and Implementation of CAN Frame Bit Disturbance based on CAN IP Core

Supported Device Family 1. Supported User Interfaces. Resources 3. Documentation. Design Files. Constraints File

How to Hack Your Mini Cooper: Reverse Engineering CAN Messages on Passenger Automobiles

Workshop on In Vehicle Network using CAN By

Keywords- AMBA, AHB, APB, AHB Master, SOC, Split transaction.

I 2 C Master Control FSM. I 2 C Bus Control FSM. I 2 C Master Controller

ENGINEERING Copyright , Philip Koopman, All Rights Reserved

Reconfigurable Computing. Design and implementation. Chapter 4.1

Real-Time Communications. LS 12, TU Dortmund

White Paper AHB to Avalon & Avalon to AHB Bridges

CONTROLLER AREA NETWORK (CAN)

CAN FD filter for Classical CAN controllers

Freescale Semiconductor, I. SECTION 13 CAN 2.0B CONTROLLER MODULE (TouCAN)

Comparison of In-Vehicle Communication Protocols for Critical Applications

CANopen Maritime A New Standard for Highly Dependable Communication Systems

Communication (III) Kai Huang

Goals of Today s Lecture. Adaptors Communicating

A Half-duplex Synchronous Serial Fieldbus S 2 CAN with Multi-host Structure

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

Transcription:

Development of a CAN Slave Module with SystemC Igor Sachs Shang Qihua

Agenda 0. Motivation 1. Introduction to the CAN-Bus 1.1 The CAN Message Format (Frame) 1.2 Bus Arbitration 1.3 Bit Stuffing 2. Development of the Slave Module 2.1 The architecture of the Module 2.2 The Finite State Machine (FSM) 2.3 Problems 3. Presentation of the Hardware 4. Conclusion 5. Questions

Motivation The Controller Area Network (CAN) is a Fieldbus which has realtime capabilities and is mainly used in the automotive industry. The so-called Multimaster Bus was developed at Bosch in 1981 and is today the de-facto standard within Car-electronics. The aim of our project was to design a Slave module for the CAN Bus using the HDL SystemC and implement it into an Xilinx Spartan-2 FPGA CAN Controller CAN Slave... CAN Slave CAN-Bus R T R T

Wiring Harness Yesterday (VW Beetle 1950) Source: Decomsys

Wiring Harness Today (VW Phaeton) Source: Decomsys

The CAN Message Format Every datagram within the CAN Bus consists of a number of bits, which are divided into different fields. Source: Microchip Technology Inc. SOF: 1 dominant bit (0) to indicate the beginning of a new message Arbitration: 11 bit identifier of the source of the message (priority) + RTR Control: 6 bits to identify the length of the data Data: Data to be transmitted (payload) CRC: Cyclic Redundancy Check (bit errors)

Bus Arbitration To avoid data collisions, CAN performs a bitwise and nondestructive arbitration on the bus Wired AND configuration: - 0-level: dominant level - 1-level: recessive level Whenever the bus is free (recessive level), any station can start to transmit data. => Multimaster functionality The lower the value of the identifier, the higher the priority of the frame

Bus Arbitration 2 Nodes writing to the bus: Listen only Node 1 Node 2 Bus The dominant zero of Slave 2 is written on the bus

Bit Stuffing In order to enable synchronisation of the CAN Modules within the frame, there has to be some level-transitions of the data of the frame. To ensure this, if it is naturally not the case, Bit Stuffing has to be applied Whenever 5 consecutive zeros or ones have been detected, an inverted stuff-bit has to be inserted into the bitstream 1 2 3 4 5 6 Additional stuff bit 1 2 3 4 5 6

Special Example of Bit Stuffing Transform the Bits stream 11111 00000 to the bus. 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 0 stuff bit stuff bit

Development of the CAN Slave Module Analysis Project Block Diagram FSM Design Hardware Implementation Verilog SystemC

The Finite State Machine (FSM) FSM: RESET IDLE RX = 1 & RTR = 0 RX = 0 RTR = 1 STARTING RECEIVING ELSE SAMPLES = 7 RX!= TX EOF = 1 BITDESTUFF = 1 ELSE ARBITRATION BIT DESTUFFING SAMPLES = 7 RX = TX BIT STUFFING BITSTUFF = 1 TRANSMITTING SAMPLES = 7 ELSE ELSE

Architecture of the CAN Bus Vcc CAN-H CAN-L Can Controller RX TX 8051 Microcontroller RX TX 82C200 RX TX SN75176A Transceiver (1) B(7,27) A(2,31) 120Ω GND FPGA Can slave RX RE TX D SN75176A Transceiver (2) B A Vcc CAN-BUS GND GND 120Ω

Interface between CAN Master and Salve

Hardware of the Candy (Can Master)

Stream from the CAN Master

Problems Bit (de-) stuffing: extraction and insertion of stuff-bits according to the CAN Protocol, including special stuff-bits Termination and connection of bus: Finding out the correct termination, wiring and connections of the bus Timing/synchronization: keep the different Slaves synchronous Clock: elaborate the correct frequencies SystemC -> Modelsim -> Xilinx = 3 different!!! Behaviors + cumbersome development steps (no IDE, but several different tools)

Presentation of Hardware

Conclusion CAN is a very mighty Bus, which uses its bandwidth efficiently and the access to the Bus is organized according to the priorities of the individual modules. The fieldbus has a guaranteed message latency (priorities through identifiers). Therefore it is very suitable for applications were real-time capabilities are needed. The successor of the CAN Bus will be Flexray, which has in addition Timeand Frequency-Mux capabilities. But CAN will coexist for at least the next one or two decades.

Questions Many thanks to: Prof. J. Reichard Prof. B. Schwarz Dipl.-Ing. D. Palme J. Pflüger Any questions left?

References Decomsys Presentation on Flexray from 08.12.05 at HAW, obtained from Prof. B. Schwarz Stand-Alone CAN Controller With SPI Interface, Microchip Technology Inc. CAN Controller Area Network Grundlagen und Praxis, Wolfhard Lawrenz Controller-Area-Network, Konrad Etschberger