Apparatus and method for processing data units
By implementing the data unit processing device in hardware, the real-time problem caused by multiplexing in automotive networks is solved, the efficiency and adaptability of packet routing are improved, and it is suitable for different protocols and data rates in automotive networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ROBERT BOSCH GMBH
- Filing Date
- 2025-12-17
- Publication Date
- 2026-06-19
AI Technical Summary
In automotive networks, the existing technology for packet routing suffers from unavoidable context switching time due to the software system performing multiplexing, which limits real-time performance, especially when using different protocols, data rates, and QoS requirements.
The data unit processing device, which is implemented entirely in hardware, includes an input interface, an output interface, circuitry, and a transmitter. It utilizes memory to store data containers and achieves hardware-level multiplexing by identifying and scheduling data units and containers with different protocols.
Hardware-level multiplexing reduces context switching time, improves the real-time performance and efficiency of packet routing in automotive networks, and adapts to the data transmission requirements of different protocols.
Smart Images

Figure CN122248007A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to apparatus and methods for processing data units, particularly for use in automotive networks. Background Technology
[0002] Communication in CAN-based, LIN-based, or AUTOSAR-based automotive networks requires data packet routing within the software system.
[0003] Routing in automotive networks presents challenges due to the use of many different protocols, data rates, latency requirements, and / or QoS requirements.
[0004] Routing data packets requires multiplexing. Multiplexing is performed by different software modules within the software system.
[0005] The unavoidable context switching time required to multiplex data packets in a software system severely limits the achievable event rate, which is critical for real-time performance.
[0006] In many cases, the main CPU of an embedded microcontroller performs multiplexing. In other cases, a dedicated microprocessor core is used to perform multiplexing. Summary of the Invention
[0007] The apparatus for processing data units according to the present invention, especially the apparatus in automotive networks, implements multiplexing entirely in hardware.
[0008] The device includes: an input interface configured to receive segments of first data units; an output interface configured to transmit a first data container; circuitry configured to collect segments of the first data units in the first data container; and a first transmitter configured to receive and transmit the first data container from the output interface, wherein the circuitry includes a memory configured to store the first data container in the memory, and the first transmitter includes a memory for storing the first data container. The input interface is configured to receive segments of second data units, and the output interface is configured to transmit a second data container. The circuitry is configured to collect segments of the second data units in the second data container. The device includes a second transmitter configured to receive and transmit the second data container from the output interface, and the circuitry is configured to store the second data container in the memory. The second transmitter includes a memory for storing the second data container. The device includes an input interface configured to receive data units and a plurality of transmitters configured to transmit data containers. The device includes circuitry for collecting data units into corresponding data containers. The circuit includes a memory for storing data containers under construction.
[0009] The transmitter includes only memory for storing data containers to be transmitted by their respective transmitters. Data containers under construction are retained in the circuit's memory. The memory in the transmitter only needs to be used for one data container at a time.
[0010] The input interface can be configured to receive data units with different protocols. The transmitter can be configured to transmit data units with different protocols. According to one example, the first data unit is formatted according to a first protocol, wherein the circuitry is configured to: identify that "segments of the first data unit are formatted according to the first protocol," and, after identifying that "segments of the first data unit are formatted according to the first protocol," collect the segments of the first data unit in a first data container. According to one example, the second data unit is formatted according to a second protocol, wherein the circuitry is configured to: identify that "segments of the second data unit are formatted according to the second protocol," and, after identifying that "segments of the second data unit are formatted according to the second protocol," collect the segments of the second data unit in a second data container.
[0011] The first transmitter may be configured to provide a first socket for transmitting the first data container, wherein the first data unit is assigned to the first socket, and wherein the circuitry is configured to: identify that "the first data unit is assigned to the first socket," and, after identifying that "the first data unit is assigned to the first socket," schedule the first data container for the first socket. The first socket may be identified by a socket identifier. The first data unit may be assigned to the first socket by a socket identifier. The scheduler may be configured to schedule the first data container for the first socket based on the socket identifier. The socket identifier may be provided to the scheduler as metadata. The circuitry may be configured to determine and / or process the socket identifier or the metadata. The circuitry may be configured to provide the scheduler with the first data unit assigned to the socket identifier or the metadata. According to one example, the first socket may be assigned to at most one data container under construction.
[0012] The input interface can be configured to receive segments of the first data unit in a timing sequence, wherein the circuit is configured to: identify the first segment in the timing sequence as the first segment of the first data container; after identifying the first segment, allocate storage space for the first data container segment by segment in the memory; and store the first segment in the memory as the first segment of the first data container. By allocating storage space, the first data container is opened to store the first segment.
[0013] The input interface can be configured to receive segments of the last data unit in a timing sequence, wherein the circuitry is configured to: identify the last segment in the timing sequence as the last segment of the last data container; and after identifying the last segment, store the last segment as the last segment of the last data container in the memory; schedule the first data container for the first transmitter; and release the storage space in the memory used for the first data container. After the storage of the last segment of the last data unit in the first data container is identified, the first data container is closed. Scheduling the first data container for the first transmitter includes: copying the first data container from the memory to the memory of the first transmitter. The release of the storage space in the memory used for the first data container makes that storage space available for other data containers.
[0014] The first data container may be closed due to different conditions: The circuit may be configured to: identify that "the condition for closing the first data container is satisfied"; and after identifying that "the condition for closing the first data container is satisfied", schedule the first data container for the first transmitter; and release the storage space for the first data container in the memory.
[0015] The circuit may be configured to: determine the amount of bytes accumulated in the first data container; and when the amount of bytes reaches or exceeds a predetermined amount of bytes, identify that "a condition for closing the first data container has been met". The predetermined amount of bytes corresponds to a first threshold.
[0016] The circuit may be configured to: collect data units having the first data unit in the first data container; after identifying that "the condition for closing the first data container is met" and "the last of the collected data units is not suitable to be placed in the first data container", exclude the last of the collected data units from the first data container; open another data container for the first transmitter and store the data units excluded from the first data container in the other data container.
[0017] The circuit can be configured to, upon receiving a segment of a data unit, identify that "the condition for closing the first data container is met", wherein the data unit is the data unit that triggered the closing.
[0018] The circuit may be configured to: determine whether "the segment is the last segment of the first data unit"; wait until the last segment of the first data unit is received; and after receiving the last segment of the first data unit, identify that "the condition for closing the first data container is satisfied".
[0019] The circuit can be configured to: start a time counter or a period counter when the first data container is opened; and recognize that "the condition for closing the first data container has been met" when the counter exceeds a boundary value.
[0020] The circuit may be configured to: wait until the first data container includes the last segment of the last data unit of the first data container; and after recognizing that "the first data container includes the last segment of the last data unit", recognize that "the condition for closing is met", or the circuit may be configured to: wait until the first data container includes the last segment of the last data unit; and recognize the first segment of the next data unit; and remove the segment of the last data unit from the first data container.
[0021] The circuit may be configured to: identify an error in a segment of the first data unit; and, upon identifying the error, remove the first data unit from the first data container.
[0022] According to the present invention, a method for processing data units, particularly for use in automotive networks, is proposed. The method includes: receiving segments of a first data unit via an input interface; transmitting a first data container via an output interface; collecting segments of the first data unit in the first data container via a circuit; receiving the first data container from the output interface via a first transmitter; and transmitting the first data container via the first transmitter. The circuit includes a memory. The method further includes: storing the first data container in the memory via the circuit, wherein the first transmitter includes a memory for storing the first data container. The method also includes: receiving segments of a second data unit via the input interface; transmitting a second data container to the output interface; collecting segments of the second data unit in the second data container via the circuit; receiving the second data container from the output interface via a second transmitter; transmitting the second data container via the second transmitter; scheduling the second data container for the second transmitter via a scheduler; and storing the second data container in the memory via the circuit, wherein the second transmitter includes a memory for storing the second data container.
[0023] The method may include: collecting the first data unit and at least one additional data unit in a first container, and / or collecting the second data unit and at least one additional data unit in the first container. Attached Figure Description
[0024] Other exemplary embodiments are derived from the following description and accompanying drawings. The drawings illustrate: Figure 1 The illustration schematically depicts a device for processing data units, particularly in automotive networks; Figure 2 This schematically illustrates the processing of data units; Figure 3 A portion of the device is shown schematically; Figure 4 A flowchart is shown, which includes the steps of a method for processing data units; Figure 5 This shows the state machine used for segment processing; Figure 6 This shows the state machine used for overflow handling; Figure 7 This shows the state machine used for error handling; Figure 8 The state machine used for time processing is shown. Detailed Implementation
[0025] Figure 1 The diagram schematically illustrates a device 100 for processing data unit 102, particularly a device in an automotive network.
[0026] Data unit 102 can be formatted according to different protocols.
[0027] Data unit 102 includes segments. According to this example, segments belonging to the same data unit 102 arrive in the correct order, and segments belonging to different data units 102 are not nested.
[0028] The device 100 includes an input interface 104. The input interface 104 is configured to receive a segment of the data unit 102.
[0029] Device 100 includes an output interface 106. The output interface 106 is configured to transmit a data container 108.
[0030] Device 100 includes circuitry 110. Circuitry 110 is configured to determine data container 108 based on segments of data unit 102. In the current context, circuitry refers to electrical circuitry. This electrical circuitry may include one or more microprocessors. This electrical circuitry may include firmware or software for running this electrical circuitry. This electrical circuitry may include one or more system-on-a-chips.
[0031] The apparatus 100 includes a first transmitter 112. The first transmitter 112 is configured to transmit frame 114 according to a first protocol. The apparatus 100 also includes a second transmitter 116. The second transmitter 116 is configured to transmit frame 118 according to a second protocol. The first protocol and the second protocol are different from each other. The first protocol is, for example, one of the Controller Area Network (CAN) protocol, the Local Area Network (LIN) protocol, or the Ethernet protocol. The second protocol is, for example, another of the Controller Area Network (CAN) protocol, the Local Area Network (LIN) protocol, or the Ethernet protocol.
[0032] Circuit 110 includes memory 120. Memory 120 is configured to store a data container under construction.
[0033] The first transmitter 112 is configured to provide a first socket for transmitting a data container according to a first protocol. The first transmitter 112 includes a first memory 122. The first memory 122 is configured to store a data container according to the first protocol.
[0034] The second transmitter 116 is configured to provide a second socket for transmitting data containers according to the second protocol. The second transmitter 116 includes a second memory 124. The second memory 124 is configured to store data containers according to the second protocol.
[0035] The apparatus 100 is not limited to two transmitters. It may include multiple transmitters. The apparatus 100 is not limited to two protocols. It may be configured to transmit frames according to multiple protocols.
[0036] Data unit 102 can be formatted in different ways. For example, data unit 102 can be formatted according to the Controller Area Network (CAN) protocol, the Local Interconnect Network (LIN) protocol, or the Ethernet protocol.
[0037] Figure 2 The processing of data unit 102 is illustrated schematically.
[0038] As shown in the example, input interface 104 receives multiple data units 201-1, 201-2, 201-3, 202-1, 203-1, 204-1, and 204-2 in one time slot. These data units may be formatted according to different protocols. Some or all of them may be formatted according to the same protocol.
[0039] Data unit 201-1 includes two segments, 201-11 and 201-12. Data unit 201-2 includes one segment, 201-21. Data unit 201-3 includes three segments, 201-31, 201-32, and 201-33. Data unit 202-1 includes four segments, 202-11, 202-12, 202-13, and 202-14. Data unit 203-1 includes one segment, 203-11. Data unit 204-1 includes two segments, 204-11 and 204-12. Data unit 204-2 includes two segments, 204-21 and 204-22.
[0040] These data units are received by input interface 104 in the order of 204-1, 201-1, 201-2, 203-1, 201-3, 202-1, and 204-2.
[0041] Output interface 106 transmits data container 206 according to the first protocol, data container 208 according to the second protocol, data container 210 according to the third protocol, and data container 212 according to the fourth protocol in a later time slot.
[0042] According to the first protocol, the data container 206 includes three data units 201-1, 201-2 and 201-3.
[0043] According to the second protocol, the data container 208 includes data unit 202-1.
[0044] According to the third protocol, the data container 210 includes data unit 203-1.
[0045] According to the fourth protocol, the data container 212 includes two data units 204-1 and 204-2.
[0046] The segments of these data units are collected into a data container by circuit 110. The order of the segments in the corresponding data unit within the container is the same as the order of the segments in the received data unit. The order of the data units within a container is the same as the order in which the data units collected in the corresponding container are received.
[0047] According to Figure 2 The example shown illustrates a device comprising four transmitters, one for each of four protocols. Each of the four transmitters provides a socket for one of these protocols. At least one of the four transmitters can each provide multiple sockets with distinct attributes. For example, the transmitters might support either Ethernet or CAN. A transmitter supporting Ethernet can have multiple sockets. The socket attributes for Ethernet are characteristics of the Ethernet protocol stack: for example, IP address and UDP port number. Similarly, a transmitter supporting CAN can also have multiple sockets. The socket attributes for CAN are characteristics of the CAN protocol stack: for example, CAN-ID.
[0048] Each data unit is assigned to a socket constructed for the following protocol: the corresponding data unit is formatted according to that protocol. The segment of the corresponding data unit is assigned to a socket constructed for the following protocol: the data unit is formatted according to that protocol.
[0049] The corresponding data unit segments are assigned to data containers that use protocols such as those that format the data units containing these segments according to those protocols.
[0050] Segments belonging to data units assigned to the same socket are not re-arranged. Segments belonging to data units assigned to different data containers are not nested.
[0051] Figure 3 A portion of an apparatus 100 according to an example is shown schematically.
[0052] Circuit 110 includes a data bus 300 with segments for input data units. The segments of the input data units each include a header and the data itself.
[0053] Circuit 110 includes a classifier 302. Classifier 302 is configured to determine the category of the input data unit. Classifier 302 is configured to determine the category from a set of categories. Each category in the set of categories is assigned to a data traffic waiting queue for that category. Different waiting queues are set up for different categories.
[0054] Classifier 302 is configured, for example, to look up a header in a received segment of an input data unit that identifies a protocol according to which the input data unit is formatted. The header includes, for example, an identifier of the protocol to which the input data packet is formatted. Classifier 302 is also configured, for example, to classify the input data unit by looking up the category of the header content in a table that includes an identifier-to-category mapping. The header content includes, for example, an identifier of a protocol to which the input data unit is formatted, such as a CAN identifier or a LIN identifier. Circuit 110 includes an input modifier 304. Input modifier 304 is configured to modify the header of a segment of the input data unit to prepare data units for an output protocol. The output protocol is the protocol used to output the data unit. For example, input modifier 304 is configured to modify the header of an input data packet to indicate the output protocol.
[0055] Circuit 110 may include segment writer 306. Segment writer 306 is configured to: retrieve useful data for a corresponding segment from the data bus and write the segment into a buffer.
[0056] Circuit 110 may include segment reader 308. Segment reader 308 is configured to: read useful data of the corresponding segment from a buffer, and insert useful data of the segment of the input data unit into the segment of the output (ausgehenden) data unit of the data container on the data bus.
[0057] The output data unit segment includes the modified header of the input data unit segment and the useful data of the input data unit segment.
[0058] Circuit 110 includes an output modifier 310. The output modifier 310 is configured to prepare data units for an output protocol. The output modifier 310 is configured, for example, to format data units according to an output protocol.
[0059] Between segment writer 306 and segment reader 308, circuitry 110 is configured to process metadata. This means that useful data is not processed by circuitry 110 after segment writer 306 and between segment writer 306 and segment reader 308.
[0060] Circuit 110 may include multicast device 312. Multicast device 312 is configured to create multiple copies of the input data units for one or more other time slots. One or more copies of the input data units may be transmitted in different data containers, for example, according to different protocols such as CAN, LIN, and Ethernet. One or more copies of the metadata may be transmitted by different transmitters.
[0061] Circuit 110 is configured to process each copy separately for this purpose.
[0062] Multicast device 312 is configured to coordinate time slots for processing the data unit and time slots for processing one or more replicas. Multicast device 312 is also configured to process the input data unit with a higher priority than data units that require multicast if the input data unit does not require a multicast replica.
[0063] Circuit 110 can be configured to process an input data unit using a first-in, first-out (FIFO) method if the input data unit requires a multicast copy. Circuit 110 can also be configured to process an input data unit using a FIFO method if the input data unit is configured for unicast. Furthermore, circuit 110 can be configured to process an input data unit with a higher priority than data units configured for multicast if the input data unit is configured for unicast.
[0064] Circuit 110 is configured, for example, to stop receiving segments through input interface 104 after identifying that "the fill level of the memory filled with segments to be routed has reached or exceeded a threshold". Circuit 110 is configured, for example, to start receiving segments through input interface 104 after identifying that "the fill level of the memory filled with segments to be routed is below a threshold".
[0065] Circuit 110 includes an input scheduler 314. The input scheduler 314 is configured to make decisions about which data units are accepted by which input device of the input interface 104.
[0066] The memory fill level exceeds the threshold, for example, when a time slot is needed for a copy; when a data container must be shut down; or when the memory does not have sufficient capacity to receive additional data units from a time slot already in the pipeline from input interface 104 to multicast device 312.
[0067] Circuit 110 includes a wait queue engine 316. The wait queue engine 316 is configured to process the metadata of segments of data units. The wait queue engine 316 is configured to verify whether there is still space in the data traffic wait queue. The wait queue engine 316 is configured to delete one or more data units when there is no longer space in the data traffic wait queue.
[0068] Circuit 110 includes a linked list manager 318.
[0069] The waiting queue engine 316 is configured to output processed metadata of segments to the linked list manager 318. The linked list manager 318 includes at least one data flow waiting queue for the data unit scheduler 320.
[0070] The data unit scheduler 320 is configured to forward the metadata of a complete container segment, or the complete data unit of the list manager 318, to at least one data container when the data unit is multiplexed.
[0071] Data unit scheduler 320 is configured to send the metadata of a segment of a data unit or the metadata of a segment of a data unit of a closed data container to segment reader 308.
[0072] Circuit 110 includes an output scheduler 322. The output scheduler 322 is configured to send segments of data units of closed data containers to output interface 106.
[0073] The output scheduler 322 is configured to identify which of the transmitters is available to send the data container, and to send the data units of the closed data container that are available to that transmitter to the output interface 106.
[0074] Circuit 110 includes interactive function 324.
[0075] Interaction function 324 includes a first interface 326. The first interface 326 is configured to pause the pipeline. This prevents a new segment from being sent to the waiting queue engine 316 during the next time slot.
[0076] Interaction function 324 includes a second interface 328. Interaction function 324 uses the second interface 328 to notify the waiting queue engine 316 whether the processed segment resulted in the closure of 0, 1, or 2 containers.
[0077] The input scheduler 314 and the multicast device 312 are configured to communicate via the third interface 330 in initiating or stopping the reception of segments for processing. For example, the multicast device 312 is configured to, upon receiving a command to initiate reception from the interactive function 324, command the input scheduler 314 to begin reception via the third interface 330. For example, the multicast device 312 is configured to, upon receiving a command to stop reception from the interactive function 324, command the input scheduler 314 to terminate reception via the third interface 330.
[0078] The waiting queue engine 316 and the data unit scheduler 320 are configured to communicate via a fourth interface 332. The waiting queue engine 316 is configured, for example, to inform the data unit scheduler 320 via the fourth interface 332 that a new data unit is available for scheduling.
[0079] Interaction function 324 includes a fifth interface 334. The fifth interface 334 is configured to indicate which segment is the first segment of the container and which segment is the last segment of the container. The first segment of the container can be assigned to information indicating that "this first segment is the first segment of the container." The last segment of the container can be assigned to information indicating that "this last segment is the last segment of the container."
[0080] The waiting queue engine 316 and the output scheduler 322 are configured to communicate via a sixth interface 336. The sixth interface 336 is used, for example, to announce that new data units are available for scheduling.
[0081] Data unit scheduler 320 is configured to schedule data traffic waiting queues for a given output device. Output scheduler 322 is configured to schedule output devices. Data unit scheduler 320 and output scheduler 322 are configured to communicate via a seventh interface 338. Output scheduler 322 informs data unit scheduler 320, for example, via the seventh interface 338, particularly for each time slot, which output device should have its traffic waiting queue scheduled.
[0082] Input scheduler 314 and input interface 104 are configured to communicate via eighth interface 340. Input scheduler 314 is configured, for example, to command input interface 104 "which input device should be selected" via eighth interface 340.
[0083] The data unit scheduler 320 and the list manager 318 are configured to communicate via a ninth interface 342. The data unit scheduler 320 requests, for example, a segment from the list manager 318 that has been selected by the data unit scheduler 320 from the traffic waiting queue via the ninth interface 342.
[0084] Interactive function 324 is configured to open a data container.
[0085] Interactive function 324 is configured to make segment decisions for input data units: whether the segment is the first segment, the last segment, or neither in the data container. Interactive function 324 is configured to collect input data units into the data container.
[0086] Interactive function 324 is configured to reserve bytes for the protocol header in the data container, for example, based on a protocol-based identifier.
[0087] Interactive function 324 is configured to, for example, identify the socket to which the input data unit is assigned based on the socket identifier, and generate a data container after identifying that "the input data unit is assigned to the socket".
[0088] Input interface 104 can be configured as segments for receiving input data units in a sequential order. Interaction function 324 can be configured to identify the first segment in the sequential order as the first segment of the data container.
[0089] Interactive function 324 can be configured to open a data container after the first segment is detected.
[0090] The waiting queue engine 316 is configured, for example, to allocate memory 120 for a segment when it pushes a segment into the data traffic waiting queue.
[0091] Interactive function 324 is configured to close the data container.
[0092] Interactive function 324 can be configured to identify the last segment in chronological order as the last segment of the data container.
[0093] Interactive function 324 can be configured to identify that "the condition for closing the data container has been met".
[0094] Interaction function 324 can be configured to determine the amount of bytes accumulated in the data container. Interaction function 324 can be configured to recognize that "the condition for closing the first data container is satisfied" when the number of bytes reaches or exceeds a pre-given number of bytes. Interaction function 324 can be configured to recognize that "the condition for closing the first data container is satisfied," wherein the data integrity of the last data unit is taken into consideration.
[0095] Interactive function 324 can be configured to exclude the input data unit from the data container after recognizing that "the condition for closing the data container has been met".
[0096] According to one example, there is a maximum number of bytes for each socket. Interactive function 324 is configured to close the container with the previous data unit and open a new container with the last data unit when the data unit is unsuitable, i.e., exceeds the maximum number of available bytes.
[0097] Interactive function 324 can be configured to, upon receiving a segment of an input data unit, identify that "the condition for closing the data container is met", wherein the input data unit is the data unit that triggered the closing.
[0098] Interactive function 324 can be configured to: determine whether "this segment is the last segment of the input data unit"; wait until the last segment of the input data unit is received; and when the last segment of the input data unit is received, identify that "the condition for closing the data container is met".
[0099] Interactive function 324 can be configured to start a time counter or a period counter when the data container is opened. Interactive function 324 can be configured to recognize that "the condition for closing the data container has been met" when the counter exceeds a boundary value.
[0100] Interactive function 324 can be configured to: identify a segment in the data container that is missing input data units; wait until the data container includes the last segment of the input data units; and after identifying that the data container includes the last segment of the input data units, identify that the conditions for closing are met.
[0101] Interactive function 324 can be configured to identify errors in segments of input data units and, upon identification of such errors, remove the input data units from the data container.
[0102] Figure 4 A flowchart is shown, outlining the steps of a method for processing data unit 102. The method is described using two input data units, namely a first data unit and a second data unit, as an example. These data units are formatted according to different protocols. The first data unit is formatted, for example, according to a first protocol, such as the LIN protocol. The second data unit is formatted, for example, according to a second protocol, such as the CAN protocol. This method is not limited to processing two data units. This method is not limited to processing two different protocols.
[0103] The method includes step 402.
[0104] Step 402 includes receiving a segment of the first data unit through the input interface 104.
[0105] The method includes step 403.
[0106] Step 403 includes receiving a segment of the second data unit through the input interface 104.
[0107] The method includes step 404.
[0108] Step 404 includes: collecting segments of the first data unit in the first data container via circuit 110.
[0109] Step 404 includes, for example, routing the segment of the first data unit to a first traffic wait list via circuit 110. The first traffic wait list is assigned to the first socket.
[0110] The method includes step 405.
[0111] Step 405 includes: collecting segments of the second data unit in the second data container via circuit 110.
[0112] Step 405 includes, for example, routing the segment of the second data unit to a second traffic wait list via circuit 110. This second traffic wait list is assigned to the second socket.
[0113] The method includes step 406.
[0114] Step 406 includes: storing a first data container in memory 120 via circuit 110.
[0115] The method includes step 407.
[0116] Step 407 includes: storing a second data container in memory 120 via circuit 110.
[0117] For example, steps 402, 404, and 406 are repeated to collect other segments in the first data container, and in particular to route segments of the data unit to the first socket, until the conditions for closing the first container are met.
[0118] For example, repeat steps 403, 405, and 407 of the method to collect other segments in the second data container, and in particular to route segments of the data unit to the second socket, until the conditions for closing the second container are met.
[0119] The method includes step 408. For example, step 408 is performed after "first data container closed" is identified.
[0120] Step 408 includes: scheduling the first data container for the first transmitter 112 via scheduler 322.
[0121] The method includes step 409. For example, step 409 is performed after "second data container closed" is identified.
[0122] Step 409 includes: scheduling the second data container for the second transmitter 116 via scheduler 322.
[0123] A segment for a data container used by one transmitter can be nested with a segment for a data container used by another transmitter. If the two transmitters are the same, the segments are not nested.
[0124] The method may include: nesting segments of a container scheduled for different senders. The method may also include: not nesting segments of a container scheduled for the same sender.
[0125] The method includes step 410.
[0126] Step 410 includes: sending the first data container through the output interface 106.
[0127] The first transmitter 112 stores the first data container in the memory 122.
[0128] The method includes step 411.
[0129] Step 411 includes: sending the second data container through the output interface 106.
[0130] The second transmitter 116 stores the second data container in the memory 124.
[0131] The method includes step 412.
[0132] Step 412 includes: sending the first data container via the first transmitter 112.
[0133] The method includes step 413.
[0134] Step 413 includes: transmitting the second data container via the second transmitter 116.
[0135] The steps of the method can be repeated to process other data units, especially to route other data units to different sockets.
[0136] Circuit 110, which includes interactive functionality 324, is an example. Circuit 110 may include a state machine.
[0137] Figure 5 This shows a state machine used for segment processing of input data segment units.
[0138] The state machine used for segment processing includes a first state 502, a second state 504, and a third state 506.
[0139] The segment processing is in an idle state under the first state 502.
[0140] Segment processing in state 504 involves collecting segments for the data container.
[0141] In state 506, the segment handler continues to collect segments and waits before closing the container until it has finished processing the last segment of the current data unit.
[0142] According to the first transition 508: if no error is detected and the data container is open, the segment processing switches from the first state 502 to the second state 504.
[0143] First transition 508 startup time counter.
[0144] According to the second transition 510: if no error is detected, no overflow is detected, and the data container is not closed, then segment processing remains in the second state 504.
[0145] According to the third transition 512: if no error is detected, no overflow is detected, the data container is closed, and there are still segments with data units to be processed, then segment processing switches from the second state 504 to the third state 506.
[0146] According to the fourth transition 514: if no error is detected, no overflow is detected, and there are still segments with data units to be processed (especially due to data integrity), segment processing remains in the third state 506.
[0147] According to the fifth transition 516: if no error is detected, no overflow is detected, and all segments of the data unit have been processed, then segment processing switches from the third state 506 to the first state 502.
[0148] Fifth transition 516 Stop time counter.
[0149] The fifth transition 516 triggers the identification of the last segment of the data container.
[0150] According to the sixth transition 518: if no error is detected, no overflow is detected, the container is closed, and all segments of the input data unit have been processed, then segment processing switches from the second state 504 to the first state 502.
[0151] The sixth transition is the 518 stop time counter.
[0152] The sixth transition 518 triggers the identification of the last segment of the data container.
[0153] According to the seventh transition 520: if no error is detected, the segment processing remains in the first state 502.
[0154] The seventh transition 520 simultaneously triggers the identification of the first segment of the data container and the identification of the last segment of the data container.
[0155] According to the eighth transition 522: if an error is detected, the segment processing remains in the first state 502.
[0156] According to the ninth transition 524: if no error is detected and an overflow is detected, segment handling switches from the second state 504 to overflow handling 526.
[0157] The ninth transition 524 stops the time counter and removes the current data unit from the data container.
[0158] According to the tenth transition 528: if no error is detected and an overflow is detected, segment handling switches from the third state 506 to overflow handling 526.
[0159] The tenth transition 528 stops the time counter and removes the current data unit from the data container.
[0160] According to the eleventh transition 530: if an error is detected, segment processing switches from the second state 504 to error handling 532.
[0161] According to the twelfth transition 534: if an error is detected, segment processing switches from the third state 506 to error handling 532.
[0162] Figure 6 The state machine for overflow handling 526 is shown.
[0163] Overflow handling 526 includes: if the current data container is closed and all segments of the input data unit have been processed, then proceeding to a first transition 602 of the first state 502. The first transition 602 of overflow handling 526 triggers the identification of the last segment of the current data container and the last segment of the preceding data container.
[0164] Overflow handling 526 includes: if the current data container remains open, proceeding to a second transition 604 to the second state 504.
[0165] The second transition 604 of overflow handling 526 triggers the identification of the last segment of the previous data container. The second transition 604 of overflow handling 526 starts a time counter.
[0166] Overflow handling 526 includes: if the current data container is closed and there are still segments of input data units to be processed, then proceeding to the third transition 606 of the third state 506. The third transition 606 of overflow handling 526 triggers the identification of the last segment of the previous data container. The third transition 606 of overflow handling 526 starts a time counter.
[0167] For example, overflow is detected when the data container's fill level reaches or exceeds a second threshold. According to one example, otherwise, overflow is not detected. According to another example, the first threshold is lower than the second threshold.
[0168] Figure 7 The state machine for error handling 532 is shown.
[0169] Error handling 532 includes: if the input data unit is a first data unit for a data container, then proceeding to a first transition 702 of the first state 502. The first transition 702 of error handling 532 stops the time counter.
[0170] Error handling 532 includes: if the input data unit is not the first data unit of the data container and the time counter is in an idling state, then proceeding to the second transition 704 of the first state 502. The second transition 704 of the first state 502 triggers the identification of the last segment of the input data unit.
[0171] Error handling 532 includes: if the input data unit is not the first data unit of the data container and the time counter is not in an idle state, then proceed to the third transition 706 of the second state 504.
[0172] For example, an error is identified when it is found in a segment of the input data unit. According to one example, otherwise, no error is identified.
[0173] Error handling 532 includes: removing the input data unit from the data container after an error is detected.
[0174] Figure 8 The state machine used for time processing is shown.
[0175] The timing process includes: if a timeout is detected and all segments of the input data unit have been processed, a first transition 802 from the second state 504 to the first state 502 is performed. The first transition 802 of the timing process stops the time counter. The first transition 802 of the timing process triggers the detection of the last segment of the data container.
[0176] The time processing includes: if a segment with a timeout detected and still input data units to be processed, a second transition 804 from the second state 504 to the third state 506 is performed. The second transition 804 of the time processing stops the time counter.
[0177] The time processing includes: if no timeout is detected, a third transition 808 is performed from the second state 504 to the second state 504.
[0178] For example, a timeout is detected when the timer exceeds a boundary value. This boundary value is specific to each socket. According to one example, otherwise, no timeout is detected.
Claims
1. An apparatus (100) for processing data units (102), particularly for use in automotive networks, characterized in that: The device (100) includes: an input interface (104) configured to receive segments of a first data unit; an output interface (106) configured to transmit a first data container; a circuit (110) configured to collect segments of the first data unit in the first data container; and a first transmitter (112) configured to receive the first data container from the output interface (106) and transmit the first data container, wherein the circuit (110) includes a memory (120) configured to store the first data container in the memory (120), and wherein the first transmitter (112) includes a memory (120) for storing the first data container. 2), wherein the input interface (104) is configured to receive a segment of a second data unit, wherein the output interface (106) is configured to transmit a second data container, wherein the circuit (110) is configured to collect a segment of the second data unit in the second data container, wherein the device (100) includes a second transmitter (116) for receiving and transmitting the second data container from the output interface (106), wherein the circuit (110) is configured to store the second data container in the memory (120), wherein the second transmitter (116) includes a memory (124) for storing the second data container.
2. The device (100) according to claim 1, characterized in that: The first data unit is formatted according to a first protocol, wherein the circuit (110) is configured to: identify that "the segment of the first data unit is formatted according to the first protocol", and after identifying that "the segment of the first data unit is formatted according to the first protocol", collect the segment of the first data unit in the first data container, and / or, the second data unit is formatted according to a second protocol, wherein the circuit (110) is configured to: identify that "the segment of the second data unit is formatted according to the second protocol", and after identifying that "the segment of the second data unit is formatted according to the second protocol", collect the segment in the second data unit in the second data container.
3. The apparatus (100) according to any one of the preceding claims, characterized in that: The first transmitter (112) is configured to provide a first socket for transmitting the first data container, wherein the first data unit is assigned to the first socket, wherein the circuit (110) is configured to: identify "the first data unit is assigned to the first socket", and after identifying "the first data unit is assigned to the first socket", schedule the first data container for the first socket.
4. The apparatus (100) according to any one of the preceding claims, characterized in that: The input interface (104) is configured to receive segments of the first data unit in a timing sequence, wherein the circuit (110) is configured to: identify the first segment in a timing sequence as the first segment of the first data container; after identifying the first segment, allocate memory for the first data container segment by segment in the memory (120); and store the first segment in the memory (120) as the first segment of the first data container.
5. The apparatus (100) according to any one of claims 1 to 3, characterized in that: The input interface (104) is configured to receive segments of the first data unit in a timing sequence, wherein the circuit (110) is configured to: identify the last segment in the timing sequence as the last segment of the first data container; and after identifying the last segment, store the last segment as the last segment of the first data container in the memory; schedule the first data container for the first transmitter (112); and release the memory for the first data container in the memory (120).
6. The apparatus (100) according to any one of the preceding claims, characterized in that: The circuit (110) is configured to: identify that "the condition for closing the first data container is satisfied"; and after identifying that "the condition for closing the first data container is satisfied", schedule the first data container for the first transmitter (112); and release the memory for the first data container in the memory (120).
7. The apparatus (100) according to claim 6, characterized in that: The circuit (110) is configured to: determine the number of bytes accumulated in the first data container; and when the number of bytes reaches or exceeds a pre-given number of bytes, identify that "the condition for closing the first data container is met".
8. The apparatus (100) according to claim 7, characterized in that: The circuit (110) is configured to: collect data units having the first data unit in the first data container; after identifying that "the condition for closing the first data container is met" and "the last of the collected data units is not suitable to be placed in the first data container", exclude the last of the collected data units from the first data container; open another data container for the first transmitter and store the data units excluded from the first data container in the other data container.
9. The apparatus (100) according to any one of claims 6 to 8, characterized in that: The circuit (110) is configured to, upon receiving a segment of a data unit, identify that "the condition for closing the first data container is met", wherein the data unit is the data unit that triggers the closing.
10. The apparatus (100) according to claim 9, characterized in that: The circuit (110) is configured to: determine whether "the segment is the last segment of the first data unit"; wait until the last segment of the first data unit is received; and after receiving the last segment of the first data unit, identify that "the condition for closing the first data container is satisfied".
11. The apparatus (100) according to any one of claims 6 to 10, characterized in that: The circuit (110) is configured to: start a time counter or a period counter when the first data container is opened; and when the counter exceeds a boundary value, identify that "the condition for closing the first data container has been met".
12. The apparatus (100) according to any one of claims 6 to 11, characterized in that: The circuit (110) is configured to: wait until the first data container includes the last segment of the last data unit of the first data container; and after recognizing that "the first data container includes the last segment of the last data unit", recognize that "the condition for closing is satisfied", or the circuit (110) is configured to: wait until the first data container includes the last segment of the last data unit; and recognize the first segment of the next data unit; and remove the segment of the last data unit from the first data container.
13. The apparatus (100) according to any one of the preceding claims, characterized in that: The circuit (110) is configured to: identify an error in a segment of the first data unit; and, upon identifying the error, remove the first data unit from the first data container.
14. A method for processing data units, particularly for use in automotive networks, characterized in that: The method includes: receiving (402) a segment of a first data unit through an input interface (104); transmitting (410) a first data container through an output interface (106); collecting (404) the segment of the first data unit in the first data container through a circuit (110); receiving the first data container from the output interface (106) through a first transmitter (112); transmitting (412) the first data container through the first transmitter (112); wherein the circuit (110) includes a memory (120), and the method further includes: storing (406) the first data container in the memory (120) through the circuit (110), wherein the first transmitter (112) includes a memory (122) for storing the first data container, and the method further includes... The circuit (110) receives (403) a segment of the second data unit through the input interface (104); sends (411) a second data container to the output interface (106); collects (405) a segment of the second data unit in the second data container through the circuit (110); receives the second data container from the output interface (106) through the second transmitter (116); sends (413) the second data container through the second transmitter (116); schedules (409) the second data container for the second transmitter (116) through the scheduler (322); and stores (407) the second data container in the memory (120) through the circuit (110), wherein the second transmitter (116) includes a memory (124) for storing the second data container.
15. The method according to claim 14, characterized in that: The method further includes: collecting the first data unit and at least one additional data unit in the first container, and / or collecting the second data unit and at least one additional data unit in the first container.