introduction
MVB (Multi-function Vehicle Bus) based on distributed control is the recommended solution of IEC61375-1 (1999) TCN (International Standard for Train Communication Network). The train communication bus formed by it and WTB (Wire Train Bus) has the characteristics of strong real-time performance and high reliability. MVB, as a fast process control optimized bus, can provide the best response speed. It is a serial data communication bus mainly used for interconnected devices with interoperability and interchangeability requirements. It is suitable for use as a vehicle bus. For fixed-formation trains, MVB can also be used as a train bus, as shown in Figure 1.
As system integration technology continues to mature, a new industry has emerged, namely IP (Intellectual Property) products and modular design. In integrated circuit design, IP specifically refers to circuit modules that can be circulated among design companies through intellectual property trade to achieve specific functions. The essential feature of IP cores is usability. They usually meet the three basic characteristics of good versatility, portability and absolute correctness. They are the core of future SOPC (System On Programmable Chip) design. To make SOPC design successful, more intellectual property (IP) reuse should be used to quickly complete the design and obtain low-cost silicon devices to meet market demand.
The author has conducted an in-depth study on the traditional foreign MVB communication controller chip MVBC and the MVB underlying communication protocol. On this basis, he designed an MVB bus access IP core with independent intellectual property rights and designed an MVB controller using SOPC technology.
1 Introduction to MVBC
MVBC (Multi-function Vehicle Bus Controller) is a new generation of core processor on the MVB bus. It is independent of the physical layer and functional devices, and provides communication interfaces and communication services for each device on the bus. Compared with the previous generation MVB communication controller BAP15-2/3, MVBC has greatly improved in performance and is currently the most advanced communication controller on the MVH bus. The internal structure of MVBC is shown in Figure 2.
MVBC is used to convert serial bit signals from the MVB bus into parallel data bytes, and send the bytes to be sent to the transmission medium through the serialization circuit, realize data processing of the data link layer and part of the transmission layer, and interact with the upper layer software through the communication memory. The bus controller contains the codec circuit and the logic circuit required to control the communication memory, which is used to control the sending and receiving of frames (such as conflict detection, frame leading bit processing and CRC check bit processing, etc.).
2 Implementation of MVB bus access IP core
The bus access IP core is used to replace the MVBC chip of the existing MVB network card to realize the application function. The IP core combines the bus transceiver of the physical layer to complete the bus access. The bus access IP core can be divided into three parts: the physical layer, the data link layer and the interface with the application layer.
① Physical layer: implement baseband Manchester Biphase-L encoding and decoding, media redundancy processing, media installation unit interface, and design of digital phase-locked loop for input decoding.
②Data link layer: including addressing method, F-code (function code) generation, filling of master and slave device frame content, and media access control (MAC), etc.
③ Interface with the application layer: usually adopts the shared memory method, which requires the definition and maintenance of ports, control of communication memory, etc. Its logic block diagram is shown in Figure 3.
2.1 MVB frame structure
There are two frame formats in MVB: one is the master frame that can only be sent by the bus master, referred to as the "master frame"; the other is the slave frame that is sent by the slave in response to the master frame, referred to as the "slave frame". A frame starts with a 9-bit delimiter. The master frame delimiter and the slave frame delimiter are different to prevent synchronization failure. Figure 4 is a diagram of the MVB master-slave frame structure.
2.2 MVB frame transmitter
The MVB bus data is based on frames, and the data frames are transmitted using Manchester code. The encoder and decoder not only perform Manchester encoding and decoding, but also special encoding and decoding of the frame header and frame tail. The traditional Manchester codec will not be able to complete this task. In this design, the method of encoding and decoding is combined with the specific state of the transceiver state machine to solve this problem. The MVB frame transmitter calls the Manchester encoding and CRC check module and the communication storage unit module through the control logic module to complete the transmission of the buffer data.
The design of the transmitter's state machine FSM (Finite State Machine) is described below. One of the main functions of the transmitter is to realize parallel-to-serial conversion and framing. The MVB bus data starts to send data after receiving the send set signal; when the data is stored in the communication storage unit, it waits for the set signal of the control logic module; then it enters the frame sending state, completes the transfer between various states through the triggering of the clock signal, and realizes a set of valid frame data transmission. The transmitter's state machine FSM is shown in Figure 5.
2.3 MVB frame receiver
[page]The key to the receiver is the recognition of valid data frames. The implementation idea is similar to that of the transmitter, and it can be realized based on the coding check. Another problem is the interface method with the bus. This design uses 8-bit parallel data width output, and the method of adding sequence number identification can receive valid data of any given length. The state machine of the receiver is shown in Figure 6.
2.4 Avalon Bus Interface
The Avalon interactive system-on-chip bus developed by Altera is used as the internal bus of this bus access IP core to connect various modules in the IP core. As shown in Figure 7, the bus access IP core structure includes: encoder module, decoder module, sink port refresh time monitoring module, and a class of device logic control module. There are 4 Avalon slave ports in the bus access IP core, among which an Avalon bus master port is set on the NiosII main controller, and Avalon bus slave ports are set on other modules. The main controller controls the data flow transmission on the bus to realize the coordinated work of various modules. Its logic block diagram is shown in Figure 7.
3 SOPC System-on-Chip MVB Controller Design
3.1 Bus Access IP Core and Nios II System Integration
Using QuartersII SOPC Builder tool, a 32-bit NiosII soft-core processor, 4 KB on-chip RAM, MVB bus access IP core (including encoder and decoder) and LCD control module are integrated to form a chip system that can realize MVB-type network node functions on Altera's CycloneII FPGA, as shown in Figure 8. Figure 9 shows the use of various functional modules in SOPCBuilder.
3.2 Software Design on NiosII Processor
Based on the above SOPC system, a basic MVB node is designed to realize process data transmission. The node sets the 0x14 address as the source port. When the master frame polls the 0x14 address, this node packs the data in this port into a slave frame and sends it to the bus to refresh the sink port of the 0x14 address.
The design of the MVB module header file altera_avalon_mvb.h includes the macro definitions for bus access to IP core registers for reading and writing.
In the main function, the MVB bus receiving enable bit is set, and the loop waits for receiving the main frame sent by the MVB main controller. After the node receives the main frame, the program enters the interrupt handler. In the interrupt program, the port address in the received main frame is extracted and compared with the preset port address code. If the address code matches, the node sends the data of this port to the bus through the MVB transmitter to implement the port data refresh operation.
Main loop code excerpt:
4 Simulation and Measured Waveforms
4.1 Simulation waveform
In this experiment, the MVB board designed by the laboratory was functionally simulated and FPGA verified. The MVB system built was verified by sending and receiving process data. The simulation results of the master-slave frame sending process of the MVB bus controller are shown in Figure 10. The master-slave frame data sent are all 0x0055, including 1 frame header and 8-bit CRC check data.
4.2 Measured waveform
After the program is compiled, compile the QuartersII project file again and download the obtained .pof file to the FPGA. After powering on, use an oscilloscope to measure the output pin, and you can observe the MVB frame waveform. The measured waveform is shown in Figure 11. Compared with the IEC-61375 protocol standard, it can be judged that the waveform is a correct waveform that meets the standard, and the source port node receives the correct data, which proves that the process data port is successfully refreshed.
Conclusion
At present, the MVB controller has realized the correct reception and transmission of process variables in the laboratory environment. The functions realized by this bus access IP core are equivalent to those of MVBC, but due to the use of advanced SOPC design technology, its architecture is greatly simplified, the design difficulty is greatly reduced, and the versatility is greatly improved.
Previous article:Digital Voice Compression System Based on TMS320C6711
Next article:Design of filter based on VerilogHDL
Recommended ReadingLatest update time:2024-11-16 20:55
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- 【Renovation of old things】 Graffiti lamp 2 software preparation
- Display image on CLUE
-
EEWORLD University Hall----Live Replay:
TE Connectivity's Smart Building Solutions - Sensing and connectivity are key to smart building design - [2022 Digi-Key Innovation Design Competition] Museums are amazing, yeah!
- wifi to serial
- CCS Installation and Use Tutorial
- 【EVK-NINA-B400 Evaluation Kit】+Building Environment and Small Test
- Double-layer board, PCB charges?
- Power Development Tutorial: Summary of topology transformation calculation formulas
- Switching Power Supply Interest Group 15th Task