The Design of CAN Controller with Verilog HDL

Author
LiYaFeng
Advisor
ZhengTaoLei
School
Beijing Jiaotong University
Major
Microelectronics and Solid State Electronics
Classification
TP273 Automatic control,automatic control system
Degree
Master's thesis
Year
2008
Downloads
489
Citations
4

Request the full text

Abstract

As one of Field Buses, CAN Bus is widely used in many areas. And it is considered to be one of the most promising Buses. But chips available in the market are customized with all kinds of standards. So from the idea of developing ASIC, we can make use of FPGA to design an application specific CAN controller, hence to its functions, which is very meaningful.The main purpose is to complete the front-end design of CAN controller using FPGA. That means to complete the RTL-level design of Data Link Layer in CAN Protocol by using Verilog HDL, and to achieve its function, then to evaluate the design through the simulation on the platform Quartus II.In the thesis, our work is started from the lower level. Firstly, we analyze the CAN Protocol. Secondly, we split the entire CAN controller into several modules which are independent but associated with each other. Thirdly, their function and principle are introduced. At last, we manage to design the modules in RTL-level, to explain the idea and process, and to improve design for timing correctly by simulation. The simulation is divided into two parts: One is the logic function simulation, the other is simulation including information of the netlist and gate delay.Within the whole design, we split CAN controller into three modules. Register Logic Module is used to save the frame information, status and commands. We can transfer the data writing to and reading from itself. Acceptance Filter is used to check the identifier. Bit Stream Processor, the core part of the controller, is not only used to control bit stream between TXB, RXFIFO and CAN bus, but also complete the function of receiving and transmiting frames of data.In simulating, we suppose the clock cycle to be 10ns, and under this condition, the modules are found to meet the design requirements. In other words, we have laidthe foundation for incorporating more functions into CAN controller based on FPGA.

Table of contents

Acknowledgements 5-6 Chinese Abstract 6-7 ABSTRACT 7-11 1 Introduction 11-15 1.1 Verilog HDL and FPGA background and superiority 11 the status of 1.2 fieldbus CAN 11-12 1.3 FPGA realization of the significance of the CAN bus controller 12-13 1.4 research content and target 13-14 1.5 paper structure arrangements 14-15 2 CAN protocol 15-33 2.1 Introduction 15-17 2.2 basic concepts 17-20 2.3 packet transmission 20-29 2.3.1 frame format 20 2.3.2 frame type 20-29 2.3.3 frame format consistency 29 2.3.4 transmitter / receiver definition 29 2.4 packet filtering 29-30 2.5 packet checksum 30 2.6 Coding 30 2.7 Error Detection 30-31 2.8 Summary 31-33 3 analysis underlying CAN controller module 33-55 3.1 CAN controller general introduction 33-34 3.1.1 CAN controller 33 3.1.2 CAN controller system 33-34 the CAN 3.2 local control module 34-37 3.2.1 interface management logic 35 3.2.2 Transmit Buffer 35-36 3.2.3 Receive Buffer 36 3.2.4 acceptance filter 36 the 3.2.5 bit stream processor 36 3.2.6-bit timing logic 36 3.2.7 error management logic 36-37 3.3 CAN controller inside details 37-49 3.3.1 two modes of operation of the CAN controller 37 3.3.2 BasicCAN mode register their functions to describe 37-41 3.3.3 PeliCAN register and address list 41-49 the the 3.4 acceptance filter structure and use 49-54 3.4.1 acceptance filter is defined 49 3.4.2 single filter mode 49-51 the 3.4.3 dual filter mode 51-54 3.5 Summary 54-55 the register module design and realize 55-69 4.1 overall introduction using Verilog HDL CAN controller 55-56 4.2 register module design foundation 56-59 4.2.1 register module 56 4.2.2 register unit module 56-59 4.3 register module implementation 59-63 4.3.1 register module's input and output signals defined 59-60 4.3.2 writes data to the register 60-61 4.3.3 read data from the register 61-63 4.4 Simulation 63-67 4.4.1 register module block diagram 63-64 4.4.2 to write registers Simulation results 64-66 4.4.3 read registers simulation results 66-67 4.5 Summary 67-69 the acceptance filter design and realization 69-81 5.1 design ideas 69-70 5.2 BasicCAN mode acceptance filtering 70 5.3 PeliCAN mode acceptance filtering 70-72 5.3.1 single filter mode 70-71 5.3.2 dual filter mode 71-72 5.4 Simulation 72-79 5.4.1 BasicCAN mode simulation results 73-75 5.4.2 PeliCAN mode simulation results 75-79 5.5 Summary 79-81 6-bit stream processor design and realization 81-99 6.1 signal defined 81-84 the the 6.2 received frame module design 84-88 6.2.1 received frame state diagram 84-85 6.2.2 the module simulation results received frame 85-88 the bit stuffing 6.3 module design 88-90 the the 6.3.1 bit stuffing design ideas 88-89 6.3.2 filling module simulation waveforms 89-90 6.4 the CRC and RXFIFO module 90-93 6.4.1 RXFIFO design ideas 90-91 6.4.2 RXFIFO key code 91-92 6.4.3 CRC checksum module 92-93 6.5 send data frame module 93-97 6.5.1 sending data frames flowchart 93-94 6.5.2 Define Send value 94-95 6.5.3 transmitted frame module simulation waveform 95-97 6.6 Summary 97-99 7 Conclusion 99-101 the References 101-102 of resume The 102-104 the Dissertation datasets 104

