Communication control apparatus of a subscriber station and method for processing a message in a subscriber station
By using the message management module and transmission order determination module of the communication control device in the CAN bus system, the transmission order of messages with the same CAN identifier is determined by the sequence index, which solves the problem of uncertain message transmission order in the CAN bus system, realizes high data rate and high error robustness communication, and is suitable for specific applications in vehicles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ROBERT BOSCH GMBH
- Filing Date
- 2025-12-18
- Publication Date
- 2026-06-23
AI Technical Summary
In a CAN bus system, when user stations send messages with the same CAN identifier, existing technology cannot determine their relative transmission order, causing messages to fail to follow the preset transmission order and reducing the effective net data rate of the bus system.
A communication control device is adopted, which uses a message management module and a transmission order determination module to determine the transmission order of messages with the same CAN identifier by using a sequence index, ensuring that the preset message transmission order is followed, without needing to consider the position of the messages in the memory.
It enables high data rate and high error robustness communication in CAN bus systems, supports net data rates of at least 5 Mbit/s to 20 Mbit/s, and supports message transmission with a payload size of up to 2048 bytes per frame. It is suitable for certain applications in vehicles such as CiA613-3 segments, CANsec, and ISO-TP.
Smart Images

Figure CN122268699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a communication control device for a user station in a serial bus system, and a method for processing messages or packets in a user station of a serial bus system operating at high data rates and with high error robustness. Background Technology
[0002] Bus systems are frequently used for communication between sensors and control units in technical equipment, such as vehicles. In a bus system, data is created, transmitted, and read as messages or packets. Many different standards exist for this purpose, such as Classical CAN, CAN FD, or CAN XL, which are standardized in the international standard ISO 11898-1:2024. Messages are transmitted between bus participants in the bus system, such as sensors, control devices, and transmitters. Bus participants are also called nodes or user stations.
[0003] Each user station in a bus system has a transmit memory that can store more than one message or message. The communication controller manages the messages in the transmit memory and specifies the order in which these messages should be sent according to different standards. In time-controlled systems such as FlexRay or TTCAN, there are system-wide rules specifying when which message should be sent. Typically, the transmit memory is managed so that messages are sent in the order they were written to the memory. This sending order is also known as FIFO (First-In, First-Out) order.
[0004] In contrast, in a CAN bus system, the message transmission order of a user station is mostly determined by internal arbitration within the user station. In this case, a CAN identifier, also known as a CAN-Identifier, is used. Each message stored in the user station's transmit memory and to be transmitted via the bus is assigned a CAN identifier. According to the CAN bus arbitration rules, the message with the highest priority CAN identifier will be sent onto the bus first. This transmission order is also known as a priority queue.
[0005] However, the problem is that if a user station needs to send two or more messages with the same CAN identifier, this internal queuing method in CAN cannot provide a definite result. The relative transmission order of such messages with the same CAN identifier may depend on the location of these messages in the user station's transmission memory. This is, for example, the M_CAN IP module currently available on the market. However, it is also possible that the relative transmission order of such messages with the same CAN identifier is random.
[0006] However, failure to adhere to the preset transmission order may render messages unusable and require retransmission, thus reducing the effective net data rate in the bus system. Consequently, it becomes impossible to comply with the timing presets of higher-level technical devices. Summary of the Invention
[0007] Therefore, the object of the present invention is to provide a communication control device for a user station in a serial bus system and a method for processing messages in a user station of a serial bus system, which solves the above-mentioned problems. In particular, a communication control device for a user station in a serial bus system and a method for processing messages in a user station of a serial bus system should be provided, wherein high data rates and high error robustness of communication can be achieved on the bus.
[0008] This task is solved by the communication control device for a user station in a serial bus system as described in claim 1. The communication control device comprises: a message management module for managing messages to be sent by the communication control device to the bus of the bus system for controlling communication between the user station and at least one other user station in the bus system; and a transmission order determination module for determining a sequence index for each message, wherein each message has an identifier whose value indicates the priority at which the message is sent to the bus, wherein the transmission order determination module is designed to determine a sequence index for each identifier and assign the sequence index to the identifier, and wherein the message management module is designed to determine the transmission order for messages with the same identifier value by using the sequence index.
[0009] Because of the design of the communication control device, it adheres to a preset message transmission order. Therefore, the communication control device presets the transmission order for a series of messages with the same CAN identifier. However, the communication control device does not need to check the storage location of these messages with the same CAN identifier. Furthermore, the communication control device does not need to use a FIFO memory for this purpose.
[0010] Therefore, the method, which can be executed by the communication control device, can be implemented with extremely low resource consumption because the sequence index only needs to have a small range of values and also allows a jump back to 0.
[0011] Another advantage is that when the communication control unit inputs a series of messages with the same CAN identifier into the transmit memory, which is managed as a "priority queue," the communication control unit does not need to consider the position of the messages in the memory. Instead, the communication control unit can utilize all the free storage locations in the memory.
[0012] Therefore, it is possible to adhere to the preset message sending order with both low time and low cost.
[0013] Another major advantage is that only minor adjustments are needed to the internal arbitration of existing communication control devices. This adjustment can then be easily plugged into any communication control device, especially a CAN controller. Therefore, even existing communication control devices, particularly CAN controllers, can be retrofitted very easily, thus saving resources.
[0014] Therefore, this communication control device enables different CAN bus systems to be used in certain applications, especially in vehicles, where these applications require a specific transmission order for messages with the same CAN identifier at the user station. Such applications include, for example, CiA613-3 compliant segmented CAN, CiA613-2 compliant CANsec, or ISO-TP compliant with international standard ISO 15765-2.
[0015] The communication control device design described above helps prevent upper-level equipment from malfunctioning because it adheres to the correct message order according to set priorities, and further enables a net data rate of at least 5 Mbit / s to approximately 8 Mbit / s or 10 Mbit / s or higher, especially up to 20 Mbit / s, on the bus. In this case, a bit length is less than 100 ns. Furthermore, the payload size per frame can be up to 2048 bytes. Of course, the number of bytes per frame can have various values, especially up to 512 bytes or 1024 bytes or any other value.
[0016] Advantageous further designs of the communication control device are described in the dependent claims.
[0017] The sending order determination module may be designed to assign the determined sequence index to the identifier in the message storage module, wherein the message management module is designed to determine the sending order for messages with the same identifier value by using the sequence index stored in the message storage module. In this case, the message storage module may have a sending priority queue with a predetermined number of storage slots in which messages with identifiers and sequence indices are stored.
[0018] In one design, the message storage module has a sending priority queue with a predetermined number of storage slots in which messages with identifiers, sequence indices, and ranges are stored, wherein the sequence index has a predetermined range of values, and the range is one of three ranges into which the predetermined range of values of the sequence index is divided.
[0019] The sequence index can be an integer selected from a predetermined range of values. The sending order determination module is designed to increment the sequence index for each consecutive message in the sending priority queue, and after exceeding the maximum value of the predetermined range of values for the sequence index, it jumps back to the minimum value of the range for the next message in the sending priority queue.
[0020] According to one embodiment, the predetermined range of values for the sequence index is determined by the following method: there exists a value of at least 3 between the minimum and maximum values of the sequence index. The difference of #Slt-4, where #Slt is the predetermined number of storage slots in the send priority queue.
[0021] It can be envisioned that the predetermined range of values for the sequence index is divided into three directly successive ranges, which have a first, a second, and a third range, and each range has a minimum size of #Slt-1, where #Slt is a predetermined number of storage slots in the sending priority queue, wherein the first range begins with the minimum value of the sequence index, wherein the second range is seamlessly and non-overlappingly arranged between the first and third ranges, and wherein the third range ends with the maximum value of the sequence index.
[0022] The communication control device described above may be part of a user station for a serial bus system, which also has a transmitting / receiving device for transmitting signals generated by the communication control device for frames to the bus of the bus system and receiving signals from the bus, wherein the communication control device is designed to negotiate with other user stations on the bus during a first communication phase: which user station of the bus system will at least temporarily gain exclusive, conflict-free access to the bus during a subsequent second communication phase.
[0023] Optionally, the transmitting / receiving device is designed to generate the bus state of the frame in a first operating mode during the first communication phase, and to generate the bus state of the frame in a second operating mode during the second communication phase, the second operating mode being different from the first operating mode.
[0024] The user station described above can be part of a bus system that also includes a bus and at least two user stations interconnected via the bus, enabling them to communicate serially with each other. In this case, at least one of the at least two user stations is the aforementioned user station.
[0025] The aforementioned task is also solved by the method for processing messages in a user station of a serial bus system according to claim 11. This method is performed by a communication control device of the user station, wherein the communication control device performs the following steps: managing messages to be sent by the communication control device to the bus of the bus system to control communication between the user station and at least one other user station of the bus system using a message management module; determining a sequence index for each message using a transmission order determination module, wherein each message has an identifier whose value indicates the priority at which the message is sent to the bus, wherein the transmission order determination module determines a sequence index for each identifier and assigns it to the identifier in the determination step; and wherein the message management module determines the transmission order for messages with the same identifier value by using the sequence index in the management step.
[0026] This method provides the same advantages as previously described regarding message processing devices and / or user stations.
[0027] Other possible implementations of the invention include combinations of features or implementation methods not explicitly mentioned but previously or subsequently described with reference to embodiments. Those skilled in the art will also add individual aspects as improvements or supplements to the corresponding basic forms of the invention. Attached Figure Description
[0028] The invention will now be described in more detail with reference to the accompanying drawings and embodiments.
[0029] Figure 1 A simplified block diagram of the bus system according to the first embodiment is shown; Figure 2 A schematic diagram illustrating the structure of messages that a user station can send and / or receive according to a bus system of the first embodiment is shown. Figure 3 A simplified schematic block diagram of a user station of a bus system according to a first embodiment is shown; Figure 4 and Figure 5 The time variation curves of signals appearing in the bus system according to the first embodiment during normal operation are shown; Figure 6 It shows Figure 3 A schematic diagram of the structure of a portion of the communication control device of a user station; and Figure 7 The illustration is shown Figure 6 A diagram showing the functions of the message management module of the communication control device.
[0030] In the accompanying drawings, unless otherwise specified, the same or functionally equivalent elements are given the same reference numerals. Detailed Implementation
[0031] Figure 1 Bus system 1 is shown as an example, which can be at least segmented as a CAN bus system, CAN-FD bus system, CAN-XL bus system, etc. Bus system 1 can be used in vehicles, especially motor vehicles, aircraft, etc., or hospitals, etc. - exist Figure 1 In this system, bus system 1 has multiple user stations 10, 20, and 30, which are respectively connected to bus 40 or bus lines having a first bus core wire 41 and a second bus core wire 42. Bus core wires 41 and 42 can also be referred to as CAN_H and CAN_L for signals on bus 40. Messages 45, 46, and 47 can be transmitted between the various user stations 10, 20, and 30 in the form of signals via bus 40. User stations 10, 20, and 30 are, for example, control devices or display devices of a motor vehicle.
[0032] like Figure 1 As shown, user stations 10 and 30 each have a communication control device 11 and a transmitting / receiving device 12. The transmitting / receiving device 12 has a transmitting module 121 and a receiving module 122.
[0033] User station 20 has a communication control device 21 and a transmitting / receiving device 22. The transmitting / receiving device 22 has a transmitting module 221 and a receiving module 222.
[0034] The transmitting / receiving devices 12 of user stations 10 and 30 and the transmitting / receiving device 22 of user station 20 are directly connected to bus 40, even though this is... Figure 1 Not shown in the image.
[0035] Communication control devices 11 and 21 are respectively used to control the corresponding user stations 10, 20 and 30 to communicate with at least one other user station among the user stations 10, 20 and 30 connected to the bus 40 via the bus 40.
[0036] Communication control device 11 creates and reads first messages 45, 47, which are, for example, CAN messages 45, 47. Here, CAN messages 45, 47 are constructed, for example, based on the CAN XL format of ISO 11898-1:2024. Transmit / receive device 12 is used to transmit and receive messages 45, 47 from bus 40. Transmit module 121 receives a digital transmit signal TxD created by communication control device 11 for one of messages 45, 47 and converts it into a signal on bus 40. The digital transmit signal TxD may be a pulse width modulated signal, at least temporarily or in sections. Receive module 122 receives the signals corresponding to messages 45 to 47 transmitted on bus 40 and thereby generates a digital receive signal RxD. Receive module 122 sends the receive signal RxD to communication control device 11.
[0037] Furthermore, the communication control device 11 can be designed to create and read a second message 46, such as a CAN FD message 46. The transmitting / receiving device 12 can be designed accordingly.
[0038] The communication control unit 21 can be designed like a conventional CAN controller conforming to ISO 11898-1:2024, i.e., a classic CAN controller or CAN FD controller with CAN FD fault tolerance. The communication control unit 21 creates and reads a second message 46, such as a CAN FD message. The transmit / receive unit 22 is used to transmit and receive message 46 from the bus 40. The transmit module 221 receives the digital transmit signal TxD created by the communication control unit 21 and converts it into a signal on the bus 40 for message 46. The receive module 222 receives the signals corresponding to messages 45 to 47 transmitted on the bus 40 and thereby generates a digital receive signal RxD. The transmit / receive unit 22 may be implemented as a conventional CAN FD transceiver or CAN-SiC transceiver.
[0039] Through these two user stations 10 and 30, it is possible to form and subsequently transmit messages 45 and 47 with different CAN formats (especially CAN FD or CAN XL formats), as well as to receive such messages 45 and 47. Message 45 will be described in more detail below.
[0040] Figure 2 Frame 450 of message 45 is shown, which is in particular a CAN XL frame or CAN FD frame provided by communication control device 11 to transmitting / receiving device 12 for transmission on bus 40. In this embodiment, communication control device 11 creates frame 450 to be compatible with CAN FD. Alternatively, frame 450 is compatible with any subsequent standard of CAN FD or CAN XL.
[0041] according to Figure 2 Frame 450, used for CAN communication on bus 40, is divided into different communication phases 451 and 452: arbitration phase 451 (first communication phase) and data phase 452 (second communication phase). Following the start bit (SOF), frame 450 has an arbitration field 453, a control field 454, a first switching field 455, a data field 456, a checksum field 457, a second switching field 458, and a frame end field 459. The checksum field 457, the second switching field 458, and the frame end field 459 constitute the frame end phases 457, 458, and 459 of frame 450. The arbitration field 453 is used to store the identifier 4531. Classic CAN frames do not have switching fields 455 and 458.
[0042] During the arbitration phase 451, using the identifier (ID) 4531 in the arbitration field 453, user stations 10, 20, and 30 negotiate bit-by-bit which user station 10, 20, or 30 wants to send messages 45 and 46 with the highest priority, thereby gaining exclusive access to bus 40 of bus system 1 for transmission in the subsequent data phase 452. In the arbitration phase 451, the physical layer, as in CAN and CAN-FD, is also used in CAN XL. The physical layer corresponds to the bit transport layer or Layer 1 of the known OSI model (Open Systems Interconnection Model 1).
[0043] During phase 451, the known CSMA / CR method is used, which allows user stations 10, 20, and 30 to access bus 40 simultaneously without disrupting higher-priority messages 45 and 46. This makes it relatively easy to add other bus user stations 10, 20, and 30 to bus system 1, which is highly advantageous.
[0044] The result of the CSMA / CR method is that bus 40 ( Figure 1 There must exist so-called recessive states on bus 40, which can be overwritten by other user stations 10, 20, and 30 using dominant levels or states on bus 40. In the recessive state, high impedance conditions exist at each user station 10, 20, and 30, which, combined with parasitic effects of the bus circuitry, results in a longer time constant. This limits the maximum bit rate of the current CAN-FD physical layer to approximately 2 megabits per second in real-world vehicle applications.
[0045] At the end of the arbitration phase 451 of CAN FD and CAN XL, the system switches to the data phase 452 by means of the first switching field 455.
[0046] In data phase 452, in addition to transmitting a portion of the first switching field 455, valid data from the CAN-XL frame 450 or message 45 from data field 456, along with a portion of the checksum field 457 and the second switching field 458, are also transmitted. Utilizing today's CAN-XL physical layer, the maximum bit rate in data phase 452 can reach approximately 20 megabits per second. At the end of data phase 452 for both CAN FD and CAN XL, the system switches back to arbitration phase 451 using the second switching field 458.
[0047] The sender of message 45 will only begin sending the bits of data phase 452 on bus 40 when user station 10 wins the arbitration as the sender and thus obtains exclusive access to bus 40 of bus system 1 as the sender.
[0048] Therefore, user stations 10 and 30, in the arbitration phase 451 as the first communication phase, partially, especially up to the FDF bits (inclusive) known in ISO 11898-1:2024, use a format known to CAN / CAN-FD that conforms to ISO 11898-1:2024. However, compared to CAN or CAN FD, the net data transmission rate can be increased in CAN XL during the data phase 452 as the second communication phase, especially to over 10 megabits per second. Furthermore, the effective data size per frame can be increased, especially to approximately 2 kilobytes or any other value.
[0049] Figure 3 The basic structure of a user station 10 with a communication control device 11 and a transmitting / receiving device 12 is shown. User station 30 and / or user station 20 may be similar to Figure 3 The layout is as shown. Therefore, user stations 20 and 30 will no longer be described separately.
[0050] according to Figure 3 In addition to the communication control unit 11 and the transmitting / receiving unit 12, the user station 10 also has a microcontroller 13, to which the communication control unit 11 is assigned, and the microcontroller 13 has a central processing unit (CPU) 131. Additional components of the user station 10, such as an energy supply device that provides power to the transmitting / receiving unit 12, are not included for simplicity. Figure 3 As shown in the image.
[0051] The communication control device 11 is designed in principle to implement CAN functions in accordance with ISO 11898-1:2024.
[0052] The communication control device 11 includes a protocol controller 111 and a protocol extension block 112. The protocol controller 111 creates frames 450 for messages 45 on the bus 40 based on messages from the microcontroller 13. Figure 2 Protocol extension block 112 provides at least one additional function that is not performed by protocol controller 111.
[0053] The protocol controller 111 includes modules that create and process message 45 according to ISO 11898-1:2024. Specifically, a checksum module 15 and / or at least one additional module may be provided for this purpose. The checksum module 15 calculates at least one checksum for frame 450 of message 45.
[0054] Protocol extension block 112 has at least one extension module 1121, but in particular has multiple extension modules 1121 to 112N. Figure 3In the example, block 112 has a transmission order determination module 1121, a message management module 1122 (MessageHandler), a message storage module 1223 with a transmission priority queue TXPQ (TXPQ = Transmit-Priority-Queue), a receive signal filtering module 1124, and optionally other modules 1125 to 112N. Any number of modules or other modules can be set up and used.
[0055] All advanced protocol extension functions are consolidated in protocol extension block 112. These functions can be modular, i.e., implemented by individual modules 1121 to 112N. Therefore, protocol extensions or protocol extension functions can be easily added without affecting the protocol controller 111. In principle, protocol extensions can be implemented alternatively or additionally in software. This software then executes on the central processing unit 131 of the microcontroller 13. At least one signal CRTL can be exchanged between the protocol controller 111 and the protocol extension block 112, using which transmission and reception can be controlled.
[0056] The transmission order determination module 1121 is designed to additionally allocate a predetermined variable SQ_IDX to each message 45 created by the protocol controller 111 that has the same priority ID or identifier 4531 (ID used for arbitration on the bus 40). (As in conjunction with...) Figure 6 As explained in more detail, the predetermined variable SQ_IDX is stored in the message storage module 1223 along with the message 45 to be sent, more specifically in the transmission priority queue TXPQ (TXPQ = Transmit-Priority-Queue). The predetermined variable SQ_IDX is used for internal arbitration at user station 10, as detailed below. The transmission order determination module 1121 can be designed in software.
[0057] Figure 3 The message management module 1122 (Message Handler) is designed to manage a predetermined number of messages 45 to be sent and a predetermined number of messages 45 already received in the message storage module 1223. The memory required to store the messages 45 to be sent or received may be additionally or alternatively arranged outside the communication control device 11. In this case, status information (e.g., whether a message 45 has been stored) is stored in the message management module 1122.
[0058] If necessary, the message management module 1122 can divide the message 45 into multiple smaller frames 450 for transmission and receive the message 45 divided into multiple smaller frames 450. Therefore, the message management module 1122 can allocate portions of the message 45 to the message 45.
[0059] The message storage module 1223 has predetermined storage elements designed to store message 45 or at least a portion of message 45, and the storage elements are designed to store additional information about message 45, particularly the variable SQ_IDX. This will combine Figure 6 To provide a more detailed description.
[0060] Figure 3 The received signal filtering module 1124 can filter incoming messages 45 to reduce the burden on the central processing unit 131.
[0061] The transmitting / receiving device 12 has a transmitting module 121 and a receiving module 122. Although the transmitting / receiving device 12 is always referred to below, the receiving module 122 may alternatively be disposed in a separate device outside the transmitting module 121. The transmitting module 121 and the receiving module 122 may be constructed in the same manner as the conventional transmitting / receiving device 22.
[0062] The transmitting / receiving device 12 is connected to the bus 40, more specifically to its first bus core 41 for CAN_H or CAN-XL_H and its second bus core 42 for CAN_L or CAN-XL_L.
[0063] During the operation of the bus system 1, the transmitting module 121 of the transmitting / receiving device 12 converts the transmitting signal TxD of the communication control device 11 into corresponding signals CAN_H and CAN_L for the bus core lines 41 and 42, and sends these signals CAN_H and CAN_L to the bus 40 at the connection end for CAN_H and CAN_L. Figure 4 An example of signals CAN_H and CAN_L is shown. If the transmitting / receiving device 12 uses a voltage source different from 5V, the voltage values of signals CAN_H and CAN_L at its connection terminals for CAN_H and CAN_L will also change.
[0064] The transmitting / receiving device 12 implements Layer 1 of the known OSI model, that is, the transmitting / receiving device 12 physically encodes each bit to be transmitted onto the bus 40. As a result, a differential voltage VDIFF = CAN_H - CAN_L is formed on the bus 40. Figure 5 The text shows the data based on... Figure 4 An example of the differential voltage VDIFF formed by the signal.
[0065] The receiving module 122 of the transmitting / receiving device 12 is based on Figure 4 Signals CAN_H and CAN_L received from bus 40 or according to Figure 5The differential voltage VDIFF forms the received signal RxD, and this received signal is transmitted to the communication control device 11, such as... Figure 3 As shown. Except in idle or standby mode, the transmitting / receiving device 12 always uses the receiving module 122 to monitor the transmission of data or messages 45, 46 on the bus 40 during normal operation, regardless of whether the transmitting / receiving device 12 is the sender of message 45.
[0066] according to Figure 4 For example, signals CAN_H and CAN_L have dominant and recessive bus levels or bus states 401, 402, at least during arbitration phase 451, as is known from CAN. Individual bits of signal VDIFF, with a bit time t_bt, can be identified using a receive threshold of 0.7 V. During data phase 452, the bits of signals CAN_H and CAN_L in CAN FD and CAN XL are transmitted faster than in arbitration phase 451, i.e., with a shorter bit time t_bt. Therefore, signals CAN_H and CAN_L in CAN FD or CAN XL during data phase 452 may differ from the conventional signals CAN_H and CAN_L according to classic CAN, at least in terms of their higher bit rates.
[0067] Figure 4 The sequences of states 401 and 402 of signals CAN_H and CAN_L, and the resulting... Figure 5 The voltage VDIFF variation curve is only used to illustrate the function of user station 10. The data status sequences of bus states 401 and 402 can be selected as needed.
[0068] During the operation of user station 10, communication control device 11 defines a group of devices with the same identifier 4531 as follows: Figure 2 Message 45 or its frame 450 ( Figure 2 The order in which they are sent. Therefore, Figure 3 The communication control device 11, especially its transmission order determination module 1121, determines the transmission order for this group of messages 45 or its frame 450. Figure 2 Define internal priorities, as shown below. Figure 6 As described in more detail. Of course, this also applies to messages 46 and 47, even though only message 45 will be mentioned below.
[0069] Message 45 or its frame 450 ( Figure 2The CAN priority of a device is determined by its identifier 4531. A smaller value for identifier 4531 indicates a higher CAN priority. A larger or higher value for identifier 4531 indicates a lower CAN priority. Identifier 4531 is used for arbitration between user stations 10, 20, and 30 on bus 40, as known from ISO 11898-1:2024.
[0070] If the CAN bus is in an "idle" state, that is, either because there is no communication activity or because CAN frame 450 has been detected. Figure 2 If the "interval" of message 45 ends, then the protocol controller 111 may begin transmitting message 45 or its frame 450 ( Figure 2 The message 450 is sent to bus 40. The "interval" can also be called the inter-frame interval and corresponds to the predetermined interval that must be observed after frame 450 ends before the next frame 450 is allowed to be sent to bus 40, that is, there is a next transmission option on bus 40. At the latest at the time of the transmission option, message management module 1122 (Message Handler) must provide the protocol controller 111 with the message 45 or frame 450 to be sent.
[0071] The transmission order determination module 1121 can dynamically manage the elements of the transmission priority queue TXPQ. Furthermore, when the transmission order determination module 1121 wants to write a new message 45 to be sent into an element or storage slot of the transmission priority queue TXPQ, the transmission order determination module 1121 always obtains only a pointer to a free element or storage slot of the transmission priority queue TXPQ from the message management module 1122.
[0072] Therefore, as in Figure 6 As an example, message 45 or frame 450 may be sent in a different order in the transmission priority queue TXPQ than it should be. Figure 6 In the context of the message, the priority queue TXPQ has seven storage slots SLT_IDX, i.e., 0 to 6, for message 45 and its control elements TxRqst, SQ_IDX, and B_SQ_IDX.
[0073] exist Figure 6 In the example, five messages 45 are stored, where, for simplicity, only the identifier ID (4531) in decimal representation is given for message 45. The transmission order determination module 1121 allocates a control element SQ_IDX. From the control element SQ_IDX, control elements B_SQ_IDX are derived for the first range B_A, the second range B_B, and the third range B_C, as described in more detail below. Ranges B_A, B_B, and B_C are arranged sequentially without overlap.
[0074] For each element or storage slot SLT_IDX in the transmission priority queue TXPQ, there is a status bit indicating a transmission request (TxRqst) for the element or message in that storage slot SLT_IDX. The control element TxRqst is a control bit that indicates whether message 45 stored in the transmission priority queue TXPQ is to be transmitted (TxRqst = 1), or whether there is no transmission request for message 45 stored in the transmission priority queue TXPQ (TxRqst = 0). This status bit changes if the element or message 45 in the storage slot SLT_IDX of the transmission priority queue TXPQ has been successfully transmitted, if the transmission order determination module 1121 inputs a new message 45 into the transmission priority queue TXPQ, or if the transmission task is cancelled. Cancellation of a transmission task can be performed, for example, by the software of the transmission order determination module 1121 or the software of the microcontroller 13, and is referred to as transmission cancellation. Alternatively, a send task can be cancelled via hardware, for example, because the maximum number of send attempts has been reached for the element or message in the storage slot SLT_IDX of the send priority queue TXPQ. Send cancellation is optional and not all message handling modules 1122 support it.
[0075] The message management module 1122 (Message Handler) uses variables SLT_IDX, RQST, RES_IDX, RES_ID, and RES_SQ to determine which message 45 stored in the send priority queue TXPQ is to be sent next. To do this, the send order determination module 1121 notifies the message management module 1122 of the control element—the sequence index SQ_ID.
[0076] As described in more detail below, the message management module 1122 can first store the current highest priority identifier ID (4531) in the variable RES_ID as an intermediate result, and additionally store the index of the storage slot where the identifier ID (4531) was found in the variable RES_IDX. Furthermore, the message management module 1122 stores the sequence index SQ_IDX found there in the variable RES_SQ. If an identifier ID (4531) with a higher priority and applicable TxRqst=1 is seen in the storage slot, this intermediate result in the variables RES_ID, RES_IDX, and RES_SQ will be updated. After checking the last send slot of the queue TXPQ, a result consisting of the three values of the variables RES_ID, RES_IDX, and RES_SQ will be obtained. The range B_SQ_IDX is automatically derived from the value of the sequence index SQ_IDX and does not need to be stored by the message management module 1122.
[0077] Whenever the value of the TxRqst bit in the transmission priority queue TXPQ changes, the message management module 1122 performs a search cycle on the elements or storage slots SLT_IDX of the transmission priority queue TXPQ to find the element or message 45 with the highest transmission priority after the change in the storage slots SLT_IDX of the transmission priority queue TXPQ. This search cycle can also be called Tx_Scan.
[0078] The transmission order determination module 1121 and the message management module 1122 cooperate to ensure that a high-priority message 45 with a low-value identifier (ID) 4531, which was written into the transmission priority queue TXPQ shortly before the next transmission option on bus 40, can be initiated at the next transmission option. To this end, modules 1121 and 1122 are designed so that the message management module 1122 (Message Handler) can quickly identify this message 45 as the highest-priority message 45 or frame 450.
[0079] This prevents other CAN frames 450 (from user station 10 or other user stations 10, 20, 30 on bus 40) from being initiated during this transmission option, thus preventing the highest priority message from being waited for until the other CAN frame 450 ends.
[0080] To this end, the transmission order determination module 1121 and the message management module 1122 together execute a two-part method. The first part of the method includes how the transmission order determination module 1121 determines the internal order of messages 45 within a group of messages 45 that have the same identifier 4531. The second part of the method includes how the message management module 1122 finds the next message 45 to be sent in the transmission priority queue TXPQ during a single search cycle (Tx_Scan).
[0081] The send priority queue TXPQ consists of a set of elements in each storage slot SLT_IDX, where one element stores a message 45 along with additional control information (such as the sequence index SQ_IDX).
[0082] The message management module 1122 (Message Handler) manages the elements or storage slots SLT_IDX of the transmit priority queue TXPQ in the message storage 1123, such that the CAN messages 45 stored there are transmitted in the order of their CAN priority (ID) 4531 and the transmission order determined by the transmit order determination module 1121. In this case, messages with the same CAN identifier 4531 ( Figure 2 The messages 45 are sent to each other in a preset order by the message management module 1122. The message management module 1122 can therefore have and use application software.
[0083] The first part of this method, in particular the sending order determination module 1121, can be executed in software as follows.
[0084] The transmission order determination module 1121 transmits the desired transmission order to the message management module 1122 via the variable—sequence index SQ_IDX. The transmission order determination module 1121 then writes the variable SQ_IDX along with message 45 into an element or storage slot SLT_IDX of the transmission priority queue TXPQ, such as... Figure 6 As indicated by the arrows. It is generally desirable that within a group of messages 45 with the same identifier 4531, these messages 45 are sent in the same order they were written into the send priority queue TXPQ. Therefore, these messages 45 with the same identifier 4531 must be written into the send priority queue TXPQ with an incrementing sequence index SQ_IDX value, such that the SQ_IDX value represents the internal send order. An example of this is given below. Figure 7 The description is based on the third embodiment.
[0085] according to Figure 6The sequence index SQ_IDX is an integer whose value ranges from the minimum value SQ_IDX-mn (especially 0) to the maximum value SQ_IDX-mx (at least SQ_IDX-mn + 3). #Slt–4), where #Slt is the maximum number of elements or storage slots SLT_IDX in the send priority queue TXPQ. A larger range is also allowed. However, an excessively large range has the disadvantage of requiring the management of longer variables SQ_IDX, thus increasing the overhead of executing this method. Alternatively, the minimum value SQ_IDX–mn can also have values other than 0.
[0086] exist Figure 6 In the example, the send priority queue TXPQ has seven elements or storage slots SLT_IDX, making #Slt = 7 applicable. Therefore, the sequence index SQ_IDX can be an integer in the range 0 to 19. The range 0 to 19 means that SQ_IDX-mn is 0 and SQ_IDX-mx is 19. In this example, ranges A and C are each 7 elements larger, while the middle range B is only 6 elements larger. Therefore, range B is smaller than ranges A and C. Ranges A, B, and C are not all the same size.
[0087] exist Figure 6 In the example, one of the messages 45 with identifier 100 has been sent. Afterwards, message 45 with identifier 200 is stored in the storage slot.
[0088] The transmission order determination module 1121 manages a separate variable SQ_IDX(ID) for each transmission identifier 4531. For this purpose, module 1121 uses at least one counter, specifically one counter for each transmission identifier 4531. Whenever the transmission order determination module 1121 writes a message 45 with a predetermined CAN identifier 4531 into the transmission priority queue TXPQ, module 1121 increments the associated sequence index SQ_IDX(ID) or the corresponding counter value. The increment is cyclical, returning to 0 after reaching a maximum value. That is, for... Figure 6 The identifier 4531 (100) in the transmission order determination module 1121 manages a separate variable SQ_IDX (100). Furthermore, the transmission order determination module 1121 provides... Figure 6 The identifier 4531 (200) manages the separate variable SQ_IDX (200). Furthermore, the transmission order determination module 1121... Figure 6 The identifier 4531 (300) manages the separate variable SQ_IDX (300). Furthermore, the transmission order determination module 1121... Figure 6The identifier 4531 (400) in the code manages the separate variable SQ_IDX (400).
[0089] The second part of this method can be implemented in hardware as follows. Thus, in the transmit priority queue TXPQ, if the transmit priority queue TXPQ contains only messages 45 with the same identifier 4531 or the same value as identifier 4531, there can be up to #Slt messages with the same identifier 4531 or the same value as identifier 4531. Furthermore, the sequence index SQ_IDX of message 45 is then numbered monotonically in a cyclic manner, possibly jumping back from the maximum value SQ_IDX-mx to the minimum value SQ_IDX-mn, where the minimum value SQ_IDX-mn can in particular have a value of 0 or any other value according to the aforementioned preset. The value of the sequence index SQ_IDX is also referred to hereinafter as the SQ_IDX value.
[0090] If there is no jumpback to the SQ_IDX value in the send priority queue TXPQ, then message 45 should be sent relative to each other in the order of their storage slot values in the queue TXPQ of storage module 1123 (i.e., SLT_IDX values), starting from the lowest SQ_IDX value of the variable—sequence index SQ_IDX.
[0091] Therefore, the internal priority of message 45 is not determined by its position in the send priority queue TXPQ (more precisely, the position of message 45), but by the sequence index SQ_IDX.
[0092] Additionally, there may be a jump back to the sequence index value (SQ_IDX value) of message 45. The manner for such SQ_IDX values is described below. Furthermore, it can be done according to the following... Figure 7 Proceed as described.
[0093] To enable the message management module 1122 to easily identify jumps back to the SLT_IDX value, the range of SQ_IDX is divided into three directly successive ranges: a lower range B_A starting with SQ_IDX-mn, an upper range B_C ending with SQ_IDX-mx, and a middle range B_B. All three ranges must have a size of at least #Slt-1. They can also be larger.
[0094] This ensures that a series of SQ_IDX values that may simultaneously reside in the transmit priority queue TXPQ can never simultaneously fall within all three ranges B_A, B_B, and B_C, but will always fall within only two ranges. If a series of SQ_IDX values falls within both range B_A and range B_C, then it can be reliably identified that the sequence contains a bounce from SQ_IDX-mx (the end of range B_C) to SQ_IDX-mn (the beginning of range B_A). In all other cases, the series does not contain a bounce to SQ_IDX-mn. The minimum size of the range #Slt-1 ensures that, in the case of a bounce, all upper elements of the series are located in range B_C, and all lower elements of the series are located in range B_A.
[0095] To find the element or storage slot SLT_IDX (search cycle) containing the message 45 with the highest transmission priority, the message management module 1122 compares the identifiers 4531 (i.e., priorities) of all elements in the queue TXPQ with the TxRqst bit set. The concepts described here are implemented to perform these comparisons in sequential methods (especially algorithms) or search cycles. The Tx_Scan method, especially the Tx_Scan algorithm, only needs to run once to find the element with the highest transmission priority.
[0096] In particular, if the withdrawn element or storage slot SLT_IDX was not found to be the TxRqst bit with the highest transmission priority in the previous Tx_Scan, then there is no need to cycle through the search of the element or storage slot SLT_IDX in the queue TXPQ.
[0097] The sequence index SQ_IDX supplements identifier 4531 in the internal arbitration of user station 10. The sequence index SQ_IDX is approximated as the decimal part of the integer CAN identifier.
[0098] The sequence index SQ_IDX can have a number with a predetermined range of values, specifically 0 to 255. However, the sequence index SQ_IDX can have other values or other ranges of values.
[0099] The communication control device 11, particularly module 1121, manages the sequence index SQ_IDX for each identifier 4531. For each successive message 45, the sequence index SQ_IDX is incremented by 1 (+1). When the maximum value is reached, the next increment causes a jump back to the minimum value SQ_IDX-mn.
[0100] In order to execute this method, the message management module 1122 can manage Figure 6 The five variables shown.
[0101] The variable SLT_IDX is the sequential index of the element in the queue TXPQ.
[0102] The variable RQST is used for the signal indicating that at least one element in queue TXPQ has been found whose TxRqst bit is set. Figure 6 In the example, the TxRqst bit is set to have a value of 1.
[0103] The variable RES_IDX is used for the following signal, which represents the index of the highest priority element in the queue TXPQ.
[0104] The variable RES_ID is used for the following signal, which indicates the identifier 4531 pointed to by the index RES_IDX of the element in the queue TXPQ.
[0105] The variable RES_SQ is used for the following signal, which indicates the sequence index SQ_IDX pointed to by the index RES_IDX of the element in the queue TXPQ.
[0106] The message management module 1122 starts Tx_Scan or sequence from the first element of queue TXPQ (SLT_IDX=0) and RQST=0. Module 1122 sequentially reads the identifier 4531 pointed to by the current sequence index SLT_IDX and the sequence index SQ_IDX of the elements in queue TXPQ, until module 1122 reaches the element in queue TXPQ where the send request is set (TxRqst=1).
[0107] Then, the message management module 1122, especially the algorithm implemented by this module 1122, sets: RQST = 1 RES_IDX = SLT_IDX RES_ID = Identifier (SLT_IDX) RES_SQ = SQ_IDX (SLT_IDX).
[0108] Subsequently, message management module 1122, and specifically the algorithm implemented by module 1122, continues to run, incrementing the variable SLT_IDX until module 1122 reaches the next element in queue TXPQ where the send request is set (TxRqst=1). There, module 1122 checks whether the variable RES_IDX must be set to a new value. In this case, module 1122 distinguishes between the following three cases: A), B), and C).
[0109] Case A) The variable RES_ID has a higher priority than identifier 4531 in the currently checked element (SLT_IDX) of queue TXPQ. If this is the case, variables RES_IDX, RES_ID, and RES_SQ remain unchanged.
[0110] Case B) The priority of the variable RES_ID is lower than that of identifier 4531 in the currently checked element (SLT_ID) of the queue TXPQ. If this is the case, then message management module 1122, and especially the algorithm implemented by module 1122, sets the variable as follows: RES_IDX = SLT_IDX RES_ID = Identifier (SLT_IDX) = ID (4531) (SLT_IDX) RES_SQ = SQ_IDX(SLT_IDX).
[0111] Case C) The variable RES_ID has the same priority as identifier 4531 in the currently checked element (SLT_IDX) of queue TXPQ. If this is the case, then message management module 1122, and in particular the algorithm implemented by module 1122, checks variables SQ_IDX (SLT_IDX) and RES_SQ.
[0112] Here, we distinguish between two cases, C1) and C2).
[0113] For case C1), message management module 1122, and especially the algorithm implemented by module 1122, checks whether one of the following two conditions / alternative options linked by "OR" is applicable: {[SQ_IDX(SLT_IDX) is in range B_C] and [RES_SQ is in range B_A]} or {[[SQ_IDX(SLT_IDX) is not in range B_C] or [RES_SQ is not in range B_A]] and [SQ_IDX(SLT_IDX)] <RES_SQ]} If either of the two conditions above is met in case C1), then message management module 1122, and especially the algorithm implemented by module 1122, sets: RES_IDX = SLT_IDX RES_ID = Identifier (SLT_IDX) RES_SQ = SQ_IDX (SLT_IDX).
[0114] Otherwise, there is a case C2). That is, when checking case C1), none of the above conditions are met or are true (ELSE). Then the message management module 1122, especially the algorithm implemented by the module 1122, keeps the variables RES_IDX, RES_ID, and RES_SQ unchanged.
[0115] The message management module 1122, and in particular the algorithm implemented by the module 1122, continues to execute the search cycle Tx_Scan until all elements of the queue TXPQ have been evaluated.
[0116] When the method executed by the message management module 1122 ends, if there is at least one element with a send request (RQST=1), then RES_IDX points to the next element or storage slot SLT_IDX or message 45 that should be sent.
[0117] Table 1 below shows an example of a transmission priority queue (TXPQ) to illustrate the above situation (C1). This applies in this case: #Slt = 6 The minimum number of SQ_IDX values is 3 * #Slt - 1 = 3 * 6 - 1 = 17. However, in the example in Table 1 below, more than the minimum number of SQ_IDX values was used, namely 18 SQ_IDX values, as follows: Range B_A: SQ_IDX values are 0 … 5 Range B_B: SQ_IDX values are 6 … 10 The range B_C:SQ_IDX has values of 11 … 17. SLT_IDX TxRqst ID(4531) SQ_IDX B_SQ_IDX 0 1 100 0 B_A 1 1 100 1 B_A 2 1 200 0 3 1 100 17 B_C 4 1 300 0 5 1 400 0 Table 1: Identifier ID (4531) (in decimal).
[0118] In the example of the transmission priority queue TXPQ in Table 1, message 45 with an identifier (ID) value of 100 is transmitted in the following order: first message 45 in slot SLT_IDX = 3, then message 45 in slot SLT_IDX = 0, and then message 45 in slot SLT_IDX = 1. In this example, the sequence index SQ_IDX value sequence of message 45 with identifier (ID) 4531 and a value of 100 contains a jump from 17 to 0. Therefore, the element in the upper subsequence (SLT_IDX=3) is transmitted before the two elements in the lower subsequence (SLT_IDX=0, SLT_IDX=1).
[0119] Table 2 below shows an example of a transmission priority queue (TXPQ) to illustrate the above situation (C2). This applies in this case: #Slt = 4 Number of SQ_IDX values: 3 * #Slt - 1 = 3 * 4 - 1 = 11 Range B_A: SQ_IDX values are 0 … 3 Range B_B: SQ_IDX values are 4 … 6 The range B_C: SQ_IDX values are 7 … 10 SLT_ID TxRqst ID(4531) SQ_IDX B_SQ_IDX 0 1 100 8 B_C 1 1 100 7 B_C 2 1 200 1 3 1 100 6 B_B Table 2: Identifier ID (4531) (in decimal).
[0120] In the example of the send priority queue TXPQ in Table 2, message 45 with an identifier (ID) value of 100 is sent in the following order: first message 45 in storage slot SLT_IDX = 3, then message 45 in storage slot SLT_IDX = 1, and then message 45 in storage slot SLT_IDX = 0.
[0121] Despite the presence of bounces in the sequence index SQ_IDX, the desired transmission order can always be correctly identified by the communication control device, particularly its modules 1121 and 1122, and by the method described above. In order to identify bounces in the sequence index SQ_IDX, the range of values for the sequence index SQ_IDX has a certain minimum size, as previously mentioned, especially 3. #Slt–1.
[0122] Because of the bounce in the sequence index SQ_IDX, all free storage slots SLT_IDX of the transmit priority queue TXPQ can always be utilized. The FIFO memory described earlier is not required.
[0123] According to the second embodiment, the predetermined value range of the sequence index SQ_IDX of each identifier 4531 is not equal. Therefore, the predetermined value range of the sequence index SQ_IDX of at least one identifier 4531 may be smaller than the value range of other identifiers 4531. Furthermore, the predetermined value range of the sequence index SQ_IDX of at least one identifier 4531 may be larger than the value range of other identifiers 4531.
[0124] In addition, the second embodiment is designed as described above with respect to the first embodiment.
[0125] According to the third embodiment, the predetermined value ranges of the three ranges B_A, B_B, and B_C for each sequence index SQ_IDX are the same. Therefore, the predetermined value range of the sequence index SQ_IDX is larger than that in the first embodiment.
[0126] However, since the three ranges B_A, B_B, and B_C of each sequence index SQ_IDX are of the same size, the message management module 1122 can more easily determine which range of B_A, B_B, and B_C the SQ_IDX value falls within. To make the determination by the message management module 1122 particularly simple, the value range of SQ_IDX is set to 0 to 3. #Slt-1.
[0127] In this case, applying the example in Table 1 above, where three ranges B_A, B_B, and B_C are defined, with 7 transmit slots, the formula 3*#Slt = 3*7 = 21 applies, where #Slt is the number of transmit slots. Then, for three ranges of the same size: Range B_A: SQ_IDX values are 0 to 6 The range B_B: SQ_IDX values are 7 to 13. The range B_C: SQ_IDX values are 14 to 20.
[0128] For example, for ranges B_A, B_B, and B_C of the same size, ranges B_A, B_B, and B_C have the following sizes or values (here, SQ_IDX-mn = 0): Range B_A: Size or value from 0 to 1 #Slt-1 Range B_B: Size or value is 1 #Slt to 2 #Slt-1 Range B_C: Size or value 2 #Slt to 3 #Slt-1.
[0129] The advantage of choosing these three ranges B_A, B_B, and B_C for each sequence index SQ_IDX is that the arithmetic operations performed in hardware are slightly simpler than those in the example in Table 1 of the previous embodiment.
[0130] Figure 7 The table, with rows Z1 to Z15, illustrates the different possibilities for assigning a value of sequence index SQ_IDX to message 45 with the same identifier (ID) 4531. Depending on rows Z11 to Z15, a bounce may exist in the value of sequence index SQ_IDX. Figure 7 The allocation of the sequence index SQ_IDX shown, and the resulting ranges B_A, B_B, B_C, can achieve the above advantages.
[0131] exist Figure 7The example assumes that there are 6 storage slots in the send priority queue TXPQ, and that message 45 with the same identifier (ID) 4531 is to be written to these storage slots in sequence. Figure 7 Each black square in one of the rows Z1 to Z15 of the table represents message 45, which is stored in one of the six storage slots of the send priority queue TXPQ. Figure 7 The value of sequence index SQ_IDX is represented, which is the value when message 45 is stored in... Figure 6 The associated storage slot in the transmission priority queue TXPQ is previously assigned to the corresponding message 45 by the transmission order determination module 1121.
[0132] Because in Figure 7 In the example, it is assumed Figure 6 The send priority queue TXPQ has six elements or storage slots SLT_IDX, therefore #Slt = 6 applies. As mentioned before, therefore in Figure 7 The sequence index SQ_IDX has fifteen values for the sequence index SQ_IDX, which, for example, has a value range from 0 to 14, as in... Figure 7 As shown. In Figure 7 In the example, the minimum value of the sent index SQ_IDX, SQ_IDX-mn, is 0. Figure 7 In the example, the maximum value of the sent index SQ_IDX, SQ_IDX-mx, is 14. Generally applicable: #Slt = 6 => The value range is from SQ_IDX_min = 0 to SQ_IDX_max = 14 = 3 (#Slt -1) -1.
[0133] Figure 7 Row Z1 of the table shows that the transmission order determination module 1121 can, for example, assign or determine the values 9 to 14 of the sequence index SQ_IDX for six consecutive messages 45. The values 9 to 14 of the sequence index SQ_IDX are arranged in the ranges B_B and B_C. Then, message 45, along with its sequence index SQ_IDX value (optionally also having the value of the range index B_SQ_IDX), is stored in the transmission priority queue TXPQ, as described above. Figure 6 The value of the storage range index B_SQ_IDX is not required because the message management module 1122 knows the size of the ranges B_A, B_B, and B_C (e.g., by calculating from the quantity #Slt), and therefore can assign each SQ_IDX value to one of the ranges B_A, B_B, and B_C. The message management module 1122 then evaluates... Figure 7Message 45 in row Z1 of table Z1 should be sent to bus 40 in the order of sequence indices SQ_IDX = 9 to 14. Therefore, message 45 with transmission index SQ_IDX = 9 is sent to bus 40 first. Then, message 45 with transmission index SQ_IDX = 10 is sent to bus 40. Then, message 45 with transmission index SQ_IDX = 11 is sent to bus 40. Then, message 45 with transmission index SQ_IDX = 12 is sent to bus 40. Then, message 45 with transmission index SQ_IDX = 13 is sent to bus 40. Then, message 45 with transmission index SQ_IDX = 14 is sent to bus 40.
[0134] according to Figure 7 The other possibilities / alternatives in rows Z2 to Z15 are the same as those mentioned above. Figure 7 The corresponding content described in line Z1 in the text applies.
[0135] Possibility of row Z2: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value of 8 to 13 to message 45, thereby arranging the SQ_IDX values in the ranges B_B and B_C. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence indices SQ_IDX = 8 to 13. Thus, message 45 with transmission index SQ_IDX = 8 is transmitted onto bus 40 before other messages 45 in row Z2, wherein message 45 with transmission index SQ_IDX = 13 is transmitted last.
[0136] Possibility for line Z3: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value of 7 to 12 to message 45, thereby arranging the SQ_IDX values in the ranges B_B and B_C. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 7 to 12, as described above for the corresponding line Z2.
[0137] Possibility for line Z4: The transmission order determination module 1121 determines or assigns sequence index SQ_IDX values 6 to 11 to message 45, thereby arranging the SQ_IDX values in the ranges B_B and B_C. Therefore, message 45 is transmitted on bus 40 in the transmission order of sequence index SQ_IDX = 6 to 11, as described above for the corresponding line Z2.
[0138] Possibility for line Z5: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value of 5 to 10 to message 45, thereby arranging the SQ_IDX values in the ranges B_B and B_C. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 5 to 10, as described above for line Z2.
[0139] Possibility for line Z6: The transmission order determination module 1121 determines or assigns sequence index SQ_IDX values 4 to 9 to message 45, thereby arranging the SQ_IDX values in the ranges B_A and B_B. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 4 to 9, as described above for the corresponding line Z2.
[0140] Possibility for line Z7: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value of 3 to 8 to message 45, thereby arranging the SQ_IDX values in the ranges B_A and B_B. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 3 to 8, as described above for the corresponding line Z2.
[0141] Possibility for line Z8: The transmission order determination module 1121 determines or assigns sequence index SQ_IDX values 2 to 7 to message 45, thereby arranging the SQ_IDX values in the ranges B_A and B_B. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 2 to 7, as described above for the corresponding line Z2.
[0142] Possibility for line Z9: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value of 1 to 6 to message 45, thereby arranging the SQ_IDX values in the ranges B_A and B_B. Therefore, message 45 is transmitted onto bus 40 in the transmission order of sequence index SQ_IDX = 1 to 6, as described above for line Z2.
[0143] Possibility for line Z10: The transmission order determination module 1121 determines or assigns a sequence index SQ_IDX value from 0 to 5 to message 45, thereby arranging the SQ_IDX values in the ranges B_A and B_B. Therefore, message 45 is transmitted on bus 40 in the transmission order of sequence index SQ_IDX = 0 to 5, as described above for the corresponding line Z2.
[0144] Possibility for line Z11: The transmission order determination module 1121 uses a backtrack in the value of the sequence index SQ_IDX. Therefore, the transmission order determination or allocation module 1121 assigns the sequence index SQ_IDX value 14 to the first message 45, and assigns sequence index SQ_IDX values 0 to 4 to subsequent messages 45, thus arranging the SQ_IDX values in the ranges B_A and B_C. Therefore, messages 45 are transmitted to bus 40 in the transmission order of sequence index SQ_IDX = 14, then 0 to 4, as described above for line Z2.
[0145] Line Z12 carries the possibility of a bounce in the sequence index SQ_IDX value: Therefore, the transmission order determination module 1121 determines or assigns the sequence index SQ_IDX value 13 to the first message 45, and assigns the sequence index SQ_IDX value 14 and then 0 to 3 to the subsequent messages 45, thereby arranging the SQ_IDX values in the ranges B_A and B_C. Therefore, messages 45 are transmitted on the bus 40 in the transmission order of sequence index SQ_IDX = 13, then 14, and then 0 to 3, as described above for the corresponding line Z2.
[0146] The possibility of a bounce in the sequence index SQ_IDX value for line Z13: Therefore, the transmission order determination module 1121 determines or assigns the sequence index SQ_IDX value 12 to the first message 45, and assigns the sequence index SQ_IDX values 13, 14, and then 0 to 2 to subsequent messages 45, thereby arranging the SQ_IDX values in the ranges B_A and B_C. Therefore, messages 45 are transmitted on bus 40 in the transmission order of sequence index SQ_IDX = 12 to 14 and then 0 to 2, as described above for line Z2.
[0147] The possibility of a bounce in the sequence index SQ_IDX value in line Z14: Therefore, the transmission order determination module 1121 determines or assigns the sequence index SQ_IDX value 11 to the first message 45, and assigns the sequence index SQ_IDX values 12 to 14 and then 0 to 1 to subsequent messages 45, thereby arranging the SQ_IDX values in the ranges B_A and B_C. Therefore, messages 45 are transmitted on bus 40 in the transmission order of sequence index SQ_IDX = 11 to 14 and then 0 to 1, as described above for line Z2.
[0148] The possibility of a bounce in the sequence index SQ_IDX value for line Z15: Therefore, the transmission order determination module 1121 determines or assigns the sequence index SQ_IDX value 10 to the first message 45, and assigns the sequence index SQ_IDX values 11 to 14 and then 0 to subsequent messages 45, thereby arranging the SQ_IDX values in the ranges B_A and B_C. Therefore, messages 45 are transmitted on bus 40 in the transmission order of sequence index SQ_IDX = 10 to 14 and then 0, as described above for line Z2.
[0149] like Figure 7 As shown, when bouncing back in the sequence of sequence index values (SQ_IDX values) of message 45, the transmission order determination module 1121 divides the SQ_IDX values into two sub-sequences, ensuring that the SQ_IDX values are always arranged only within two ranges: B_A, B_B, and B_C. The lower elements of this sequence have values from X to the maximum value SQ_IDX-mx, and the upper elements of this sequence have values from SQ_IDX-mn to Y. Figure 7 In the example ( Figure 7 The diagram shows the minimum number of sequence index values (SQ_IDX values) for #Slt = 6 storage slots, for example, X = 2 and Y = 12 in row Z13. The values of X and Y ensure that both the upper and lower subsequences have 1 to #Slt-1 elements, i.e., a total of at most #Slt elements. Because the maximum value of SQ_IDX, SQ_IDX-mx, is significantly greater than the number of storage slots SLT_IDX, #Slt, there is a large gap between the values of SQ_IDX(Y) and SQ_IDX(X). Figure 7 In the example, the difference between the values of SQ_IDX(Y) and SQ_IDX(X) is 10. If a bounce occurs, the upper subsequence is sent first, followed by the lower subsequence. Except for possible bounces, messages 45 with the same identifier 4531 are sent in the relative order of their sequence index SQ_IDX values.
[0150] If in Figure 6 If the sequence of SQ_IDX values in the most #Slt transmit slots SLT_IDX of the queue TXPQ contains values from both range B_A and range B_C, then the message management module 1122 reliably identifies a bounce in the SQ_IDX values. Then, messages with SQ_IDX values from range B_C are sent first, followed by messages with SQ_IDX values from range B_A. If the message management module 1122 does not identify a bounce because no SQ_IDX value is in range B_A or no SQ_IDX value is in range B_C, then message 45 is sent to bus 40 in the order of its SQ_IDX values.
[0151] In addition, the third embodiment is designed as described above with respect to the first or second embodiment.
[0152] According to the fourth embodiment, all three ranges B_A, B_B, and B_C are of different sizes.
[0153] In addition, the fourth embodiment is designed as described above with respect to the first or second embodiment.
[0154] Generally, for all embodiments, the ranges B_A, B_B, B_C have at least the following sizes or values (here SQ_IDX-mn = 0): Range B_A: Size or value from 0 to 1 #Slt-2 Range B_B: Size or value is 1 #Slt-1 to 2 #Slt-3 Range B_C: Size or value 2 #Slt-2 to 3 #Slt-4.
[0155] At this minimum size, the ranges B_A, B_B, and B_C are all the same size. If the minimum size is chosen, the message management module 1122 must manage fewer values for the sequence index SQ_IDX and therefore for the ranges B_A, B_B, and B_C. Of course, larger values can also be chosen for the sequence index SQ_IDX and therefore for the ranges B_A, B_B, and B_C.
[0156] All of the above-described design schemes of the communication control device 11, modules 1121, 1122, 1123 and their modifications, user stations 10, 30, bus system 1 and the methods performed therein can be used individually or in all possible combinations. In particular, all features of the above embodiments and / or their modifications can be combined arbitrarily. Additionally or alternatively, the following modifications are particularly conceivable.
[0157] Although the invention has been described above using a CAN bus system as an example, it can be applied to any communication network and / or communication method in which the internal transmission order of messages in the transmission queue needs to be determined in the communication control device.
[0158] Although the invention has been described above using a CAN bus system as an example, the invention can be applied to any communication network and / or communication method that uses two different communication phases, in which different bus states are generated for the different communication phases.
[0159] In particular, the bus system 1 according to the embodiment can be a communication network capable of serially transmitting data at two different bit rates. In the bus system 1, it is advantageous, but not a mandatory prerequisite, to guarantee exclusive, conflict-free access to the common channel by user stations 10, 20, and 30, at least for a certain period of time.
[0160] The number and arrangement of user stations 10, 20, and 30 in the bus system 1 of the embodiment are arbitrary. In particular, user station 20 in bus system 1 may be omitted. There may be one or more user stations 10 or 30 in bus system 1. It is conceivable that all user stations in bus system 1 are designed identically, i.e., only user station 10, only user station 20, or only user station 30 exist.
Claims
1. A communication control device (11; 21) for a user station (10; 20; 30) in a serial bus system (1), comprising: A message management module (1122) is used to manage messages (45; 46; 47) that will be sent by the communication control device (11; 21) to the bus (40) of the bus system (1) to control communication between the user station (10; 20; 30) and at least one other user station (10; 20; 30) of the bus system (1). The sending order determination module (1121) is used to determine the sequence index (SQ_IDX) of the messages (45; 46; 47). Each message (45; 46; 47) has an identifier (4531), the value of which indicates the priority at which the message (45; 46; 47) is sent on the bus (40). The transmission order determination module (1121) is designed to determine a sequence index (SQ_IDX) for each identifier (4531) and assign the sequence index to the identifier (4531). The message management module (1122) is designed to determine the sending order for messages (45; 46; 47) with the same identifier (4531) by using the sequence index (SQ_IDX).
2. The communication control device (11; 21) according to claim 1. The sending order determination module (1121) is designed to assign the determined sequence index (SQ_IDX) to the identifier (4531) in the message storage module (1223), and The message management module (1122) is designed to determine the sending order for messages (45; 46; 47) with the same identifier (4531) by using the sequence index (SQ_IDX) stored in the message storage module (1223).
3. The communication control device (11; 21) according to claim 2, wherein the message storage module (1223) has a transmission priority queue (TXPQ), the transmission priority queue has a predetermined number (#Slt) of storage slots (SLT_IDX), in which messages (45; 46; 47) having the identifier (4531) and the sequence index (SQ_IDX) are stored.
4. The communication control device (11; 21) according to claim 2 or 3. The message storage module (1223) has a transmission priority queue (TXPQ) with a predetermined number (#Slt) of storage slots (SLT_IDX) storing messages (45; 46; 47) with the identifier (4531), the sequence index (SQ_IDX), and the range (B_A; B_B; B_C). The sequence index (SQ_IDX) has a predetermined range of values, and The range (B_A; B_B; B_C) is one of the three ranges (B_A, B_B, B_C) into which the predetermined value range of the sequence index (SQ_IDX) is divided.
5. The communication control device (11; 21) according to any one of the preceding claims. The sequence index (SQ_IDX) is an integer selected from a predetermined range of values, and The sending order determination module (1121) is designed to increment the sequence index (SQ_IDX) for each successive message (45; 46; 47) in the sending priority queue (TXPQ), and after exceeding the maximum value of the predetermined value range of the sequence index (SQ_IDX), jump back to the minimum value of the value range for the next message (45; 46; 47) in the sending priority queue (TXPQ).
6. The communication control device (11; 21) according to any one of the preceding claims, wherein the predetermined value range of the sequence index (SQ_IDX) is determined by: at least 3 values between the minimum value (SQ_IDX-mn) and the maximum value (SQ_IDX-mx) of the sequence index (SQ_IDX). The difference of #Slt-4, where #Slt is the predetermined number of storage slots in the Transmission Priority Queue (TXPQ).
7. The communication control device (11; 21) according to any one of claims 4 to 6, wherein the predetermined value range of the sequence index (SQ_IDX) is divided into three directly successive ranges (B_A, B_B, B_C), the ranges including a first range, a second range, and a third range, and each having a minimum size of #Slt–1, wherein #Slt is a predetermined number of storage slots in the transmission priority queue (TXPQ). The first range (B_A) begins with the minimum value of the sequence index (SQ_IDX) SQ_IDX-mn. The second range (B_B) is arranged seamlessly and non-overlappingly between the first range (B_A) and the third range (B_C), and The third range (B_C) ends with the maximum value (SQ_IDX-mx) of the sequence index (SQ_IDX).
8. A user station (10; 20; 30) for a serial bus system (1), comprising: The communication control device (11; 21) according to any one of the preceding claims, and The transmitting / receiving device (12; 22) is used to transmit the signal (TxD) generated by the communication control device (11; 21) for the frame (450) to the bus (40) of the bus system (1) and to receive the signal (VDIFF) from the bus (40). The communication control device (11; 21) is designed to negotiate with other user stations (20; 30) on the bus (40) in a first communication phase (451) which user station (10, 20, 30) of the bus system (1) will at least temporarily gain exclusive, conflict-free access to the bus (40) in a subsequent second communication phase (452).
9. The user station (10; 20; 30) according to claim 8, wherein the transmitting / receiving device (12; 22) is designed to generate bus states (401; 402) in a first communication phase (451) with a first operating mode as the frame (450) and in a second communication phase (452) with a second operating mode different from the first operating mode as the frame (450) to generate bus states (401; 402).
10. A bus system (1) having: Bus (40), and At least two user stations (10; 20; 30) are interconnected via the bus (40) such that the at least two user stations can communicate serially with each other, and at least one of the user stations (10; 30) is the user station (10; 30) according to claim 8 or 9.
11. A method for processing messages (45; 46; 47) in a user station (10; 20; 30) of a serial bus system (1), wherein the method is performed using a communication control device (11; 21) of the user station (10; 20; 30), and wherein the communication control device (11; 21) performs the following steps: The message management module (1122) manages messages (45; 46; 47), which are sent by the communication control device (11; 21) to the bus (40) of the bus system (1) to control communication between the user station (10; 20; 30) and at least one other user station (10; 20; 30) of the bus system (1). The sequence index (SQ_IDX) of the messages (45; 46; 47) is determined using the sending order determination module (1121). Each message (45; 46; 47) has an identifier (4531), the value of which indicates the priority at which the message (45; 46; 47) is sent on the bus (40). The transmission order determination module (1121) determines a sequence index (SQ_IDX) for each identifier (4531) in the determination step and assigns the sequence index to the identifier (4531). The message management module (1122) determines the sending order for messages (45; 46; 47) with the same identifier (4531) in the management step by using the sequence index (SQ_IDX).