Communication control device and communication control device control method
By using the reference table and the attributes of the received data to select the reception queue in the communication control machine, the priority selection problem of additional information in the prior art is solved, and efficient priority processing and storage of data is realized.
Patent Information
- Application Number
- CN202180012337.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-09
- Filing Date
- 2021-01-18
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-01-18
AI Technical Summary
The prior art requires the data to be assigned processing priority tags to select a queue that stores data from multiple transmission queues, and there is a lack of a priority selection method that does not rely on additional information.
By using a reference table in the communication control machine, the appropriate reception queue is selected for storage based on the transmission source address, destination address and Ethernet frame type of the received data, so as to achieve priority processing of data.
Data can be effectively selected and stored without additional priority information, which improves the efficiency of data processing and the accuracy of priority processing, and avoids transmission delays and memory conflicts.
Smart Images

Figure CN115039388B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a communication control device or the like which stores reception data received from a network in any one of a plurality of reception queues to which different priorities are assigned in advance for transmission to a main memory. Background Art
[0002] Conventionally, there is a known technology that a communication control device that transmits a plurality of received data to a main memory includes a plurality of transmission queues, and determines in which of the plurality of transmission queues the plurality of data are to be stored, based on the respective processing priorities of the plurality of data. For example, the following patent document 1 discloses a communication control device that selects a transmission queue based on a priority tag assigned to a data frame.
[0003] Prior art literature
[0004] Patent Literature
[0005] Patent Document 1: Japanese Patent Application Publication No. 2003-244222 Summary of the invention
[0006] Problems to be solved by the invention
[0007] However, the conventional technology described above has a problem in that in order to select a transmission queue for storing data from a plurality of transmission queues, it is necessary to use additional information ("priority tag" in Patent Document 1) given to the data.
[0008] An object of an embodiment of the present invention is to select a transmission queue for storing the data from a plurality of transmission queues according to the processing priority of the data even if additional information indicating the processing priority is not given to the data.
[0009] Technical means of solving problems
[0010] In order to solve the above-mentioned problem, a communication control machine according to an embodiment of the present invention is a communication control machine which stores received data received from a network in any one of a plurality of receiving queues which are pre-assigned with different priority levels in order to transmit the received data to a main memory, and includes: a reference table which specifies, for at least one of the plurality of receiving queues, at least one of a source address, a destination address, and a type of Ethernet frame of the received data to be stored; and a selection unit which uses at least one of the source address, the destination address, and the type of Ethernet frame of the received data and selects, based on the reference table, a receiving queue from the plurality of receiving queues to store the received data.
[0011] In order to solve the above-mentioned problem, a control method of one embodiment of the present invention is a control method for a communication control machine that stores received data received from a network in any one of a plurality of receiving queues that are pre-assigned with different priority levels in order to transmit the received data to a main memory, and includes: a selection process, in which a reference table that specifies at least one of a source address, a destination address, and a type of Ethernet frame of the received data to be stored for at least one of the plurality of receiving queues is used to select a receiving queue for storing the received data from the plurality of receiving queues; and a storage process, in which the received data is stored in the receiving queue selected by the selection process.
[0012] Effects of the Invention
[0013] According to an embodiment of the present invention, the following effect is achieved: even if additional information indicating a processing priority is not given to data, a transmission queue for storing the data can be selected from a plurality of transmission queues according to the processing priority of the data. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a diagram showing a main part configuration of a PLC including a communication controller according to Embodiment 1 of the present invention.
[0015] Figure 2 Yes means including Figure 1 Diagram of an overview of a PLC control system.
[0016] Figure 3 This is a diagram for explaining a situation to be solved by the communication controller according to the first embodiment of the present invention.
[0017] Figure 4 This is a diagram for explaining a case where the order of transferring received data to the main memory is changed according to the order in which the received data are received by the communication controller according to the first embodiment of the present invention.
[0018] Figure 5 This is a diagram for explaining the queue selection table used by the communication controller according to the first embodiment of the present invention.
[0019] Figure 6 This is a diagram for explaining a start time log and the like generated by the communication controller according to the first embodiment of the present invention.
[0020] Figure 7 Yes means Figure 1 A flowchart showing an overall overview of the processing performed by the PLC.
[0021] Figure 8 Yes Figure 7 A flowchart illustrating a detailed example of queue selection processing in FIG.
[0022] Fig. 9 Yes Figure 7 A flowchart illustrating a detailed example of the transmission processing in FIG.
[0023] Fig.10 Yes Fig. 9 A flowchart illustrating a detailed example of coordination processing and storage processing in .
[0024] [Explanation of Symbols]
[0025] 3: Network
[0026] 13: Receive queue
[0027] 10: Communication controller (communication control equipment)
[0028] 20: Main memory
[0029] 42: Various setting information
[0030] 121: Queue selection table (reference table)
[0031] 122: Selection Department
[0032] NP: Priority Level
[0033] S60: Queue selection processing (selection process)
[0034] S70: Transmission processing (storage process)
[0035] S710: Storage process DETAILED DESCRIPTION
[0036] [Implementation method 1]
[0037] Hereinafter, an embodiment of one aspect of the present invention (hereinafter, also referred to as "this embodiment") is described based on the accompanying drawings. In addition, the same symbols are marked for the same or corresponding parts in the figures, and their descriptions are not repeated. In this embodiment, a communication controller 10 included in a programmable logic controller (PLC) 1 that controls a control object such as a machine or equipment is described as a typical example of a communication control machine.
[0038] In the following description, "n", "N", "p", and "q" each represent an integer greater than or equal to "1", and "p" and "q" are integers different from each other.
[0039] In the following description, in order to ensure the simplicity of the description, the "receive queue" is sometimes referred to as "RX". For example, the first receive queue 13 (0) is sometimes referred to as "RX0" and the second receive queue 13 (1) is sometimes referred to as "RX1". In addition, when there is no need to distinguish between the first receive queue 13 (0) (i.e., RX0) and the second receive queue 13 (1) (i.e., RX1), it is sometimes referred to as "receive queue 13" or simply "RX".
[0040] §1. Application examples
[0041] In order to facilitate understanding of the communication controller 10 (communication control device) of one embodiment of the present invention, first, an example of a scenario in which the present invention is applied is described. Specifically, Figure 2 An overview of the control system 0 including the PLC 1 including the communication controller 10 will be described.
[0042] (Overview of control system)
[0043] Figure 2 This is a diagram showing an overview of a control system 0. The control system 0 includes a PLC 1, a network hub 2, and a network 3(1) and a network 3(2) each connected to the PLC 1 via the network hub 2. Hereinafter, when there is no need to particularly distinguish between the network 3(1) and the network 3(2), they are sometimes simply referred to as "network 3". The network 3 includes one or more network devices.
[0044] exist Figure 2 In the illustrated control system 0, a plurality of networks 3 are connected to the PLC 1 via a network hub 2. The GHz band can also be used for communication in the control system 0.
[0045] The PLC 1 is a control device that controls the entire control system 0, and the network hub 2 is a network hub or a network switch that manages the communication between the PLC 1 and a plurality of networks 3. Figure 2 In the control system 0 shown, relative to a network port of PLC 1 (i.e., Figure 1 There are multiple networks 3 such as network 3(1) and network 3(2).
[0046] Here, both network 3(1) and network 3(2) can be control networks, that is, all networks 3 communicating with PLC 1 can be control networks. In addition, any one of network 3(1) and network 3(2) can be a control network, and the other can be a data network, that is, control networks and data networks can be mixed in network 3 communicating with PLC 1.
[0047] For example, when the network 3 is a control network, the PLC 1 is a control device responsible for controlling the input machine and the output machine in the production equipment, and the network device is, for example, the input machine and the output machine in the production equipment. The PLC 1 and the network device periodically communicate via the network 3 to send and receive input (IN) data and output (OUT) data (hereinafter referred to as "IO data"), and the PLC 1 controls the entire production equipment. That is, when the network 3 is a control network, the control system 0 can be regarded as a master-slave control system in which the PLC 1 is set as the master device (the master device that manages data transmission) and the network device is set as the slave device.
[0048] When the network 3 is a control network, the network 3 may be a network in accordance with industrial Ethernet (registered trademark) standards such as Ethernet for Control Automation Technology (EtherCAT (Ethernet for Control Automation Technology): registered trademark) standards. When the network 3 is a control network, the network 3 may be a network in accordance with Ethernet / Industrial Protocol (EtherNet Industrial Protocol, Ethernet / IP) (registered trademark) standards.
[0049] The following, Figure 2 The communication between the PLC 1 and the network device (hereinafter also referred to as "network communication") is described in accordance with the example of the Ethernet standard. In addition, the central processing unit (CPU) 30 and the communication controller 10 are connected in a communicative manner through the peripheral component interconnect Express (PCIe).
[0050] In addition, Figure 2 The control system 0 in which a plurality of networks 3 are connected to the PLC 1 via the network hub 2 is illustrated, but in the control system 0, it is not necessary that the plurality of networks 3 are connected to the PLC 1 via the network hub 2. In the control system 0, one network 3 (particularly one control network) may be connected to the PLC 1 without passing through the network hub 2. For example, in the control system 0 as a master-slave control system, the PLC 1 as a master device and one or more network devices each as a slave device may be connected in a one-stroke form and in a manner capable of communication.
[0051] (Specific example of a situation to be solved by the communication controller of this embodiment)
[0052] Figure 3This is a diagram for explaining a situation that is to be solved by the communication controller 10 (particularly the transmission control unit 12). Specifically, Figure 3 This is a diagram for explaining a situation that may occur when a plurality of received data are transmitted (stored) to the main memory 20 in accordance with the order of reception from the network 3 .
[0053] In the following description, the term "processing priority P" is used to indicate "in what order the CPU 30 processes" the data (received data) received by the PLC 1 (especially the communication controller 10) from the network 3. It is not necessary to assign the processing priority P itself to the data (received data) received by the PLC 1 (especially the communication controller 10) from the network 3. The details will be described below, but the reason is that the PLC 1 (especially the communication controller 10) can use at least one of the source address, destination address, and Ethernet frame type (for example, information for distinguishing IPv4, ECAT, etc.) of the received data to grasp the processing priority P of the received data.
[0054] That is, the processing priority level P of the received data is not given to the received data, and the “processing priority level P” is simply used to simply explain “in what order the CPU 30 processes the received data”.
[0055] Regarding the "processing priority P", the smaller the value, the higher the value, and "P1, i.e., processing priority P = 1" is higher than "P2, i.e., processing priority P = 2". Therefore, data with "processing priority P = 1" is preferably processed by CPU 30 before data with "processing priority P = 2". Compared with data with "processing priority P = 2", data with "processing priority P = 1" has a higher processing priority P, so it is also called "high priority data". Similarly, data with "processing priority P = 2" has a lower processing priority P than data with "processing priority P = 1" (i.e., high priority data), so it is also called "low priority data".
[0056] In addition, "the order in which the PLC 1 (especially the communication controller 10) receives data (receives data) from the network 3" is also referred to as the "receiving order". "The order in which the communication controller 10 transmits (stores) the data received from the network 3 to the main memory 20" is also referred to as the "transmission order". In principle, the data stored in the main memory 20 is processed by the CPU 30 in the order consistent with the transmission order.
[0057] Figure 3 (A) is a diagram for explaining the following situation: when the network communication speed is faster than the communication speed between the CPU 30 and the communication controller 10, a plurality of received data are transmitted (stored) to the main memory 20 according to the order of reception from the network 3.
[0058] By speeding up the communication according to the Ethernet standard, the network communication speed may be faster than the communication speed between the CPU 30 and the communication controller 10. For example, the communication speed according to the Ethernet standard is 10 Gbits / s, while the communication speed of PCIe Gen2 is 5 Gbits / s.
[0059] In the case where the communication speed of the network communication is faster than the communication speed between the CPU 30 and the communication controller 10, in the case where the transmission order is made consistent with the reception order, a Figure 3 The situation shown in (A).
[0060] That is, when PLC 1 (particularly communication controller 10) receives data D3 from network 3 in a sequence subsequent to data D2, when the transmission order is made consistent with the reception order, data D3 is transmitted to main memory 20 in a sequence subsequent to data D2.
[0061] Here, in Figure 3 In (A), data D3 (processing priority P=1) is high priority data, and data D2 (processing priority P=2) is low priority data.
[0062] However, when the transmission order is made consistent with the reception order, the data D3 as high priority data is transmitted to the main memory 20 in an order later than the data D2 as low priority data, that is, the transmission of the data D3 as high priority data to the main memory 20 is delayed. As a result, it is difficult for the data D3 as high priority data to be processed by the CPU 30 before the data D2 as low priority data. In particular, when the speed of network communication is faster than the communication speed between the CPU 30 and the communication controller 10, the delay in processing the data D3 as high priority data has a great influence on the overall control of the control system 0.
[0063] Figure 3 (B) is a diagram for explaining the following situation: when a period (access prohibition period) is set to prohibit access to the main memory 20, a plurality of received data are transmitted (stored) to the main memory 20 according to the order of reception from the network 3.
[0064] Here, a "memory conflict" is generated by the generation of multiple access requests to the main memory 20 at the same timing. In order to suppress the occurrence of memory conflicts without causing the operation unit (i.e., CPU 30) to perform coordination processing for preventing the memory conflicts, a period during which access to the main memory 20 is prohibited, i.e., an "access prohibition period", is sometimes set. In addition, when an important process is performed by the CPU 30 using data stored in the main memory 20 while a device other than the CPU 30 (e.g., the communication controller 10) is accessing the main memory 20, the processing speed of the CPU 30 is reduced. In order to prevent the above situation, a period during which devices other than the CPU 30 cannot access the main memory 20, i.e., an "access prohibition period", is sometimes set. An access prohibition period can be set in the PLC 1 (especially the communication controller 10).
[0065] When an access prohibition period is set and high priority data is received during the access prohibition period, when the transmission order to the main memory 20 is made consistent with the reception order, the transmission of the high priority data may be significantly delayed after the transmission of the low priority data.
[0066] That is, in Figure 3 In (B), data D2 (processing priority P=1) is high priority data, and data D1 (processing priority P=2) is low priority data. Furthermore, PLC 1 (particularly communication controller 10) receives data D2 (processing priority P=1) from network 3 after data D1 (processing priority P=2) during the access prohibition period.
[0067] When the transmission order is made consistent with the reception order, the timing of transferring the data D2 (processing priority P=1) to the main memory 20 is after the data D1 (processing priority P=2) is transferred to the main memory 20. Furthermore, when the access prohibition period is set, the main memory 20 cannot be accessed by the communication controller 10 during the access prohibition period, so the data D1 (processing priority P=2) is transferred to the main memory 20 after the access prohibition period has passed. Therefore, when the access prohibition period is set, the timing of transferring the data D2 (processing priority P=1) to the main memory 20 is further delayed compared to the case where the access prohibition period is not set.
[0068] like Figure 3As shown in (B), when the transmission order is made consistent with the reception order, it is difficult to process the data D2 as high priority data received after the data D1 as low priority data before the data D1 by the CPU 30. In particular, when the access prohibition period is set and the transmission order is made consistent with the reception order, the processing of the data D2 as high priority data by the CPU 30 is further delayed compared with the case where the access prohibition period is not set.
[0069] (Specific Example of Transmission Order Implemented by the Communication Controller of the Present Embodiment)
[0070] Figure 4 This diagram explains a case where the communication controller 10 (particularly the transfer control unit 12 ) changes the transfer order of received data to the main memory 20 according to the reception order of the received data.
[0071] To overcome Figure 3 In the situation shown, the communication controller 10 transmits (stores) the high priority data to the main memory 20 before the low priority data. Specifically, the transmission control unit 12 of the communication controller 10 switches the reception queue 13 storing the received data according to the transmission source address, destination address, and Ethernet frame type (e.g., information for distinguishing IPv4, ECAT, etc.) of the received data.
[0072] Here, the communication controller 10 includes a plurality of receiving queues 13, for example, a first receiving queue 13 (0) (i.e., RX0) and a second receiving queue 13 (1) (i.e., RX1). Moreover, the plurality of receiving queues 13 are respectively pre-assigned with different priority levels NP, that is, the priority levels NP of the plurality of receiving queues 13 are different from each other. For example, the priority level NP (RX0) pre-assigned to the first receiving queue 13 (0) (i.e., RX0) is higher than the priority level NP (RX1) pre-assigned to the second receiving queue 13 (1) (i.e., RX1).
[0073] Furthermore, the priority level NP assigned in advance to each of the plurality of reception queues 13 is different from the processing priority level P indicating “the ideal order of processing of the data (reception data) stored in the main memory 20 by the CPU 30 ”.
[0074] When the first receiving queue 13 (0) and the second receiving queue 13 (1) request access at the same time, the coordination unit 14 grants access rights to the receiving queue 13 assigned a higher priority level NP. Then, the receiving queue 13 that has obtained the access rights transfers the data (received data) stored in the data first-in first-out queue (FIFO) 131 to the main memory 20. That is, the received data stored in the beginning of the receiving queue 13 assigned a higher priority level NP in advance is transferred to the main memory 20 before the received data stored in the opening of the receiving queue 13 assigned a lower priority level NP in advance.
[0075] Therefore, the communication controller 10 can transfer the received data to the main memory 20 in an order different from the order of receiving from the network 3 by switching the receiving queue 13 storing the received data. Specifically, the communication controller 10 can transfer high priority data to the main memory 20 before low priority data by storing only the received data determined to have a high processing priority P in the receiving queue 13 to which a high priority level NP is pre-assigned.
[0076] The communication controller 10 determines the processing priority P of the received data based on at least one of the "destination address", "source address" and "type of Ethernet frame (frame type)" of the received data. The communication controller 10 may determine the processing priority P of the received data based only on the "source address" of the received data. The "destination address", "source address" and "frame type" are all information originally possessed by the received data, and are not newly added information to indicate the processing priority P of the received data.
[0077] The "destination address" of the received data that is referred to when the transmission control unit 12 switches the storage destination of the received data can be roughly divided into a unicast address, a multicast address, a broadcast address, etc. When the communication controller 10 is implemented as a general network interface card (NIC), multiple addresses can be registered as multicast addresses. Therefore, for example, when the "destination address" of the received data is "multicast address A", the communication controller 10 (especially the transmission control unit 12) can select the first receiving queue 13 (0) as the storage destination of the received data. Similarly, for example, when the "destination address" of the received data is "multicast address B", the communication controller 10 (especially the transmission control unit 12) can select the second receiving queue 13 (1) as the storage destination of the received data.
[0078] The transmission control unit 12 can select a storage destination for the received data based on the source address of the received data. For example, when the "source address" of the received data is "addr_txa" or "addr_txb", the communication controller 10 (particularly the transmission control unit 12) can select the first receiving queue 13 (0) as the storage destination for the received data. Similarly, when the "source address" of the received data is neither "addr_txa" nor "addr_txb", the communication controller 10 (particularly the transmission control unit 12) can select the second receiving queue 13 (1) as the storage destination for the received data.
[0079] The transmission control unit 12 may select a storage destination for the received data according to the frame type of the received data. For example, when the "frame type" of the received data is "other than IPv4", the communication controller 10 (particularly the transmission control unit 12) may select the first receive queue 13 (0) as the storage destination for the received data. Similarly, when the "frame type" of the received data is "IPv4", the communication controller 10 (particularly the transmission control unit 12) may select the second receive queue 13 (1) as the storage destination for the received data.
[0080] Figure 4 (A) is a diagram showing a case where, even when the network communication speed is faster than the communication speed between the CPU 30 and the communication controller 10, the communication controller 10 stores a plurality of received data in the main memory 20 in an order different from the order in which they were received.
[0081] exist Figure 4 In (A), data D3 (processing priority P=1) is high priority data, and data D2 (processing priority P=2) is low priority data. In addition, PLC 1 (particularly communication controller 10) receives data D3 from network 3 in the order after data D2.
[0082] The communication controller 10 (transmission control unit 12) stores the data D3 in RX0 assigned a higher priority NP than RX1, based on at least one of the transmission source address, destination address, and Ethernet frame type of the data D3. That is, the transmission control unit 12 stores the data D3 in the first reception queue 13(0) assigned a higher priority NP than the second reception queue 13(1).
[0083] Similarly, the communication controller 10 (transmission control unit 12) stores the data D2 in RX1 assigned a lower priority NP than RX0, based on at least one of the transmission source address, destination address, and Ethernet frame type of the data D2. That is, the transmission control unit 12 stores the data D2 in the second reception queue 13(1) assigned a lower priority NP than the first reception queue 13(0).
[0084] Furthermore, since RX0 is assigned a higher priority level NP than RX1 , when RX0 and RX1 request access at the same time, the arbitration unit 14 grants access rights to RX0 assigned a higher priority level NP.
[0085] As a result, RX0 can transfer data D3 to the main memory 20 at an earlier timing than RX1 transfers data D2 to the main memory 20. That is, the communication controller 10 can transfer "data D3 as high priority data" received after "data D2 as low priority data" to the main memory 20 before "data D2 as low priority data".
[0086] As described above, the communication controller 10 can make the high priority data be processed by the CPU 30 before the low priority data by "transmitting the high priority data received after the low priority data to the main memory 20 before the low priority data". In particular, when the speed of network communication is faster than the communication speed between the CPU 30 and the communication controller 10, the communication controller 10 can prevent the "processing delay of the high priority data" which has a great influence on the control of the control system 0 as a whole.
[0087] Figure 4 (B) is a diagram showing a case where the communication controller 10 can store a plurality of received data in the main memory 20 in an order different from the order in which they were received even when an access prohibition period is provided.
[0088] exist Figure 4 In (B), data D2 (processing priority P=1) is high priority data, and data D1 (processing priority P=2) is low priority data. Furthermore, PLC 1 (particularly communication controller 10) receives data D2 (processing priority P=1) from network 3 after data D1 (processing priority P=2) during the access prohibition period.
[0089] The communication controller 10 (transmission control unit 12) stores the data D2 in RX0 assigned a higher priority NP than RX1, based on at least one of the transmission source address, destination address, and Ethernet frame type of the data D2. That is, the transmission control unit 12 stores the data D2 in the first reception queue 13(0) assigned a higher priority NP than the second reception queue 13(1).
[0090] Similarly, the communication controller 10 (transmission control unit 12) stores the data D1 in RX1 assigned a lower priority NP than RX0, based on at least one of the transmission source address, destination address, and Ethernet frame type of the data D1. That is, the transmission control unit 12 stores the data D1 in the second reception queue 13(1) assigned a lower priority NP than the first reception queue 13(0).
[0091] Furthermore, since RX0 is assigned a higher priority level NP than RX1 , when RX0 and RX1 request access at the same time, the arbitration unit 14 grants access rights to RX0 assigned a higher priority level NP.
[0092] As a result, RX0 can transfer data D2 to the main memory 20 at an earlier timing than RX1 transfers data D1 to the main memory 20. Specifically, RX0 transfers data D2 to the main memory 20 just after the access prohibition period has passed, and then RX1 transfers data D1 to the main memory 20. That is, the communication controller 10 can transfer "data D2 as high priority data" received later than "data D1 as low priority data" to the main memory 20 before "data D1 as low priority data".
[0093] As described above, the communication controller 10 can make the high priority data be processed by the CPU 30 before the low priority data by "transmitting the high priority data received after the low priority data to the main memory 20 before the low priority data". In particular, when the access prohibition period is set, the communication controller 10 can prevent a large "processing delay of the high priority data" compared to the case where the access prohibition period is not set.
[0094] (Conclusions regarding the communication controller of this embodiment)
[0095] For previous use Figure 2 , Figure 3 and Figure 4 The communication controller 10 has been described in outline, and is summarized as follows for easier understanding.
[0096] That is, the communication controller 10 is a communication control device that stores data (received data) received from the network 3 in any one of a plurality of receive queues 13 to which different priority levels NP are assigned in advance for transmission to the main memory 20. The communication controller 10 includes a queue selection table 121 (reference table) and a selection unit 122.
[0097] In the queue selection table 121 , at least one of “source address”, “destination address” and “Ethernet frame type” of received data to be stored is defined for at least one of the plurality of reception queues 13 .
[0098] The selection unit 122 uses at least one of the “source address”, “destination address” and “Ethernet frame type” of the received data and selects the reception queue 13 storing the received data according to the queue selection table 121 .
[0099] According to the above configuration, the communication controller 10 selects a reception queue 13 storing reception data from among the plurality of reception queues 13 using at least one of the “source address”, “destination address” and “Ethernet frame type” of the reception data.
[0100] Here, the “source address”, “destination address”, and “Ethernet frame type” are all information originally possessed by the received data, and are not information newly given for selecting the receive queue 13 in which the received data is to be stored.
[0101] Therefore, the communication controller 10 has an effect of being able to store reception data in a desired reception queue 13 selected from a plurality of reception queues 13 to which different priority levels NP are assigned in advance, without using additional information indicating the processing priority level P.
[0102] In the communication controller 10 , the selection unit 122 may select the reception queue 13 storing the reception data from among the plurality of reception queues 13 based on the queue selection table 121 using only the “transmission source address” of the reception data.
[0103] For example, only the "source address" of the received data to be stored in the first receiving queue 13(0) may be specified in the queue selection table 121. Then, when the "source address" of the received data matches the "source address" specified in the queue selection table 121, the selection unit 122 may select the first receiving queue 13(0) as the storage destination of the received data.
[0104] According to the above structure, the communication controller 10 uses only the "source address" of the received data and selects a receiving queue 13 for storing the received data from the plurality of receiving queues 13 according to the queue selection table 121. Therefore, the communication controller 10 has the effect of storing the received data in a desired receiving queue 13 selected from the plurality of receiving queues 13 to which different priority levels NP are pre-assigned only by the "source address" of the received data.
[0105] §2.Structure example
[0106] Second, use Figure 1 The communication controller 10 and the PLC 1 including the communication controller 10 , whose outlines have been described above, will be described in detail.
[0107] Figure 1 1 is a diagram showing a configuration example of PLC 1. Figure 1 As shown in the example, the PLC 1 includes a communication controller 10, a main memory 20, a CPU 30, and a non-volatile memory 40 as a hardware structure. The PLC 1 may also include a Universal Serial Bus (USB) connector for connecting an external device to the PLC 1. The communication controller 10, the main memory 20, the CPU 30, and the non-volatile memory 40 are respectively connected through various buses (internal buses).
[0108] Typically, the CPU 30 is constructed according to a general computer architecture and interprets and executes command codes in sequence according to an internal clock. The CPU 30 includes one or more CPU cores and a network control unit as a hardware structure. Figure 1 The CPU 30 illustrated in FIG. 2 includes a table generating unit 31 as a functional block.
[0109] The table generation unit 31 generates a queue selection table 121 based on "various setting information 42 including the network configuration of the control system 0" generated by the user using a setting personal computer (PC). The queue selection table 121 generated by the table generation unit 31 can be used to select the reception queue 13 to store the received data through the transmission control unit 12 (particularly the selection unit 122) of the communication controller 10.
[0110] The main memory 20 is a storage means of the PLC 1, and can store, for example, data (received data) received by the PLC 1 (particularly, the communication controller 10) from the network 3. The CPU 30 executes various calculation processes on the data stored in the main memory 20.
[0111] The main memory 20 is a volatile storage area (Random Access Memory (RAM)), which stores the received data received from the network 3 and used for various calculations by the CPU 30, and also holds various programs to be executed by the CPU 30 after the PLC 1 is powered on. In addition, the main memory 20 can also be used as a job memory when the CPU 30 executes various programs. As such a main memory 20, for example, a dynamic random access memory (DRAM), a static random access memory (SRAM), etc. can be used.
[0112] exist Figure 1 The main memory 20 illustrated in FIG. 2 stores descriptor data (descriptor) corresponding to the received data together with the received data. The descriptor includes information indicating the storage destination address of the corresponding received data in the main memory 20 and the data size of the corresponding received data in the main memory 20.
[0113] The nonvolatile memory 40 stores data such as various programs and parameters in a nonvolatile manner. These data are copied to the main memory 20 as needed so that the CPU 30 can access them. Such a nonvolatile memory may use a semiconductor memory such as a flash memory. Alternatively, a magnetic recording medium such as a hard disk drive, an optical recording medium such as a digital versatile disk random access memory (DVD-RAM), etc. may also be used.
[0114] exist Figure 1 The nonvolatile memory 40 illustrated in FIG. 1 stores “various setting information 42 including the network configuration of the control system 0 ” generated by the user using the setting PC. The nonvolatile memory 40 also includes a log table 41 storing various logs generated by the log generating unit 16 of the communication controller 10 .
[0115] The communication controller 10 is a data transmission device that receives data from the network 3 and stores the received data (received data) in the main memory 20, and can be implemented as a network interface card (NIC). Typically, the communication controller 10 includes a logic circuit formed by hardware such as a field programmable gate array (FPGA) or an application specific integrated circuit (ASIC). The communication controller 10 is configured to be able to send and receive data with each of the main memory 20, the CPU 30, and the non-volatile memory 40.
[0116] The communication controller 10 is connected to the network 3 via the receiving port 11, and controls the data exchange with the network 3, especially controls the reception of received data. The communication controller 10 provides the functions of the physical layer and the data link layer in the network 3, for example. That is, the communication controller 10 controls the sending of the transmission data and the receiving of the reception data according to the standard followed by the network 3. Specifically, the communication controller 10 receives the reception data from the network device connected to the network 3, and stores the received data (reception data) in the reception queue 13. In particular, the communication controller 10 selects the reception queue 13 to store the reception data from a plurality of reception queues 13 to which different priority levels NP are pre-assigned, and stores the reception data in the selected reception queue 13.
[0117] As will be described in detail below, the PLC 1 controls the transmission order of the received data from the network 3 to the main memory 20 by the communication controller 10 including the logic circuit formed by hardware instead of the CPU 30. Therefore, the PLC 1 has the following effect: the transmission order of the received data to the main memory 20 can be controlled to a desired order by the communication controller 10 including the logic circuit formed by hardware without increasing the processing load of the CPU 30.
[0118] Figure 1 The communication controller 10 illustrated in FIG. 1 includes a reception port 11 , a transmission control unit 12 , two or more reception queues 13 , a coordination unit 14 , an interface (IF) 15 , and a log generation unit 16 as functional blocks.
[0119] exist Figure 1In the example shown, the communication controller 10 includes a first receive queue 13(0) (i.e., RX0) and a second receive queue 13(1) (i.e., RX1) as receive queues 13. The plurality of receive queues 13 are respectively pre-assigned different priority levels NP, for example, the priority level NP(RX0) pre-assigned to the first receive queue 13(0) is higher than the priority level NP(RX1) pre-assigned to the second receive queue 13(1).
[0120] about Figure 1 In order to ensure the simplicity of the description, the communication controller 10 illustrated in the example omits the structure that sends the transmission data to the network 3 via the transmission port and other structures that are not directly related to the present embodiment. According to the actual implementation, the communication controller 10 may also include the omitted structure.
[0121] The transfer control unit 12 selects a reception queue 13 for storing data (reception data) received from the network 3 via the reception port 11 , from among a plurality of reception queues 13 to which different priority levels NP are assigned in advance. Figure 1 The transmission control unit 12 shown in the example selects whether to store data (received data) received by the reception port 11 from the network 3 in the first reception queue 13 ( 0 ) or the second reception queue 13 ( 1 ). The transmission control unit 12 includes a queue selection table 121 , a selection unit 122 , and a storage unit 123 .
[0122] The queue selection table 121 stores the following information: information indicating conditions for receiving data to be stored for at least one of the plurality of receiving queues 13. Specifically, the queue selection table 121 stores the following information: information specifying at least one of the "source address", "destination address" and "type of Ethernet frame" of the receiving data to be stored for at least one of the plurality of receiving queues 13. Figure 1 The queue selection table 121 illustrated in the example stores the following information: information indicating the conditions for received data to be stored in the first receive queue 13(0), the first receive queue 13(0) being pre-assigned a higher priority NP than the priority NP(RX1) assigned to the second receive queue 13(1).
[0123] The selection unit 122 selects the reception queue 13 storing the reception data based on the queue selection table 121 using at least one of the “source address”, “destination address” and “type of Ethernet frame” of the reception data. Figure 1The selection unit 122 illustrated in the example selects the first reception queue 13(0) or the second reception queue 13(1) as the storage destination of the reception data using at least one of the "source address", "destination address" and "type of Ethernet frame" of the reception data. In particular, when at least one of the "source address", "destination address" and "type of Ethernet frame" of the reception data satisfies the conditions specified in the queue selection table 121, the selection unit 122 selects the first reception queue 13(0) as the storage destination. The selection unit 122 notifies the storage unit 123 of the reception queue 13 selected as the storage destination of the reception data, that is, the first reception queue 13(0) or the second reception queue 13(1).
[0124] The storage unit 123 stores the received data in the receive queue 13 selected by the selection unit 122, and in particular, stores the received data in the data FIFO 131 of the receive queue 13 selected by the selection unit 122. For example, when the first receive queue 13(0) is selected by the selection unit 122, the storage unit 123 stores the received data in the first data FIFO 131(0) of the first receive queue 13(0). Similarly, when the second receive queue 13(1) is selected by the selection unit 122, the storage unit 123 stores the received data in the second data FIFO 131(1) of the second receive queue 13(1).
[0125] The receiving queue 13 temporarily stores data (received data) received by the PLC 1 (especially the communication controller 10) from the network 3, and transmits the received data to the main memory 20 according to the descriptor. The receiving queue 13 includes a data FIFO 131, a descriptor FIFO 132 and a direct memory access controller (DMAC) 133.
[0126] In the data FIFO 131 , data (received data) received by the PLC 1 (particularly the communication controller 10 ) from the network 3 is stored in a first in, first out (FIFO) manner.
[0127] Descriptors (descriptor data) are stored in a first-in, first-out (FIFO) manner in the descriptor FIFO 132. When the CPU 30 completes the setting of the descriptor data in the main memory 20 and issues a reception permission to the communication controller 10, the communication controller 10 reads the descriptor from the main memory 20 and stores it in the descriptor FIFO 132.
[0128] The DMAC 133 performs data exchange between the main memory 20 and each of the data FIFO 131 and the descriptor FIFO 132. For example, the DMAC 133 reads the descriptor data set in the main memory 20 by the CPU 30 and stores it in the descriptor FIFO 132. In addition, when the DMAC 133 is allowed to access by the arbitration unit 14, it stores the received data stored in the data FIFO 131 in the main memory 20 in order from the beginning. In particular, the DMAC 133 stores the received data stored in the data FIFO 131 at the address of the main memory 20 specified in the descriptor according to the descriptor stored in the descriptor FIFO 132. Furthermore, when the DMAC 133 is allowed to access by the arbitration unit 14, it transfers the write-back descriptor to the main memory 20, that is, it rewrites the descriptor in the main memory 20 with the write-back descriptor.
[0129] The coordination unit 14 coordinates multiple access requests to the main memory 20, that is, the access requests from each of the multiple receiving queues 13. Specifically, when there are access requests from each of the multiple receiving queues 13 at approximately the same time, the coordination unit 14 grants access rights only to the receiving queue 13 assigned the highest priority level NP, that is, permits access. For example, when an access request from the first receiving queue 13 (0) and an access request from the second receiving queue 13 (1) exist at approximately the same time, the coordination unit 14 permits access to the first receiving queue 13 (0) assigned a higher priority level NP than the second receiving queue 13 (1).
[0130] The IF 15 is an interface for allowing the communication controller 10 (particularly the DMAC 133 ) to communicate with each of the main memory 20 , the CPU 30 , and the nonvolatile memory 40 .
[0131] The log generation unit 16 generates logs indicating various times related to the reception and transmission of received data (specifically, a start time log, a sequence change log, and an end time log). The log generation unit 16 stores the generated logs in the log table 41 of the nonvolatile memory 40. The logs generated by the log generation unit 16 will be described in detail below. Figure 6 Give a narrative.
[0132] (About the queue selection table)
[0133] Figure 5 is a diagram for explaining the queue selection table 121. Figure 5 (A) shows an example of the queue selection table 121. In addition, Figure 5 (B) is a diagram for explaining an example of a method for generating the queue selection table 121. Figure 5, “a queue selection table 121 that defines conditions for reception data to be stored in the reception queue 13 to which a high priority level NP is assigned” is shown as an example of the queue selection table 121 .
[0134] exist Figure 5 The queue selection table 121 illustrated in (A) of FIG. 1 defines the conditions for receiving data to be stored in the first receiving queue 13 (0) (ie, RX0). Figure 5 In the queue selection table 121 of (A), the "source address" is defined as "addr_txa" as the "condition: 1" for the received data to be stored in the first receiving queue 13 (0). Figure 5 In the queue selection table 121 of (A), the "transmission source address" is defined as "addr_txb" as "condition: 2".
[0135] In addition, Figure 5 The queue selection table 121 of (A) specifies that "destination address" is "multicast (addr_rxa)" and "frame type" is "!IPv4 (ie, other than IPv4)" as "condition: n". In addition, "-" indicates that the matching of the conditions is not confirmed.
[0136] The transmission control unit 12 includes a queue selection table 121 for the selection unit 122 to select a storage destination for the received data. The queue selection table 121 is set by software (i.e., the CPU 30) before communication. In the queue selection table 121, conditions such as the received data to be stored in the receiving queue 13 (e.g., the first receiving queue 13 (0)) assigned a high priority level NP are pre-set. Figure 5 In the queue selection table 121 illustrated in (A), at least one of the "source address", "destination address" and "Ethernet frame type" of the received data is set as a condition for the received data to be stored in the first receive queue 13 (0).
[0137] The conditions for selecting the receiving queue 13 to be stored can be set in multiple numbers for each item (ie, "source address", "destination address", "Ethernet frame type" of received data) or in combination of multiple items.
[0138] A plurality of items can be combined to form a condition, but it is not necessary to set all of them. For example, it is also possible to set only the "source address" and not set other items. In this case, as long as the source address of the received data satisfies the "source address" set as a condition, it is determined that "the received data satisfies the condition" regardless of the destination address of the received data and the type of Ethernet frame.
[0139] In addition, for each item, if it is a value other than "other than ○○" (i.e., ○○), a condition that the selection unit 122 determines as "the condition is satisfied" can be set. For example, when the condition "!IPv4 (i.e., other than IPv4)" is set for "frame type", if the frame type of the received data is other than "IPv4", the selection unit 122 determines that "the received data satisfies the condition".
[0140] Figure 5 (B) shows a method in which the PLC 1 (particularly the CPU 30 ) generates the queue selection table 121 as an example of a method for generating the queue selection table 121 .
[0141] The user uses the setting PC to generate machine setting information and program data, that is, to generate "various setting information 42 including the network structure of the control system 0". Here, generally speaking, industrial controllers and devices (for example, Figure 2 "Network devices") perform data exchange at a certain cycle. Figure 5 In the example shown in (B), the user uses the setting PC to set one or more data exchange cycles and the communication priority CP of the cell group for a cell group including one or more devices D. The user may also use the setting PC to set the data exchange cycle and the communication priority CP for a plurality of cell groups. That is, the communication priority CP of the cell group is included in the various setting information 42 generated by the user using the setting PC.
[0142] Here, the communication priority CP and the processing priority P may also be associated. In addition, the fact that the communication priority CP of a certain cell group (e.g., cell group U1) is higher than the communication priority CP of other cell groups (e.g., cell group U2) may also mean that the necessity of maintaining the communication cycle of the certain cell group is higher than that of the other cell groups. Furthermore, the fact that the communication priority CP of a certain cell group (e.g., cell group U1) is higher than the communication priority CP of other cell groups (e.g., cell group U2) may also mean that the communication cycle of the certain cell group is faster (shorter) than the communication cycle of the other cell groups.
[0143] In other words, a high necessity to maintain the communication cycle may be referred to as a "high priority cycle", and a fast (short) communication cycle may be referred to as a "high priority cycle". That is, a "high priority cycle" means that the set communication priority CP is high, and may also mean at least one of a high necessity to maintain the communication cycle and a fast (short) communication cycle.
[0144] For example, in Figure 5 (B) shows an example in which a user uses a setting PC to assign a high communication priority CP and data exchange period to a unit group U1 including devices D1-1, D1-2, ..., D1-n. Figure 5 (B) shows an example in which "the user sets a high priority period for the unit group U1".
[0145] In addition, Figure 5 In the example shown in (B), a user uses a setting PC to assign a low communication priority CP and data exchange period to a unit group U2 including devices D2-1, D2-2, ..., D2-n. Figure 5 (B) shows an example in which "the user sets a low priority period for the unit group U2".
[0146] In the following description, when it is not necessary to distinguish each of the devices D1-1, D1-2, ..., D1-n, D2-1, D2-2, ..., D2-n, they are simply referred to as "device D". Similarly, when it is not necessary to distinguish each of the devices D1-1, D1-2, ..., D1-n, they are simply referred to as "device D1", and when it is not necessary to distinguish each of the devices D2-1, D2-2, ..., D2-n, they are simply referred to as "device D2".
[0147] The setting PC notifies (uploads) the various setting information 42 generated by the user to the PLC 1. The PLC 1 stores the various setting information 42 loaded from the setting PC in the non-volatile memory 40. When "queue selection table creation" is valid, the table generation unit 31 of the CPU 30 obtains the transmission source address of the device D connected to the PLC 1 (especially the communication controller 10). The table generation unit 31 determines the unit group U including the device D based on the obtained transmission source address. In addition, the table generation unit 31 refers to the various setting information 42 stored in the non-volatile memory 40 to obtain the communication priority CP set for the unit group U including the device D.
[0148] The table generation unit 31 refers to the various setting information 42 to store the transmission address corresponding to the device D included in the unit group U assigned with the high communication priority CP in the "transmission source address" item of the queue selection table 121. That is, the table generation unit 31 stores the transmission address corresponding to the device D included in the unit group U set with the high priority cycle in the "transmission source address" item of the queue selection table 121.
[0149] For example, when a certain device Dp is connected to the PLC 1 (particularly the communication controller 10), the table generation unit 31 obtains the transmission source address of the device Dp. The table generation unit 31 refers to the various setting information 42, and determines that the device Dp is the device D1-1 and the unit group U including the device D1-1 is the unit group U1 based on the obtained transmission source address. In addition, the table generation unit 31 refers to the various setting information 42 to confirm that the "high priority period" is set for the unit group U1.
[0150] The table generation unit 31 stores the transmission address corresponding to the device D1 included in the unit group U1 in the “transmission source address” item of the queue selection table 121, that is, sets (generates) the queue selection table 121. For example, the table generation unit 31 stores the transmission address of the device Dp which is the device D1-1 in the “transmission source address” item of the queue selection table 121.
[0151] In the "destination address" and "frame type" of the queue selection table 121, a condition is set to determine "a device connected to the PLC 1 (especially the communication controller 10) in a communicable manner without passing through an industrial network." Examples of industrial networks include Ethernet Control Automation Technology (EtherCAT) (registered trademark) and Ethernet / Industrial Protocol (Ethernet / IP).
[0152] The table generation unit 31 refers to the various setting information 42 stored in the nonvolatile memory 40 to confirm whether there is a device "connecting to the PLC 1 (especially the communication controller 10) without passing through the industrial network". When there is a device "connecting to the PLC 1 without passing through the industrial network", the table generation unit 31 sets the conditions of the "destination address" and "frame type" of the queue selection table 121 so that the received data from the device meets the conditions.
[0153] The table generator 31 stores the queue selection table 121 generated by referring to the various setting information 42 stored in the nonvolatile memory 40 in the nonvolatile memory 40 and notifies the communication controller 10. The communication controller 10 (particularly the transmission control unit 12) acquires the queue selection table 121 generated by the table generator 31.
[0154] use Figure 5 The contents described in (B) can be summarized as follows. That is, the queue selection table 121 used by the communication controller 10 is generated using various setting information 42 including the configuration information of the network 3 and specified by the user for the network 3 .
[0155] According to the above configuration, the communication controller 10 selects the reception queue 13 storing the reception data based on the queue selection table 121 generated using various setting information 42 including the configuration information of the network 3 and specified by the user for the network 3 .
[0156] For example, the PLC 1 can confirm in the various setting information 42 whether there is a device D (a high priority device; for example, D1-1) whose necessity to maintain the communication cycle is set higher than that of other devices D among the devices D that periodically communicate with the device via the network 3. When a high priority device is specified in the various setting information 42, the PLC 1 generates or updates the queue selection table 121 in such a way that reception data for which the high priority device is set as the "sending source address" is stored in the reception queue 13 assigned a high priority level NP.
[0157] Similarly, in the various setting information 42, when the necessity of maintaining the communication cycle with a certain unit group U (device group) is set higher than that of other unit groups U, the PLC 1 can generate or update the queue selection table 121 as follows. That is, the PLC 1 can generate or update the queue selection table 121 in such a manner that the reception data of the device D included in the certain unit group U (for example, unit group U1) is set as the "sending source address" is stored in the first receiving queue 13 (0). In addition, the PLC 1 can also generate or update the queue selection table 121 in such a manner that the reception data of the device included in the other unit group U (for example, unit group U2) is set as the "sending source address" is stored in the second receiving queue 13 (1).
[0158] In addition, in the various setting information 42, when the communication priority CP of the communication with a certain destination address is set to be higher than the communication priority CP of the communication with other destination addresses, the PLC 1 may generate or update the queue selection table 121 as follows. That is, the PLC 1 may generate or update the queue selection table 121 in such a manner that the reception data with the certain destination address set as the "destination address" is stored in the first reception queue 13 (0). In addition, the PLC 1 may generate or update the queue selection table 121 in such a manner that the reception data with the other destination address set as the "destination address" is stored in the second reception queue 13 (1).
[0159] Furthermore, in the various setting information 42, when the processing priority P of the received data of a certain frame type is set to be higher than the processing priority P of the received data of other frame types, the PLC 1 may generate or update the queue selection table 121 as follows. That is, the PLC 1 may generate or update the queue selection table 121 in such a manner that the received data of the certain frame type is stored in the first receive queue 13(0). In addition, the PLC 1 may generate or update the queue selection table 121 in such a manner that the received data of the other frame types is stored in the second receive queue 13(1).
[0160] Therefore, the communication controller 10 has an effect of being able to appropriately select the reception queue 13 storing the reception data based on the queue selection table 121 generated without causing the user to rework.
[0161] (About various logs)
[0162] Figure 6 This is a diagram for explaining the start time log etc. generated by the communication controller 10 (particularly the log generating unit 16). Specifically, Figure 6 (A) is a diagram illustrating the reception start time and the transmission start time of the start time log. Figure 6 (B) shows an example of a storage destination of the start time log.
[0163] like Figure 6 As shown in (A), the log generation unit 16 generates a start time log for each data (each received data), wherein the start time log sets the reception start time, which is the time when reception from the network 3 is started, and the transmission start time, which is the time when transmission to the main memory 20 is started.
[0164] exist Figure 6 In the example shown in (A), PLC 1 (particularly communication controller 10) sequentially receives data D1, data D2, and data D3 from network 3. Particularly, PLC 1 starts receiving data D1 at reception start time T1-0 (D1), starts receiving data D2 at reception start time T1-0 (D2), and starts receiving data D3 at reception start time T0-0 (D3).
[0165] The communication controller 10 stores data D1 (processing priority P=2) and data D2 (processing priority P=2) in the second receiving queue 13 (1) (ie, RX1), and stores data D3 (processing priority P=1) in the first receiving queue 13 (0) (ie, RX0).
[0166] As a result, the time when data D1 (processing priority P=2) is transferred from RX1 to the main memory 20 becomes the transfer start time T1-1(D1). In addition, the time when data D2 (processing priority P=2) is transferred from RX1 to the main memory 20 becomes the transfer start time T1-1(D2). Furthermore, the time when data D3 (processing priority P=1) is transferred from RX0 to the main memory 20 becomes the transfer start time T0-1(D3). Figure 6 As shown in (A), the transmission start time T0-1 (D3) is before the transmission start time T1-1 (D2).
[0167] The log generation unit 16 generates a start time log that associates the reception start time T1-0 (D1) with the transmission start time T1-1 (D1), and generates a start time log that associates the reception start time T1-0 (D2) with the transmission start time T1-1 (D2). Furthermore, the log generation unit 16 generates a start time log that associates the reception start time T0-0 (D3) with the transmission start time T0-1 (D3).
[0168] By using the start time log generated by the log generating unit 16 , for example, the user can perform data tracking including the behavior in the communication controller 10 for each of the data D1 , the data D2 , and the data D3 .
[0169] In addition, Figure 6 In the example shown in (A), the communication controller 10 that receives data D1, data D2, and data D3 in sequence transfers the data D1, data D3, and data D2 to the main memory 20 in that order, that is, changes the transmission order according to the reception order.
[0170] Therefore, the communication controller 10 (particularly the log generation unit 16) increments the counter each time the transmission order is changed according to the reception order, and generates a log (order change log) which is an indicator of the occurrence of data conflict. Figure 6 In the example shown, the transmission order is changed "once" according to the reception order.
[0171] The log generation unit 16 further generates an end time log for each data (each received data), wherein the end time log sets the reception end time (the time when reception from the network 3 is completed) and the transmission end time (the time when transmission to the main memory 20 is completed) as a group. Figure 6 In the example shown, the log generation unit 16 generates a log in which the reception completion time of the data D1 received from the network 3 and the transmission completion time of the data D1 to the main memory 20 are set as the end time of the group. In addition, the log generation unit 16 generates a log in which the reception completion time of the data D2 received from the network 3 and the transmission completion time of the data D2 to the main memory 20 are set as the end time of the group. Furthermore, the log generation unit 16 generates a log in which the reception completion time of the data D3 received from the network 3 and the transmission completion time of the data D3 to the main memory 20 are set as the end time of the group.
[0172] For example, the log generating unit 16 calculates the reception end time and the transmission end time of the reception data using the reception start time and the transmission start time of the reception data and the data size of the reception data.
[0173] Here, PLC 1 retains records (logs) related to (1) the communication speed of communication with network 3 (i.e., network communication) and (2) the communication speed of communication between CPU 30 and communication controller 10 at startup and during operation. In addition, PLC 1 retains records (logs) related to the data size of each received data.
[0174] Therefore, the log generation unit 16 can calculate the time required from the start of receiving the received data to the completion (receiving action period) according to the communication speed of the network communication and the data size of the received data. Furthermore, the log generation unit 16 can calculate the reception end time of the received data by adding the calculated receiving action period to the reception start time of the received data.
[0175] In addition, the log generation unit 16 can calculate the time required from the start of transmission of the received data to the completion (transmission operation period) based on the communication speed of the communication between the CPU 30 and the communication controller 10 and the data size of the received data. Furthermore, the log generation unit 16 can calculate the transmission end time of the received data by adding the calculated transmission operation period to the transmission start time of the received data.
[0176] The log generation unit 16 generates an end time log that associates the calculated reception end time with the transmission end time. By using the end time log generated by the log generation unit 16, for example, the user can track data including the behavior in the communication controller 10 for each of the data D1, the data D2, and the data D3.
[0177] That is, the user can monitor the received data based on the logs (start time log, sequence change log, end time log) generated by the log generating unit 16 .
[0178] In addition, the example in which the communication controller 10 (particularly the log generation unit 16) generates the start time log, the sequence change log, and the end time log is described above, but the subject that generates the start time log, the sequence change log, and the end time log is not necessarily the communication controller 10. At least one of the start time log, the sequence change log, and the end time log can be generated by the CPU 30, and the start time log, the sequence change log, and the end time log can be generated by the PLC 1. For example, a structure in which the CPU 30 includes the log generation unit 16 can be adopted.
[0179] Figure 6 (B) is a diagram showing an example of a storage destination of logs (start time log, sequence change log, end time log) generated by the communication controller 10 (particularly the log generation unit 16). Figure 6As shown in (B) of FIG. 1 , the storage destination of the log generated by the log generating unit 16 may be a nonvolatile memory outside the communication controller 10 or a nonvolatile memory inside the communication controller 10 .
[0180] That is, the log generated by the log generation unit 16 may be stored in a non-volatile memory located outside the communication controller 10 and managed by the CPU 30. In addition, the log stored in the non-volatile memory located outside the communication controller 10 and managed by the CPU 30 may also be a log generated by the CPU 30 acquiring necessary data from the reception descriptor, that is, the CPU 30 may include the log generation unit 16.
[0181] In addition, the log generated by the log generating unit 16 may be stored in a nonvolatile memory included in the communication controller 10. That is, the log generating unit 16 may store the generated log in a nonvolatile memory included in the communication controller 10.
[0182] Furthermore, the log generated by the log generating unit 16 may be stored in a nonvolatile memory provided outside the communication controller 10. That is, the log generating unit 16 may store the generated log in a nonvolatile memory provided outside the communication controller 10.
[0183] use Figure 6 (in particular Figure 6 The contents described in (A)) can be summarized as follows. That is, the log generation unit 16 generates a start time log, which is a log that associates the time when the reception of received data from the network 3 is started, that is, the reception start time, with the time when the transmission of the received data to the main memory 20 is started, that is, the transmission start time.
[0184] According to the structure, the communication controller 10 generates a start time log, which is a log that associates the reception start time and the transmission start time of the received data. Therefore, the communication controller 10 has the following effect: data tracking of the received data including the behavior in the communication controller 10 can be performed based on the start time log.
[0185] Furthermore, the log generation unit 16 generates a sequence change log which is a log indicating the number of times that other received data received after a certain received data is transferred to the main memory 20 before the certain received data.
[0186] According to the above configuration, the communication controller 10 generates the order change log which is a log indicating the number of times that other reception data received after receiving a certain reception data is transferred to the main memory 20 before the certain reception data.
[0187] Therefore, the communication controller 10 has an effect of being able to use the order change log as an indicator indicating the occurrence of a data conflict in which "reception data received later than reception data received earlier is transferred to the main memory 20 first".
[0188] Furthermore, the log generation unit 16 generates an end time log which associates the reception end time when the reception of the received data from the network 3 is completed and the transmission end time when the transmission of the received data to the main memory 20 is completed.
[0189] According to the structure, the communication controller 10 generates an end time log, which is a log that associates the reception end time and the transmission end time of the received data. Therefore, the communication controller 10 has the following effect: data tracking of the received data including the behavior in the communication controller 10 can be performed based on the end time log.
[0190] Here, regarding the end time log, the reception end time can be calculated based on the reception start time, which is the time when the reception of the received data from the network 3 is started, the communication speed of the network 3, and the data size of the received data. In addition, the transmission end time can be calculated based on the transmission start time, which is the time when the transmission of the received data to the main memory 20 is started, the transmission speed to the main memory 20, and the data size of the received data.
[0191] According to the above configuration, the communication controller 10 calculates the reception end time and the transmission end time. Therefore, the communication controller 10 can fully monitor the communication of the received data using the reception start time, the transmission start time, the calculated reception end time, and the calculated transmission end time.
[0192] The logs (start time log, sequence change log, end time log) generated by the communication controller 10 (particularly the log generating unit 16 ) are stored in the nonvolatile memory 40 inside or outside the device.
[0193] According to the above structure, the communication controller 10 stores the start time log, the sequence change log, and the end time log in the non-volatile memory 40 inside or outside the device. Therefore, the communication controller 10 has the following effect: the start time log, the sequence change log, and the end time log can be appropriately stored in the non-volatile memory 40 inside or outside the device, so that each log can be easily used.
[0194] §3. Action Examples
[0195] If used Figure 1As described in the above, the communication controller 10 includes a plurality of receiving queues 13 to which different priority levels NP are pre-assigned. Furthermore, the communication controller 10 uses at least one of the "source address", "destination address" and "type of Ethernet frame" of the received data and selects the receiving queue 13 storing the received data according to the queue selection table 121. Figures 7 to 10 The details of the processing executed by the PLC 1 (particularly the communication controller 10) will be described.
[0196] (Overall outline of processing performed by PLC)
[0197] Figure 7 1 is a flowchart showing the overall outline of the processing performed by the PLC 1. Figure 7 As shown in the example, first, the CPU 30 pre-sets the queue selection table 121 of the communication controller 10 (S10). Then, the CPU 30 sets (stores) the reception descriptor (i.e., descriptor data) in the main memory 20 (S20). In addition, the CPU 30 notifies the communication controller 10 of the completion of the setting of the reception descriptor and the reception permission (S30).
[0198] When receiving the notification from the CPU 30 in S30 , the communication controller 10 reads the reception descriptor stored in the main memory 20 into the communication controller itself ( S40 ), that is, stores it in the descriptor FIFO 132 of the reception queue 13 .
[0199] The communication controller 10 (particularly the transmission control unit 12) determines whether the start of reception is detected (S50), and waits until the start of reception is detected while the start of reception is not detected (No in S50). When the start of reception is detected (Yes in S50), the transmission control unit 12 (particularly the selection unit 122) performs "queue selection processing" (S60) to select the reception queue 13 in which the received data (received data) is to be stored.
[0200] The storage unit 123 stores the received data in the data FIFO 131 of the reception queue 13 selected by the selection unit 122 in S60 , and the reception queue 13 transfers the received data stored in the data FIFO 131 to the main memory 20 ( S70 , transfer process).
[0201] (Queue selection process details)
[0202] Figure 8 Yes Figure 7 This is a flowchart for explaining a detailed example of the queue selection process (S60) in FIG. 1 , that is, a flowchart showing an example of the queue selection process executed by the transmission control unit 12 (particularly the selection unit 122).
[0203] like Figure 8 As shown, first, the selection unit 122 obtains various information from the header part (receive header) of the received data, specifically, obtains at least one of the "source address, destination address, and Ethernet frame type" of the received data (S610).
[0204] The selection unit 122 sets "1" at "condition number variable Num" (S620). The selection unit 122 acquires data (ie, condition) corresponding to "condition = condition number variable Num" from the queue selection table 121 (S630).
[0205] For example, when "condition number variable Num = 1", the selection unit 122 obtains the condition corresponding to "condition 1" from the queue selection table 121. Figure 5 , the condition "source address = addr_txa" is obtained. Similarly, when "condition number variable Num = 2", the selection unit 122 obtains the condition corresponding to "condition 2" from the queue selection table 121. If the queue selection table 121 is Figure 5 In the example of (A), the condition of "source address = addr_txb" is obtained. In addition, when "condition number variable Num = n", the selection unit 122 obtains the condition corresponding to "condition n" from the queue selection table 121. If the queue selection table 121 is Figure 5 The following conditions are obtained based on the content illustrated in (A) of FIG. 1. That is, the selection unit 122 obtains the “condition n” that “the destination address is multicast (addr_rxa)” and “the frame type is !IPv4 (ie, other than IPv4)”.
[0206] The selection unit 122 determines whether at least one of “the transmission source address, the destination address, and the type of Ethernet frame” of the received data matches the condition acquired in S630 (that is, whether the condition is satisfied) ( S640 ).
[0207] If it is determined in S640 that the condition is met (YES in S640 ), the selection unit 122 selects RX0 ( S650 ), that is, selects the first reception queue 13 ( 0 ) (particularly the first data FIFO 131 ( 0 )) as the storage destination of the received data.
[0208] If it is determined that the condition is not consistent in S640 (No in S640), the selection unit 122 determines whether the condition number variable Num is consistent with the condition number: n (S670). That is, the selection unit 122 determines whether the determination in S640 has been performed for all conditions from condition 1 to condition n specified in the queue selection table 121.
[0209] When "the condition number variable Num matches the condition number: n (i.e., the determination of S640 is performed for all conditions specified in the queue selection table 121)" (YES in S670), the selection unit 122 selects RX1 (S680). In other words, when it is determined that "the received data does not satisfy any of the conditions specified in the queue selection table 121", the selection unit 122 selects the second receive queue 13 (1) (particularly the second data FIFO 131 (1)) as the storage destination of the received data.
[0210] If "the condition number variable Num does not match the condition number: n" (No in S670), the selection unit 122 executes "condition number variable Num = condition number variable Num + 1" (S660). That is, if "there are conditions that have not been determined in S640 among the conditions specified in the queue selection table 121", the selection unit 122 sets "condition number variable Num + 1 (a value obtained by adding 1 to the condition number variable Num)" to the "condition number variable Num". Then, the selection unit 122 executes the processing after S630 again.
[0211] (Details of the transfer process)
[0212] Fig. 9 Yes Figure 7 1. The flowchart for explaining a detailed example of the transmission process (S70) in S60 is a flowchart showing an example of the transmission process of the received data executed by the storage unit 123, the reception queue 13 selected by the selection unit 122 in S60, and the arbitration unit 14.
[0213] like Fig. 9 As shown, first, the storage unit 123 stores the received data in the data FIFO 131 of the receive queue 13 selected by the selection unit 122 in S60 (S710). For example, when the first receive queue 13(0) (i.e., RX0) is selected by the selection unit 122 in S60, the storage unit 123 stores the received data in the first data FIFO 131(0) of the first receive queue 13(0). Similarly, for example, when the second receive queue 13(1) (i.e., RX1) is selected by the selection unit 122 in S60, the storage unit 123 stores the received data in the second data FIFO 131(1) of the second receive queue 13(1).
[0214] The receiving queue 13 performs a check (S720) for confirming that the received data stored in the data FIFO 131 is normal data, such as data size and error field, for the received data stored in the data FIFO 131. Then, the receiving queue 13 determines whether there is an abnormality in the received data stored in the data FIFO 131 (S730).
[0215] When the reception queue 13 determines that the reception data stored in the data FIFO 131 is “abnormal” (NO in S730 ), the reception queue 13 discards the reception data stored in the data FIFO 131 ( S750 ), and ends the process.
[0216] When the receive queue 13 determines that the receive data stored in the data FIFO 131 is "normal" (YES in S730), the receive descriptor FIFO 132 is referenced to obtain the receive descriptor (S740). For example, when the first receive queue 13 (0) (i.e., RX0) is selected by the selection unit 122 in S60, the first receive queue 13 (0) obtains the receive descriptor stored at the beginning of the first descriptor FIFO 132 (0). Similarly, when the second receive queue 13 (1) (i.e., RX1) is selected by the selection unit 122 in S60, the second receive queue 13 (1) obtains the receive descriptor stored at the beginning of the second descriptor FIFO 132 (1).
[0217] The receive queue 13 sets the address (storage destination address in the main memory 20) and the receive data size specified in the received receive descriptor in the DMAC 133 (S760). For example, when the first receive queue 13 (0) (i.e., RX0) is selected by the selection unit 122 in S60, the first receive queue 13 (0) sets the address and data size specified in the receive descriptor obtained in S740 in the first DMAC 133 (0). Similarly, when the second receive queue 13 (1) (i.e., RX1) is selected by the selection unit 122 in S60, the second receive queue 13 (1) sets the address and data size specified in the receive descriptor obtained in S740 in the second DMAC 133 (1).
[0218] The DMAC 133 and the coordination unit 14 that have performed the setting in S760 perform coordination processing and storage processing (S770). When the coordination processing and storage processing performed by the DMAC 133 and the coordination unit 14 are completed, the reception queue 13 creates a write-back descriptor in which the end bit and log data are set (S780). Then, the reception queue 13 sets the content specified by the created write-back descriptor in the DMAC 133 again.
[0219] The DMAC 133 and the arbitration unit 14 that set the content specified by the write-back descriptor execute the arbitration process and the storage process again (S790). When the arbitration process and the storage process of S790 are completed, the reception queue 13 issues an interrupt notification of the end of the transfer to the CPU 30 (S800).
[0220] use Figure 7 , Figure 8 and Fig. 9 The contents described above can be summarized as follows. That is, the control method executed by the communication controller 10 is a control method for a communication control device that stores the received data received from the network 3 in any one of a plurality of receiving queues 13 that are pre-assigned with different priority levels NP in order to transmit the received data to the main memory 20. The control method executed by the communication controller 10 includes a queue selection process (selection process, Figure 7 S60) and a storage step (S61) of storing the received data in the receiving queue 13 selected by the selection step. Figure 7 The S70, in particular Fig. 9 S710).
[0221] In the selection process, a reception queue 13 for storing received data is selected from a plurality of reception queues 13 according to the queue selection table 121 (reference table). In particular, in the selection process, at least one of the "source address", "destination address", and "type of Ethernet frame" of the received data is used to select the reception queue 13 for storing the received data. As described above, in the queue selection table 121, at least one of the "source address", "destination address", and "type of Ethernet frame" of the received data to be stored is specified for at least one of the plurality of reception queues 13.
[0222] According to the above configuration, in the control method executed by the communication controller 10, at least one of the "source address", "destination address" and "Ethernet frame type" of the received data is used to select the reception queue 13 storing the received data.
[0223] Here, the “source address”, “destination address”, and “Ethernet frame type” are all information originally possessed by the received data, and are not information newly given for selecting the receive queue 13 in which the received data is to be stored.
[0224] Therefore, the control method has an effect of being able to store reception data in a desired reception queue 13 selected from a plurality of reception queues 13 to which different priority levels NP are assigned in advance, without using additional information indicating the processing priority level P.
[0225] (Details of coordination and storage processing)
[0226] Fig.10 Yes Fig. 9 14. Specifically, it is a flowchart for explaining a detailed example of the arbitration process and the storage process (S770 and S790) in the arbitration unit 14. Specifically, it is a flowchart showing an example of the arbitration process executed by the arbitration unit 14 and the storage process executed by the DMAC 133.
[0227] like Fig.10 As shown in the example, the DMAC 133 having set the contents specified in the descriptor issues an access request to the arbitration unit 14 (S771). Then, the DMAC 133 determines whether the arbitration unit 14 permits access (S772). If the arbitration unit 14 does not permit access (No in S772), the DMAC 133 waits until the arbitration unit 14 permits access.
[0228] When the access is permitted by the arbitration unit 14 (YES in S772), the DMAC 133 stores the data in the main memory 20 according to the content specified in the descriptor (S773). For example, the DMAC 133 stores the received data stored in the data FIFO 131 in the specified address of the main memory 20 according to the content specified in the receive descriptor, that is, transfers the received data to the main memory 20. In addition, for example, the DMAC 133 stores the updated receive descriptor with the additional information added in the write-back area of the main memory 20 according to the content specified in the write-back descriptor. The DMAC 133 may also rewrite the content of the descriptor data stored in the main memory 20 with the content of the updated receive descriptor according to the content specified in the write-back descriptor. The additional information included in the updated receive descriptor may, for example, indicate at least one of the size of the received data written to the address specified by the receive descriptor and a completion determination flag indicating that the writing of the data is completed.
[0229] Then, the DMAC 133 determines whether the storage of all the data to be stored in the main memory 20 to the main memory 20 has been completed (S774). When the storage of all the data to be stored in the main memory 20 to the main memory 20 has been completed (YES in S774), the DMAC 133 ends the processing. When the storage of all the data to be stored in the main memory 20 to the main memory 20 has not been completed (NO in S774), the processing after S771 is performed on the data that has not been completed to the main memory 20.
[0230] §4. Variations
[0231] (About network configuration example)
[0232] exist Figure 2In the control system 0 illustrated in the example, a plurality of networks 3 are connected to the PLC 1 via the network hub 2. However, in the control system 0, one network 3 may be connected to the PLC 1 without passing through the network hub 2, for example, the PLC 1 and one or more network devices may be connected in a one-stroke manner and in a manner capable of communicating with each other.
[0233] (Regarding various log generation processes and log storage locations)
[0234] exist Figure 1 , the communication controller 10 includes the log generation unit 16 as a functional block, but the component including the log generation unit 16 as a functional block may also be the CPU 30. That is, the CPU 30 may also generate various logs such as the start time log, the sequence change log, and the end time log.
[0235] In addition, Figure 1 2 shows an example in which various logs such as a start time log, a sequence change log, and an end time log are stored in a nonvolatile memory 40 outside the communication controller 10. However, it is not necessary to store these various logs in a nonvolatile memory outside the communication controller 10. A nonvolatile memory may be provided inside the communication controller 10, and at least one of these various logs may be stored in the nonvolatile memory inside the communication controller 10.
[0236] (Notes)
[0237] A communication control machine according to one embodiment of the present invention is a communication control machine that stores received data received from a network in any one of a plurality of receiving queues that are pre-assigned with different priority levels in order to transmit the received data to a main memory, and includes: a reference table that specifies, for at least one of the plurality of receiving queues, at least one of a source address, a destination address, and a type of Ethernet frame of the received data to be stored; and a selection unit that uses at least one of the source address, the destination address, and the type of Ethernet frame of the received data and selects a receiving queue for storing the received data from the plurality of receiving queues based on the reference table.
[0238] According to the above configuration, the communication control device selects a reception queue for storing the reception data from among the plurality of reception queues using at least one of a transmission source address, a destination address, and an Ethernet frame type of the reception data.
[0239] Here, the transmission source address, the destination address, and the type of Ethernet frame are all information originally possessed by the received data, and are not information newly assigned for selecting a receive queue in which the received data is to be stored.
[0240] Therefore, the communication control device has an effect of being able to store the reception data in a desired reception queue selected from the plurality of reception queues to which different priority levels are assigned in advance, without using additional information indicating a processing priority.
[0241] The communication control machine of one embodiment of the present invention can generate a start time log, which is a log that establishes an association between the time when the reception of the received data from the network starts, i.e., the reception start time, and the time when the transmission of the received data to the main memory starts, i.e., the transmission start time.
[0242] According to the structure, the communication control device generates a start time log, which is a log that associates the reception start time and the transmission start time of the received data. Therefore, the communication control device has the following effect: data tracking of the received data including the behavior in the communication control device can be performed based on the start time log.
[0243] The communication control device of one embodiment of the present invention may generate a sequence change log, which is a log indicating the number of times that other received data received after a certain received data is transferred to the main memory before the certain received data.
[0244] According to the above configuration, the communication control device generates the order change log, which is a log indicating the number of times that other reception data received after receiving a certain reception data is transferred to the main memory before the certain reception data.
[0245] Therefore, the communication control device has an effect of being able to use the order change log as an indicator indicating the occurrence of a data conflict in which "the reception data received later than the reception data received earlier is transferred to the main memory first".
[0246] The communication control machine of one embodiment of the present invention can also generate an end time log, which is a log that establishes an association between the moment when the reception of the received data from the network is completed, i.e., the reception end time, and the moment when the transmission of the received data to the main memory is completed, i.e., the transmission end time.
[0247] According to the structure, the communication control device generates an end time log, which is a log that associates the reception end time of the received data with the transmission end time. Therefore, the communication control device has the following effect: data tracking of the received data including the behavior within the communication control device can be performed based on the end time log.
[0248] Regarding the communication control machine of one embodiment of the present invention, the reception end time can be calculated based on the time when the reception of the reception data from the network starts, i.e., the reception start time, the communication speed of the network and the data size of the reception data, and the transmission end time can be calculated based on the time when the transmission of the reception data to the main memory starts, i.e., the transmission start time, the transmission speed to the main memory and the data size of the reception data.
[0249] According to the structure, the communication control device calculates the reception end time and the transmission end time. Therefore, the communication control device has the following effect: the communication of the received data can be fully monitored using the reception start time, the transmission start time, the calculated reception end time, and the calculated transmission end time.
[0250] In the communication control device of one embodiment of the present invention, the selection unit may select a reception queue storing the reception data from among the plurality of reception queues based on the reference table using only a transmission source address of the reception data.
[0251] According to the configuration, the communication control device selects a receiving queue for storing the received data from among the plurality of receiving queues based on the reference table using only the sending source address of the received data. Therefore, the communication control device has the following effect: the received data can be stored in a desired receiving queue selected from among the plurality of receiving queues to which different priorities are pre-assigned only by the sending source address of the received data.
[0252] In the communication control device according to one embodiment of the present invention, the reference table may be generated using various setting information including configuration information of the network and specified by a user for the network.
[0253] According to the above configuration, the communication control device selects the reception queue storing the reception data based on the reference table generated using various setting information for the network that is defined by the user and includes the configuration information of the network.
[0254] For example, the control device including the communication control device can confirm in the various setting information whether there is a device (high priority device) whose necessity to maintain the communication cycle is set higher than that of other devices among the devices that periodically communicate with the device via the network. When the high priority device is specified in the various setting information, the control device generates or updates the reference table in such a way that the reception data with the high priority device as the transmission source address is stored in the reception queue assigned a high priority level.
[0255] Similarly, in the various setting information, when the necessity of maintaining the communication cycle with a certain device group is set higher than that of other device groups, the control device may generate or update the reference table as follows. That is, the control device may generate or update the reference table in such a manner that the received data with the devices included in the certain device group as the transmission source address is stored in the first reception queue assigned a higher priority than the second reception queue. In addition, the control device may generate or update the reference table in such a manner that the received data with the devices included in the other device groups as the transmission source address is stored in the second reception queue assigned a lower priority than the first reception queue.
[0256] Furthermore, in the various setting information, when the communication priority of communication with a certain destination address is set higher than the communication priority of communication with other destination addresses, the control device may generate or update the reference table as follows. That is, the control device may generate or update the reference table in such a manner that the reception data with the certain destination address as the destination address is stored in the first reception queue assigned a higher priority than the second reception queue. Furthermore, the control device may generate or update the reference table in such a manner that the reception data with the other destination address as the destination address is stored in the second reception queue assigned a lower priority than the first reception queue.
[0257] Furthermore, in the various setting information, when the processing priority of received data of a certain frame type is set higher than the processing priority of received data of other frame types, the control device may generate or update the reference table as follows. That is, the control device may generate or update the reference table in such a manner that the received data of the certain frame type is stored in a first receiving queue assigned a higher priority than a second receiving queue. In addition, the control device may generate or update the reference table in such a manner that the received data of the other frame types is stored in a second receiving queue assigned a lower priority than the first receiving queue.
[0258] Therefore, the communication control device has an effect of being able to appropriately select a reception queue for storing the reception data based on the reference table generated without causing the user to rework.
[0259] Regarding the communication control device of one embodiment of the present invention, the start time log can be stored in a non-volatile memory inside or outside the device.
[0260] According to the structure, the communication control device stores the start time log in a non-volatile memory inside or outside the device. Therefore, the communication control device has the following effect: the start time log can be appropriately stored in a non-volatile memory inside or outside the device so that the start time log can be easily used.
[0261] A control method according to an embodiment of the present invention is a control method for a communication control machine that stores received data from a network in any one of a plurality of receive queues that are pre-assigned with different priority levels in order to transmit the received data to a main memory, and includes: a selection process, based on a reference table that specifies at least one of a source address, a destination address, and a type of Ethernet frame of the received data to be stored for at least one of the plurality of receive queues, and using at least one of the source address, the destination address, and the type of Ethernet frame of the received data to select a receive queue from the plurality of receive queues that stores the received data; and a storage process, storing the received data in the receive queue selected by the selection process.
[0262] According to the above configuration, the control method selects a reception queue storing the reception data from among the plurality of reception queues using at least one of a transmission source address, a destination address, and a type of Ethernet frame of the reception data.
[0263] Here, the transmission source address, the destination address, and the type of Ethernet frame are all information originally possessed by the received data, and are not information newly assigned for selecting a receive queue in which the received data is to be stored.
[0264] Therefore, the control method has an effect that the reception data can be stored in a desired reception queue selected from the plurality of reception queues to which different priority levels are assigned in advance, without using additional information indicating a processing priority.
[0265] The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims. Embodiments obtained by appropriately combining technical means disclosed in different embodiments are also included in the technical scope of the present invention.
Claims
1. A communication control device that stores reception data received from a network in any one of a plurality of reception queues to which different priorities are assigned in advance for transmission to a main memory, and the communication control device comprises: a reference table that specifies, for at least one of the plurality of receiving queues, at least one of a transmission source address, a destination address, and a type of Ethernet frame of the received data to be stored; as well as a selection unit that uses at least one of a source address, a destination address, and a type of Ethernet frame of the received data and selects a receiving queue that stores the received data from among the plurality of receiving queues based on the reference table; A sequence change log is generated, wherein the sequence change log is a log indicating the number of times other received data received after receiving the certain received data is transferred to the main memory before the certain received data.
2. The communication control device according to claim 1, generating a start time log, The start time log is a log that associates the reception start time, which is the time when the reception of the reception data from the network starts, with the transmission start time, which is the time when the transmission of the reception data to the main memory starts.
3. The communication control device according to claim 1 or 2, generating an end time log, The end time log is a log that associates a reception end time, which is a time when the reception of the reception data from the network is completed, with a transmission end time, which is a time when the transmission of the reception data to the main memory is completed.
4. The communication control device according to claim 3, wherein: The reception end time is calculated based on the reception start time, which is the time when the reception data starts to be received from the network, the communication speed of the network, and the data size of the reception data. The transfer end time is calculated based on the transfer start time, which is the time when the received data starts to be transferred to the main memory, the transfer speed to the main memory, and the data size of the received data.
5. The communication control device according to claim 1 or 2, wherein: The selection unit selects a reception queue storing the reception data from among the plurality of reception queues based on the reference table using only the transmission source address of the reception data.
6. The communication control device according to claim 1 or 2, wherein: The reference table is generated using various setting information including configuration information of the network and specified by a user for the network.
7. The communication control device according to claim 2, wherein: The start time log is stored in a non-volatile memory inside or outside the device.
8. A method for controlling a communication control device, wherein the communication control device stores reception data received from a network in any one of a plurality of reception queues to which different priority levels are assigned in advance for transmission to a main memory, and the control method comprises: A selecting step, based on a reference table that defines at least one of a source address, a destination address, and a type of Ethernet frame of the received data to be stored for at least one of the plurality of receiving queues, and using at least one of the source address, the destination address, and the type of Ethernet frame of the received data to select a receiving queue for storing the received data from the plurality of receiving queues; as well as a storing step of storing the received data in the receiving queue selected by the selecting step, A sequence change log is generated, wherein the sequence change log is a log indicating the number of times other received data received after receiving the certain received data is transferred to the main memory before the certain received data.