Related dissertations

  1. Research and Design of the Des Encryption Chip Based on Resource Optimization
  2. Research and Design of32-bit and Five-stage Pipelined CPU Based on FPGA
    MiHaiXiao ·Hebei University of Technology ·2012 ·Master's thesis
  3. The Research and Design of RISC Microprocessor Soft Core
    ZhuShuangBing ·Hubei University ·2013 ·Master's thesis
  4. JPEG Encoding Algorithm Optimization and Implementation Based on FPGA
    ZhaoWei ·Wuhan University of Technology ·2013 ·Master's thesis
  5. Research of CAN_USB Conversion System Based on FPGA
    WangShengXing ·Beijing Jiaotong University ·2012 ·Master's thesis
  6. Design of Environment Monitoring System for Power Supply in Mobile Communication Base Station of Hunan Telecom
    XuZuoFang ·Hunan University ·2013 ·Master's thesis
  7. Optical Fiber Perimeter Alarm System Based on DSP and FPGA
  8. Design and Implementation of the Engineering Machinery Color Monitor System Based on FPGA+MCU
    LiuWen ·Xiangtan University ·2013 ·Master's thesis
  9. Digital Electrical Impedance Tomography Hardware System Design Based on FPGA
  10. Study on Magnetic Flux Leakage Testing System of Rail Based on FPGA
  11. Digital Cross Section Data Acquisition System Based on Industrial Standard System Bus
    ZhangZhiQiang ·Tianjin University ·2009 ·Master's thesis
  12. Research of Dual Chanel High Speed Data Acquisition Card
    DanGuangXing ·Harbin Institute of Technology ·2012 ·Master's thesis
  13. Design and Implementation of FPGA-Based Six-Channel Non-Crosstalk Sonar System
    ZuoJiaLin ·Tianjin University ·2012 ·Master's thesis
  14. The Realization of Quality Detection System of Cataplasm Coating Based on FPGA
    LiuRongPeng ·Tianjin University ·2012 ·Master's thesis
  15. Design of Remote Strain Measurement System Based on FGPA
    LiuNanNan ·Harbin Engineering University ·2013 ·Master's thesis
  16. The Design of Digital Ultrasonic Nondestructive Testing System
  17. Design of Embedded Data Acquisition and Processing System of MEMS-INS
  18. Design and Implementation of High Speed Data Recorder Based on FPGA
  19. Design of the High-speed Data Acquisition System Based on USB Interface
    LiuYu ·Harbin Engineering University ·2013 ·Master's thesis
  20. Design and Implementation of Four Channels High Speed Synchronous Sampling in Sound Source Localization System
    ZhengZuo ·Hebei University of Technology ·2013 ·Master's thesis