Communication device, communication method, and program
The communication device addresses jitter issues in TSN systems by using separate queues and a conflict determination mechanism to manage delays, ensuring efficient and consistent priority frame transmission.
Patent Information
- Application Number
- PCT/JP2023/010995
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-26
AI Technical Summary
In communication systems utilizing Time-Sensitive Networking (TSN), jitter occurs due to conflicts between priority and standard frames during transmission, particularly when priority frames are preempted, leading to increased delay and processing overhead.
A communication device with separate queues for standard and priority frames, a conflict determination unit, and a delay adding mechanism that measures and stores interruption processing times to determine if a conflict has occurred, applying a delay to priority frames when necessary to prevent jitter.
The solution effectively suppresses jitter in priority frame transmissions by managing conflicts and delays, ensuring consistent and efficient transmission even under varying processing loads.
Smart Images

Figure JP2023010995_26092024_PF_FP
Abstract
Description
Communication device, communication method, and program
[0001] The present disclosure relates to a communication device, a communication method, and a program.
[0002] In recent years, industrial networks have become increasingly open, as exemplified by the standardization of Time-Sensitive Networking (TSN). In TSN, a standardized Ethernet frame control mechanism tailored to the requirements has been developed to connect communication devices that must meet a wide variety of requirements regarding delay and jitter to the same Layer 2 network (see Non-Patent Document 1). Furthermore, Frame preemption (FP), one of the TSN standards, defines a function for interrupting the transfer of Express frames, which are priority frames, with Preemptable frames, which are standard frames.
[0003] IEEE Standard for Local and Metropolitan Area Networks, Bridges and Bridged Networks Sponsored by the LAN / MAN Standards Committee, IEEE Std 802.1QTM-2018 (Revision of IEEE Std 802.1Q-2014)
[0004] In a communication system in which one or more communication devices use FP to forward frames transmitted from a transmitting device until the frames are received by a receiving device, a communication device may receive a priority frame (e.g., an Express frame) that is required to be transmitted with less delay than the standard frame while transmitting a standard frame (e.g., a Preemptable frame).
[0005] In the example shown in FIG. 7 , once the communication device has completed inputting the standard frame F1 into the queue, it outputs the standard frame F1 to the transmission interface. Here, the communication device may input a priority frame F2 into the queue while outputting the standard frame F1. At this time, the transmission interface of the communication device is transmitting the standard frame F1, so the priority frame F2 cannot be immediately output to the transmission interface. In such a case, the communication device suspends output of the standard frame F1 and performs an interrupt priority transfer to enable output of the priority frame F2. Therefore, jitter equivalent to preemption overhead (PO) occurs for the time required for the interrupt priority transfer. Furthermore, as shown in FIG. 8 , each time the communication device transfers the priority frame F2 transmitted from the transmitting device to the receiving device, a conflict with the standard frame F1 may occur, potentially increasing the jitter of the priority frame F2.
[0006] In view of the above circumstances, an object of the present disclosure is to provide a communication device, a communication method, and a program that can suppress jitter in the transmission of priority frames.
[0007] In order to solve the above problem, a communication device according to the present disclosure includes: a standard frame queue that accepts input of a standard frame and holds the standard frame; a priority frame queue that accepts input of a priority frame that is required to be transmitted with less delay than the standard frame and holds the priority frame; a transmission interface unit that transmits the standard frame and the priority frame; a conflict determination unit that determines, each time input of the priority frame to the priority frame queue is completed, whether or not a conflict has occurred in which the standard frame is being output to the transmission interface unit when input of the priority frame is completed; an interruption processing time memory unit that stores an interruption processing time, measured each time it is determined that a conflict has occurred, from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue to the transmission interface unit; a delay imparting unit that, when it is determined that the conflict has not occurred, imparts a delay to the priority frame that is a time related to the maximum value of the interruption processing time so that the priority frame is held in the priority frame queue; and a priority frame transmission processing unit that, when it is determined that the conflict has not occurred, outputs the priority frame from the priority frame queue to the transmission interface unit after the delay has elapsed.
[0008] and a transmission interface unit that transmits the standard frames and the priority frames; and an interruption processing time memory unit that stores an interruption processing time, which is the time from when it is determined that a conflict has occurred to when the priority frame can be output from the priority frame queue to the transmission interface unit, measured each time it is determined that a conflict has occurred, in which the standard frame is being output to the transmission interface unit when the input of the priority frame to the priority frame queue is complete, and the interruption processing time is the time from when it is determined that a conflict has occurred to when the priority frame can be output from the priority frame queue to the transmission interface unit, the method comprising: a step of determining whether or not the conflict has occurred each time the input of the priority frame to the priority frame queue is complete; if it is determined that the conflict has not occurred, a step of imparting a delay to the priority frame such that the priority frame is held in the priority frame queue for a time related to the maximum value of the interruption processing time; and if it is determined that the conflict has not occurred, a step of outputting the priority frame from the priority frame queue to the transmission interface unit after the delay has elapsed.
[0009] In order to solve the above problem, a program according to the present disclosure causes a computer to operate as the above-described communication device.
[0010] According to the communication device, communication method, and program of the present disclosure, jitter in the transmission of priority frames can be suppressed.
[0011] FIG. 4 is a schematic diagram showing an example of a communication device according to a first embodiment. FIG. 5 is a diagram showing an example of an interruption processing time stored in an interruption processing time storage unit shown in FIG. 1. FIG. 6 is a flowchart showing an example of an operation performed by the communication device shown in FIG. 1. FIG. 7 is a schematic diagram showing an example of a communication device according to a second embodiment. FIG. 8 is a flowchart showing an example of an operation performed by the communication device shown in FIG. 4. FIG. 9 is a diagram showing an example of the hardware configuration of a communication device. FIG. 10 is a timing chart showing the input and output timing of standard frames and priority frames in a conventional communication device. FIG. 11 is a schematic diagram for explaining transmission of standard frames and priority frames in prior art.
[0012] <<First Embodiment>> <Configuration of Communication Device> A communication device 1 according to the first embodiment will be described with reference to Fig. 1. Fig. 1 is a schematic diagram showing an example of a communication device 1 according to the first embodiment. Note that, hereinafter, elements that are identical or similar to elements already described will be assigned the same or similar reference numerals, and duplicated descriptions will generally be omitted. For example, when there are multiple identical or similar elements, a common reference numeral may be used to describe each element without distinguishing between them, or a subnumber may be used in addition to the common reference numeral to describe each element with distinction between them.
[0013] The communication device 1 transfers standard frames and priority frames transmitted from an external device. Standard frames are frames that are permitted to be transmitted with a longer delay than priority frames, and may be, for example, preemptable frames. Priority frames are frames that are required to be transmitted with a shorter delay than standard frames, and may be, for example, express frames.
[0014] The communication device 1 includes a first receiving interface unit (first receiving IF unit) 11, a second receiving interface unit (second receiving IF unit) 12, a priority control unit 13, a standard frame queue 14, a priority frame queue 15, a conflict determination unit 16, a standard frame transmission processing unit 17, a priority frame transmission processing unit 18, an interruption processing time measurement unit (preemption processing time measurement unit) 19, an interruption processing time memory unit (preemption processing time memory unit) 20, a delay granting unit 21, and a transmission interface unit (transmission IF unit) 22.
[0015] The first receiving IF unit 11, the second receiving IF unit 12, and the transmitting IF unit 22 are configured as communication interfaces. The first receiving IF unit 11 and the second receiving IF unit 12 may be configured as an integrated unit or as separate units. The number of communication interfaces configuring the first receiving IF unit 11 and the second receiving IF unit 12 may be arbitrary. The priority control unit 13, the contention determination unit 16, the standard frame transmission processing unit 17, the priority frame transmission processing unit 18, the interruption processing time measurement unit 19, and the delay adding unit 21 are configured as a controller. The controller may be configured as dedicated hardware such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array), a processor, or may include both. The standard frame queue 14, the priority frame queue 15, and the interruption processing time storage unit 20 are configured as memories. The memory may be a hard disk drive (HDD), a solid state drive (SSD), an electrically erasable programmable read-only memory (EEPROM), a read-only memory (ROM), a random access memory (RAM), or the like.
[0016] The first receiving IF unit 11 receives standard frames transmitted from an external device and outputs the received priority frames to the priority control unit 13. The external device may be another communication device 1 or any transmitting device.
[0017] The second receiving IF unit 12 receives priority frames transmitted from an external device and outputs the received standard frames to the priority control unit 13. The external device may be another communication device 1 or any transmitting device.
[0018] The priority control unit 13 determines whether a frame output from the first reception IF unit 11 or the second reception IF unit 12 is a priority frame or a standard frame. At this time, the priority control unit 13 can determine whether a frame is a priority frame or a standard frame using any method.
[0019] If the priority control unit 13 determines that a frame is a standard frame, it outputs the standard frame to a standard frame queue 14. If the priority control unit 13 determines that a frame is a priority frame, it outputs the priority frame to a priority frame queue 15.
[0020] The standard frame queue 14 accepts input of a standard frame and holds the standard frame. Specifically, the standard frame queue 14 accepts input of a standard frame that is received by the first IF unit 11 and output from the priority control unit 13, and holds the standard frame.
[0021] The priority frame queue 15 receives and stores priority frames. Specifically, the priority frame queue 15 receives and stores priority frames that are received by the second IF unit 12 and output from the priority control unit 13.
[0022] The conflict determination unit 16 determines whether or not a conflict has occurred each time the input of a priority frame to the priority frame queue 15 is completed. A conflict is a state in which a standard frame is being output to the transmission IF unit 22 when the input of the priority frame is completed. The conflict determination unit 16 also outputs conflict information indicating whether or not a conflict has occurred to the interruption processing time measurement unit 19 and the delay imparting unit 21. For example, when the conflict determination unit 16 determines that a conflict has occurred, it can output conflict information indicating that a conflict has occurred to the interruption processing time measurement unit 19. When the conflict determination unit 16 determines that a conflict has occurred, it can output conflict information indicating that a conflict has occurred to the delay imparting unit 21, and when it determines that a conflict has not occurred, it can output conflict information indicating that a conflict has not occurred to the delay imparting unit 21.
[0023] When no priority frames are held in the priority frame queue 15 , the standard frame transmission processing unit 17 starts outputting the standard frames held in the standard frame queue 14 to the transmission IF unit 22 .
[0024] If it is determined that a conflict has occurred, the priority frame transmission processing unit 18 suspends the output of the standard frame from the standard frame queue 14 to the transmission IF unit 22. Furthermore, the priority frame transmission processing unit 18 outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after the delay imparted by the delay imparting unit 21 has elapsed. The delay imparted by the delay imparting unit 21 is a delay depending on whether or not a conflict has occurred, and will be described in detail later. Note that if it is determined that a conflict has occurred, the priority frame transmission processing unit 18 may suspend the output of the standard frame and then transmit the priority frame without imparting a delay.
[0025] The interruption processing time measurement unit 19 measures the interruption processing time when the conflict determination unit 16 determines that a conflict has occurred. The interruption processing time is the time from when it is determined that a conflict has occurred to when the priority frame can be output from the priority frame queue 15 to the transmission IF unit 22. The interruption processing time measurement unit 19 can determine that a conflict has occurred based on the conflict information output from the conflict determination unit 16, and can measure the interruption processing time based on this.
[0026] Furthermore, every time the interrupted processing time measurement unit 19 measures the interrupted processing time, it adds the interrupted processing time to the interrupted processing time storage unit 20 and stores the added interrupted processing time.
[0027] The interruption processing time storage unit 20 stores the interruption processing time. Specifically, the interruption processing time storage unit 20 stores the interruption processing time, which is measured each time it is determined that a conflict has occurred, and is the time from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue 15 to the transmission IF unit 22. For example, as shown in FIG. 2 , the interruption processing time storage unit 20 stores a measurement identifier (measurement ID (Identification)) that uniquely identifies the measurement and the measured interruption processing time in association with each other. Therefore, the interruption processing time storage unit 20 stores a history of the measurement identifiers and interruption processing times for the past N measurements.
[0028] The interrupted processing time measurement unit 19 calculates a time related to the maximum value of the interrupted processing time stored in the interrupted processing time storage unit 20. The time related to the maximum value may be the time corresponding to the maximum value of the interrupted processing time stored in the interrupted processing time storage unit 20. The time related to the maximum value may also be the time corresponding to the maximum value of a predetermined interval including the average value (mode) of the interrupted processing time in a normal distribution that approximates the distribution of the interrupted processing times stored in the interrupted processing time storage unit 20. For example, the predetermined interval may be a 2kσ interval (k is an integer), where σ is the standard deviation. k may be, for example, 3. The interrupted processing time measurement unit 19 then outputs the time related to the maximum value of the interrupted processing time stored in the interrupted processing time storage unit 20 to the delay adding unit 21.
[0029] When the conflict determination unit 16 determines that no conflict has occurred, the delay imparting unit 21 imparts a delay to the priority frame for a time related to the maximum value of the interruption processing time so that the priority frame is held in the priority frame queue 15. Furthermore, when the conflict determination unit 16 determines that a conflict has occurred, the delay imparting unit 21 imparts a delay to the priority frame for a difference time obtained by subtracting the interruption processing time from the time related to the maximum value after the interruption processing time of the priority frame so that the priority frame is held in the priority frame queue 15.
[0030] If it is determined that no contention has occurred, the priority frame transmission processing unit 18 outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after a time period related to the maximum value of the interruption processing time has elapsed, a delay such that the priority frame is held in the priority frame queue 15. Furthermore, if it is determined that contention has occurred, the priority frame transmission processing unit 18 suspends the output of the standard frame from the standard frame queue 14 to the transmission IF unit 22, and after a time period corresponding to the above-mentioned difference has elapsed, a delay such that the priority frame is held in the priority frame queue 15, outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22.
[0031] The transmission IF unit 22 transmits standard frames and priority frames. Specifically, the transmission IF unit 22 transmits standard frames output from the standard frame queue 14. The transmission IF unit 22 also transmits priority frames output from the priority frame queue 15.
[0032] <Operation of the Communication Device> Next, the operation of the communication device 1 according to the first embodiment will be described with reference to FIG. 3. FIG. 3 is a flowchart showing an example of the operation of the communication device 1 according to the first embodiment. The operation of the communication device 1 described with reference to FIG. 3 corresponds to a communication method executed by the communication device 1 according to the first embodiment. Here, the operation of the communication device 1-1 after a priority frame is input to the priority frame queue 15 will be described. Note that, when starting this operation, the interruption processing time storage unit 20 stores an interruption processing time measured each time it is determined that a conflict has occurred. As described above, the interruption processing time is the time from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue 15 to the transmission IF unit 22.
[0033] In step S11, the contention determination unit 16 determines whether or not a contention has occurred each time a priority frame is completely input to the priority frame queue 15. As described above, a contention occurs when a standard frame is being output to the transmission IF unit 22 when the input of the priority frame is completely input.
[0034] If it is determined in step S11 that a conflict has occurred, in step S12, the priority frame transmission processing unit 18 suspends the output of standard frames from the standard frame queue 14 to the transmission IF unit 22, and the interruption processing time measurement unit 19 measures the interruption processing time. At this time, the interruption processing time measurement unit 19 can add the measured interruption processing time to the interruption processing time storage unit 20 for storage.
[0035] In step S13 , the interrupted processing time measurement unit 19 calculates the maximum value of the interrupted processing time stored in the interrupted processing time storage unit 20 .
[0036] In step S14, the delay imparting unit 21 imparts a delay to the priority frame so that the priority frame is held in the priority frame queue 15 for a differential time obtained by subtracting the interruption processing time from the time related to the maximum value calculated in step S13 after the interruption processing time of the priority frame.
[0037] If it is determined in step S11 that no contention has occurred, in step S15, the time related to the maximum value of the interrupted processing time stored in the interrupted processing time storage unit 20 is calculated.
[0038] In step S16, the delay imparting unit 21 imparts a delay to the priority frame so that the priority frame is held in the priority frame queue 15 for a time period related to the maximum value of the interruption processing time.
[0039] In step S17, the priority frame transmission processing unit 18 outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after the delay imparted in step S14 or step S16 has elapsed. Specifically, if it is determined in step S11 that a conflict has occurred, the priority frame transmission processing unit 18 outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after the delay imparted in step S14 has elapsed. Furthermore, if it is determined in step S11 that a conflict has not occurred, the priority frame transmission processing unit 18 outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after the delay imparted in step S16 has elapsed.
[0040] In step S18 , the transmission IF unit 22 transmits the priority frame output from the priority frame queue 15 .
[0041] After executing the operation of step S18, the communication device 1 can return to step S11 and repeat the operation when the input of the priority frame to the priority frame queue 15 is completed again. Furthermore, if it is determined in step S11 that a conflict has occurred, the communication device 1 may not execute steps S13 and S14, and in step S17, the priority frame transmission processing unit 18 may output the priority frame without adding a delay.
[0042] As described above, according to the first embodiment, the communication device 1 includes the standard frame queue 14 that accepts input of a standard frame and holds the standard frame; the priority frame queue 15 that accepts input of a priority frame that is required to be transmitted with less delay than a standard frame and holds the priority frame; the transmission IF unit 22 that transmits the standard frame and the priority frame; the conflict determination unit 16 that determines, each time input of a priority frame to the priority frame queue 15 is completed, whether or not a conflict has occurred, in which the standard frame is being output to the transmission IF unit 22 when the input is completed; the interruption processing time memory unit 20 that stores an interruption processing time, which is the time from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue 15 to the transmission interface unit, measured each time it is determined that a conflict has occurred; the delay imparting unit 21 that, when it is determined that no conflict has occurred, imparts a delay to the priority frame such that the priority frame is held in the priority frame queue 15 for a time related to the maximum value of the interruption processing time; and the priority frame transmission processing unit 18 that outputs the priority frame from the priority frame queue 15 to the transmission IF unit 22 after the delay has elapsed.
[0043] In this way, the communication device 1 holds a priority frame for which no contention has occurred in the priority frame queue 15 for a time period related to the maximum value of the interruption processing time, and then outputs the frame to the transmission IF unit 22. Therefore, even if the processing load of the communication device 1 fluctuates, priority frames received by the communication device 1 are uniformly held in the priority frame queue 15 and then output when no contention has occurred, thereby suppressing jitter in the transmission of priority frames.
[0044] Furthermore, according to the first embodiment, when it is determined that a conflict has occurred, the delay imparting unit 21 imparts a delay to the priority frame so that the priority frame is held in the priority frame queue 15 for a differential time obtained by subtracting the interruption processing time from the time related to the maximum value after the interruption processing time. As a result, the priority frame for which a conflict has occurred is held in the priority frame queue 15 for the differential time after the interruption processing time before being output to the transmission IF unit 22. Therefore, even if there is a fluctuation in the processing load of the communication device 1, the priority frame received by the communication device 1 is held in the priority frame queue 15 and then output, regardless of whether a conflict has occurred or not. This makes it possible to further suppress jitter in the transmission of priority frames.
[0045] <<Second Embodiment>> <Configuration of Communication Device> A communication device 1-1 according to a second embodiment will be described with reference to Fig. 4. Fig. 4 is a schematic diagram showing an example of a communication device 1-1 according to the second embodiment. In the second embodiment, the same functional units as those in the first embodiment are denoted by the same reference numerals, and descriptions thereof will be omitted.
[0046] The communication device 1-1 includes a first receiving IF unit 11, a second receiving IF unit 12, a priority control unit 13, a standard frame queue 14, a priority frame queue 15, a conflict determination unit 16-1, a standard frame transmission processing unit 17, a priority frame transmission processing unit 18, an interruption processing time measurement unit 19, an interruption processing time storage unit 20, a delay imparting unit 21-1, a transmission IF unit 22, a conflict detection rate calculation unit 23, and a mode switching determination unit 24. The conflict determination unit 16-1, the delay imparting unit 21-1, the conflict detection rate calculation unit 23, and the mode switching determination unit 24 are configured by a controller.
[0047] Similar to the conflict determination unit 16 of the first embodiment, the conflict determination unit 16-1 determines whether or not a conflict has occurred each time a priority frame is completely input to the priority frame queue 15. The conflict determination unit 16-1 also outputs conflict information indicating whether or not a conflict has occurred to the interrupted processing time measurement unit 19 and the conflict detection rate calculation unit 23.
[0048] The conflict detection rate calculation unit 23 calculates a conflict detection rate D, which is the ratio of the conflict count n_total to the priority frame input count n_total, as shown in equation (1). The priority frame input count n_total is the number of times a priority frame is input to the priority frame queue 15. The conflict count n_collision is the number of times a conflict is determined to have occurred by the conflict determination unit 16-1. The priority frame input count n_total may be the number of times a priority frame is input within a certain period of time, and in such a configuration, the conflict count n_collision is the number of times a conflict is determined to have occurred within the certain period of time. Furthermore, the priority frame input count n_total may be a predetermined number of times, and in such a configuration, the conflict count n_collision is the number of times a conflict is determined to have occurred before the priority frame input count n_total reaches the predetermined number of times.
[0049] Furthermore, the conflict detection rate calculation unit 23 outputs the conflict detection rate D calculated as described above to the mode switching determination unit 24 .
[0050] The mode switching determination unit 24 determines whether the conflict detection rate D is equal to or greater than a predetermined threshold value T. The predetermined threshold value T is a value at which jitter is deemed to be reduced to a level that satisfies the required communication quality when the conflict detection rate D is less than the predetermined threshold value T, even if the same processing as in the first embodiment is not performed. The mode switching determination unit 24 also outputs conflict detection rate information indicating whether the conflict detection rate D is equal to or greater than the predetermined threshold value T to the delay adding unit 21-1.
[0051] When the delay imparting unit 21-1 determines that the conflict detection rate D is equal to or greater than a predetermined threshold T, it imparts a delay to the priority frame, similar to the delay imparting unit 21 of the first embodiment. When the delay imparting unit 21-1 determines that the conflict detection rate D is less than the predetermined threshold T, it does not impart a delay to the priority frame. The delay imparting unit 21-1 can perform the above-described processing based on the conflict detection rate information output from the delay imparting unit 21-1.
[0052] <Operation of the Communication Device> The operation of the communication device 1-1 according to the second embodiment will be described with reference to FIG. 5. FIG. 5 is a flowchart showing an example of the operation of the communication device 1-1 according to the second embodiment. The operation of the communication device 1-1 described with reference to FIG. 5 corresponds to a communication method executed by the communication device 1-1 according to the second embodiment. Here, the operation of the communication device 1-1 after a priority frame is input to the priority frame queue 15 will be described. Note that, when starting this operation, the interruption processing time storage unit 20 stores an interruption processing time, which is measured each time it is determined that a conflict has occurred, and is the time from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue 15 to the transmission IF unit 22. Furthermore, before the communication device 1-1 starts its operation, the number of priority frame inputs n_total and the number of conflicts n_collision described above are counted.
[0053] In step S21, the conflict detection rate calculation unit 23 calculates the conflict detection rate D. As described above, the conflict detection rate D is the ratio of the number of conflicts n_collision, which is the number of times a conflict is determined to have occurred, to the number of priority frame inputs n_total, which is the number of times a priority frame is input to the priority frame queue 15.
[0054] In step S22, the mode switching determination unit 24 determines whether the conflict detection rate D is equal to or greater than a predetermined threshold value T.
[0055] If it is determined in step S22 that the conflict detection rate D is less than the predetermined threshold T, then in step S23 the communication device 1-1 transmits the priority frame without adding a delay to the priority frame. That is, if a conflict occurs, the communication device 1-1 suspends the transmission of the standard frame and then transmits the priority frame without adding a delay, and if a conflict does not occur, it transmits the priority frame without adding a delay.
[0056] If it is determined in step S22 that the conflict detection rate D is equal to or greater than the predetermined threshold value T, the communication device 1-1 executes the operations from step S24 to step S31. The operations from step S24 to step S31 are the same as the operations from step S11 to step S18 in the first embodiment.
[0057] After executing the operation of step S29, the communication device 1-1 can return to step S11 and repeat the operation when input of the priority frame to the priority frame queue 15 is completed again. Furthermore, if it is determined in step S24 that a conflict has occurred, the communication device 1-1 may not execute steps S26 and S27, and in step S30, the priority frame transmission processing unit 18 may output the priority frame without adding a delay.
[0058] As described above, according to the second embodiment, the communication device 1-1 further includes a conflict detection rate calculation unit 23 that calculates a conflict detection rate D, which is the ratio of the conflict count n_collision, which is the number of times a conflict is determined to have occurred, to the priority frame input count n_total, which is the number of times a priority frame is input to the priority frame queue 15, and a mode switching determination unit 24 that determines whether the conflict detection rate D is equal to or greater than a predetermined threshold T. The delay imparting unit 21 imparts a delay to the priority frame if it is determined that the conflict detection rate D is equal to or greater than the predetermined threshold T, and does not impart a delay to the priority frame if it is determined that the conflict detection rate D is less than the predetermined threshold T.
[0059] As a result, the communication device 1-1 can suppress jitter caused by conflicts when the conflict detection rate D is equal to or greater than a predetermined threshold T, and can suppress delays when the conflict detection rate D is less than the predetermined threshold T. If a delay is imparted to a priority frame in a communication device 1-1 in which conflicts rarely occur, an unnecessary delay will be imparted even though the effect of suppressing jitter is small. In this embodiment, by imparting a delay according to the conflict detection rate D, it is possible to appropriately suppress jitter, while avoiding imparting a delay to the priority frame queue 15 when the effect of suppressing jitter is small.
[0060] <Program> The above-described communication device 1 and communication device 1-1 can each be realized by a computer 401. Furthermore, a program for causing each of the above-described communication devices 1 and 1-1 to function may be provided. Furthermore, the program may be stored in a storage medium or provided via a network. FIG. 6 is a block diagram showing a schematic configuration of a computer 401 that functions as the communication device 1. The computer that functions as the communication device 1-1 may also have a similar configuration to the computer 401. Here, the computer 401 may be a general-purpose computer, a dedicated computer, a workstation, a PC (Personal Computer), an electronic notepad, or the like. The program instructions may be program code, code segments, or the like for executing necessary tasks.
[0061] 6 , the computer 401 includes a processor 410, a read-only memory (ROM) 420, a random access memory (RAM) 430, a storage 440, an input unit 450, an output unit 460, and a communication interface (I / F) 470. Each component is communicably connected to one another via a bus 480. The processor 410 is specifically a central processing unit (CPU), a micro processing unit (MPU), a graphics processing unit (GPU), a digital signal processor (DSP), a system on a chip (SoC), or the like, and may be configured by multiple processors of the same type or different types.
[0062] The processor 410 controls each component and executes various arithmetic processes. That is, the processor 410 reads a program from the ROM 420 or the storage 440 and executes the program using the RAM 430 as a work area. The processor 410 controls each component and executes various arithmetic processes in accordance with the program stored in the ROM 420 or the storage 440. In the above-described embodiment, the program according to the present disclosure is stored in the ROM 420 or the storage 440.
[0063] The program may be stored in a storage medium readable by the computer 401. Using such a storage medium, the program can be installed in the computer 401. Here, the storage medium on which the program is stored may be a non-transitory storage medium. The non-transitory storage medium is not particularly limited, and may be, for example, a CD-ROM, a DVD-ROM, or a USB (Universal Serial Bus) memory. Furthermore, the program may be downloaded from an external device via a network.
[0064] The ROM 420 stores various programs and various frames. The RAM 430 temporarily stores programs or frames as a working area. The storage 440 is configured with a hard disk drive (HDD) or a solid state drive (SSD) and stores various programs including the operating system and various frames.
[0065] The input unit 450 includes one or more input interfaces that receive input operations from a user and acquire information based on the user operations. For example, the input unit 450 may be, but is not limited to, a pointing device, a keyboard, a mouse, or the like.
[0066] The output unit 460 includes one or more output interfaces that output information. For example, the output unit 460 may be, but is not limited to, a display that outputs information as a video or a speaker that outputs information as an audio. If the output unit 460 is a touch panel display, it also functions as the input unit 450.
[0067] The communication interface (I / F) 470 is an interface for communicating with external devices.
[0068] The following additional notes are provided regarding the above-described embodiments. [Supplementary Item 1] A communication device comprising a controller, a memory, and a communication interface, wherein the memory: accepts input of a standard frame and holds the standard frame; accepts input of a priority frame that is required to be transmitted with less delay than the standard frame and holds the priority frame; the communication interface transmits the standard frame and the priority frame; the controller: each time input of the priority frame to the priority frame queue is completed, determines whether or not a conflict has occurred in which the standard frame would be output to the communication interface when input of the priority frame is completed; the memory stores an interruption processing time, measured each time it is determined that a conflict has occurred, which is the time from when it is determined that a conflict has occurred to when the priority frame can be output from the priority frame queue to the communication interface; and the controller: when it is determined that the conflict has not occurred, imparts a delay to the priority frame such that the priority frame is held in the priority frame queue for a time related to the maximum value of the interruption processing time; and when it is determined that the conflict has not occurred, outputs the priority frame from the priority frame queue to the communication interface after the delay has elapsed. [Supplementary Item 2] The communication device described in Supplementary Item 1, wherein the controller, when it is determined that the conflict has occurred, imparts a delay to the priority frame such that the priority frame is held in the priority frame queue for a differential time period after the interruption processing time, which is the time related to the maximum value minus the interruption processing time; when it is determined that the conflict has occurred, interrupts the output of the standard frame from the standard frame queue to the communication interface, and outputs the priority frame from the priority frame queue to the communication interface after the differential time period and the delay period during which the priority frame is held in the priority frame queue have elapsed.[Supplementary Item 3] The communication device according to Supplementary Item 1 or 2, wherein the controller calculates a conflict detection rate which is a ratio of a conflict count, which is the number of times that the conflict is determined to have occurred, to a priority frame input count, which is the number of times that the priority frame is input to the priority frame queue, determines whether the conflict detection rate is equal to or greater than a predetermined threshold, and imparts the delay to the priority frame if it is determined that the conflict detection rate is equal to or greater than the predetermined threshold, and does not impart the delay to the priority frame if it is determined that the conflict detection rate is less than the predetermined threshold. [Supplementary Item 4] The communication device according to any one of Supplementary Item 1 to 3, wherein the time related to the maximum value is a time at which the interruption processing time is maximum, or a time at which the maximum value is in a predetermined section including an average value of the interruption processing time. [Supplementary Item 5] A communication method executed by a communication device comprising a memory and a communication interface, wherein the memory: accepts input of a standard frame and holds the standard frame; accepts input of a priority frame that is required to be transmitted with less delay than the standard frame and holds the priority frame; the communication interface transmits the standard frame and the priority frame; and the memory stores an interruption processing time, which is the time from when it is determined that a conflict has occurred until the priority frame can be output from the priority frame queue to the communication interface, measured each time it is determined that a conflict has occurred, in which the standard frame is being output to the communication interface when input of the priority frame to the priority frame queue is complete, wherein the communication device determines whether or not the conflict has occurred each time input of the priority frame to the priority frame queue is complete; and if it is determined that the conflict has not occurred, imparts a delay to the priority frame such that the priority frame is held in the priority frame queue for a time related to the maximum value of the interruption processing time; and outputs the priority frame from the priority frame queue to the communication interface after the delay has elapsed.[Supplementary Item 6] A non-transitory storage medium storing a program executable by a computer, the non-transitory storage medium storing the program causing the computer to function as the communication device described in any one of Supplementary Items 1 to 4.
[0069] Although the above-described embodiments have been described as typical examples, it will be apparent to those skilled in the art that many modifications and substitutions can be made within the spirit and scope of the present disclosure. Therefore, the present invention should not be construed as being limited by the above-described embodiments, and various modifications or alterations are possible without departing from the scope of the claims.
[0070] DESCRIPTION OF SYMBOLS 1, 1-1 Communication device 11 First receiving interface unit (first IF unit) 12 Second receiving interface unit (second IF unit) 13 Priority control unit 14 Standard frame queue 15 Priority frame queue 16, 16-1 Conflict determination unit 17 Standard frame transmission processing unit 18 Priority frame transmission processing unit 19 Interruption processing time measurement unit (Preemption processing time measurement unit) 20 Interruption processing time storage unit (Preemption processing time storage unit) 21, 21-1 Delay imparting unit 22 Transmission interface unit (Transmission IF unit) 23 Conflict detection rate calculation unit 24 Mode switching determination unit 401 Computer 410 Processor 420 ROM 430 RAM 440 Storage 450 Input unit 460 Output unit 470 Communication interface 480 Bus
Claims
a priority frame queue that accepts input of a standard frame and holds the standard frame; a priority frame queue that accepts input of a priority frame that is required to be transmitted with less delay than the standard frame and holds the priority frame; a transmission interface unit that transmits the standard frame and the priority frame; a contention determination unit that determines, each time the input of the priority frame is completed to the priority frame queue, whether or not a contention has occurred in which the standard frame is output to the transmission interface unit when the input of the priority frame is completed; an interruption processing time memory unit that stores an interruption processing time, which is the time from when it is determined that the contention has occurred to when the priority frame can be output from the priority frame queue to the transmission interface unit, measured each time it is determined that the contention has occurred; a delay imparting unit that, when it is determined that the contention has not occurred, imparts to the priority frame a delay related to the maximum value of the interruption processing time such that the priority frame is held in the priority frame queue; and a priority frame transmission processing unit that, when it is determined that the contention has not occurred, outputs the priority frame from the priority frame queue to the transmission interface unit after the delay has elapsed.
2. The communication device of claim 1, wherein, when it is determined that the contention has occurred, the delay imparting unit imparts a delay to the priority frame such that the priority frame is held in the priority frame queue for a differential time obtained by subtracting the interruption processing time from the time related to the maximum value after the interruption processing time; and when it is determined that the contention has occurred, the priority frame transmission processing unit interrupts the output of the standard frame from the standard frame queue to the transmission interface unit, and outputs the priority frame from the priority frame queue to the transmission interface unit after the differential time and a delay such that the priority frame is held in the priority frame queue have elapsed.
3. A communication device as described in claim 1 or 2, further comprising: a conflict detection rate calculation unit that calculates a conflict detection rate, which is a ratio of the conflict count, which is the number of times that the conflict is determined to have occurred, to the priority frame input count, which is the number of times that the priority frame is input to the priority frame queue; and a mode switching determination unit that determines whether the conflict detection rate is equal to or greater than a predetermined threshold, wherein the delay imparting unit imparts a delay to the priority frame if it is determined that the conflict detection rate is equal to or greater than the predetermined threshold, and does not impart a delay to the priority frame if it is determined that the conflict detection rate is less than the predetermined threshold.
4. A communication device according to claim 1 or 2, wherein the time relating to the maximum value is the time at which the interrupted processing time is the maximum value, or the time at which the interrupted processing time is the maximum value of a specified section including an average value of the interrupted processing time.
5. A communications method executed by a communications device comprising: a standard frame queue that accepts input of a standard frame and holds the standard frame; a priority frame queue that accepts input of a priority frame that is required to be transmitted with less delay than the standard frame and holds the priority frame; a transmission interface unit that transmits the standard frame and the priority frame; and an interruption processing time memory unit that stores an interruption processing time, which is a time from when it is determined that a conflict has occurred until when the priority frame can be output from the priority frame queue to the transmission interface unit, measured each time it is determined that a conflict has occurred in which the standard frame is being output to the transmission interface unit when the input of the priority frame is completed to the priority frame queue, the communications method comprising: a step of determining whether or not the conflict has occurred each time the input of the priority frame is completed to the priority frame queue; a step of, when it is determined that the conflict has not occurred, imparting to the priority frame a delay related to the maximum value of the interruption processing time such that the priority frame is held in the priority frame queue; and a step of, when it is determined that the conflict has not occurred, outputting the priority frame from the priority frame queue to the transmission interface unit after the delay has elapsed.
6. A program for causing a computer to function as the communication device according to claim 1 or 2.
Citation Information
Patent Citations
Relay device and data transfer method
WO2015162734A1
