摘要:
The present invention discloses a signal name based method for automatic signal exchange between multiple embedded CPU boards, including the following steps: dividing CPU boards into master board and slave board, where during an initialization phase, each slave board sends signal registration information to the master board; after the master board collects the signal registration information of all the slave boards, reading, from a configuration file, an exchange relationship between an output signal and an input signal that is represented by a connection line between signal names, calculating and allocating a data bus address to which the output signal and the input signal are mapped, and sending memory addresses, data types, and bus addresses of signals to each slave board; after a slave board receives the memory addresses, the data types, and the bus addresses of the signals from the master board, saving same as output signal tables and input signal tables; and during an operation phase, writing, by a signal sender, a value of an output signal into a corresponding bus address according to the output signal tables, and reading, by a receiver, a value of an input signal from a corresponding bus address according to the input signal tables. With this method, signal exchange between CPU boards may be intuitively and simply adjusted, and the correctness of signal exchange is ensured. The present invention further provides an apparatus for implementing automatic signal exchange.
摘要:
The present invention discloses a signal name based method for automatic signal exchange between multiple embedded CPU boards, including the following steps: dividing CPU boards into master board and slave board, where during an initialization phase, each slave board sends signal registration information to the master board; after the master board collects the signal registration information of all the slave boards, reading, from a configuration file, an exchange relationship between an output signal and an input signal that is represented by a connection line between signal names, calculating and allocating a data bus address to which the output signal and the input signal are mapped, and sending memory addresses, data types, and bus addresses of signals to each slave board; after a slave board receives the memory addresses, the data types, and the bus addresses of the signals from the master board, saving same as output signal tables and input signal tables; and during an operation phase, writing, by a signal sender, a value of an output signal into a corresponding bus address according to the output signal tables, and reading, by a receiver, a value of an input signal from a corresponding bus address according to the input signal tables. With this method, signal exchange between CPU boards may be intuitively and simply adjusted, and the correctness of signal exchange is ensured. The present invention further provides an apparatus for implementing automatic signal exchange.
摘要:
Disclosed by the present invention are a running method for an embedded type virtual device and a system, an embedded type device being divided into a managing process, a plurality of real-time modules and a plurality of non-real-time modules. The managing process reading a configuration file, loading real-time and non-real-time module libraries of each processor and completing initialization interaction by means of a virtual controller area network (CAN) bus and first in, first out (FIFO) communication. The managing process starting a real-time thread and serially scheduling real-time task according to a task period setting relation. The managing process starting a plurality of non-real-time threads, calling a period task of a non-real-time module and carrying out parallel communication with a plurality of debugging clients. The real-time modules exchange data with each other by means of a virtual data bus, and the real-time modules exchange data with the non-real-time modules by means of a sharing memory.