Packet sending method, apparatus, and device
By using FPGA PL memory and timer configuration tables in the autonomous driving system, the problem of inaccurate CAN FD message synchronization period was solved, and efficient and accurate periodic message transmission was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2023-05-18
- Publication Date
- 2026-05-01
AI Technical Summary
In autonomous driving computing systems, when LiDAR synchronizes with the system via CAN FD messages, the period accuracy cannot be guaranteed, causing period jitter to exceed the threshold and resulting in reported error cases.
Periodic messages are written to programmable logic memory, a programmable logic configuration table is configured, and a timer is used to ensure that periodic messages are sent at a predetermined time. The FPGA PL memory and hardware layer cache accelerate the transmission process of CAN FD messages.
It improves the efficiency and accuracy of CAN FD message transmission, ensures that periodic messages are sent according to the predetermined cycle, and reduces the occurrence of error cases.
Smart Images

Figure CN116582387B_ABST
Abstract
Description
Message transmission methods, apparatus and equipment Technical Field
[0001] This disclosure relates to the field of autonomous driving technology, specifically to the field of message transmission technology. Background Technology
[0002] In autonomous driving computing systems, the lidar synchronizes with the system via CAN FD (Controller Area Network Flexible Data-Rate) messages. Tasks running on the system software send CAN FD messages with different IDs to the lidar. Because the CPU schedules between different tasks, cycle accuracy cannot be guaranteed. If cycle jitter exceeds a threshold, an error case is reported. Summary of the Invention
[0003] This disclosure provides a message sending method, apparatus, device, storage medium, and program product.
[0004] In a first aspect, embodiments of this disclosure propose a message transmission method, comprising: upon receiving a transmission request for a periodic message, writing the periodic message into a programmable logic memory, wherein the periodic message is a baud rate variable controller area network (CAN FD) message; configuring a programmable logic configuration table based on the information of the periodic message, and configuring the periodic parameters in the programmable logic configuration table into a timer; starting the timer, and when the timer alarms, retrieving the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table; and first writing the periodic message into a hardware layer cache, and then sending it from the hardware layer cache to the CAN bus of the controller area network.
[0005] Secondly, embodiments of this disclosure provide a message transmission device, comprising: a first writing module configured to write a periodic message into a programmable logic memory upon receiving a transmission request for a periodic message, wherein the periodic message is a baud rate variable controller area network (CAN) FD message; a configuration module configured to configure a programmable logic configuration table based on information from the periodic message, and to configure periodic parameters in the programmable logic configuration table into a timer; an acquisition module configured to start a timer, and to acquire the periodic message from the programmable logic memory based on a storage index address in the programmable logic configuration table when the timer alarms; and a first transmission module configured to first write the periodic message into a hardware layer cache, and then transmit it from the hardware layer cache to the CAN bus of the controller area network.
[0006] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method as described in any implementation of the first aspect.
[0007] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method as described in any implementation of the first aspect.
[0008] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method as described in any of the implementations of the first aspect.
[0009] The message transmission method provided in this disclosure involves writing periodic messages into the FPGA PL memory, configuring the information of the periodic messages in the FPGA PL configuration table, and simultaneously passing the period parameters from the FPGA PL configuration table to a timer. When the timer alarms, the periodic message is retrieved from the FPGA PL memory and transmitted. Using the FPGA PL can accelerate the CAN FD message transmission process. Utilizing the timer ensures that periodic messages are transmitted according to a predetermined period, greatly improving the efficiency and accuracy of the CAN FD message transmission process.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0011] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. Wherein:
[0012] Figure 1 is a flowchart of an embodiment of the message transmission method according to the present disclosure;
[0013] Figure 2 is a flowchart of yet another embodiment of the message transmission method according to the present disclosure;
[0014] Figure 3 is a flowchart of another embodiment of the message transmission method according to the present disclosure;
[0015] Figure 4 is a data flow diagram of message transmission;
[0016] Figure 5 is a block diagram of message transmission;
[0017] Figure 6 is a schematic diagram of a structure of a message transmission apparatus according to an embodiment of the present disclosure;
[0018] Figure 7 is a block diagram of an electronic device used to implement the message transmission method of the embodiments of this disclosure. Detailed Implementation
[0019] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] Figure 1 illustrates a flow 100 of an embodiment of a message transmission method according to the present disclosure. The message transmission method includes the following steps:
[0022] Step 101: Upon receiving a request to send a periodic message, write the periodic message into the programmable logic memory.
[0023] In this embodiment, when a request to send a periodic message is received, the periodic message can be written into PL (Programmable Logic) memory for temporary storage.
[0024] Periodic messages can be CAN FD messages sent periodically. In autonomous driving computing systems, the lidar synchronizes with the system via CAN FD messages. Tasks running on the system software send CAN FD messages with different IDs to the radar. CAN FD refers to a modern CAN (Controller Area Network) bus protocol that allows for higher data transmission rates and larger payloads. CAN FD messages are data frames transmitted according to the CAN FD protocol, enabling high-speed and reliable communication on the CAN FD bus.
[0025] Among them, PL can be FPGA (Field Programmable Gate Array Programmable Logic), which can be used to accelerate the transmission process of CAN FD messages.
[0026] Step 102: Configure the programmable logic configuration table based on the information in the periodic message, and configure the periodic parameters in the programmable logic configuration table to the timer.
[0027] In this embodiment, the PL configuration table can be configured based on the information in the periodic message, and the periodic parameters in the PL configuration table can be configured into the timer.
[0028] The PL configuration table can be an FPGA PL configuration table, which can configure information about periodic messages, including but not limited to: the period, identifier, data length, enable, and storage index address of the periodic message. Furthermore, the period parameter in the FPGA PL configuration table can be configured for timers.
[0029] Step 103: Start the timer, and when the timer alarms, retrieve the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table.
[0030] In this embodiment, when the timer is started and when the timer alarms, the periodic message can be found in the PL memory based on the storage index address in the PL configuration table.
[0031] Here, after the timer starts, if its count value is equal to the period parameter, the timer will alarm to indicate the time when the periodic message is about to be sent.
[0032] Step 104: First write the periodic message into the hardware layer cache, and then send it from the hardware layer cache to the CAN bus of the controller area network.
[0033] In this embodiment, when the timer alarms, the periodic message can be first written to the hardware layer buffer and then sent from the hardware layer buffer to the CAN bus, thereby ensuring that the periodic message is sent according to the predetermined periodic time, which greatly improves the efficiency and accuracy of the CAN FD message sending process.
[0034] The message transmission method provided in this disclosure involves writing periodic messages into the FPGA PL memory, configuring the information of the periodic messages in the FPGA PL configuration table, and simultaneously passing the period parameters from the FPGA PL configuration table to a timer. When the timer alarms, the periodic message is retrieved from the FPGA PL memory and transmitted. Using the FPGA PL can accelerate the CAN FD message transmission process. Utilizing the timer ensures that periodic messages are transmitted according to a predetermined period, greatly improving the efficiency and accuracy of the CAN FD message transmission process.
[0035] Referring again to Figure 2, a flow 200 of another embodiment of the message transmission method according to this disclosure is shown. This message transmission method includes the following steps:
[0036] Step 201: Upon receiving a request to send a periodic message, write the periodic message into the programmable logic memory.
[0037] Step 202: Configure the programmable logic configuration table based on the information in the periodic message, and configure the periodic parameters in the programmable logic configuration table to the timer.
[0038] Step 203: Start the timer, and when the timer alarms, retrieve the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table.
[0039] Step 204: First write the periodic message into the hardware layer cache, and then send it from the hardware layer cache to the CAN bus of the controller area network.
[0040] In this embodiment, the specific operations of steps 201-204 have been described in detail in steps 101-104 of the embodiment shown in Figure 1, and will not be repeated here.
[0041] Step 205: When a request to send an aperiodic message is received, the aperiodic message is written into the hardware cache.
[0042] In this embodiment, when a request to send an aperiodic message is received, the aperiodic message can be written into the hardware cache.
[0043] Among them, non-periodic messages can be CAN FD messages.
[0044] Step 206: Read the non-periodic message from the hardware cache and send it to the CAN bus.
[0045] In this embodiment, non-periodic messages are read from the hardware cache and sent to the CAN bus.
[0046] It should be noted that the process of sending non-periodic messages is similar to the process of sending periodic messages when the timer alarms. For details, please refer to step 104 in Figure 1, which will not be repeated here.
[0047] As can be seen from Figure 2, compared with the embodiment corresponding to Figure 1, the message sending method in this embodiment adds a step of sending non-periodic messages in process flow 200. Therefore, the solution described in this embodiment can send not only periodic messages but also non-periodic messages, making its application scenarios more extensive.
[0048] Referring further to Figure 3, a flow 300 of another embodiment of the message transmission method according to this disclosure is illustrated. This message transmission method includes the following steps:
[0049] Step 301: Initiate a request to send periodic messages through the radar service layer.
[0050] In this embodiment, the radar service layer can initiate a request to send periodic messages.
[0051] Step 302: Invoke the intermediate layer to transmit the periodic message sending request from the radar service layer to the CAN FD driver layer.
[0052] In this embodiment, the intermediate layer can transmit the periodic message transmission request from the radar service layer to the CAN FD driver layer. The intermediate layer can be a bcan, located between the radar service layer and the CAN FD driver layer.
[0053] Step 303: The CAN FD driver layer writes the periodic message into the first base address register.
[0054] In this embodiment, the CAN FD driver layer can write periodic messages into the first base address register. Typically, periodic messages can be sent to bar4 by reading the message instructions stored in OCM MEM. Here, OCM MEM can be the on-chip memory of the FPGA, and bar4 can be the first base address register.
[0055] Step 304: The CAN FD driver layer writes the information of the periodic message into the second base address register.
[0056] In this embodiment, the CAN FD driver layer can write the information of the periodic message into the second base address register. The second base address register can be bar0.
[0057] Step 305: Configure the periodic parameters in the programmable logic configuration table to the timer.
[0058] Step 306: Start the timer, and when the timer alarms, retrieve the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table.
[0059] Step 307: First write the periodic message into the hardware layer cache, and then send it from the hardware layer cache to the CAN bus of the controller area network.
[0060] In this embodiment, the specific operations of steps 305-307 have been described in detail in steps 202-204 of the embodiment shown in Figure 2, and will not be repeated here.
[0061] Step 308: Initiate a request to send non-periodic messages through the radar service layer.
[0062] In this embodiment, the radar service layer can initiate a request to send non-periodic messages.
[0063] Step 309: Invoke the intermediate layer to transmit the non-periodic message transmission request from the radar service layer to the CAN FD driver layer.
[0064] In this embodiment, the intermediate layer can transmit non-periodic message transmission requests from the radar service layer to the CANFD driver layer. The intermediate layer can be a BCAN, located between the radar service layer and the CAN FD driver layer.
[0065] Step 310: The CAN FD driver layer writes the periodic message into the hardware layer cache.
[0066] In this embodiment, the CAN FD driver layer can write periodic messages into the hardware layer buffer. The hardware layer buffer can be bar2.
[0067] Step 311: Call the CAN FD protocol stack to send aperiodic messages.
[0068] In this embodiment, the CAN FD driver layer can call the CAN FD protocol stack to send non-periodic messages.
[0069] The CAN FD protocol stack is a new standard based on the CAN communication protocol, which improves capabilities such as data rate and frame payload. The CAN FD protocol stack is the software implementation of this communication protocol, including different parts such as the application layer, transport layer, data link layer, and physical layer.
[0070] Specifically, the CAN FD protocol stack employs several new technologies to achieve more efficient data communication and more flexible configuration options. These mainly include:
[0071] 1. The hardware communication interface supports the CAN FD protocol, enabling it to achieve a data transmission rate of 2 Mbit / s without changing the original physical connection method;
[0072] 2. The new data format allows for larger data frame payloads while retaining the classic CAN data frame format, thus ensuring backward compatibility;
[0073] 3. The protocol stack supports an adaptive bit timer, which can dynamically adjust the bit rate on the CAN bus within a specified range according to conditions such as the length of the communication cable and the data transmission rate, so as to avoid problems such as baud rate error and clock jitter caused by changes in cable length.
[0074] 4. Supports enhanced security mechanisms such as information filtering and authentication functions to protect sensitive information in the CAN FD protocol stack from being illegally received and tampered with.
[0075] As can be seen from Figure 3, compared with the embodiment corresponding to Figure 2, the message sending method flow 300 in this embodiment highlights the periodic message storage step and the aperiodic message sending step. Therefore, the scheme described in this embodiment details the processing of periodic and aperiodic messages at each network layer, making the scheme clearer, more complete, and easier to implement.
[0076] For ease of understanding, Figure 4 shows a data flow diagram of message transmission.
[0077] The data flow of non-periodic messages is as follows:
[0078] (1) The radar service layer initiates a request to send non-periodic messages.
[0079] (2) Call the intermediate layer's bcan device.
[0080] Among them, bcan is the middle layer between the radar service layer and the axon driver layer. The axon driver layer is the CAN FD driver layer.
[0081] (3) The axon driver layer begins to access the hardware’s PCIe bar2 space and writes data to the CAN FIFO.
[0082] Among them, CAN FIFO is a hardware-level cache.
[0083] (4) The hardware layer starts calling the CAN FD protocol stack to send non-periodic messages.
[0084] Among them, Xilinx CAN IP is a hardware CAN FD protocol stack.
[0085] The data flow of periodic messages is as follows:
[0086] (1) The radar service layer initiates a request to send periodic messages.
[0087] (2) Call the intermediate layer's bcan device.
[0088] (3) The axon driver layer starts writing data to the bar4 space for temporary storage, then configures the bar0 space and starts the timer counting.
[0089] Here, bar is the space for the PCIe hardware device.
[0090] (4) The FPGAPL will send periodic messages to the CAN bus on time according to the ringing of the timer.
[0091] For ease of understanding, Figure 5 shows a block diagram of message transmission.
[0092] The sending process for periodic messages is as follows:
[0093] (1) After the driver layer receives the periodic message sending request from the upper layer service, it first configures the periodic parameter configuration table (bar0), writes parameters such as period, sending enable, ID, and storage index address into the table, and then writes the periodic message to be sent into OCM MEM (bar4) for temporary storage.
[0094] Among them, OCM MEM is the on-chip memory of the FPGA, which refers to the memory table of bar4 mentioned above.
[0095] (2) cycan_tab will continuously scan the tab ram to check if there are any messages to send. If so, it will write the period parameter to the timer ram and then start the timer ram counting.
[0096] The `cycan_tab` function polls the `tab_ram` to check for any periodic messages to be sent and configures the period parameters in the `timer_ram`. The `tab_ram` is a storage table for periodic messages, and the `timer_ram` is a timer table.
[0097] (3) The cylcan_robin_timer continuously monitors the timer RAM to see if there is a ringing. If there is, it will send a periodic message request to the cycan_tx module.
[0098] Specifically, `cylcan_robin_timer` polls the timer RAM, looks up the alarm flag, and requests to send a message from `cylcan_tx`. `cylcan_timer` also polls the timer RAM, updates the timestamp in the timer table, and sets the alarm flag.
[0099] (4) After receiving the request to send a periodic message, cycan_tx will read the corresponding storage index address from the tab ram, and then read the periodic message to be sent from the OCM MEM according to the storage index address. At the same time, the alarm flag will be cleared.
[0100] Among them, cycan_tx is used to receive and send requests, read message commands stored in OCM MEM, and send them to CAN AxiFIFO. CAN AxiFIFO is a hardware-level cache.
[0101] (5) The periodic message to be sent will first be written to the CAN AXI FIFO and then sent to the CANFD bus.
[0102] Among them, bus_arb is the RAM (Random Access Memory) interface bus arbitration.
[0103] The sending process for non-periodic messages is as follows:
[0104] (1) Directly write to CAN AXI FIFO and send.
[0105] Among them, CAN AXI FIFO is a hardware-level cache.
[0106] Referring further to FIG6, as an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a message sending device, which corresponds to the method embodiment shown in FIG1, and the device can be specifically applied to various electronic devices.
[0107] As shown in Figure 6, the message sending device 600 of this embodiment may include: a first writing module 601, a configuration module 602, an acquisition module 603, and a first sending module 604. The first writing module 601 is configured to write a periodic message into the programmable logic memory upon receiving a request to send a periodic message, wherein the periodic message is a Variable Baud Rate Controller Area Network (CAN) FD message. The configuration module 602 is configured to configure a programmable logic configuration table based on the information in the periodic message, and to configure the periodic parameters in the programmable logic configuration table into a timer. The acquisition module 603 is configured to start the timer, and, when the timer alarms, to acquire the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table. The first sending module 604 is configured to first write the periodic message into a hardware layer cache, and then send it from the hardware layer cache to the CAN bus.
[0108] In this embodiment, the specific processing of the first writing module 601, configuration module 602, acquisition module 603 and first sending module 604 in the message sending device 600 and the resulting technical effects can be referred to the relevant descriptions of steps 101-104 in the corresponding embodiment of Figure 1, and will not be repeated here.
[0109] In some optional implementations of this embodiment, the first writing module 601 is further configured to: initiate a periodic message transmission request through the radar service layer; call the intermediate layer to transmit the periodic message transmission request from the radar service layer to the CAN FD driver layer; and have the CAN FD driver layer write the periodic message into the first base address register.
[0110] In some optional implementations of this embodiment, the configuration module 602 is further configured to: write the information of the periodic message into the second base address register by the CAN FD driver layer.
[0111] In some optional implementations of this embodiment, the message sending device 600 further includes: a second writing module, configured to write an aperiodic message into a hardware buffer when a sending request for an aperiodic message is received, wherein the aperiodic message is a CAN FD message; and a second sending module, configured to read the aperiodic message from the hardware buffer and send it to the CAN bus.
[0112] In some optional implementations of this embodiment, the second writing module is further configured to: initiate a non-periodic message transmission request through the radar service layer; call the intermediate layer to transmit the non-periodic message transmission request from the radar service layer to the CAN FD driver layer; and have the CAN FD driver layer write the periodic message into the hardware layer cache.
[0113] In some optional implementations of this embodiment, the second sending module is further configured to: call the CANFD protocol stack to send aperiodic messages.
[0114] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0115] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0116] Figure 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0117] As shown in Figure 7, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 can also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0118] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as message transmission methods. For example, in some embodiments, the message transmission method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the message transmission method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform message transmission methods by any other suitable means (e.g., by means of firmware).
[0120] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0124] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0125] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0126] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution provided in this disclosure can be achieved, and this is not limited herein.
[0127] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A message sending method, comprising: Upon receiving a request to send a periodic message, the periodic message is written into the programmable logic memory, wherein the periodic message is a Variable Baud Rate Controller Area Network (CAN) FD message; a programmable logic configuration table is configured based on the information in the periodic message, and the periodic parameters in the programmable logic configuration table are configured into a timer; the timer is started, and when the timer alarms, the periodic message is retrieved from the programmable logic memory based on the storage index address in the programmable logic configuration table; the periodic message is first written into a hardware layer cache, and then sent from the hardware layer cache to the CAN bus of the Controller Area Network.
2. The method according to claim 1, wherein, The step of writing the periodic message into programmable logic memory upon receiving a request to send a periodic message includes: initiating the request to send the periodic message through the radar service layer; calling the intermediate layer to transmit the request to send the periodic message from the radar service layer to the CAN FD driver layer; and having the CAN FD driver layer write the periodic message into the first base address register.
3. The method according to claim 2, wherein, The configuration of the programmable logic configuration table based on the information of the periodic message includes: the CAN FD driver layer writing the information of the periodic message into the second base address register.
4. The method according to any one of claims 1-3, wherein, The method further includes: upon receiving a request to send an aperiodic message, writing the aperiodic message into the hardware layer buffer, wherein the aperiodic message is a CAN FD message; reading the aperiodic message from the hardware layer buffer and sending it onto the CAN bus.
5. The method according to claim 4, wherein, The step of writing the non-periodic message into the hardware layer cache upon receiving a transmission request for a non-periodic message includes: initiating the transmission request for the non-periodic message through the radar service layer; calling the intermediate layer to transmit the transmission request for the non-periodic message from the radar service layer to the CAN FD driver layer; and having the CAN FD driver layer write the periodic message into the hardware layer cache.
6. The method according to claim 5, wherein, The step of reading the aperiodic message from the hardware layer cache and sending it to the CAN bus includes: calling the CAN FD protocol stack to send the aperiodic message.
7. A message transmitting device, comprising: A first write module is configured to write the periodic message into programmable logic memory upon receiving a request to send the periodic message, wherein the periodic message is a Variable Baud Rate Controller Area Network (CAN) FD message; a configuration module is configured to configure a programmable logic configuration table based on the information in the periodic message, and to configure the periodic parameters in the programmable logic configuration table into a timer; an acquisition module is configured to start the timer, and to acquire the periodic message from the programmable logic memory based on the storage index address in the programmable logic configuration table when the timer alarms; a first send module is configured to first write the periodic message into a hardware layer cache, and then send it from the hardware layer cache to the CAN bus of the Controller Area Network.
8. The apparatus according to claim 7, wherein, The first writing module is further configured to: initiate a transmission request for the periodic message through the radar service layer; and call the intermediate layer to transmit the transmission request for the periodic message from the radar service layer to the CAN FD driver layer; The periodic message is written to the first base address register by the CAN FD driver layer.
9. The apparatus according to claim 8, wherein, The configuration module is further configured to write the information of the periodic message into the second base address register by the CAN FD driver layer.
10. The apparatus according to any one of claims 7-9, wherein, The device further includes: a second writing module configured to write the non-periodic message into the hardware layer cache when a transmission request for the non-periodic message is received, wherein the non-periodic message is a CAN FD message; and a second sending module configured to read the non-periodic message from the hardware layer cache and send it to the CAN bus.
11. The apparatus according to claim 10, wherein, The second writing module is further configured to: initiate a request to send the non-periodic message through the radar service layer; and call the intermediate layer to transmit the request to send the non-periodic message from the radar service layer to the CAN FD driver layer. The periodic message is written to the hardware layer cache by the CAN FD driver layer.
12. The apparatus according to claim 11, wherein, The second sending module is further configured to: call the CAN FD protocol stack to send the aperiodic message.
13. An electronic device, comprising: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.
Citation Information
Patent Citations
CAN network system and packet transmission control method
CN105099945A
CAN bus data transmission method and control system
CN109962858A