Communications equipment
By using the memory control unit and the last data mark in the descriptor to detect frame loss in automotive communication equipment, real-time error control of frame loss is achieved, the processing delay problem caused by frame loss is solved, and the processing performance of the system is improved.
Patent Information
- Application Number
- CN202010261305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-04-05
- Filing Date
- 2020-04-03
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-04-03
AI Technical Summary
In automobile autonomous driving systems, frame loss causes communication equipment to transmit unexpected data to unexpected memory, resulting in processing delays and reduced processing capabilities. Existing technologies cannot effectively control errors.
By introducing a memory control unit into the communication device, the last data flag and transmission rules in the descriptor are used to detect frame loss, and error control is performed at the hardware level to avoid exception processing by the CPU.
It realizes real-time detection and error control of frame loss, improves the processing performance of communication equipment, and avoids data deviation and processing delay caused by frame loss.
Smart Images

Figure CN111800224B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] The entire disclosure of Japanese Patent Application No. 2019-072624 filed on April 5, 2019 including the specification, drawings and abstract is incorporated herein by reference. Technical Field
[0003] The present disclosure relates to a communication device and may be suitable for use in a communication device of an in-vehicle network, for example. Background Art
[0004] In recent years, the technology of car autonomous driving has been widely studied and developed. In order for a car to drive itself, it is necessary to process a large number of frames (hereinafter, data sent and received on the network is referred to as "frames") acquired by various sensors and cameras attached to the car without delay and control the entire car.
[0005] As cars become more automated, a large number of devices are connected to the in-vehicle network, the number of frames processed by communication devices increases dramatically, and the amount of data processed by communication devices exceeds the processing capacity of the software of the communication devices. Therefore, communication devices include multiple memories and CPUs (central processing units) in order to process large amounts of data.
[0006] In order for each CPU to perform distributed processing, the communication device divides the received frame into multiple data fragments and sends each data fragment to the memory corresponding to each CPU. At this time, the communication device assumes that the order and size of the payload in the frame are fixed for each type of frame received, divides the frame into multiple data fragments, and sends these data fragments to each memory. Therefore, when the frame received by the communication device is lost, the communication device can transfer unexpected data to unexpected memory. If the software of the communication device performs exception processing for all unexpected data transmissions, the processing becomes very complicated and there is a possibility of delays in data processing. Therefore, it is expected to transmit data and control errors through hardware.
[0007] [Patent Document 1] Japanese Patent Application Publication No. 2017-204083
[0008] Regarding the transmission of data, for example, Patent Document 1 discloses a system in which "when an application to be executed is switched, the DMAC refers to data for setting a memory area (including area data corresponding to the next application from the TCM) to store the area data to be executed, and transfers the data directly to a register of the MCU to perform memory protection." Summary of the invention
[0009] According to the technology disclosed in Patent Document 1, error control cannot be performed for frame loss. Therefore, even in the case of frame loss, the communication device continues processing in a state of transmitting unexpected data to an unexpected memory. In order to prevent this state, each CPU included in the communication device needs to perform exception processing by software, and as a result, the processing capacity of the communication device is reduced. Therefore, a technology for providing error control for frame loss is needed. The present disclosure is made in view of the above background, and in some aspects provides a technology for performing error control for frame loss.
[0010] Other objects and novel features will become apparent from the description of this specification and the accompanying drawings.
[0011] According to one embodiment, a communication device includes: a receiving unit for receiving a frame including a plurality of data; a first memory for temporarily storing the plurality of data; a second memory for storing a transmission rule for each of the plurality of data; a plurality of third memories to which the plurality of data are respectively allocated; and a memory control unit for sequentially allocating each of the plurality of data from its head to each of the plurality of third memories. When the data acquired from the first memory is not the last data of the frame, or when the second data includes a last data flag and the size of the data acquired from the first memory is greater than the size defined by the second data, the memory control unit outputs an error.
[0012] According to the above-described embodiment, the communication device can detect the loss of a frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a diagram showing a configuration example of an in-vehicle network.
[0014] Figure 2 is a diagram showing a configuration example of the communication device 101 .
[0015] Figure 3 is shown by Figure 2 FIG. 2 is a diagram of an example of signals of a communication path such as Ethernet 208 .
[0016] Figure 4 is a diagram showing examples of frame types.
[0017] Figure 5 is a diagram showing an example of data transmission in a frame in the communication device 101 .
[0018] Figure 6 is a diagram showing an example of data transmission in a lost frame in the communication device 101 .
[0019] Figure 7is a diagram showing an example of transmitting data in a frame using a last data flag in the communication device 101 .
[0020] Figure 8 is a diagram showing an example of a more detailed configuration of the communication device 101 .
[0021] Fig. 9 is a diagram showing an example of communication processing by the communication device 101 .
[0022] Fig.10 is a diagram showing an example of the format of the descriptor 1000 .
[0023] Fig.11 is a diagram showing an example of the format of the descriptor 1100 .
[0024] Fig.12 is a diagram showing an example of the format of the descriptor 1200 .
[0025] Fig.13 is a diagram showing an example of the format of the descriptor 1300 .
[0026] Fig.14 is a diagram showing an example of the format of the frame 1400 .
[0027] Fig.15 is a diagram showing an example of the format of a frame 1500 .
[0028] Fig.16 is a diagram showing an example of the format of the descriptor 1600 . DETAILED DESCRIPTION
[0029] Hereinafter, each embodiment will be described in detail with reference to the accompanying drawings. The same or corresponding parts are denoted by the same reference numerals, and their description will not be repeated.
[0030] Figure 1 is a diagram showing an example of the configuration of an in-vehicle network. The in-vehicle network is configured by connecting multiple communication devices 101 to each other. Various devices such as cameras, radars, LiDAR (light detection and ranging), chassis, and power systems are connected to each communication device 101, and each communication device 101 processes frames received from these devices. The communication device 101 is connected to an external network and can collaborate with cloud services. Since the communication device 101 needs to process and transmit various data without delay, the communication device 101 includes multiple CPUs and memories. The communication device 101 also includes a memory control unit that divides the received frame into multiple data segments and allocates the data to each memory. Next, the details of the communication device 101 will be described.
[0031] Figure 2is a diagram showing a configuration example of the communication device 101. The communication device 101 includes CPUs 201A, 201B, and 201C (hereinafter collectively referred to as "CPU 201"), memories 202A, 202B, and 202C (hereinafter collectively referred to as "memories 202"), a controller 203, a bus 204, and a memory 205.
[0032] The communication device 101 is connected to a CAN (Controller Area Network) 207 and Ethernet (registered trademark Ethernet) 208 via a gateway 206. Furthermore, the communication device 101 is connected to a power system 209, a chassis 210, and a sensor 211 via the CAN 207. The communication device 101 is connected to a LiDAR 212 via the Ethernet 208.
[0033] Notice, Figure 2 The configuration of is an example, and the configuration of the communication device 101 is not limited thereto. In some aspects, the number of CPU 201 and memory 202 may be 1, 2, or 4 or more. In addition, in another aspect, the power system 209 and the sheath 210 and the sensor 211 may be connected to the easier network 208, and the LiDAR 212 may be connected to the CAN 207. In other aspects, any device other than the power system 209, the chassis 210, the sensor 211, and the LiDAR 212 may communicate with the communication device 101.
[0034] The CPU 201 is associated with the memory 202 , and the CPUs 201A, 201B, and 201C process data stored in the memories 202A, 202B, and 202C, respectively.
[0035] The memory 202 is implemented by a random access memory (RAM) that stores data received from the controller 203 via the bus 204. In some aspects, the memory 202 may be a DRAM (dynamic random access memory) or an SRAM (static random access memory).
[0036] The controller 203 divides the frame obtained from the gateway 206 into a plurality of data segments. The controller 203 transmits the divided data to each memory 202 via the bus 204. The controller 203 also includes a memory 213. In some aspects, the memory 213 may be external to the controller 203. The controller 203 uses the memory 213 as a FIFO (First In First Out Memory).
[0037] The memory 205 stores the transmission rules defining the addresses, etc. in the memory for the transmission destination of each data included in each frame. The controller 203 determines the data transmission destination by referring to the transmission rules of the memory 205. In some aspects, the transmission rules can be included in the file descriptor. The memory 205 stores a file descriptor chain as a continuous file descriptor.
[0038] The gateway 206 receives frames from various devices and transfers the received frames to the communication device 101. The gateway 206 transmits the frames received from the communication device 101 to another device.
[0039] In some aspects, the communication device 101 may be a SoC (System on Chip), an FPGA (Field Programmable Gate Array), and an ASIC (Application Specific Integrated Circuit), or a combination thereof.
[0040] Figure 3 is shown by Figure 2 FIG. 1 is a diagram of an example of signals of a communication path such as Ethernet 208. Signal 301 is a signal for synchronization. Signal 302 is a data signal. Communication device 101 and gateway 206 capture signal 303 detected by signal 301 during a high period as part of a frame. Communication device 101 and gateway 206 may capture signal 303 multiple times and process it as a frame.
[0041] Figure 4 is a diagram showing examples of frame types. Table 400 includes Figure 2 208. Each frame is assigned a filter code. The types of data included in the frame include "powertrain data", "chassis data" and "sensor data". These data can be included in the payload of the frame.
[0042] For example, in table 400, a frame with filter code "a" includes "powertrain data", "chassis data", and "sensor data" in the payload. A frame with filter code "c" includes "powertrain data" and "chassis data" in the payload. Thus, for each type defined by a filter code, a frame can include one or more data in the payload.
[0043] Note that these data are examples and that a frame may include many more types of data. For visual clarity, table 400 depicts one block in each column. When communication device 101 stores table 400, table 400 may include alphanumeric or binary data instead of blocks.
[0044] Figure 55 is a diagram showing an example of data transmission in a frame in the communication device 101. The descriptor chain 501 is stored in the memory 205. The memory addresses X, Y, and Z are addresses in the corresponding memories 202. The data transmitted to the memory addresses X, Y, and Z are processed by the CPU 201 corresponding to the memory 202.
[0045] Assume that the controller 203 receives frames 503A, 503B, and 503C. Each frame includes multiple data. For example, frame 503A includes header A1, payload B1, and payload C1. For simplicity, Figures 5 to 7 In the illustration, frame type 1 is assumed.
[0046] The controller 203 transfers a plurality of data fragments included in the frame to the memory addresses X, Y, and Z. The controller 203 refers to the descriptor chain 501 to determine the address in the memory of the transfer destination of each data.
[0047] When a frame is received, the controller 203 stores the frame in the memory 213. The data in the memory 213 is processed in the order in which it is stored in the memory 213. Next, the controller 203 refers to the descriptor chain 501. The descriptor chain 501 includes consecutive descriptors, and each descriptor includes a transmission rule that specifies how many bytes of data are to be transmitted next at which address.
[0048] The controller 203 refers to the descriptor chain 501 from the head. The controller 203 first refers to the first descriptor 502A. The descriptor 502A includes a transmission rule "transfer 20 bytes to address X". Therefore, the controller 203 obtains 20 bytes of data "header A1 (20 bytes)" from the memory 213 and transfers it to the memory address X. The controller 203 stores the transmission result in the descriptor 502A. The transmission result may also include error information.
[0049] Next, the controller 203 refers to the second descriptor 502B. The descriptor 502B includes a transfer rule "transfer 50 bytes to address Y". Therefore, the controller 203 obtains 50 bytes of data "payload B1 (50 bytes)" from the memory 213 and transfers it to the memory address Y. The controller 203 stores the transfer result in the descriptor 502B.
[0050] Next, the controller 203 refers to the third descriptor 502C. The descriptor 502C includes a transfer rule "transfer 80 bytes to address Z". Therefore, the controller 203 obtains 80 bytes of data "payload C1 (80 bytes)" from the memory 213 and transfers the data to the memory address Z. The controller 203 stores the transfer result in the descriptor 502C.
[0051] Similarly, the controller 203 sequentially refers to the descriptors and transfers the data in the frames 503B and 503C to any one of the memory addresses X, Y, and Z.
[0052] The controller 203 sequentially references the descriptors from the top of the descriptor chain 501, and can determine the number of descriptors to be referenced by checking the transfer result of each descriptor. For example, if the descriptor 502A includes a transfer result "successfully write 20 bytes of data to memory address X", and there is no transfer result of the input descriptor 502B, the controller 203 can refer to the descriptor 502B.
[0053] As described above, the controller 203 transmits the data contained in the received frame to each memory 202 according to the transmission rule defined in the descriptor. The transmission using the descriptor is based on the assumption that the frame size corresponding to the descriptor chain 501 is fixed. Therefore, if the controller 203 receives a lost data frame, a problem may occur. Next, the problem in the case where the controller 203 receives a frame with lost data will be described.
[0054] Figure 6 is a diagram showing an example of data transmission in a lost frame in the communication device 101. Figure 5 , the descriptor chain 501 is stored in the memory 205. The memory addresses X, Y, and Z are addresses in the corresponding memory 202. The data transferred to the memory addresses X, Y, and Z are processed by the CPU 201 corresponding to the memory 202.
[0055] Assume that the controller 203 receives frames 603A, 503B, and 503C, and assume that frame 603A is lost and does not include the payload C1 that should have been included originally. For simplicity, assume that the frame is of type 1. Upon receiving the frame, the controller 203 stores the frame in the memory 213. Next, the controller 203 refers to the descriptor chain 501.
[0056] The controller 203 refers to the descriptor chain 501 from the header. The controller 203 refers to the descriptor 502A, obtains the 20-byte data "header A1" from the memory 213, and transfers the data to the memory address X. Next, the controller 203 refers to the descriptor 502B, obtains the 50-byte data "payload B1" from the memory 213, and transfers it to the memory address Y.
[0057] Next, the controller 203 refers to the descriptor 502C, obtains 80 bytes of data "payload C1" from the memory 213, and transfers it to the memory address Z. However, since the payload C1 of the frame 603A is lost, the data that the controller 203 obtains next from the memory 213 becomes the data of the frame 503B.
[0058] The controller 203 cannot detect that the payload C1 is lost. Therefore, the controller 203 acquires "header A2 (20 bytes)", "payload B2 (50 bytes)", and "payload C2 (10 bytes)" as 80 bytes of data from the memory 213 according to the transmission rule "transfer 80 bytes to address Z" of the descriptor 502C, and transfers it to the memory address Z. As a result, the unexpected data is transferred to the memory address Z. The controller 203 cannot detect that a shift has occurred in the transferred data. Therefore, after this, the controller 203 continues the transmission of the data of each frame while the data acquired from the memory 213 is shifted.
[0059] Typically, the exception processing of the program executed by the CPU 201 detects the deviation of the data caused by the loss of the frame and recovers the data. However, this exception processing is complicated and may cause the execution speed of the program to decrease. Therefore, it is desirable to detect the deviation of the data without using the program executed by the CPU 201.
[0060] In order to solve the above problem, the descriptor according to the present embodiment includes a last data flag capable of determining whether the next data to be transmitted is the last data of the frame, thereby enabling the controller 203 to detect the deviation of the data. Figure 7 , the operation of the communication device 101 when the descriptor includes the last data flag will be described.
[0061] Figure 7 7 is a diagram showing an example of transmitting data in a frame using a last data flag in the communication device 101. In the descriptor chain 501 according to the present embodiment, the descriptor corresponding to the last data of the frame includes a "last data flag 710". Figure 7 In the example shown, descriptors 502C, 502D, and 502E include a "last data flag 710".
[0062] and Figure 5 , the descriptor chain 501 is stored in the memory 205. The memory addresses X, Y, and Z are addresses in the corresponding memory 202. The data transferred to the memory addresses X, Y, and Z are processed by the CPU 201 corresponding to the corresponding memory.
[0063] In one aspect, the controller 203 receives frames 703A, 703B, and 703C. For simplicity, assume that the frame is of type 1. Upon receiving the frame, the controller 203 stores the frame in the memory 213. Next, the controller 203 refers to the descriptor chain 501.
[0064] Controller 203 refers to descriptor chain 501 from the head. First, controller 203 refers to descriptor 502A and confirms that descriptor 502A does not include "last data flag 710". Next, controller 203 determines whether data to be acquired from memory 213 (hereinafter referred to as "next data") is the last data of the frame.
[0065] If the next data is not the last data of the frame, the controller 203 transfers the next data to the memory address X and stores the normal transmission result in the descriptor 502A. When the next data is the last data of the frame, since the content of the descriptor 502A does not match the content of the next data, the controller 203 suspends the transmission of the data and stores the transmission result including the error in the descriptor 502A.
[0066] The controller 203 adds the judgment information indicating the head or the end of the frame before and after the frame 503, and stores the judgment information in the memory 213. In one aspect, the controller 203 may add the judgment information indicating the start of the frame and the judgment information indicating the end of the frame before and after the frame 503, and may store the result in the memory 213.
[0067] In addition, the controller 203 counts the size of data input and output from the memory 213. Therefore, the controller 203 can detect whether the next data is the last data of the frame by checking whether the determination information is included at the end of the next data. In addition, the controller 203 can compare the size of the transmission data defined in the transmission rule of the descriptor with the size of the next data to determine whether the last data is lost.
[0068] Next, the controller 203 refers to the descriptor 502B and confirms that the descriptor 502A does not include the “last data flag 710.” Next, the controller 203 determines whether the next data is the last data of the frame.
[0069] When the next data is not the last data of the frame, the controller 203 transfers the next data to the memory address Y and stores the normal transmission result in the descriptor 502B. If the next data is the last data of the frame, the controller 203 suspends the transmission of the data and stores the transmission result including the error in the descriptor 502B.
[0070] Next, the controller 203 refers to the descriptor 502C and confirms that the descriptor 502A includes the “last data flag 710.” Next, the controller 203 determines whether the next data is the last data of the frame.
[0071] When the next data is the last data of the frame and the size of the next data is normal, the controller 203 transfers the data to the memory address Z and stores the normal transmission result in the descriptor 502C. If the next data is not the last data of the frame or the size of the next data is abnormal, the controller 203 suspends the transmission of the data and stores the transmission result including the error in the descriptor 502C.
[0072] When determining the size of the last data, when the size of the last data matches the size of the transmission data defined in the transmission rule of the descriptor 502C, the controller 203 can determine that the size of the last data is normal. When the size of the last data is within the size of the transmission data defined by the transmission rule of the descriptor 502C, the controller 203 can determine that the size of the last data is normal. Since the controller 203 counts the size of the data to be input and output to the memory 213, the size of the last data can be calculated in combination with the determination information.
[0073] exist Figure 7 In the example of , when the frame 503A is normal, when the controller 203 refers to the descriptor 502C including the "last data flag 710", the next data includes determination information of the end, and the size of the next data is 80 bytes.
[0074] However, when a portion of frame 503A is lost, controller 203 can detect the loss of the frame without failure because the next data includes certain information when controller 203 refers to descriptors 502A and 502B, or the size of the next data is abnormal when controller 203 refers to descriptor 502C.
[0075] In this embodiment, when a frame loss is detected, the controller 203 stores an error in the descriptor, but in some aspects, the controller 203 may generate an error interrupt signal to interrupt the CPU 201 process. The controller 203 may perform both processes.
[0076] As described above, since the descriptor corresponding to the last data of the frame has the last frame flag, the controller 203 can detect the loss of data in units of frames without failure. As a result, the communication device 101 does not need to allocate CPU 201 resources for error detection processing, and the processing performance of the communication device 101 is improved.
[0077] Figure 8801, a media access controller 802, a filter 803, memories 804 and 806, a memory controller 805, a bus 808, memories 809A, 809B, and 809C (hereinafter collectively referred to as "memory 809"), CPUs 810A, 810B, and 810C (hereinafter collectively referred to as "CPU 810"), and a memory 811. The communication device 101 transmits and receives a plurality of types of frames, and causes the CPU 810 to process data included in the frames in a distributed manner. The Ethernet PHY 801, the media access controller 802, the filter 803, the memories 804 and 806, and the memory control unit 805 correspond to the controller 203. The memory control unit 805 uses the memories 804 and 806 as FIFO memories.
[0078] The memory 811 includes a plurality of descriptor chains 812A, 812B, 812C, and 812D (hereinafter collectively referred to as “descriptor chains 812”). Figures 5 to 7 Unlike the example of FIG. 1 , the communication device 101 receives multiple types of frames. Each descriptor chain 812 is assigned to a corresponding type of frame.
[0079] The Ethernet PHY 801 transmits and receives signals on the Ethernet. The media access controller 802 converts the signal received by the Ethernet PHY 801 into a frame format and transmits the frame format to the filter 803. The Ethernet PHY 801 and the media access controller 802 process signals and data of a network interface layer called TCP / IP (Transmission Control Protocol / Internet Protocol). Hereinafter, the Ethernet PHY 801 and the media access controller 802 are collectively referred to as a communication unit 813.
[0080] The filter 803 determines the type of the received frame. The filter 803 sends a filtering code and an address of a descriptor chain corresponding to the filtering code to the memory control unit 805 according to the type of the frame. The filter 803 sends the frame to the memory control unit 805. The filter 803 may only send the frame and the address of the descriptor chain to the memory control unit 805. The memory control unit 805 may obtain the filtering code from the filter 803, and the memory control unit 805 may determine the address of the descriptor chain corresponding to the filtering code based on the filtering code.
[0081] In some aspects, the filter 803 may determine the filter code based on the frame size, header, and any data contained in the payload. In addition, in some aspects, for example, the filter 803 may store the table 400 and determine the filter and select the filter code based on the table 400. In this case, the filter 803 stores the corresponding address of the descriptor chain 812 associated with the corresponding filter code in the table 400.
[0082] The memory 806 temporarily stores the frames received by the communication device 101. When a plurality of frames are received, the memory control unit 805 sequentially stores the frames in the memory 806 as temporary data 807. The memory control unit 805 counts the size of data input and output of the memory 806. The frames stored in the memory 806 are divided into a plurality of data fragments by the memory control unit 805 and further allocated to any one of the memories 809. The memory 804 temporarily stores the frames transmitted by the communication device 101.
[0083] In addition to the determination information indicating whether the frame is the head before the frame or the end after the frame, the memory control unit 805 also stores the frame in the memory 806. When a plurality of frames are received, the memory control unit 805 similarly adds determination information to each frame and stores the result in the memory 806. In one aspect, the memory controller 805 may store the positions of the head and the end of the frame in the memory 806 as the determination information in a register (not shown). In this case, when acquiring data from the memory 806, the memory control unit 805 may determine whether the data acquired from the memory 806 is the last data of the frame by referring to the determination information of the register.
[0084] Next, the memory control unit 805 refers to the address of the descriptor chain corresponding to the filter code and acquires the transmission rule. Based on the acquired transmission rule, the memory control unit 805 acquires data of the number of bytes defined in the transmission rule from the memory 806.
[0085] Next, the memory control unit 805 transfers the data acquired from the memory 806 to one of the transfer destination memories 809 defined in the transfer rule. Finally, the memory control unit 805 stores the transfer result in the referenced descriptor. In one aspect, the memory control unit 805 may be a DMAC (Direct Memory Access Controller).
[0086] The bus 808 interconnects the memory control unit 805 , the memory 809 , and the memory 811 . The memory control unit 805 communicates with these memories 809 and 811 via the bus 808 .
[0087] Each memory in the memory 809 is a RAM, and stores data allocated from the memory control unit 805. The CPU 810 is allocated to any one of the memories 809. The CPU 810 processes the data stored in the memory 809.
[0088] The memory 811 stores a plurality of descriptor chains 812. The descriptor chain 812 is associated with each frame filter code. For example, referring to Table 400, the descriptor chains 812A, 812B, 812C, and 812D are associated with filter codes "a, b, c, and d", respectively.
[0089] The memory control unit 805 may distribute data obtained by dividing a frame into a plurality of frames to each memory in the memory 809 by referring to the address of the descriptor chain 812 received from the filter 803 , and distribute the distributed data to the CPU 810 .
[0090] In one aspect, when the communication device 101 is activated, any one of the CPUs 910 may execute a program for writing the descriptor chain 812 in the memory 911. In this case, the communication device 101 may include a ROM (read only memory) (not shown), such as a flash memory for storing the program.
[0091] As described above, in the communication device 101 , the filter 803 determines the type of the frame, the memory control unit 805 allocates data to each memory 812 by referring to the descriptor chain 812 , and the CPU 810 distributes the allocated data to each memory 809 .
[0092] Fig. 9 1 is a diagram showing an example of communication processing by the communication device 101. Fig. 9 , a process when the communication device 101 receives a frame in an environment where multiple types of frames are transmitted and received will be described.
[0093] In step S905 , the communication unit 813 receives a signal. For example, the communication unit 813 may receive a signal from devices such as the power system 209 , the chassis 210 , the sensor 211 , and the LiDAR 212 .
[0094] In step S910, the communication unit 813 converts the received signal into a frame format and sends the frame to the filter 803. In some aspects, the frame may be in the form of a TCP / IP message or may follow any other format.
[0095] In step S915, the filter 803 analyzes the received frame and determines the type of the frame. The frame may include a correspondence table, not shown, of a filter code and an address of a descriptor chain 812 corresponding to the filter code. For example, the correspondence table may be obtained by adding the address of the descriptor chain 812 to the table 400. The filter 803 determines the filter code based on any item of the data included in the frame size, header, and payload, and obtains the address of the descriptor chain 812 from the correspondence table.
[0096] In step S920, the filter 803 sends the frame to the memory control unit 805. In step S925, the filter 803 sends the frame filtering code and the address of the descriptor chain 812 corresponding to the filtering code to the memory control unit 805.
[0097] In step S930, the memory control unit 805 temporarily stores the received frame in the memory 806. At this time, the memory control unit 805 adds determination information indicating the head or end of the frame before and after the frame, and stores the frame in the memory 806. Alternatively, the memory control unit 805 may store the positions of the head and tail of the frame in the memory 806 as determination information in a register.
[0098] In step S935, the memory control unit 805 refers to the address of the descriptor chain 812 received from the filter 803. Fig. 9 In the example shown, the address of the descriptor chain 812 received from the filter 803 is the head address of one of the descriptor chains 812A, 812B, 812C, and 812D.
[0099] Assume that the address of the descriptor chain 812 received from the filter 803 in step S935 is the head address of the descriptor chain 812A. The memory control unit 805 acquires the transmission rule of the first "descriptor 1-1" of the descriptor chain 812A.
[0100] In step S940, the memory control unit 805 determines whether "Descriptor 1-1" includes the last data flag. The memory control unit 805 determines whether the next data, ie, the data acquired from the memory 806, is the last data of the frame based on whether the next data includes the determination information.
[0101] When the "descriptor 1 - 1" does not include the last data flag and the next data is not the last data of the frame, the memory control unit 805 moves the control to step S945.
[0102] In the case where "Descriptor 1-1" includes the last data flag, when the next data is the last data of the frame, the memory control unit 805 refers to the size of the data defined in the transmission rule, and determines whether the size of the next data is equal to or less than the size of the data defined in the transmission rule. When the size of the next data is equal to or less than the size of the data specified by the transmission rule, the memory control unit 805 determines that the next data is the normal last data, and moves the control to step S945.
[0103] When the size of the next data is larger than the size of the data defined by the transmission rule, the memory control unit 805 determines that the next data is abnormal and performs a predetermined error process. Note that the memory control unit 805 can determine whether the next data is normal based on whether the data size defined in the transmission rule matches the size of the next data. Since the memory control unit 805 counts the size of the data to be input to / output from the memory 806, the memory control unit 805 can calculate the size of the next data based on the determination information of the next data and the count number when the next data is taken out of the memory 806.
[0104] Otherwise, the memory control unit 805 performs error processing. In the error processing, the memory control unit 805 may store the transfer result including the error in "Descriptor 1-1", may output an error interrupt signal, or may perform both of these processes.
[0105] In step S945, the memory control unit 805 stores the following data in the address in the memory 809A defined by "descriptor 1-1." The subsequent data stored in the memory 809A is processed by the CPU 810A.
[0106] In step S950, the memory control unit 805 stores the transmission result of the next data in "Descriptor 1-1." When the subsequent data is the last data of the frame, the memory control unit 805 moves the control to step S930.
[0107] In step S955, the memory control unit 805 moves the referenced descriptor forward by one in the descriptor chain 812. In step S955, the memory control unit 805 acquires the transfer rule of "descriptor 1-2".
[0108] In step S960, the memory control unit 805 determines whether "Descriptor 1-2" includes the last data flag. The memory control unit 805 determines whether the next data is the last data of the frame.
[0109] In the case where "Descriptor 1-2" includes the last data flag, when the next data is the last data of the frame, the memory control unit 805 refers to the size of the data defined in the transmission rule, and determines whether the size of the next data is equal to or less than the data size defined in the transmission rule. When the size of the next data is equal to or less than the data size specified by the transmission rule, the memory control unit 805 determines that the next data is the normal last data, and moves control to step S965.
[0110] When the size of the next data is larger than the data size defined in the transmission rule, the memory control unit 805 determines that the next data is abnormal and performs error processing. Note that the memory control unit 805 can determine whether the next data is normal based on whether the data size defined in the transmission rule matches the size of the next data.
[0111] Otherwise, the memory control unit 805 performs error processing. In the error processing, the memory control unit 805 may store the transfer result including the error in "Descriptor 1-2", may output an error interrupt signal, or may perform both of these processes.
[0112] In step S965, the memory control unit 805 stores the following data in the address in the memory 809B defined by "descriptor 1-2." The subsequent data stored in the memory 809B is processed by the CPU 810B.
[0113] In step S970, the memory control unit 805 stores the transmission result of the next data in “Descriptor 1-2.” When the subsequent data is the last data of the frame, the memory control unit 805 moves the control to step S930.
[0114] In step S975, the memory control unit 805 moves the referenced descriptor forward by one in the descriptor chain 812. In step S975, the memory control unit 805 acquires the transfer rule of "descriptor 1-3".
[0115] In step S980, the memory control unit 805 determines whether "Descriptor 1-3" includes the last data flag. The memory control unit 805 determines whether the next data is the last data of the frame.
[0116] In the case where "Descriptor 1-3" includes the last data flag, when the next data is the last data of the frame, the memory control unit 805 refers to the size of the data defined in the transmission rule, and determines whether the size of the next data is equal to or less than the data size defined in the transmission rule. When the size of the next data is equal to or less than the data size specified by the transmission rule, the memory control unit 805 determines that the next data is the normal last data, and moves control to step S965.
[0117] When the size of the next data is larger than the data size defined in the transmission rule, the memory control unit 805 determines that the next data is abnormal and performs error processing. Note that the memory control unit 805 can determine whether the next data is normal based on whether the data size defined in the transmission rule matches the size of the next data.
[0118] Otherwise, the memory control unit 805 performs error processing. In the error processing, the memory control unit 805 may store the transfer result including the error in "Descriptor 1-3", may output an error interrupt signal, or may perform both of these processes.
[0119] In step S985, the memory control unit 805 stores the following data in the address in the memory 809C defined by "Descriptor 1-3." The subsequent data stored in the memory 809C is processed by the CPU 810C.
[0120] In step S990, the memory control unit 805 stores the transmission result of the next data in “Descriptor 1-3.” When the subsequent data is the last data of the frame, the memory control unit 805 moves the control to step S930.
[0121] If the number of data included in the frame is three, the memory control unit 805 allocates all the data included in the frame to the memory 809 through the processing from step S935 to step S990 .
[0122] In reference Fig. 9 In the described process, the memory control unit 805 performs the process of steps S935 to S990 in units of frames. For example, it is assumed that the communication device 101 receives "frame A" and "frame B". The filter 803 sends "frame A" and "frame B" to the memory 806. In addition, the filter 803 sends "address A of the descriptor chain 812" to the memory control unit 805 based on the filter code of "frame A". The filter 803 sends "address B of the descriptor chain 812" to the memory control unit 805 based on the filter code of "frame B".
[0123] The memory control unit 805 stores "Frame A" and "Frame B" in the memory 806. Then, the memory control unit 805 determines the descriptor chain 812 to be referenced based on "Address A of the descriptor chain 812". Next, the memory control unit 805 performs the processing after step S935 until the last data of "Frame A" is obtained.
[0124] After all data included in "Frame A" is allocated to the memory 809, the memory control unit 805 determines the descriptor chain 812 to be referenced based on "address B of descriptor chain 812." Thereafter, the memory control unit 805 similarly performs the processing of step S935 and subsequent steps until the memory control unit 805 acquires the last data of "Frame B".
[0125] As in Figure 7As in the example of , the memory control unit 805 adds determination information indicating the head or end of the frame before and after the frame, and stores the determination information in the memory 806. Alternatively, the memory control unit 805 may store the positions of the head and tail of the frame in the memory 806 as determination information in a register.
[0126] In addition, the memory control unit 805 counts the size of data to be input / output to / from the memory 806 and stores the data in the memory 806. Therefore, the memory control unit 805 can determine whether the next data is the normal last data of the frame by checking whether the determination information is included at the end of the next data and checking the size of the next data.
[0127] exist Fig. 9 During the processing of step S930, the communication device 101 can send and receive data at any time. For example, even when the processing is performed after step S930, the memory control unit 805 can receive the messages of step S920 and step S925.
[0128] Fig.10 is a diagram showing an example of the format of the descriptor 1000. The transmission rule according to the present embodiment includes data defined by the descriptor 1000. The descriptor 1000 includes DT (Descriptor Type), DIE (Descriptor Interrupt Enable), MSC (MAC Status Code), PS (Padding Selection), EI (Error Indication), TR (Truncation Indication), DS (Data Size), FIN (Last Part of Rx Frame), JDS (Data Size Only), and DPTR (Data Pointer).
[0129] DT indicates completed / uncompleted processing, errors, and other states defined by the descriptor 1000. DT may include type information of data to be processed. DIE indicates a setting for enabling / disabling interruption in a transmission process defined by the descriptor 1000. MSC indicates an error code received from the media access controller 802. PS indicates data that makes a frame smaller than the minimum standard size into a specified size.
[0130] EI represents error information at the time of data transmission. TR represents information indicating that a frame is discarded due to a reception error, etc. FIN represents information indicating that the descriptor 1000 is a descriptor for processing the last data of a divided frame.
[0131] JDS represents a flag for error determination of the last data of a frame. For example, the JDS error determination flag may include the following two types. (Error determination 1) "If the size of the last data is within the size specified in DS, it is judged to be normal, if not, it is judged to be an error." (Error determination 2) "If the size of the last data matches the size specified in DS, it is determined that the data is normal, if not, it is determined that the data is an error." DPTR refers to the address in the memory to which the data is transferred. The memory control unit 805 refers to the DPTR and performs the processing of "transferring subsequent data to the address in the memory defined by the DPTR." Note that Fig.10 The format of the descriptor 1000 shown is an example, and items that can be set by the descriptor 1000 are not limited to these.
[0132] As described above, according to the communication device 101 of this embodiment, the memory control unit 805 can detect errors immediately frame by frame by referring to the last data flag set in the descriptor. As a result, the communication device 101 does not need to allocate CPU 810 resources for error detection processing, and the processing performance of the communication device 101 is improved.
[0133] Next, the processing of the communication device 101 according to the second embodiment will be described. The second embodiment is different from the above-mentioned first embodiment in that one descriptor includes a plurality of transmission rules for data contained in a frame. The hardware configuration of the communication device 101 according to the second embodiment is the same as the hardware configuration of the communication device 101 of the first embodiment. Therefore, the description of the same configuration will not be repeated.
[0134] Fig.11 is a diagram showing an example of the format of a descriptor 1100. The transmission rule according to the present embodiment includes data defined by the descriptor 1100. The descriptor 1100 includes DT, DIE, MSC, PS, EI, TR, DS, and DPTR, the number of which is the same as the number of data in a frame. Fig.11 The depicted descriptor 1100 corresponds to a frame including three data segments. In certain aspects, the descriptor 1100 may include any number of two or more data transmission rules.
[0135] By using the descriptor 1100, the memory control unit 805 can reduce the number of references to the descriptor chain 812. A case where a description frame includes three data fragments is taken as an example.
[0136] In the case of a transmission process using the descriptor 1000 , since the descriptor 1000 includes only one data transmission rule, the memory control unit 805 needs to refer to the descriptor chain 812 three times to transmit all data in a frame.
[0137] On the other hand, in the case of the transmission process using the descriptor 1100, since the descriptor 1100 includes three data transmission rules, the memory control unit 805 only needs to refer to the descriptor chain 812 once in order to transmit all the data in the frame. Fig. 9 In steps S955, S970, and S990, the memory control unit 805 stores the transfer result in the same descriptor.
[0138] Furthermore, by using the descriptor 1100, the memory control unit 805 can quickly detect a frame loss compared to the case of using the descriptor 1000 according to the first embodiment. A case where a description frame includes three data fragments is taken as an example.
[0139] The memory control unit 805 refers to the descriptor chain 812 once to obtain the transmission rule of all data included in the frame. The memory control unit 805 can obtain information about the number of data included in the frame and the size of each data based on the transmission rule. When storing the frame in the memory 806, the memory control unit 805 can determine whether the next data obtained from the memory 806 is the head data and the last data by using the determination information added to the frame.
[0140] Therefore, with Fig. 9 Together with the error determination shown, when the next data to be transmitted defined in the transmission rule is not the last data of the frame but the next data is the last data of the frame, the memory control unit 805 can determine that a loss has occurred in the data and output an error.
[0141] In the error processing, the memory control unit 805 may store the transfer result including the error in the descriptor 1100 , may output an error interrupt signal, or may perform both processes.
[0142] As described above, according to the communication device 101 of this embodiment, the memory control unit 805 can reduce the number of references to the descriptor chain by referring to the descriptor that defines the transmission rules of multiple data included in the frame, and can detect the loss of the frame at an early stage.
[0143] Next, the processing of the communication device 101 according to the third embodiment will be described. The third embodiment is different from the first embodiment and the second embodiment described above because the descriptor includes position information of the data to be processed in the frame. The hardware configuration of the communication device 101 according to the third embodiment is the same as the hardware configuration of the communication device 101 of the first embodiment and the second embodiment. Therefore, the description of the same configuration will not be repeated.
[0144] Fig.12is a diagram showing an example of the format of the descriptor 1200. The transmission rule according to the present embodiment includes data defined by the descriptor 1200. The descriptor 1200 includes DT, DIE, MSC, PS, EI, TR, DS, SMF (the beginning or middle or last part of the Rx frame), JDS, and DPTR.
[0145] SMF defines the position of the data to be processed in the frame. Position "beginning" means that the data to be processed is the header data of the frame. Position "middle" means that the data to be processed is the data located in the middle position, which is neither the header nor the end of the frame. Position "last" means that the data to be processed is the last data of the frame.
[0146] By using the descriptor 1200, the memory control unit 805 can quickly detect frame loss compared to the case of using the descriptor 1000 according to the first embodiment. By referring to the IMF included in the transmission rule, the memory control unit 805 can determine whether the next data to be transmitted is the head data, the middle data, or the last data in the frame. When storing the frame in the memory 806, the memory control unit 805 can determine whether the next data is the head data and the last data by using the determination information added to the frame.
[0147] Therefore, with Fig. 9 Together with the error determination shown, when the position of the next data to be transmitted defined by the transmission rule is "beginning" or "middle", and when the next data is the last data of the frame, the memory control unit 805 can determine that a loss has occurred in the data and can output an error.
[0148] Apart from Fig. 9 In addition to the error determination shown, when the position of the next data to be transmitted defined by the transmission rule is "middle" or "last", and when the next data is the header data of the frame, the memory control unit 805 can determine that a loss has occurred in the data and can output an error.
[0149] In the error processing, the memory control unit 805 may store the transfer result including the error in the descriptor, may output an error interrupt signal, or may perform both processes.
[0150] Fig.13 is a diagram showing an example of the format of the descriptor 1300. The transmission rule according to the present embodiment may include data defined by the descriptor 1300 instead of the descriptor 1200. The descriptor 1300 includes DT, DIE, MSC, PS, EI, TR, DS, and DPTR.
[0151] The descriptor 1300 represents various types of data by changing the value of DT, thereby distinguishing the last data in a frame from other data. The memory control unit 805 can determine whether the data to be processed is the last data in a frame by referring to DT of the descriptor 1300.
[0152] By using the descriptor 1300, the memory control unit 805 can determine that a loss has occurred in the data and output an error when the DT of the transmission rule does not indicate the last data and the next data is the last data of the frame. Fig. 9 The error shown is OK.
[0153] In the error processing, the memory control unit 805 may store the transfer result including the error in the descriptor, may output an error interrupt signal, or may perform both processes.
[0154] As described above, according to the communication device 101 of the present embodiment, the memory control unit 805 can detect frame loss at an early stage by referring to the descriptor that defines the position of data to be processed in the frame.
[0155] Next, the processing of the communication device 101 according to the fourth embodiment will be described. The fourth embodiment is different from the above-mentioned first to third embodiments in that a frame includes a header code and a tail code for each data included in the frame. The hardware configuration of the communication device 101 according to the fourth embodiment is the same as the hardware configuration of the communication device 101 of the first to third embodiments. Therefore, the description of the same configuration will not be repeated.
[0156] Fig.14 1400 is a diagram showing an example of the format of a frame 1400. The frame 1400 includes a header code and a trailer code before and after all payloads included in the frame 1400. Fig.14 In the example of , frame 1400 includes payloads B1 and C1, and also includes header codes and tail codes before and after payloads B1 and C1, respectively. The header code and tail code may include the size and identification code of the payload. Header A1 is the header of frame 1400.
[0157] The memory control unit 805 can obtain the size of the next data and the identification information of the payload obtained from the memory 806 by referring to the header code and the tail code of the frame 1400. Therefore, when retrieving the next data from the memory 806, the memory control unit 805 can compare the size and identification information of the next data with the size, DT, etc. defined in the transmission rule, and output an error when the type and size of the data do not match.
[0158] Fig.15is a diagram showing an example of the format of a frame 1500. The frame 1500 is different from the frame 1400 in that an element identification code is added to a payload instead of a header code.
[0159] The memory control unit 805 can obtain the size and identification information of the payload of the next data obtained from the memory 806 by referring to the element identification code and the tail code of the frame 1500. Therefore, when retrieving the next data from the memory 806, the memory control unit 805 can compare the size and header code of the next data with the size and DT defined in the transmission rule, and output an error when the type and size of the data do not match.
[0160] Fig.16 1600 is a diagram showing an example of the format of the descriptor 1600. The transmission rule according to the present embodiment may include data defined by the descriptor 1600 instead of the descriptor 1000. The descriptor 1600 is obtained by adding a PEID (Message Element Identifier) to the descriptor 1100.
[0161] PEID is the identification code of the data to be processed, corresponding to Fig.14 The header code and Fig.15 The descriptor 1600 is referenced by the memory control unit 805 together with the frame 1400 or the frame 1500 .
[0162] By referring to the frame 1400 or the frame 1500, the memory control unit 805 can obtain the size and identification information of the next data when retrieving the next data from the memory 806. The memory control unit 805 can compare the size and identification information of the next data with the size, DT, etc. defined in the transmission rule of the descriptor 1600, and output an error when the type and size of the data are inconsistent with each other.
[0163] In addition, the memory control unit 805 can obtain the size and identification information of all data in the frame by referring to the descriptor 1600. Therefore, the memory control unit 805 can determine whether each data in the frame is normal by checking the size and identification information of subsequent data obtained from the memory 806 by using the PEID, DS, etc. of the descriptor 1600. Therefore, even if some data of the frame is lost, the memory control unit 805 can only transmit other normal data to the memory 809 without deleting all frames.
[0164] As described above, according to the communication device 101 of the present embodiment, the memory control unit 805 refers to the header code, the tail code, etc. before and after the payload of the frame. In addition, the memory control unit 805 can detect lost frames at an early stage by comparing these header codes and tail codes, etc. with the DT, PEID, DS, etc. of the descriptor.
[0165] Although the invention made by the present inventors has been specifically described based on the embodiments, the present invention is not limited to the above-mentioned embodiments, and it goes without saying that various modifications can be made without departing from the gist thereof.
Claims
1. A data processing device, include: A receiving circuit configured to receive a communication frame including a plurality of data; a temporary memory circuit configured to temporarily store the communication frame; a rule memory circuit configured to store a descriptor chain comprising consecutive descriptors, each descriptor comprising a transfer rule specifying a size of data to be transferred next and a destination of the memory circuit; a memory control circuit configured to sequentially reference the descriptors of the descriptor chain stored in the rule memory circuit and transfer temporarily stored data to the memory circuit according to the transfer rule; wherein the descriptor corresponding to the last data of the communication frame indicates the last data transmission, wherein, in the case where the referenced descriptor indicates the last data transmission, i) if one of the data temporarily stored and to be transferred next indicates the last data transfer and the size of the one of the data is within the data size specified in the corresponding transfer rule, the memory control circuit is configured to transfer the one of the data to a corresponding destination of the memory circuit specified in the corresponding transfer rule, and ii) the referenced descriptor indicates the last data transmission, and the one of the data temporarily stored and to be transmitted next is not the last data of the communication frame or the size of the one of the data exceeds the size of the data specified in the corresponding transmission rule, the memory control circuit is configured to output an error detection signal.
2. The data processing device according to claim 1, further comprising: include: a filtering circuit configured to obtain an identifier from the received communication frame, wherein the rule memory circuit is configured to store a plurality of descriptor chains assigned to an identifier, and The memory control circuit is configured to reference one of the plurality of descriptor chains stored in the rule memory circuit based on the identifier.
3. The data processing device according to claim 1 or 2, in, The memory control circuit is configured to determine whether the one of the data temporarily stored and to be transmitted next is the last data of the communication frame based on tail information stored in the temporary memory circuit together with the plurality of data.
4. A data transmission method for a communication device, include: (a) receiving communication frames; (b) temporarily storing the communication frame and dividing the communication frame into a plurality of data; (c) acquiring a transmission rule corresponding to one of the data to be transmitted from a rule memory circuit, the rule memory circuit being configured to store a descriptor chain including consecutive descriptors, each descriptor including a transmission rule, the transmission rule specifying a size of the data to be transmitted next and a destination of the memory circuit, wherein the descriptor corresponding to the last data of the communication frame indicates the last data transmission; wherein, in the case where the referenced descriptor indicates the last data transmission, i) if one of the data temporarily stored and to be transferred next indicates the last data transfer and the size of the one of the data is within the data size specified in the corresponding transfer rule, transferring the one of the data to a corresponding destination of the memory circuit specified in the corresponding transfer rule, and ii) the referenced descriptor indicates the last data transmission, and the one of the data temporarily stored and to be transmitted next is not the last data of the communication frame or the size of the one of the data exceeds the size of the data specified in the corresponding transmission rule, an error detection signal is output.
5. The data transmission method according to claim 4, further comprising: include: obtaining an identifier from the received communication frame, A plurality of descriptor chains are assigned to an identifier, and a descriptor chain among the plurality of descriptor chains is referenced based on the identifier.
6. The data transmission method according to claim 4 or 5, further comprising: include: Based on the tail information associated with the plurality of data, it is determined whether the one of the data temporarily stored and to be transmitted next is the last data of the communication frame.
Citation Information
Patent Citations
Game machine
JP2019072624A
Data transmission device, memory control device, and memory system
CN102568603A
Information processing apparatus, and method of controlling information processing apparatus
CN103365792A
VIDEO RECORDING AND regeneration APPARATUS, AND FILE MANAGEMENT METHOD
CN104333796A
Accommodation frame and transmission device of different data traffics on common carrier wave
EP1102515A2
