WO2022049801A1 - Dispositif de commande de communication et procédé de commande pour dispositif de commande de communication - Google Patents

Dispositif de commande de communication et procédé de commande pour dispositif de commande de communication Download PDF

Info

Publication number
WO2022049801A1
WO2022049801A1 PCT/JP2021/006542 JP2021006542W WO2022049801A1 WO 2022049801 A1 WO2022049801 A1 WO 2022049801A1 JP 2021006542 W JP2021006542 W JP 2021006542W WO 2022049801 A1 WO2022049801 A1 WO 2022049801A1
Authority
WO
WIPO (PCT)
Prior art keywords
descriptor
data
control device
communication control
start address
Prior art date
Application number
PCT/JP2021/006542
Other languages
English (en)
Japanese (ja)
Inventor
俊規 玉井
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2022049801A1 publication Critical patent/WO2022049801A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/111Switch interfaces, e.g. port details

Definitions

  • the present invention relates to a communication control device or the like that transfers data received from a network to a main memory.
  • Patent Document 1 discloses a DMA circuit that confirms whether or not a descriptor is correct when reading a descriptor and determines whether or not DMA transfer of memory data is possible. If the DMA circuit determines that the descriptor is incorrect, the DMA circuit notifies the CPU of an error without performing DMA transfer. Then, after the appropriate setting is made by the CPU notified of the error, the DMA circuit executes the transfer.
  • the above-mentioned conventional technology has a problem that the data reception process of "transferring the received data to the main memory according to the descriptor" cannot be executed at high speed.
  • the above-mentioned conventional technique it is difficult to complete the data reception process that should be periodically executed in a high-speed control cycle (for example, 100 ⁇ s) within the control cycle.
  • a high-speed control cycle for example, 100 ⁇ s
  • FIG. 8 shows from the time when the communication control device that transfers data to the main memory according to the descriptor in the above-mentioned conventional technique determines whether or not the descriptor is allowed or rejected, until the data is transferred to the main memory. It is a figure explaining the time required for this.
  • the communication control device when the communication control device detects an error in the descriptor, the communication control device notifies the CPU of the detection result. Upon receiving the above notification, the CPU resets the descriptor. Then, according to the descriptor reset by the CPU, the communication control device transfers the data to the main memory.
  • the communication control device must wait until the descriptor reset processing by the CPU (software) is completed, and after detecting the descriptor error, the data It takes a long time to transfer to the main memory.
  • a communication control device stores the received data in a buffer (for example, FIFO (First In First Out) method) which is a temporary storage area from the time when the data is received until the time when the data is transferred to the main memory. It is stored in the data FIFO) which is an area. Then, the communication control device transfers the data stored in the buffer to the main memory according to the descriptor.
  • a buffer for example, FIFO (First In First Out) method
  • FIFO First In First Out
  • the communication control device transfers the data stored in the buffer to the main memory according to the descriptor.
  • the storage capacity of the buffer provided in the communication control device is usually limited. Further, in principle, the communication control device once stores the data in the buffer and then keeps the data in the buffer until the transfer of the data to the main memory is completed.
  • the communication control device receives the data 1 and then further receives the data 2 and the data 3, and the received data 1, the data 2, and the data 3 To the buffer. Then, the communication control device keeps storing the data 1 in the buffer until the transfer of the data 1 to the main memory is completed, that is, until the descriptor reset processing by the CPU (software) is completed.
  • the buffer since the storage capacity of the buffer is limited, the buffer storing the data 1, the data 2, and the data 3 received by the communication control device cannot afford to store new data.
  • the communication control device when the communication control device further receives the data 4 by the time the descriptor reset processing by the software is completed and the transfer of the data 1 to the main memory is completed, the communication control device buffers the data 4. Cannot be stored in. Therefore, the communication control device cannot transfer the received data 4 to the main memory, and the data 4 is lost.
  • the conventional technique of "when a descriptor error is detected, the detection result is notified to the CPU and the data is transferred to the main memory according to the descriptor reset by the CPU” is included in the prior art.
  • the conventional technique has a problem that the time required for data transfer becomes long, and as a result of the long time required for data transfer, the received data is lost (that is, it cannot be transferred to the main memory).
  • the received data is lost (that is, it cannot be transferred to the main memory).
  • One aspect of the present invention is to realize a communication control device capable of transferring data received from a network to a main memory at high speed while preventing erroneous data transfer by a descriptor.
  • the communication control device is a communication control device that transfers data received from the network to the main memory, and is a start address of an area in which the data should be stored.
  • a permission area in which the reading unit for reading the descriptor and the start address specified in the descriptor read by the reading unit are preset areas in the main memory as areas in which the data can be stored. If it is inside, the determination unit for determining that the descriptor read by the reading unit is available, and the area having the start address specified in the descriptor read by the reading unit as the start address.
  • a transfer unit for transferring the data, and a plurality of the descriptors are prepared in advance, and the transfer unit is (A) the first of the plurality of descriptors prepared in advance, which is read by the reading unit.
  • the data is transferred to an area having the start address specified in the first descriptor as a start address, and (B) the first descriptor.
  • the start address specified in the second descriptor read by the reading unit after the first descriptor among the plurality of descriptors prepared in advance is assigned. The data is transferred to the area to be the start address.
  • the control method is a control method for a communication control device that transfers data received from a network to a main memory, and is an area for storing the data.
  • the determination step of determining that the descriptor read in the read step is available, and the start address specified in the descriptor read in the read step are headed.
  • the area to be an address includes a transfer step for transferring the data, and a plurality of the descriptors are prepared in advance.
  • the transfer step is (A) in the read step among the plurality of descriptors prepared in advance. When it is determined that the first descriptor read in the above is available in the determination step, the data is transferred to an area having the start address specified in the first descriptor as a start address. (B) When it is determined that the first descriptor is not available in the determination step, the second descriptor read after the first descriptor in the read step among the plurality of descriptors prepared in advance. The data is transferred to an area having the start address specified in 1.
  • the present invention it is possible to transfer the data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
  • the communication control device 10 provided in the PLC (Programmable Logic Controller) 1 that controls the control target of a machine, equipment, or the like is a typical "communication control device that transfers data received from the network to the main memory".
  • PLC Protein Logic Controller
  • FIG. 2 is a diagram showing an outline of control system 0 including PLC1.
  • the control system 0 includes a PLC 1, a network hub 2, and networks 3 (1) and 3 (2), each of which is connected to the PLC 1 via the network hub 2.
  • networks 3 (1) and 3 (2) each of which is connected to the PLC 1 via the network hub 2.
  • network 3 includes one or more network devices.
  • control system 0 illustrated in FIG. 2, a plurality of networks 3 are connected to the PLC 1 via the network hub 2.
  • a giga band may be used for communication in control system 0.
  • the PLC1 is a control device that controls the entire control system 0.
  • the network hub 2 is a network hub or network switch that manages communication between the PLC 1 and the plurality of networks 3.
  • a plurality of networks 3 for example, networks 3 (1) and 3 (2), are used for one network port of PLC1 (that is, the receiving port 130 of FIG. 1). Existing.
  • any of the networks 3 (1) and 3 (2) may be a control network, that is, all the networks 3 communicating with the PLC 1 may be a control network. Further, either one of the networks 3 (1) and 3 (2) may be a control network and the other may be a data network. That is, with respect to the network 3 communicating with the PLC 1, the control network and the data network may be used. It may be mixed.
  • the PLC 1 is a control device that controls the input device and the output device in the production facility, and the network device is, for example, an input device and an output device in the production facility.
  • the PLC1 and the network device transmit and receive IN data and OUT data (hereinafter referred to as "IO data") by cyclically communicating with each other via the network 3, and the PLC1 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 PLC1 is a master device (master device that manages data transmission) and the network device is a slave device.
  • the network 3 When the network 3 is a control network, the network 3 may conform to an Industrial Ethernet (registered trademark) standard such as an EtherCAT (Ethernet for Control Automation Technology: registered trademark) standard. If the network 3 is a control network, the network 3 may be compliant with the EtherNet / IP® standard.
  • an Industrial Ethernet registered trademark
  • EtherCAT Ethernet for Control Automation Technology: registered trademark
  • network communication communication between PLC1 and a network device in FIG. 2
  • network communication also referred to as “network communication”
  • PCIe Peripheral Component Interconnect Express
  • FIG. 2 illustrates a control system 0 in which a plurality of networks 3 are connected to the PLC 1 via the network hub 2.
  • the plurality of networks 3 are connected to the PLC 1 via the network hub 2. It is not essential to connect with.
  • one network 3 (particularly one control network) may be connected to the PLC 1 without going through the network hub 2.
  • the PLC1 which is a master device and one or more network devices, each of which is a slave device, may be communicably connected in a one-stroke format.
  • the PLC1 exemplified in FIG. 2 is a communication control device 10 that executes data reception processing, a main memory 20 that is a storage means of the PLC1, and data transferred to the main memory 20. It includes a CPU 30 that executes various processes using Dt.
  • various data Dt received from the network 3 every control cycle Cc (for example, 100 ⁇ s) are transferred to the main memory 20 as follows, for example. That is, first, the CPU 30 sets the descriptor Dc that defines the start address As of the "area in the main memory 20 that should store the data Dt received by the PLC 1 from the network 3" in the main memory 20. For example, the CPU 30 sets the normal descriptor Dco in the main memory 20 each time the PLC1 tries to receive the data Dt (for example, every control cycle Cc) before receiving the data Dt.
  • the communication control device 10 notified by the CPU 30 that the setting of the normal descriptor Dco is completed refers to the main memory 20 according to the notification, and reads the normal descriptor Dco set by the CPU 30. Specifically, the communication control device 10 stores the normal descriptor Dco set in the main memory 20 by the CPU 30 in the first descriptor FIFO 125.
  • the first descriptor FIFO 125 is a storage area for storing a normal descriptor Dco, and is, for example, a storage area of a FIFO (First In First Out) method.
  • the communication control device 10 executes the data reception process. That is, the communication control device 10 first stores the data Dt received by the PLC 1 from the network 3 in the data FIFA 127.
  • the data FIFO 127 is a buffer (storage area) for temporarily storing data Dt, and is, for example, a storage area of the FIFO method.
  • the communication control device 10 transfers the data Dt stored in the data FIFA 127 to the main memory 20 according to the descriptor Dc, and for example, transfers the data Dt to the main memory 20 according to the normal descriptor Dco stored in the first descriptor FIFA 125. Specifically, the communication control device 10 transfers the data Dt to an area in the main memory 20 having the start address As defined in the descriptor Dc as the start address.
  • the communication control device 10 uses the following information to change the descriptor Dc in the main memory 20 corresponding to the descriptor Dc used for transferring the data Dt to the main memory 20.
  • Update That is, the communication control device 10 is updated by "information indicating the data size of the data Dt transferred to the main memory 20" and "information indicating that the data Dt has been used for the transfer". Therefore, the descriptor Dc in the main memory 20 corresponding to the descriptor Dc used for transferring the data Dt to the main memory 20 has “information indicating the data size of the data Dt" and “used for data transfer". "Information indicating that" is added.
  • the communication control device 10 allows or rejects the normal descriptor Dco before transferring according to the normal descriptor Dco so that a situation such as loss of data Dt does not occur by using the normal descriptor Dco that specifies an erroneous start address As. Is determined.
  • the communication control device 10 is used when transferring the data Dt to the main memory by using the standard reception area Rgo preset as the “area where the transfer of the data Dt is permitted”. Normally, the permission or disapproval of the descriptor Dco is determined. For example, the communication control device 10 acquires the start address of the standard reception area Rgo and the data size of the standard reception area Rgo in advance, and uses the acquired start address of the standard reception area Rgo and the data size of the standard reception area Rgo. , The standard reception area Rgo is calculated (set).
  • the communication control device 10 determines whether or not the start address As defined in the normal descriptor Dco is within the standard reception area Rgo (first determination process FJ). Further, the communication control device 10 calculates the end address Ae of the "region after transfer when the data Dt is transferred" from the data size of the data Dt and the start address As defined in the normal descriptor Dco. Then, the communication control device 10 determines whether or not the calculated end address Ae is within the standard reception area Rgo (second determination process SJ).
  • the communication control device 10 can use its normal descriptor Dco for data Dt transfer. Determined as "available descriptor". If at least one of the start address As and the end address Ae is not in the standard reception area Rgo, the communication control device 10 determines that the normal descriptor Dco is an "unusable descriptor" that cannot be used for transferring data Dt. ..
  • the communication control device 10 first executes the above-mentioned determination for the certain normal descriptor Dco (X), that is, determines whether or not the certain normal descriptor Dco (X) is appropriate.
  • the communication control device 10 determines that the certain normal descriptor Dco (X) is an "available descriptor"
  • the communication control device 10 executes the transfer of the data Dt to the main memory 20 according to the normal descriptor Dco (X).
  • the communication control device 10 determines that the certain normal descriptor Dco (X) is an "unusable descriptor"
  • the communication control device 10 executes the following processing. That is, the communication control device 10 does not notify the CPU 30 of the determination result that the certain normal descriptor Dco (X) is an "unusable descriptor", and another descriptor Dc (Y) prepared in advance. ), The data Dt is transferred.
  • the communication control device 10 has, in addition to one normal descriptor Dco (X), another descriptor Dc (Y) in case the certain normal descriptor Dco (X) is an "unusable descriptor". Is prepared in advance.
  • the communication control device 10 prepares another normal descriptor Dco (Y) in advance in addition to a certain normal descriptor Dco (X). Then, when the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor", the communication control device 10 uses another normal descriptor Dco (Y) determined to be an "usable descriptor" to perform data. Perform Dt transfer.
  • the communication control device 10 prepares in advance a plurality of normal descriptors Dco including a certain normal descriptor Dco (X) as descriptors Dc to be followed when transferring the data Dt received from the network 3 to the main memory 20. ing.
  • the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor"
  • the communication control device 10 does not notify the CPU 30 of the determination result, but with respect to another normal descriptor Dco (Y).
  • Judge the permission or disapproval When the communication control device 10 determines that the other normal descriptor Dco (Y) is an "available descriptor”, the data Dt is transferred to the main memory 20 according to the other descriptor Dc (Y).
  • the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor"
  • the communication control device 10 skips the certain normal descriptor Dco (X) and the certain normal descriptor Dco (X). ) Is not used for the transfer of data Dt.
  • the communication control device 10 further reads another normal descriptor Dco (Y) from the plurality of normal descriptors Dco prepared in advance, and determines the rejection of the other normal descriptor Dco (Y).
  • the communication control device 10 determines that the other normal descriptor Dco (Y) is an "available descriptor"
  • the start address As (Y) specified by the other descriptor Dc (Y) is set as the start address. Data Dt is transferred to the area.
  • the above processing can be organized as follows. That is, the communication control device 10 prepares a plurality of normal descriptors Dco in advance. Then, the communication control device 10 sequentially reads a plurality of the normal descriptors Dco prepared in advance until a normal descriptor Dco determined to be an "usable descriptor" appears from the plurality of normal descriptors Dco prepared in advance, and permits or rejects each of them. Is determined. When a normal descriptor Dco determined to be an "usable descriptor" appears from among a plurality of normal descriptors Dco prepared in advance, the communication control device 10 executes transfer according to the normal descriptor Dco determined to be an "usable descriptor".
  • the communication control device 10 uses the "usable descriptor" to be used for the transfer of the data Dt as follows. You may choose. That is, the communication control device 10 may select an "usable descriptor" to be used for transferring data Dt from a plurality of normal descriptors Dco prepared in advance.
  • the communication control device 10 determines that the normal descriptor Dco (X) is an "unusable descriptor"
  • the communication control device 10 does not notify the CPU 30 of the determination result, and the CPU 30 is notified of the normal descriptor Dco (X). It does not reset X) to the correct content. Instead, the communication control device 10 reads another normal descriptor Dco (Y) from the plurality of normal descriptors Dco prepared in advance. Then, the communication control device 10 determines whether or not the other normal descriptor Dco (Y) is permitted, and determines that the other normal descriptor Dco (Y) is an "usable descriptor", and determines that the other normal descriptor Dco (Y) is an "usable descriptor". Data Dt is transferred according to (Y).
  • the communication control device 10 determines that a certain normal descriptor Dco (X) is "unusable", the communication control device 10 does not reset the "usable descriptor" to be used for data Dt transfer in the CPU 30, for example, another.
  • the transfer is usually executed according to the descriptor Dco (Y). That is, the communication control device 10 selects an "available descriptor" from a plurality of normal descriptors Dco prepared in advance, and transfers the data Dt according to the selected "available descriptor".
  • the communication control device 10 can shorten the time required for transferring the data Dt as compared with the case where the "usable descriptor" is reset to the CPU 30.
  • a certain normal descriptor Dco (X) is an "available descriptor”
  • the time required for the transfer is time T. It is assumed that it was (X).
  • a certain normal descriptor Dco (X) is an "unusable descriptor”
  • the time required for the transfer is time T. It is assumed that it was (Y).
  • the difference between the time T (X) and the time T (Y) becomes sufficiently small.
  • the difference between the time T (X) and the time T (Y) can be made negligibly small. That is, in the communication control device 10, since one normal descriptor Dco (X) is an "unusable descriptor", even if the transfer is performed using another normal descriptor Dco (Y), the time is required. Data Dt can be transferred in about the same time as T (X).
  • the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor"
  • the communication control device 10 skips the certain normal descriptor Dco (X) and follows another descriptor Dc (Y). Perform the transfer. Since the communication control device 10 executes the transfer according to another descriptor Dc (Y) prepared in advance without waiting for the reset of the "available descriptor" by the CPU 30, it is almost the same as the time T (X).
  • the data Dt can be transferred at the time T (Y), which is the time.
  • the CPU 30 sets the save descriptor Dce in the main memory 20 before receiving the data Dt, separately from the normal descriptor Dco. Then, the save descriptor Dce set in the main memory 20 by the CPU 30 is stored in the second descriptor FIFO 126, which is a storage area of the FIFO method for storing the save descriptor Dce. That is, in the present embodiment, the descriptor Dc is roughly classified into a normal descriptor Dco and a save descriptor Dce.
  • the communication control device 10 prepares a descriptor Dce for saving in advance in addition to a certain normal descriptor Dco (X).
  • a certain normal descriptor Dco (X) is an "unusable descriptor”
  • the save descriptor Dce is set as an "usable descriptor” and the save descriptor Dce is used to obtain data Dt. You may perform the transfer.
  • the communication control device 10 executes the following processing when the error number Ct, which is the number of normal descriptors Dco determined to be "unusable descriptors", exceeds the preset reference number Nr. .. That is, when the error number Ct exceeds the reference number Nr, the communication control device 10 transfers the data Dt to the main memory 20 according to the save descriptor Dce (Y). Specifically, the communication control device 10 may transfer the data Dt to an area in the main memory 20 having the start address As defined in the save descriptor Dce (Y) as the start address.
  • the communication control device 10 executes the following processing. That is, when the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor", the data Dt is used by using the save descriptor Dce without determining whether the other normal descriptor Dco is appropriate or not. Perform a transfer.
  • a certain normal descriptor Dco (X) is an "available descriptor”
  • the time required for the transfer is time T. It is assumed that it was (X).
  • a certain normal descriptor Dco (X) is an "unusable descriptor”
  • the transfer is performed using the backup descriptor Dce (Y)
  • the time required for the transfer is time T (). It is assumed that it was Y).
  • the difference between the time T (X) and the time T (Y) becomes sufficiently small.
  • the communication control device 10 is configured by a logic circuit by hardware, the difference between the time T (X) and the time T (Y) can be made negligibly small. That is, in the communication control device 10, since a certain normal descriptor Dco (X) is an "unusable descriptor", even if the backup descriptor Dce (Y) is used for transfer, the time T The data Dt can be transferred in almost the same time as (X).
  • the communication control device 10 when transferring data Dt, the communication control device 10 first reads a certain normal descriptor Dco (X) and determines its refusal. When the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor", the number of normal descriptors Dco (error number Ct) determined to be an "unusable descriptor” is determined. It is determined whether the reference number Nr is exceeded. When it is determined that the error number Ct does not exceed the reference number Nr, the communication control device 10 reads another normal descriptor Dco from the plurality of normal descriptor Dco prepared in advance, and determines whether or not to allow the error number Ct.
  • the normal descriptor Dco (Y) read by the communication control device 10 next to a certain normal descriptor Dco (X) is a normal descriptor Dco that follows a certain normal descriptor Dco (X), and is also referred to as a trailing descriptor Dc.
  • the communication control device 10 determines that another read normal descriptor Dco is an "unusable descriptor", it further determines "whether the error number Ct exceeds the reference number Nr". When it is determined that the error number Ct does not exceed the reference number Nr, the communication control device 10 reads another normal descriptor Dco from the plurality of normal descriptor Dco prepared in advance, and determines whether or not to allow it. .. When the communication control device 10 determines that the read normal descriptor Dco is an "unusable descriptor”, it reads another normal descriptor Dco until it determines that "the error number Ct exceeds the reference number Nr". Judge the permission or disapproval.
  • the communication control device 10 transfers the data Dt according to the normal descriptor Dco determined to be "available descriptor". Execute.
  • the communication control device 10 determines that "the error number Ct exceeds the reference number Nr"
  • the save descriptor Dce is read, and the data Dt is set in the area having the start address As of the save descriptor Dce as the start address. Forward.
  • the communication control device 10 repeats the following processing until "the error number Ct exceeds the reference number Nr" or "a normal descriptor Dco determined to be a" available descriptor "appears". That is, the communication control device 10 sequentially reads the normal descriptor Dco prepared in advance, and sequentially determines whether or not the descriptor is permitted.
  • the communication control device 10 reads the backup descriptor Dce and transfers the data Dt to the area having the start address As specified by the backup descriptor Dce as the start address.
  • the communication control device 10 puts the start address As specified by the normal descriptor Dco determined to be a "usable descriptor” into an area as a start address. Transfer the data Dt.
  • the start address As defined by the save descriptor Dce (Y) is in the “area in the main memory 20 (“reserve reception area Rge” described later) different from the standard reception area Rgo). be.
  • the save receive area Rge which is the area of the transfer destination (storage destination) of the data Dt when the data Dt is transferred according to the save descriptor Dce (Y), and the standard receive area Rgo are in the main memory 20. Are different areas of each other.
  • FIG. 1 is a diagram showing a configuration example of PLC1.
  • the PLC 1 includes a communication control device 10, a main memory 20, and a CPU 30 as a hardware configuration.
  • the PLC1 may further include a non-volatile memory that non-volatilely holds data such as various programs and parameters, a USB connector for connecting an external device and the PLC1, and the like.
  • the communication control device 10, the main memory 20, the CPU 30, and the non-volatile memory (not shown) are coupled to each other via various buses (internal buses).
  • the CPU 30 is typically configured according to a general-purpose computer architecture, and sequentially interprets and executes an instruction code according to an internal clock.
  • the CPU 30 includes one or more CPU cores and a network control unit as a hardware configuration.
  • the main memory 20 is a storage means of the PLC 1, and for example, the data Dt received from the network 3 by the PLC 1 (particularly, the communication control device 10) is stored.
  • the CPU 30 executes various arithmetic processes on the data Dt stored in the main memory 20.
  • the main memory 20 is a volatile storage area (RAM), and is executed by the CPU 30 after the power is turned on to the PLC 1 in addition to storing the data Dt that is received from the network 3 and is the target of various arithmetic processes by the CPU 30. Holds various programs that should be.
  • the main memory 20 is also used as a working memory when the CPU 30 executes various programs.
  • a main memory 20 for example, a DRAM (Dynamic Random Access Memory), a SRAM (Static Random Access Memory), or the like can be used.
  • the main memory 20 illustrated in FIG. 1 is a normal descriptor set by the CPU 30 before receiving the data Dt each time the PLC1 tries to receive the data Dt (for example, every control cycle Cc) together with the data Dt.
  • Dco is stored.
  • the normal descriptor Dco corresponds to, for example, the specific data Dt received by the PLC, the storage destination address (that is, the start address As) in the main memory 20 of the corresponding data Dt, and the main memory 20 of the corresponding data Dt. Includes information indicating the data size, etc. in.
  • the PLC 1 may further include a non-volatile memory (not shown), and the non-volatile memory non-volatilely holds data such as various programs and parameters. These data are copied to the main memory 20 so that the CPU 30 can access them, if necessary.
  • a non-volatile memory a semiconductor memory such as a flash memory can be used.
  • a magnetic recording medium such as a hard disk drive, an optical recording medium such as a DVD-RAM (Digital Versatile Disk Random Access Memory), or the like can be used.
  • the communication control device 10 is a data transfer device that receives data Dt from network 3 and stores (transfers) the received data Dt in the main memory 20, and is realized as, for example, a NIC (Network Interface Card).
  • the communication control device 10 is typically composed of a logic circuit made of hardware such as FPGA (Field-Programmable gate array) or ASIC (Application Specific Integrated Circuit).
  • the communication control device 10 is configured to be capable of transmitting and receiving data to and from each of the main memory 20, the CPU 30, and the non-volatile memory (not shown).
  • the communication control device 10 is connected to the network 3 via the reception port 130, controls the exchange of data with the network 3, and particularly controls the reception of the data Dt.
  • the communication control device 10 provides, for example, the functions of the physical layer and the data link layer in the network 3. That is, the communication control device 10 controls the transmission of transmission data and the reception of data Dt in accordance with the standard to which the network 3 conforms. Specifically, the communication control device 10 receives the data Dt from the network device connected to the network 3, and stores the received data Dt in the data FIFA 127.
  • the PLC 1 controls the transfer of the data Dt received from the network 3 to the main memory 20 by the communication control device 10 configured by the logic circuit by hardware instead of the CPU 30, and in particular, the transfer destination. To determine. Therefore, the PLC 1 has the effect that the data Dt can be transferred to a desired area of the main memory 20 by the communication control device 10 configured by the logic circuit by the hardware without increasing the processing load of the CPU 30. Play.
  • the communication control device 10 illustrated in FIG. 1 includes an IF 110, a reception processing unit 120, and a reception port 130 as functional blocks.
  • a configuration that is not directly related to the present embodiment such as a configuration in which transmission data is transmitted to the network 3 via the transmission port, is included. It is omitted.
  • the communication control device 10 may have the omitted configuration.
  • the IF (Interface) 110 is an interface for the communication control device 10 (particularly, DMAC121) to communicate with each of the main memory 20, the CPU 30, and the non-volatile memory (not shown).
  • the data Dt (received data) received on the receiving port 130 is stored in the data FIFA 127.
  • the reception processing unit 120 "processes to transfer the data Dt received from the network 3 (specifically, the data Dt stored in the data FIFA 127) to the main memory 20 according to the descriptor Dc prepared in advance". Execute a certain reception process.
  • the reception processing unit 120 includes a DMAC 121, an address determination unit 122, a first descriptor FIFA 125, a second descriptor FIFA 126, and a data FIFA 127.
  • the DMAC (Direct Memory Access Controller) 121 executes data exchange between the main memory 20 and each of the first descriptor FIFA 125, the second descriptor FIFA 126, and the data FIFA 127.
  • the DMAC 121 reads the normal descriptor Dco set in the main memory 20 by the CPU 30 and stores it in the first descriptor FIFA 125 each time the data Dt is received (for example, every control cycle Cc). do. Further, the DMAC 121 reads the save descriptor Dce set in the main memory 20 by the CPU 30 regardless of the specific data Dt, and stores the descriptor Dce in the second descriptor FIFA 126.
  • the DMAC 121 stores the received data (data Dt) stored in the data FIFA 127 in the main memory 20 in order from the beginning.
  • the DMAC 121 is stored in the data FIFA 127 in an area in the main memory 20 having the "start address As specified in the" available descriptor "for the transfer of the data Dt" notified from the address determination unit 122 as the start address. Transfer the data Dt.
  • the writeback descriptor is transferred to the main memory 20, that is, the descriptor in the main memory 20 is overwritten by the writeback descriptor. Specifically, the DMAC 121 overwrites the descriptor Dc in the main memory 20 corresponding to the descriptor Dc used for transferring the data Dt to the main memory 20 with the write-back descriptor.
  • the write-back descriptor is a descriptor Dc in which the following two pieces of information are added to the descriptor Dc used for transferring the data Dt to the main memory 20. That is, it is a descriptor Dc in which "information indicating the data size of the data Dt transferred to the main memory 20 according to the descriptor Dc" and "information indicating that the data Dt has been used for the transfer" are added.
  • the address determination unit 122 selects an "usable descriptor" that can be used for transferring data Dt from a plurality of descriptors Dc prepared in advance, and starts the selected "usable descriptor". Notify the DMAC 121 of the address As.
  • the address determination unit 122 includes a reading unit 123 and a determination unit 124.
  • the address determination unit 122 When the determination unit 124 determines that a certain normal descriptor Dco is "an" available descriptor "that can be used for transferring data Dt", the address determination unit 122 notifies the DMAC 121 of the following information. do. That is, the address determination unit 122 notifies the DMAC 121 of the start address As specified by a certain normal descriptor Dco, which is determined to be "an” available descriptor "that can be used for transferring data Dt". do.
  • the address determination unit 122 When the save descriptor Dce is read by the read unit 123, the address determination unit 122 notifies the DMAC 121 of the start address As specified by the save descriptor Dce read by the read unit 123. That is, the address determination unit 122 assumes that the save descriptor Dce is an "usable descriptor" that can be used for transferring data Dt, and notifies the DMAC 121 of the start address As specified by the save descriptor Dce. ..
  • the reading unit 123 reads the descriptor Dc and notifies the determination unit 124 of the start address As specified by the read descriptor Dc. For example, the reading unit 123 first reads the normal descriptor Dco stored in the first descriptor FIFO 125 at the time of transferring the data Dt, and notifies the determination unit 124 of the start address As specified by the read normal descriptor Dco. ..
  • the reading unit 123 executes the following determination. That is, the reading unit 123 determines whether the number of normal descriptors Dco (error number Ct) determined to be "unusable descriptors" by the determination unit 124 does not exceed the reference number Nr.
  • the reading unit 123 When the reading unit 123 determines that the error number Ct does not exceed the reference number Nr, it reads another normal descriptor Dco with reference to the first descriptor FIFA 125, and determines the start address As specified by the other normal descriptor Dco. Notify unit 124. For example, the reading unit 123 reads the normal descriptor Dco (that is, the subsequent descriptor of a certain normal descriptor Dco) stored next to a certain normal descriptor Dco in the first descriptor FIFA 125.
  • the normal descriptor Dco that is, the subsequent descriptor of a certain normal descriptor Dco
  • the reading unit 123 notified of the determination result that a certain normal descriptor Dco is an "unusable descriptor" is stored in the first descriptor Dco 125 until the error number Ct exceeds the reference number Nr. Are read sequentially. Then, the reading unit 123 notifies the determination unit 124 of the start address As specified by the read normal descriptor Dco.
  • the reading unit 123 determines that the error number Ct exceeds the reference number Nr, it reads the save descriptor Dce stored in the second descriptor FIFA 126.
  • the address determination unit 122 notifies the DMAC 121 of the start address As specified by the save descriptor Dce read by the reading unit 123.
  • the reading unit 123 acquires the reference number Nr from the CPU 30 in advance.
  • the reference number Nr is preferably "3", for example.
  • the normal descriptor Dco is determined to be an "unusable descriptor" for the transfer of data Dt. That is, first, "the start address As specified by the normal descriptor Dco is not in the standard reception area Rgo (for example, the start address As indicates an address exceeding the end address of the standard reception area Rgo)". It is a case.
  • the second case is "the data size of the data Dt received from the network 3 is larger than expected, and the end address Ae is not in the standard reception area Rgo".
  • the communication control device 10 can realize the following two effects. That is, first, even if any of the above two typical cases occurs, the communication control device 10 does not follow the save descriptor Dce, but is a normal descriptor Dco (third normal descriptor Dco). Data Dt transfer may be performed accordingly. Secondly, the communication control device 10 can reliably transfer the data Dt according to the save descriptor Dce even when some abnormality occurs.
  • the reference number Nr is the number of normal descriptors Dco that can be determined as "unusable descriptors" for the transfer of data Dt.
  • the reading unit 123 may acquire in advance from the CPU 30 a method for determining the reference number Nr instead of the reference number Nr itself.
  • the reading unit 123 is a reference number Nr obtained by subtracting "2" from the number X of the normal descriptors Dco set by the CPU 30 and for which the determination unit 124 has not yet determined whether or not to allow.
  • the determination method of "to be” may be acquired in advance.
  • the reference number Nr is an integer of "0" or more.
  • the reading unit 123 may determine the reference number Nr based on the above-mentioned determination method acquired in advance, and may use the determined reference number Nr.
  • the above-mentioned number X can be rephrased as "the number of normal descriptors Dco stored in the first descriptor FIFA 125, and the determination unit 124 has not yet determined whether or not to allow it".
  • the reading unit 123 sets the reference number Nr to "0".
  • the communication control device 10 sets the reference number Nr to "2".
  • Each of the plurality of data Dt can be transferred according to the normal descriptor Dco.
  • the communication control device 10 determines the reference number Nr to "2" based on the above-mentioned determination method. Then, the communication control device 10 may execute the following processing at the time of transferring each of the first data Dt (0) and the second data Dt (1).
  • the communication control device 10 determines that the first normal descriptor Dco (0) and the second normal descriptor Dco (1) are "unusable descriptors" for the transfer of the first data Dt (0). Also determines the rejection of the third normal descriptor Dco (2). Then, when the communication control device 10 determines that the third normal descriptor Dco (2) is an "usable descriptor" for the transfer of the first data Dt (0), the communication control device 10 determines that the third normal descriptor Dco (2) is in accordance with the third normal descriptor Dco (2). , The first data Dt (0) is transferred.
  • the communication control device 10 determines the refusal of the fourth normal descriptor Dco (3). Then, when the communication control device 10 determines that the fourth normal descriptor Dco (3) is an "usable descriptor" for the transfer of the second data Dt (1), the communication control device 10 determines that the fourth normal descriptor Dco (3) is in accordance with the fourth normal descriptor Dco (3). , The second data Dt (1) is transferred.
  • the communication control device 10 realizes the following effects by determining the reference number Nr based on the determination method of "the value obtained by subtracting" 2 "from the number X is used as the reference number Nr". be able to. That is, even if there are a plurality of data Dts to be transferred to the main memory 20, the communication control device 10 has the effect that each of the plurality of data Dts can be transferred to the main memory 20 according to the normal descriptor Dco. It can be realized.
  • the determination unit 124 determines the rejection of the normal descriptor Dco read by the reading unit 123, and executes the first determination process FJ and the second determination process SJ using, for example, the start address As defined by the normal descriptor Dco. do.
  • the determination unit 124 when the determination unit 124 is notified by the reading unit 123 of "the start address As of the normal descriptor Dco read by the reading unit 123", the notified start address As is the standard reception area Rgo. Determine if it is inside.
  • the determination unit 124 uses the start address As notified from the read unit 123 and the data size of the data Dt to indicate that "the area after transfer when the data Dt is transferred to the area having the start address As as the start address". "The end address Ae is calculated. Then, the determination unit 124 determines, as the second determination process SJ, whether or not the calculated end address Ae is in the standard reception area Rgo.
  • the determination unit 124 transfers the "normal descriptor Dco read by the reading unit 123" to the data Dt. Judged as "Available Descriptor”. The address determination unit 122 notifies the DMAC 121 of the start address As specified by the normal descriptor Dco determined by the determination unit 124 as "an available descriptor”.
  • the determination unit 124 uses the "normal descriptor Dco read by the reading unit 123" as the "unusable descriptor” for the transfer of the data Dt. Is determined. The determination unit 124 notifies the reading unit 123 of the determination result that the "normal descriptor Dco read by the reading unit 123" is determined to be an "unusable descriptor".
  • the determination unit 124 acquires in advance the start address of the standard reception area Rgo and the data size of the standard reception area Rgo from the CPU 30. Then, the determination unit 124 calculates the standard reception area Rgo from the acquired start address of the standard reception area Rgo and the data size of the standard reception area Rgo.
  • the normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125, and is stored, for example, by a FIFO (first in, first out, first in, first out) method.
  • the communication control device 10 (specifically, the DMAC121) starts the normal descriptor Dco from the main memory 20. Is read. Then, the DMAC 121 stores the read normal descriptor Dco in the first descriptor FIFO 125.
  • the save descriptor Dce set in the main memory 20 by the CPU 30 is stored in the second descriptor FIFO 126, and is stored, for example, by a FIFO (first in, first out, first in, first out) method.
  • the communication control device 10 specifically, DMAC121
  • the DMAC 121 Read the descriptor Dce.
  • the DMAC 121 stores the read save descriptor Dce in the second descriptor FIFO 126.
  • the data Dt (received data) received from the network 3 by the PLC 1 (particularly, the communication control device 10) is temporarily stored in the data FIFO 127, and is stored, for example, by the FIFO method.
  • a plurality of descriptors Dc are prepared in advance, and can be roughly classified into a normal descriptor Dco and a save descriptor Dce.
  • the descriptor Dco is set in the main memory 20 by the CPU 30 before receiving the data Dt each time the PLC1 tries to receive the data Dt (for example, every control cycle Cc).
  • the normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125 by the DMAC 121.
  • the save descriptor Dce is preset in the main memory 20 by the CPU 30 regardless of the reception of the data Dt.
  • the save descriptor Dce set in the main memory 20 by the CPU 30 is stored in the second descriptor FIFO 126 by the DMAC 121.
  • the CPU 30 is used to indicate an area (particularly, a start address thereof) in the main memory 20 to which the certain data Dt (X) should be transferred before receiving the certain data Dt (X).
  • a normal descriptor Dco (X) is set in the memory 20.
  • the CPU 30 normally indicates the descriptors Dco (X1), Dco (X2), Dco (X3), ... , Dco (Xn) may be set.
  • the normal descriptor Dco (X) (or the normal descriptor Dco (X1), Dco (X2), Dco (X3), ..., Dco (Xn)) set in the main memory 20 by the CPU 30 is the first. It is stored in the descriptor FIFA 125.
  • the normal descriptor Dco is a descriptor Dc corresponding to (or should correspond to) a specific data Dt received by the PLC, and for example, the normal descriptor Dco (X) is a specific data Dt received by the PLC. Corresponds to (X).
  • the save descriptor Dce is a descriptor Dc that does not correspond to the specific data Dt received by the PLC, and defines the transfer destination (particularly, the start address) of any data Dt received by the PLC. Descriptor Dc to be used.
  • the area in the main memory 20 having the "start address As specified by the save descriptor Dce" as the start address is also referred to as a save receive area Rge (save area).
  • the save reception area Rge is an area capable of storing arbitrary data Dt received by the PLC, and is "an area designated by the CPU 30 as an area to store specific data Dt (that is, a standard reception area Rgo (permitted area)). ) ”Is different.
  • the communication control device 10 whose configuration example has been described with reference to FIG. 1 will be described next, and specific examples of reception processing executed by the communication control device 10 will be described with reference to FIGS. 3 to 5. ..
  • FIG. 3 is a diagram illustrating an example in which the communication control device 10 sequentially reads a plurality of prepared normal descriptors Dco and transfers data Dt to the main memory 20 according to the normal descriptor Dco determined to be “available”. Is.
  • the data Dt (0) and the data Dt (1) are stored in the data FIFO 127 in the FIFO method. Further, in the first descriptor FIFO 125, normal descriptors Dco (0), Dco (1), Dco (2), ..., Dco (N) are stored in advance.
  • the communication control device 10 In order to transfer the data Dt (0) stored at the head of the data FIFA 127, the communication control device 10 first determines the refusal of the normal descriptor Dco (0) stored at the head of the first descriptor FIFA 125.
  • the reading unit 123 reads the normal descriptor Dco (0) stored at the beginning of the first descriptor FIFA 125, and sets the start address As (0) specified in the normal descriptor Dco (0). Notify the determination unit 124.
  • the determination unit 124 determines whether the start address As (0) is within the preset standard reception area Rgo (first determination FJ).
  • the determination unit 124 determines the "region after transfer when the data Dt (0) is transferred according to the normal descriptor Dco (0)" from the data size of the data Dt (0) and the start address As (0). The ending address Ae (0,0) is calculated. Then, the communication control device 10 determines whether or not the calculated end address Ae (0,0) is within the preset standard reception area Rgo (second determination SJ).
  • the normal descriptor Dco (0) is the data Dt. It is determined that the transfer of (0) is an "available descriptor".
  • the address determination unit 122 sets the start address As (0) specified in the normal descriptor Dco (0) determined by the determination unit 124 to be an "available descriptor" for the transfer of the data Dt (0) to the DMAC121. Notify to.
  • the DMAC 121 transfers the data Dt to the area in the main memory 20 having the "start address As specified in the" available descriptor "for the transfer of the data Dt" notified from the address determination unit 122 as the start address. ..
  • the DMAC 121 is set in an area in the main memory 20 having a "start address As (0) defined in the normal descriptor Dco (0), which is a" usable descriptor "for transferring data Dt (0)" as a start address. , Data Dt (0) is transferred.
  • the DMAC 121 When the DMAC 121 completes the transfer of the data Dt (0) to the main memory 20, the DMAC 121 overwrites the normal descriptor Dco (0) in the main memory 20 with the write-back descriptor. As a result, the normal descriptor Dco (0) in the main memory 20 has "information indicating the data size of the data Dt (0)" and "information indicating that the data Dt (0) has been used for transfer". Is added.
  • the communication control device 10 determines in the first descriptor FIFO 125 that the normal descriptor Dco (1) stored next to the normal descriptor Dco (0) is rejected in order to transfer the data Dt (1). That is, the communication control device 10 determines the rejection of the normal descriptor Dco (1) which is the head of the normal descriptor Dco which is the normal descriptor Dco stored in the first descriptor FIFO 125 and whose refusal is not determined. ..
  • the reading unit 123 reads the normal descriptor Dco (1) and notifies the determination unit 124 of the start address As (1) defined in the normal descriptor Dco (1).
  • the determination unit 124 determines whether the start address As (1) is within the preset standard reception area Rgo (first determination FJ).
  • the determination unit 124 determines the "region after transfer when the data Dt (1) is transferred according to the normal descriptor Dco (1)" from the data size of the data Dt (1) and the start address As (1). Calculate the ending address Ae (1,1). Then, the communication control device 10 determines whether or not the calculated end address Ae (1,1) is within the preset standard reception area Rgo (second determination SJ).
  • the standard reception area is replaced with the start address As'(1) in the standard reception area Rgo that the CPU 30 intends to set in the normal descriptor Dco (1).
  • the starting address As (1) outside the Rgo is specified.
  • the determination unit 124 determines that the normal descriptor Dco (1) is an "unusable descriptor". The determination unit 124 notifies the reading unit 123 of this determination result without notifying the CPU 30.
  • the reading unit 123 notified of the determination result that the normal descriptor Dco (1) is an "unusable descriptor” is the normal descriptor Dco (1) stored next to the normal descriptor Dco (1) in the first descriptor FIFO 125. 2) is read. Then, the reading unit 123 notifies the determination unit 124 of the start address As (2) defined in the read normal descriptor Dco (2).
  • the determination unit 124 determines whether the start address As (2) is within the preset standard reception area Rgo (first determination FJ).
  • the determination unit 124 determines the "region after transfer when the data Dt (1) is transferred according to the normal descriptor Dco (2)" from the data size of the data Dt (1) and the start address As (2). Calculate the ending address Ae (1, 2). Then, the communication control device 10 determines whether or not the calculated end address Ae (1, 2) is within the preset standard reception area Rgo (second determination SJ).
  • the normal descriptor Dco (2) is the data Dt (2). It is determined that the descriptor is "available” for the transfer of 1).
  • the address determination unit 122 sets the start address As (2) specified in the normal descriptor Dco (2) determined by the determination unit 124 to be an "available descriptor" for the transfer of the data Dt (1) to the DMAC121. Notify to.
  • the DMAC 121 transfers the data Dt to the area in the main memory 20 having the "start address As specified in the" available descriptor "for the transfer of the data Dt" notified from the address determination unit 122 as the start address. ..
  • the DMAC 121 is set in an area in the main memory 20 having a "start address As (2) defined in the normal descriptor Dco (2), which is a" usable descriptor "for transferring data Dt (1)" as a start address. , Data Dt (1) is transferred.
  • the DMAC 121 When the DMAC 121 completes the transfer of the data Dt (1) to the main memory 20, the DMAC 121 overwrites the normal descriptor Dco (2) in the main memory 20 with the write-back descriptor. As a result, the normal descriptor Dco (2) in the main memory 20 has "information indicating the data size of the data Dt (1)" and "information indicating that the data Dt (1) has been used for transfer". Is added.
  • the CPU 30 determines how many data Dt (more accurately, how many frame data) a certain information (for example, several megabytes (Mbyte) of image information) is transmitted. Not calculated. For example, even if the data size of one data Dt (frame data) is usually "1.5 kilobytes (Kbyte)", the CPU 30 uses the information as how many data Dt. I haven't calculated if it will be sent.
  • Mbyte megabytes
  • the CPU 30 (software) generally sets a sufficient number (number) of normal descriptors Dco in the main memory 20 so that the certain information can always be received before receiving the certain information. deep.
  • the CPU 30 previously stores the number of normal descriptors Dco, which has a sufficient margin compared to the number of data Dt to be received by the PLC1 for each control cycle Cc, into the main memory 20 before the PLC1 receives the data Dt. Set it. Then, the normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFO 125 by the DMAC 121.
  • the address determination unit 122 selects the "usable descriptor" for the transfer of the data Dt from the number of normal descriptors Dco that is sufficiently larger than the number of data Dt to be transferred. can do.
  • the DMAC 121 overwrites the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco used for the transfer with the write-back descriptor.
  • the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco used for the transfer has "information indicating the data size of the data Dt" and "indicating that the data Dt has been used for the transfer". "Information" is added.
  • the CPU 30 can grasp the permission or disapproval of the normal descriptor Dco in the main memory 20 by referring to the "information indicating that the data Dt has been used for transfer".
  • the DMAC 121 sets the "result flag", which is one of the items in the normal descriptor Dco, from "0" to "1" for the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco used for the transfer.
  • the CPU 30 can grasp which of the normal descriptor Dco in the main memory 20 is used for the transfer and which normal descriptor Dco is not used for the transfer by the "result flag".
  • the DMAC 121 sets the "discard flag", which is one of the items in the normal descriptor Dco, from "0" to "0" for the normal descriptor Dco in the main memory 20 corresponding to the normal descriptor Dco not used for transfer. It may be updated to "1".
  • the CPU 30 can grasp the normal descriptor Dco that was not used for the transfer of the data Dt among the normal descriptor Dco in the main memory 20 by the "discard flag".
  • FIG. 4 is a diagram illustrating an example in which the communication control device 10 reads the save descriptor Dce and transfers the data Dt to the main memory 20 according to the save descriptor Dce.
  • the error number Ct which is the number of normal descriptors Dco determined to be "unusable descriptors" by the determination unit 124, exceeds the preset reference number Nr. And execute the following processing. That is, when the error number Ct exceeds the reference number Nr, the DMAC 121 transfers the data Dt to the area having the start address As defined in the save descriptor Dce as the start address.
  • the data Dt (0) and the data Dt (1) are stored in the data FIFO 127 by the FIFO method. Further, in the first descriptor FIFO 125, normal descriptors Dco (0), Dco (1), Dco (2), ..., Dco (N) are stored in advance. Further, the save descriptor Dce (Z) is stored in advance in the second descriptor FIFO 126. Further, "0" is preset as the reference number Nr by the CPU 30.
  • the process executed by the communication control device 10 when transferring the data Dt (0) is the same as the process exemplified in FIG. That is, in order to transfer the data Dt (0) stored at the head of the data FIFA 127, the communication control device 10 first first stores the normal descriptor stored at the head of the first descriptor FIFA 125, as shown in FIG. Judgment of refusal of Dco (0). That is, the determination unit 124 executes the first determination FJ and the second determination SJ with respect to the normal descriptor Dco (0).
  • the normal descriptor Dco (0) is the data Dt (0). It is determined that the descriptor is "available" for the transfer of 0).
  • the address determination unit 122 sets the start address As (0) specified in the normal descriptor Dco (0) determined by the determination unit 124 to be an "available descriptor" for the transfer of the data Dt (0) to the DMAC121. Notify to.
  • the DMAC 121 transfers the data Dt (0) to the area in the main memory 20 having the start address As (0) notified from the address determination unit 122 as the start address.
  • the DMAC 121 When the DMAC 121 completes the transfer of the data Dt (0) to the main memory 20, the DMAC 121 overwrites the normal descriptor Dco (0) in the main memory 20 with the write-back descriptor.
  • the communication control device 10 is stored in the first descriptor FIFO 125 in order to transfer the data Dt (1), and is the head of the normal descriptor Dco for which the refusal has not been determined, that is, the normal descriptor Dco (1).
  • the determination unit 124 executes the first determination FJ and the second determination SJ with respect to the normal descriptor Dco (1).
  • the normal descriptor Dco (1) defines the start address As (1) outside the standard reception area Rgo.
  • the determination unit 124 confirms that the start address As (1) is not in the standard receive area Rgo, and determines that the normal descriptor Dco (1) is an "unusable descriptor". The determination unit 124 notifies the reading unit 123 of this determination result without notifying the CPU 30.
  • the reading unit 123 notified of the determination result that the normal descriptor Dco (1) is an "unusable descriptor” executes the following processing. That is, the reading unit 123 determines whether or not the error number Ct, which is the number of normal descriptors Dco determined to be "unusable descriptors" by the determination unit 124, exceeds the reference number Nr.
  • the reference number is Nr "0". Further, since the determination unit 124 determines that the normal descriptor Dco (1) is an "unusable descriptor", the number of normal descriptors Dco determined by the determination unit 124 to be an "unusable descriptor" is used. A certain number of errors Ct is "1".
  • the reading unit 123 determines that "the error number Ct exceeds the reference number Nr". Then, the reading unit 123 that determines that "the error number Ct exceeds the reference number Nr" reads the save descriptor Dce (Z) stored in the second descriptor FIFA 126.
  • the address determination unit 122 notifies the DMAC 121 of the start address As (Z) specified in the save descriptor Dce (Z) read by the reading unit 123.
  • the DMAC 121 transfers the data Dt to the area in the main memory 20 having the "start address As specified in the" available descriptor "for the transfer of the data Dt" notified from the address determination unit 122 as the start address. ..
  • the DMAC 121 is an area in the main memory 20 having a start address As (Z) defined in the save descriptor Dce (Z), which is a “usable descriptor” for transferring data Dt (1), as a start address. Data Dt (0) is transferred to.
  • the start address As specified by the backup descriptor Dce (Y) is in the standard reception area Rgo
  • the following events may occur. That is, the data Dt (1) transferred into the standard reception area Rgo according to the save descriptor Dce (Y) is updated (overwritten) by other data Dt transferred into the standard reception area Rgo according to the normal descriptor Dco.
  • An event such as closing can occur.
  • the above-mentioned event can be avoided without requiring the above-mentioned complicated processing. That is, by separating the backup reception area Rge and the standard reception area Rgo, "a certain data Dt transferred according to the backup descriptor Dce is overwritten by another data Dt transferred according to the normal descriptor Dco". The event can be easily avoided.
  • FIG. 5 is a diagram illustrating the effect of the communication control device 10.
  • FIG. 5A is the same as FIG. 8A, and after determining whether or not the descriptor Dc is permitted for the conventional communication control device that transfers the data Dt to the main memory 20 according to the descriptor Dc, It is a figure explaining the time required to transfer the data Dt and the like.
  • Conventional communication control devices execute the following processing when an abnormality such as an address (start address As) is detected for a certain descriptor Dc (X). That is, when the conventional communication control device detects an error in a certain descriptor Dc (X), it notifies the CPU of the detection result and resets the certain descriptor Dc (X) in the CPU (software). Let me. For example, the conventional communication control device causes the CPU 30 to rewrite "a certain descriptor Dc (X) defining an abnormal address" to "a certain descriptor Dc (X') defining a correct address".
  • the conventional communication control device has to wait until the reset processing of a certain descriptor Dc (X) by the CPU is completed, and after detecting an error of a certain descriptor Dc (X), the data It takes a long time to transfer Dt to the main memory 20.
  • Conventional communication control devices need to wait for the completion of the descriptor Dc resetting process by software between the time when an abnormality such as the start address As of the descriptor Dc is detected and the time when the data Dt is transferred. ..
  • FIG. 5B is a diagram for explaining the time required for the communication control device 10 to transfer the data Dt after determining the permission / rejection of the descriptor Dc.
  • the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor", another descriptor Dc (Y) is used as an "available descriptor” to transfer data Dt. Execute. Therefore, as shown in FIG. 5B, the communication control device 10 detects the abnormality such as the start address As of the descriptor Dc, and the descriptor Dc by the CPU 30 is executed between the time when the data Dt is transferred. There is no need to wait for the completion of the resetting process.
  • a certain normal descriptor Dco (X) is an "available descriptor”
  • the time required for the transfer is time T. It is assumed that it was (X).
  • a certain normal descriptor Dco (X) is an "unusable descriptor”
  • the transfer is performed using another descriptor Dc (Y)
  • the time required for the transfer is time T (). It is assumed that it was Y).
  • the difference between the time T (X) and the time T (Y) becomes sufficiently small.
  • the difference between the time T (X) and the time T (Y) can be made negligibly small. That is, in the communication control device 10, since a certain normal descriptor Dco (X) is an "unusable descriptor", even if the transfer is performed using another descriptor Dc (Y), the time T Data Dt can be transferred in almost the same time as (X).
  • the communication control device 10 is a communication control device that transfers the data Dt received from the network 3 to the main memory 20.
  • the communication control device 10 includes a reading unit 123, a determination unit 124, and a DMAC 121 (transfer unit).
  • the reading unit 123 reads the descriptor Dc that defines the start address As of the area in which the data Dt should be stored.
  • the determination unit 124 has a standard reception area Rgo (permission area) in which the start address As defined in the descriptor Dc read by the reading unit 123 is an area preset as an area in which the data Dt can be stored in the main memory 20. ) Is determined. When the start address As is in the standard reception area Rgo, the determination unit 124 determines that the descriptor Dc read by the reading unit 123 is "available".
  • Rgo transmission area
  • the DMAC 121 transfers the data Dt to an area having the start address As defined in the descriptor Dc read by the reading unit 123 as the start address.
  • a plurality of descriptors Dc are prepared in advance in the communication control device 10. Then, the reading unit 123 first reads, for example, the first descriptor Dc (X) (particularly, the first normal descriptor Dco (X)) from among a plurality of descriptors Dc prepared in advance.
  • the DMAC 121 executes the following transfer when the first descriptor Dc (X) is determined to be "available" by the determination unit 124. That is, the DMAC 121 transfers the data Dt to the area having the start address As (X) defined in the first descriptor Dc (X) as the start address.
  • the DMAC 121 executes the following transfer when the first descriptor Dc (X) is determined to be "not available" by the determination unit 124. That is, the DMAC 121 transfers the data Dt according to the second descriptor Dc (Y) read after the first descriptor Dc (X) by the reading unit 123 among the plurality of descriptors Dc prepared in advance. As a specific example, the DMAC 121 transfers data Dt to an area having a start address As (Y) defined in the second descriptor Dc (Y) as a start address.
  • the communication control device 10 determines that the first descriptor Dc (X) read from a plurality of descriptors Dc prepared in advance is "available", the first descriptor Dc ( Data Dt is transferred according to X).
  • the communication control device 10 transfers data Dt to an area having a start address As (X) defined by the first descriptor Dc (X) as a start address.
  • the communication control device 10 determines that the first descriptor Dc (X) is "not available"
  • the communication control device 10 further reads the second descriptor Dc (Y) from the plurality of descriptors Dc prepared in advance. Then, the communication control device 10 transfers the data Dt to the area whose head address is the start address As (Y) defined by the second descriptor Dc (Y).
  • the communication control device 10 determines that the start address As (X) defined by the first descriptor Dc (X) read is not within the standard reception area Rgo, the communication control device 10 notifies the CPU 30 or the like of the determination result. There is nothing to do. Even if it is determined that the start address As (X) is not in the standard reception area Rgo, the communication control device 10 does not cause the CPU 30 or the like to reset the first descriptor Dc (X) to the correct one.
  • the communication control device 10 determines that the start address As (X) defined by the first descriptor Dc (X) is not within the standard reception area Rgo, the communication control device 10 further reads the second descriptor Dc (Y) prepared in advance. .. Then, the communication control device 10 transfers the data Dt to the main memory 20 according to the read second descriptor Dc (Y).
  • the communication control device 10 selects an "usable descriptor" for transferring data Dt from a plurality of descriptors Dc prepared in advance, and transfers the data Dt according to the selected "available descriptor".
  • the communication control device 10 can prevent erroneous data transfer by the descriptor Dc. Further, the communication control device 10 can shorten the time required for transferring the data Dt as compared with the case where the "usable descriptor" is reset to the CPU 30 or the like for the transfer of the data Dt.
  • the communication control device 10 has the effect of being able to transfer the data Dt received from the network 3 to the main memory 20 at high speed while preventing erroneous data transfer by the descriptor Dc.
  • the determination of "whether or not the start address As specified in the read descriptor Dc is within the standard reception area Rgo" can be executed even before the data Dt is received from the network 3. .. Therefore, the communication control device 10 can execute a process for preventing "erroneous data transfer by the descriptor Dc" before receiving the data Dt.
  • the communication control device 10 executes a process for preventing "erroneous data transfer by the descriptor Dc" before receiving the data Dt, so that the data Dt is transferred to the main memory 20 after receiving the data Dt. It has the effect of shortening the time until transfer.
  • the communication control device 10 is realized as a NIC (Network Interface Card).
  • the communication control device 10 is typically composed of a logic circuit made of hardware such as FPGA (Field-Programmable gate array) or ASIC (Application Specific Integrated Circuit).
  • the communication control device 10 for determining the rejection of the descriptor Dc is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device 10 configured by the logic circuit by the hardware has an effect that the rejection of the descriptor Dc can be determined at a higher speed than the case where the CPU 30 or the like determines the rejection of the descriptor Dc.
  • the communication control device 10 selects and selects an "usable descriptor" for data Dt transfer from a plurality of descriptors Dc prepared in advance without requiring the descriptor Dc to be reset by the CPU 30 or the like.
  • the transfer is executed according to the descriptor Dc.
  • the communication control device 10 can execute a process of selecting a plurality of "usable descriptors" prepared in advance from the descriptor Dc for data Dt transfer at extremely high speed. .. Further, when configured by a logic circuit by hardware, the communication control device 10 can execute transfer at extremely high speed according to the descriptor Dc selected from a plurality of descriptors Dc prepared in advance.
  • the communication control device 10 when the communication control device 10 is configured by a logic circuit by hardware, the communication control device 10 transfers the data Dt received from the network 3 at an extremely high speed while preventing erroneous data Dt transfer by the descriptor Dc. It has the effect of being able to do it.
  • the determination unit 124 determines that the descriptor Dc read by the reading unit 123 is "available" when both of the following two conditions are satisfied. That is, the determination unit 124 has both the condition that (A) the start address As defined by the descriptor Dc is in the standard reception area Rgo and (B) the condition that the end address Ae is in the standard reception area Rgo. If it is satisfied, it is determined to be "available”.
  • the end address Ae is the end address of the area after transfer when the data Dt is transferred according to the descriptor Dc read by the reading unit 123.
  • the end address Ae is calculated from the data size of the received data Dt and the start address As defined by the descriptor Dc read by the reading unit 123.
  • the communication control device 10 calculates the end address Ae from the data size of the received data Dt and the start address As defined by the descriptor Dc read by the reading unit 123. Then, the communication control device 10 states that "the start address As specified by the read descriptor Dc is in the standard reception area Rgo" and "the end address Ae is in the standard reception area Rgo", and the read descriptor Dc. Is determined to be "available”.
  • the read descriptor Dc is inappropriate as the descriptor Dc for determining the transfer destination of the received data Dt, that is, it can be used as the descriptor Dc for determining the transfer destination of the received data Dt. Not possible (not available).
  • the communication control device 10 considers "whether or not the read descriptor Dc can be used" in consideration of the data size of the received data Dt in addition to the "start address As specified by the read descriptor Dc" (that is,). , Descriptor Dc permission / non-permission) ”is determined.
  • the communication control device 10 considers the data size of the received data Dt in addition to the start address As, so that the "usable descriptor" is used for transferring the received data Dt from among a plurality of descriptors Dc prepared in advance. Has the effect of being able to select more accurately.
  • the communication control device 10 calculates the standard reception area Rgo from the start address of the standard reception area Rgo and the data size of the standard reception area Rgo acquired in advance. For example, the communication control device 10 acquires in advance the start address of the standard reception area Rgo and the data size of the standard reception area Rgo from the CPU 30.
  • the communication control device 10 acquires in advance the start address of the standard reception area Rgo and the data size of the standard reception area Rgo. Then, the communication control device 10 calculates the standard reception area Rgo from the acquired start address of the standard reception area Rgo and the data size of the standard reception area Rgo.
  • the communication control device 10 has the effect that the standard reception area Rgo can be calculated from the start address of the standard reception area Rgo and the data size of the standard reception area Rgo acquired in advance.
  • the communication control device 10 further includes a first descriptor FIFA 125 (storage unit).
  • the first descriptor FIFO 125 stores a normal descriptor Dco which is "a descriptor Dc set in the main memory 20 before receiving the data Dt each time the data Dt is to be received (for example, every control cycle Cc)". Will be done.
  • the first descriptor Dc (X), which is first read by the reading unit 123 when the data Dt is transferred and is first determined by the determination unit 124, is a normal descriptor Dco stored in the first descriptor FIFO 125. ..
  • the first descriptor Dc (X) that the reading unit 123 first reads and reads when transferring the data Dt and the determination unit 124 first determines whether or not the data Dt is correct is the normal descriptor Dco (X).
  • the DMAC 121 determines that (A) the normal descriptor Dco (X) is "not available” and (B) another normal descriptor Dco (Y) is "available”. The transfer is executed according to Dco (Y).
  • Another normal descriptor Dco (Y) is a normal descriptor Dco read by the reading unit 123 after the first descriptor Dc (X) (that is, the normal descriptor Dco (X)). That is, the normal descriptor Dco (Y) is a normal descriptor Dco that follows the normal descriptor Dco (X), and is a trailing descriptor Dc of the normal descriptor Dco (X).
  • the DMAC 121 uses the normal descriptor Dco (Y) as the "usable descriptor” and transfers according to the normal descriptor Dco (Y). Execute. Specifically, the DMAC 121 transfers the data Dt to an area having the start address As (Y) defined in the descriptor Dco (Y) as the start address.
  • DMAC121 performs the following transfer. That is, the DMAC 121 is read next to the normal descriptor Dco (P) by the reading unit 123, and transfers the data Dt according to the normal descriptor Dco (Q) determined to be "available” by the determination unit 124.
  • the normal descriptors Dco (P) and Dco (Q) are determined to be "not available", and the normal descriptor Dco (R) read next to the normal descriptor Dco (Q) is determined to be "available”. Then, the DMAC 121 executes the following. That is, the DMAC 121 is read next to the normal descriptor Dco (Q) by the reading unit 123, and transfers the data Dt according to the normal descriptor Dco (R) determined to be "available” by the determination unit 124.
  • the communication control device 10 determines that the normal descriptor Dco (X) stored in the first descriptor FIFO 125 is "available"
  • the communication control device 10 executes the transfer according to the normal descriptor Dco (X). Specifically, the communication control device 10 transfers the data Dt to an area whose head address is the start address As (X) defined by the normal descriptor Dco (X) determined to be “available”.
  • the communication control device 10 determines that the normal descriptor Dco (X) is "not available” and determines that the normal descriptor Dco (Y) is "available"
  • the normal descriptor Dco (Y) is determined according to the normal descriptor Dco (Y). Perform the transfer. For example, when the communication control device 10 determines that the normal descriptor Dco (X) is "not available”, it further reads the normal descriptor Dco (Y) which is the trailing descriptor Dc stored in the first descriptor FIFA 125.
  • the communication control device 10 determines that the read normal descriptor Dco (Y) is "available"
  • the communication control device 10 sets the start address As (Y) defined by the normal descriptor Dco (Y) as the start address in the area. Transfer the data Dt.
  • the CPU or the like determines how many data Dt (more accurately, how many frame data) a certain information (for example, image information of several megabytes (Mbyte)) is transmitted. Has not calculated. For example, even if the data size of one data Dt (frame data) is usually "1.5 kilobytes (Kbyte)", the CPU or the like has a certain amount of information such as how many data Dt. Not calculated if it will be sent as.
  • a certain information for example, image information of several megabytes (Mbyte)
  • the CPU or the like generally has a sufficient number (number) of normal descriptors Dco so that the certain information can always be received (transferred to the main memory 20) before receiving the certain information. Is set in the main memory 20. That is, the CPU 30 and the like set the number of normal descriptors Dco, which is sufficiently larger than the number of data Dt to be received from the network 3, in the main memory 20 in advance before receiving the data Dt.
  • the normal descriptor Dco set in the main memory 20 by the CPU 30 or the like is stored in the first descriptor FIFO 125. Therefore, the number of normal descriptors Dco stored in the first descriptor FIFO 125 is sufficiently larger than the number of data Dt to be received from the network 3.
  • the communication control device 10 can select an "usable descriptor" for the transfer of the data Dt from the number of normal descriptors Dco that is sufficiently larger than the number of data Dt to be transferred. Play.
  • the communication control device 10 further includes a second descriptor FIFA 126 different from the first descriptor FIFA 125.
  • the reading unit 123 reads the save descriptor Dce which is the descriptor Dc stored in advance in the second descriptor FIFA 126.
  • the DMAC 121 uses the save descriptor Dce read by the read unit 123 as a "usable descriptor" for transferring data Dt, and sets data in an area having a start address As defined in the save descriptor Dce as a start address. Transfer Dt.
  • the error number Ct is the number of normal descriptors Dco stored in the first descriptor FIFA 125 and read by the reading unit 123, and is the number of normal descriptors Dco determined to be "not available" by the determination unit 124.
  • the communication control device 10 reads the save descriptor Dce stored in advance in the second descriptor FIFA 126. Then, the communication control device 10 sets the save descriptor Dce as a "usable descriptor" for the transfer of the data Dt, and sets the data Dt in an area starting from the start address As defined in the save descriptor Dce. To transfer.
  • the communication control device 10 transfers the data Dt according to the save descriptor Dce instead of the "normal descriptor Dco stored in the first descriptor FIFO 125".
  • the communication control device 10 transfers the data Dt reliably and at high speed even when an abnormality occurs in all or most of the "normal descriptor Dco stored in the first descriptor FIFO 125". It has the effect of being able to.
  • the start address As defined by the backup descriptor Dce is an area in which data Dt can be stored in the main memory 20, and is in an area different from the standard reception area Rgo (save reception area Rge). be.
  • the communication control device 10 transfers the data Dt to the main memory 20 according to the save descriptor Dce
  • the communication control device 10 transfers the data Dt to the following area. That is, the communication control device 10 transfers the data Dt to the backup reception area Rge, which is an area different from the standard reception area Rgo, according to the backup descriptor Dce.
  • the save reception area Rge which is an area to which data Dt is transferred according to the save descriptor Dce, is different from the standard reception area Rgo.
  • the following events may occur for a certain data Dt (X) transferred into the standard reception area Rgo according to the backup descriptor Dce. .. That is, there is a possibility that the certain data Dt (X) may be overwritten by another data Dt (Y) transferred into the standard reception area Rgo according to the normal descriptor Dco stored in the first descriptor FIFO 125. be.
  • the communication control device 10 requires complicated processing such as "the data Dt (X) transferred according to the save descriptor Dce is overwritten by the data Dt (Y) transferred according to the normal descriptor Dco". It has the effect of being able to avoid it without doing so.
  • FIG. 6 is a diagram illustrating an outline of a process for specifying a standard reception area Rgo (permitted area) and a determination process.
  • the communication control device 10 is standard before executing the data reception process, which is the process of "determining the transfer destination (particularly, its start address As) of the received data Dt and transferring the data Dt to the determined transfer destination".
  • a process for specifying the reception area Rgo is executed.
  • the data reception process executed by the communication control device 10 after specifying the standard reception area Rgo includes two determination processes, specifically, a first determination process FJ and a second determination process SJ.
  • FIG. 6A is a diagram illustrating a standard reception area Rgo specified before the communication control device 10 executes data reception processing.
  • the communication control device 10 acquires in advance from the CPU 30 the information indicating the "start address of the standard reception area Rgo" and the information indicating the "data size of the standard reception area Rgo".
  • the communication control device 10 has a standard reception area as shown in FIG. 6A from the “start address of the standard reception area Rgo” and the “data size of the standard reception area Rgo” acquired from the CPU 30. Identify the Rgo.
  • FIG. 6A is a diagram illustrating an outline of the first determination process FJ and the second determination process SJ included in the data reception process executed by the communication control device 10.
  • the communication control device 10 has a standard reception area in which the start address As defined in the descriptor Dc (particularly, the normal descriptor Dco) read by the read unit 123 is set. Is it in Rgo? "
  • the determination unit 124 can execute the first determination process FJ after the time when the normal descriptor Dco is set in the main memory 20 by the CPU 30. More precisely, the determination unit 124 can execute the first determination process FJ after the time when the normal descriptor Dco set in the main memory 20 by the CPU 30 is stored in the first descriptor FIFA 125. That is, the determination unit 124 can execute the first determination process FJ even before the data Dt is received, as long as it is after the time when the normal descriptor Dco is stored in the first descriptor FIFO 125.
  • the second determination process SJ is executed by the communication control device 10 (particularly, the determination unit 124) after the time when the data Dt is received.
  • the determination unit 124 measures the data size of the data Dt when the PLC1 receives the data Dt and more accurately, when the data Dt received by the PLC1 is stored in the data FIFA 127.
  • the determination unit 124 determines the end address Ae of "the area after transfer when the data Dt is transferred according to the normal descriptor Dco" from the measured data size of the data Dt and the start address As defined in the normal descriptor Dco. calculate. Then, in the second determination process SJ, the determination unit 124 determines whether the end address Ae is within the standard reception area Rgo.
  • the first determination process FJ can be executed even before the data Dt is received, but it is not essential to execute the first determination process FJ before the data Dt is received.
  • the first determination process FJ may be executed after receiving the data Dt, or the first determination process FJ may be executed in parallel with the reception of the data Dt.
  • FIG. 7 is a flow chart showing an example of data reception processing executed by the communication control device 10.
  • the address determination unit 122 sets the error number Ct, which is the number of normal descriptors Dco determined to be "unusable descriptors" by the determination unit 124, to "0" (S110).
  • the reading unit 123 refers to the first descriptor FIFA 125 and reads the normal descriptor Dco whose validity has not yet been determined by the determination unit 124 (S120).
  • the reading unit 123 notifies the determination unit 124 of the start address As specified in the read normal descriptor Dco.
  • the determination unit 124 determines "whether the start address As notified from the reading unit 123 is within the standard reception area Rgo" (S130) (first determination process FJ).
  • the communication control device 10 receives the data Dt (S140).
  • the received data Dt is stored in the data FIFA 127.
  • the determination unit 124 measures the data size of the data Dt stored in the data FIFA 127.
  • the determination unit 124 calculates the end address Ae of "the area after transfer when the data Dt is transferred according to the normal descriptor Dco" from the measured data size of the data Dt and the start address As notified from the read unit 123. (S150). Then, the determination unit 124 determines "whether the end address Ae calculated in S140 is within the standard reception area Rgo" (S160) (second determination process SJ).
  • the address determination unit 122 executes the following processing. That is, the address determination unit 122 notifies the DMAC 121 of the start address As specified in the descriptor Dc last read by the reading unit 123.
  • the DMAC 121 transfers the data Dt according to the descriptor Dc last read by the reading unit 123 (S170). That is, the DMAC 121 puts the data Dt in the area in the main memory 20 having the "start address As specified in the descriptor Dc last read by the reading unit 123" notified from the addressing unit 122 as the start address. Forward.
  • the address determination unit 122 sets the error number Ct to "1" only. Count up (S180). The reading unit 123 determines "whether the reference number Nr has been exceeded” with respect to the error number Ct counted up by "1" in S180 (S190).
  • the reading unit 123 reads the save descriptor Dce stored in advance in the second descriptor FIFA 126. (S200). Then, the address determination unit 122 notifies the DMAC 121 of the start address As specified in the descriptor Dc last read by the read unit 123. That is, the address determination unit 122 is the read unit in S200. Notify the DMAC 121 of the start address As specified in the save descriptor Dce read by 123.
  • the reading unit 123 receives the next normal descriptor stored in the first descriptor FIFA 125.
  • Read Dco S210. That is, the reading unit 123 reads the first normal descriptor Dco among the normal descriptor Dco that is stored in the first descriptor FIFA 125 and whose validity has not yet been determined by the determination unit 124.
  • the reading unit 123 notifies the determination unit 124 of the start address As specified in the read normal descriptor Dco.
  • the determination unit 124 executes the process of S130.
  • FIG. 7 shows an example in which the communication control device 10 receives the data Dt after the determination unit 124 determines that “the start address As notified from the reading unit 123 is in the standard reception area Rgo”. .. However, it is essential that the timing at which the communication control device 10 receives the data Dt is after the determination unit 124 determines that "the start address As notified from the reading unit 123 is within the standard reception area Rgo". is not it.
  • S140 reception of data Dt
  • S130 first determination process FJ
  • the determination unit 124 may find the normal descriptor Dco that determines that "the start address As is in the standard reception area Rgo" from the normal descriptor Dco read by the reading unit 123.
  • the communication control device 10 may receive the data Dt before the normal descriptor Dco "the start address As is in the standard reception area Rgo" is discovered in the first processing FJ. For example, after the determination of "NO" in S130 for a certain descriptor Dc, before another descriptor Dc is read, or before the determination of S130 is executed for another descriptor Dc, the communication control device 10 Data Dt may be received.
  • the control method executed by the communication control device 10 is a control method of the communication control device that transfers the data Dt received from the network 3 to the main memory 20.
  • the control method includes a read step (S120, S200, and S210), a determination step (S130 and S160), and a transfer step (S170).
  • the read step reads the descriptor Dc that defines the start address As of the area where the data Dt should be stored.
  • the descriptor Dc read in the read step is "available". Is determined.
  • the standard reception area Rgo is preset as an area in which the data Dt can be stored in the main memory 20.
  • the data Dt is transferred to the area having the start address As specified by the descriptor Dc read in the read step as the start address.
  • a plurality of descriptors Dc are prepared in advance in the communication control device 10.
  • the first descriptor Dc (X) read in the read step is determined to be "available” in the determination step.
  • the read step transfers the data Dt to the area having the start address As (X) defined in the first descriptor Dc (X) as the start address.
  • the first normal descriptor Dco (X) read in the read step is determined to be "available” in the determination step. The transfer is performed according to the first normal descriptor Dco (X).
  • the transfer step transfers the data Dt according to the second descriptor Dc (Y) read after the first descriptor Dc (X) in the read step among the plurality of descriptors Dc prepared in advance.
  • the transfer step transfers data Dt to an area having a start address As (Y) defined in the second descriptor Dc (Y) as a start address.
  • the control method determines that the first descriptor Dc (X) read from a plurality of descriptors Dc prepared in advance is "available", the first descriptor Dc (X) is determined. ), The data Dt is transferred. As a specific example, the control method transfers data Dt to an area having a start address As (X) defined by the first descriptor Dc (X) as a start address.
  • the second descriptor Dc (Y) is further read from the plurality of descriptors Dc prepared in advance. Then, in the control method, the data Dt is transferred to the area having the start address As (Y) defined by the second descriptor Dc (Y) as the start address.
  • the control method notifies the CPU 30 or the like of the determination result. There is no such thing. Even when it is determined that the start address As (X) is not in the standard reception area Rgo, the control method does not cause the CPU 30 or the like to reset the first descriptor Dc (X) to the correct one.
  • the control method further reads the second descriptor Dc (Y) prepared in advance when it is determined that the start address As (X) defined by the first descriptor Dc (X) is not in the standard reception area Rgo. Then, the control method transfers the data Dt to the main memory 20 according to the second descriptor Dc (Y) read.
  • available descriptor is selected for the transfer of data Dt from a plurality of descriptors Dc prepared in advance, and the data Dt is transferred according to the selected "available descriptor".
  • control method can prevent erroneous data transfer by the descriptor Dc. Further, the control method can shorten the time required for data Dt transfer as compared with the case where the "usable descriptor" is reset to the CPU 30 or the like for data Dt transfer.
  • control method has the effect of being able to transfer the data Dt received from the network 3 to the main memory 20 at high speed while preventing erroneous data transfer by the descriptor Dc.
  • the determination of "whether or not the start address As specified in the read descriptor Dc is within the standard reception area Rgo" can be executed even before the data Dt is received from the network 3. .. Therefore, in the control method, a process for preventing "erroneous data transfer by the descriptor Dc" can be executed before receiving the data Dt.
  • a process for preventing "erroneous data transfer by the descriptor Dc" is executed before the data Dt is received, so that the data Dt is transferred to the main memory 20 after the data Dt is received. It has the effect of shortening the time required to do so.
  • the communication control device 10 is realized as a NIC (Network Interface Card).
  • the communication control device 10 is typically composed of a logic circuit made of hardware such as FPGA (Field-Programmable gate array) or ASIC (Application Specific Integrated Circuit).
  • the communication control device 10 for determining the rejection of the descriptor Dc is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device 10 configured by the logic circuit by the hardware has an effect that the rejection of the descriptor Dc can be determined at a higher speed than the case where the CPU 30 or the like determines the rejection of the descriptor Dc.
  • control method selects "usable descriptor" for data Dt transfer from a plurality of descriptors Dc prepared in advance without requiring resetting of the descriptor Dc by the CPU 30 or the like, and the selected descriptor. Transfer is executed according to Dc.
  • the communication control device 10 can execute a process of selecting a plurality of "usable descriptors" prepared in advance from the descriptor Dc for data Dt transfer at extremely high speed. .. Further, when configured by a logic circuit by hardware, the communication control device 10 can execute transfer at extremely high speed according to the descriptor Dc selected from a plurality of descriptors Dc prepared in advance.
  • the control method can transfer the data Dt received from the network 3 at an extremely high speed while preventing erroneous data transfer by the descriptor Dc. It has the effect of.
  • Modification example (about network configuration example)
  • a plurality of networks 3 are connected to the PLC 1 via the network hub 2.
  • one network 3 is connected to PLC1 without going through a network hub 2, and for example, PLC1 and one or more network devices are communicably connected to each other in a one-stroke format. You may.
  • the communication control device is a communication control device that transfers data received from the network to the main memory, and has a reading unit that reads a descriptor that defines a start address of an area in which the data should be stored. When the start address specified in the descriptor read by the reading unit is within the permitted area which is a preset area for storing the data in the main memory, the reading unit determines. A determination unit that determines that the read descriptor is available, and a transfer unit that transfers the data to an area having the start address specified in the descriptor read by the reading unit as a start address.
  • a plurality of the descriptors are prepared in advance, and in the transfer unit, (A) among the plurality of descriptors prepared in advance, the first descriptor read by the reading unit can be used by the determination unit. If it is determined that the data is transferred to an area having the start address specified in the first descriptor as a start address, (B) the first descriptor is not available by the determination unit. When it is determined, among the plurality of descriptors prepared in advance, the data is set in the area having the start address specified in the second descriptor read after the first descriptor by the reading unit as the start address. To transfer.
  • the communication control device determines that the first descriptor read from the plurality of descriptors prepared in advance is "available"
  • the start address specified by the first descriptor is started first. Transfer the data to the area to be the address.
  • the communication control device determines that the first descriptor is "not available”
  • the communication control device further reads the second descriptor from the plurality of descriptors prepared in advance. Then, the communication control device transfers the data to an area whose head address is the start address defined by the second descriptor.
  • the communication control device determines that the read start address specified by the first descriptor is not within the permitted area, the communication control device does not notify the CPU or the like of the determination result, and the CPU or the like is described. It does not reset the first descriptor to the correct one.
  • the communication control device determines that the start address specified by the first descriptor is not within the permitted area, the communication control device further reads the second descriptor prepared in advance, and the data is mainly read according to the read second descriptor. Transfer to memory.
  • the communication control device selects "available descriptors" for transferring the data from the plurality of descriptors prepared in advance, and transfers the data according to the selected "available descriptors".
  • the communication control device can prevent erroneous data transfer by the descriptor, and the data can be transferred as compared with the case where the CPU or the like resets the "usable descriptor" for the data transfer.
  • the time required for transfer can be shortened.
  • the communication control device has the effect of being able to transfer data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
  • the determination of "whether or not the start address specified in the read descriptor is within the permitted area" can be executed even before the data is received from the network. Therefore, the communication control device can execute a process for preventing "erroneous data transfer by the descriptor" before receiving the data.
  • the communication control device executes a process for preventing "erroneous data transfer by a descriptor" before receiving the data, so that the data is transferred to the main memory after receiving the data. It has the effect of shortening the time required to do so.
  • the communication control device is realized as a NIC (Network Interface Card).
  • the communication control device is typically composed of a logic circuit made of hardware such as FPGA (Field-Programmable gate array) or ASIC (Application Specific Integrated Circuit).
  • the communication control device for determining the descriptor refusal is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device configured by the logic circuit by the hardware has an effect that the descriptor rejection can be determined at a higher speed than the case where the CPU determines the descriptor rejection.
  • the communication control device selects an "usable descriptor" for data transfer from a plurality of descriptors prepared in advance without requiring the descriptor to be reset by a CPU or the like, and follows the selected descriptor. Perform the transfer.
  • the communication control device can execute a process of selecting a plurality of "usable descriptors" prepared in advance for data transfer at extremely high speed. Further, when configured by a logic circuit by hardware, the communication control device can execute transfer at extremely high speed according to a descriptor selected from a plurality of descriptors prepared in advance.
  • the communication control device when configured by a logic circuit by hardware, the communication control device can transfer the data received from the network at an extremely high speed while preventing erroneous data transfer by the descriptor. It works.
  • the start address specified in the descriptor read by the reading unit is in the permitted area
  • the communication control device calculates the end address from the data size of the received data and the start address specified by the descriptor read by the reading unit. Then, when the communication control device determines that "the start address specified by the read descriptor is in the permitted area" and "the end address is in the permitted area", the read descriptor is used. Judge that it is possible.
  • the read descriptor is inappropriate as a descriptor for determining the transfer destination of the received data, that is, it cannot be used as a descriptor for determining the transfer destination of the received data (unusable). be).
  • the communication control device determines "whether or not the read descriptor is available" in consideration of the data size of the received data in addition to the "start address specified by the read descriptor".
  • the communication control device considers the data size of the received data in addition to the start address, and selects a "usable descriptor" for the transfer of the received data from among a plurality of descriptors prepared in advance. , It has the effect of being able to select more accurately.
  • the communication control device may calculate the permitted area from the start address of the permitted area and the data size of the permitted area acquired in advance.
  • the communication control device acquires the start address of the permission area and the data size of the permission area in advance, and obtains the start address of the permission area and the data size of the permission area. From, the permission area is calculated.
  • the communication control device has the effect that the permitted area can be calculated from the start address of the permitted area and the data size of the permitted area acquired in advance.
  • the communication control device further includes a storage unit for storing the descriptor set in the main memory before receiving the data each time the data is to be received, and the first descriptor is provided. Is stored in the storage unit, and the transfer unit (A) determines that the first descriptor is not available by the determination unit, and (B) the first storage unit stored in the storage unit. When it is determined by the determination unit that the trailing descriptor, which is the descriptor different from the descriptor and is the descriptor read after the first descriptor by the reading unit, is available, the subsequent descriptor is used.
  • the data may be transferred to an area having the start address specified in the trailing descriptor as the start address, with the descriptor as the second descriptor.
  • the communication control device determines that the first descriptor stored in the storage unit is "available"
  • the communication control device is set in an area having a start address specified by the first descriptor as a start address. Transfer data.
  • the trailing descriptor is used as the second descriptor.
  • the transfer is executed according to the following descriptor. For example, when the communication control device determines that the first descriptor is "not available”, the communication control device further reads the trailing descriptor stored in the storage unit. Then, when the communication control device determines that the read trailing descriptor is "available", the communication control device transfers the data to an area having the start address defined by the trailing descriptor as the start address.
  • the CPU or the like determines how many of the above data (more accurately, how many frame data) the certain information (for example, image information of several megabytes (Mbyte)) is transmitted. Has not calculated. For example, even if the data size of one piece of the data (frame data) is usually "1.5 kilobytes (Kbyte)", the CPU or the like may use the information such as how many pieces of the data. Not calculated if it will be sent as.
  • the CPU or the like generally provides a sufficient number (number) of the descriptors so that the information can always be received (transferred to the main memory) before receiving the information. , Set in the main memory. That is, the CPU or the like sets the descriptors in the main memory in advance before receiving the data, in a number having a sufficient margin with respect to the number of the data to be received from the network.
  • the descriptor set in the main memory by the CPU or the like is stored in the storage unit. Therefore, the number of the descriptors stored in the storage unit is sufficiently larger than the number of the data to be received from the network.
  • the communication control device has the effect that "available descriptors" can be selected for the transfer of the data from the descriptors having a sufficiently large number as compared with the number of the data to be transferred. Play.
  • the number of the descriptors stored in the storage unit and read by the reading unit and determined not to be available by the determination unit is determined in advance.
  • the reading unit reads the save descriptor which is the descriptor stored in advance in the second storage unit different from the storage unit, and the transfer unit reads by the reading unit.
  • the saved descriptor may be used as the second descriptor, and the data may be transferred to an area having the start address specified in the save descriptor as a start address.
  • the communication control device is the read "descriptor stored in the storage unit", and when the number of descriptors determined to be unusable exceeds the reference number, the second storage is performed.
  • the save descriptor stored in advance in the unit is read. Then, the communication control device transfers the data to the area where the save descriptor is used as the second descriptor and the start address defined in the save descriptor is the start address.
  • the communication control device replaces the "descriptor stored in the storage unit".
  • the data is transferred according to the save descriptor.
  • the communication control device reliably and quickly transfers the data to the main memory even when an abnormality occurs in all or most of the "descriptors stored in the storage unit". It has the effect of being able to be transferred to.
  • the start address defined by the save descriptor is an area in which the data can be stored in the main memory, even if it is in an area different from the permitted area. good.
  • the communication control device transfers the data to the main memory according to the save descriptor
  • the communication control device transfers the data to an area different from the permitted area according to the save descriptor. ..
  • the area to which the data is transferred according to the save descriptor is different from the permitted area.
  • the following events may occur. That is, there is a possibility that a certain data transferred into the permitted area according to the save descriptor may be overwritten by another data transferred into the permitted area according to the descriptor stored in the storage unit. There is.
  • the communication control device complicates the situation that "a certain data transferred according to the save descriptor is overwritten by another data transferred according to the descriptor stored in the storage unit". It has the effect of being avoidable without the need for processing.
  • the control method is a control method for a communication control device that transfers data received from a network to a main memory, and reads a descriptor that defines a start address of an area in which the data should be stored.
  • a descriptor that defines a start address of an area in which the data should be stored.
  • the step and the start address specified in the descriptor read in the read step are in a permitted area which is a preset area as an area in which the data can be stored in the main memory, the said.
  • the data is stored in a determination step of determining that the descriptor read in the read step is available, and an area having the start address specified in the descriptor read in the read step as a start address.
  • a plurality of the descriptors including the transfer step to be transferred are prepared in advance, and in the transfer step, (A) among the plurality of descriptors prepared in advance, the first descriptor read in the read step is used.
  • the data is transferred to an area having the start address specified in the first descriptor as a start address, and (B) the first descriptor is said. If it is determined that the data is not available in the determination step, among the plurality of descriptors prepared in advance, the start address specified in the second descriptor read after the first descriptor in the read step is assigned. The data is transferred to the area to be the start address.
  • the control method determines that the first descriptor read from the plurality of descriptors prepared in advance is "available"
  • the start address specified by the first descriptor is set as the start address. Transfer the data to the area to be.
  • the control method determines that the first descriptor is "not available”
  • the second descriptor is further read from the plurality of descriptors prepared in advance. Then, the control method transfers the data to an area having the start address defined by the second descriptor as a start address.
  • the control method determines that the read start address specified by the first descriptor is not within the permitted area, the determination result is not notified to the CPU or the like, and the CPU or the like is notified of the determination result. It does not reset a descriptor to the correct one.
  • the control method determines that the start address specified by the first descriptor is not within the permitted area, the second descriptor prepared in advance is further read, and the data is stored in the main memory according to the read second descriptor. Transfer to.
  • the control method selects "available descriptors" for transferring the data from the plurality of descriptors prepared in advance, and transfers the data according to the selected "available descriptors".
  • control method can prevent erroneous data transfer by the descriptor, and also, as compared with the case where the CPU or the like resets the "usable descriptor" for the data transfer, the data transfer.
  • the time required for the data can be shortened.
  • control method has the effect of being able to transfer data received from the network to the main memory at high speed while preventing erroneous data transfer by the descriptor.
  • the control method can execute a process for preventing "erroneous data transfer by the descriptor" before receiving the data.
  • a process for preventing "erroneous data transfer by a descriptor" is executed before receiving the data, so that the data is transferred to the main memory after receiving the data. It has the effect of shortening the time until.
  • the communication control device is realized as a NIC (Network Interface Card).
  • the communication control device is typically composed of a logic circuit made of hardware such as FPGA (Field-Programmable gate array) or ASIC (Application Specific Integrated Circuit).
  • the communication control device for determining the descriptor refusal is configured by a logic circuit by hardware, the following effects can be realized. That is, in general, if the processing contents are the same, the processing by hardware can be executed at a higher speed than the processing by software (specifically, CPU). Therefore, the communication control device configured by the logic circuit by the hardware has an effect that the descriptor rejection can be determined at a higher speed than the case where the CPU determines the descriptor rejection.
  • "available descriptors" are selected for data transfer from a plurality of descriptors prepared in advance without the need for descriptor resetting by a CPU or the like, and the descriptors are transferred according to the selected descriptors. To execute.
  • the communication control device can execute a process of selecting a plurality of "usable descriptors" prepared in advance for data transfer at extremely high speed. Further, when configured by a logic circuit by hardware, the communication control device can execute transfer at extremely high speed according to a descriptor selected from a plurality of descriptors prepared in advance.
  • the control method has an effect that the data received from the network can be transferred at an extremely high speed while preventing erroneous data transfer by the descriptor. Play.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

La présente invention empêche que des données erronées soient réacheminées par un descripteur, tout en réacheminant des données reçues d'un réseau à une mémoire principale à des vitesses élevées. Un DMAC (121) exécute un réacheminement conformément à un deuxième descripteur (Dc(Y)) s'il est déterminé qu'un premier descripteur (Dc(X)) est inutilisable.
PCT/JP2021/006542 2020-09-07 2021-02-22 Dispositif de commande de communication et procédé de commande pour dispositif de commande de communication WO2022049801A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-149861 2020-09-07
JP2020149861A JP7476733B2 (ja) 2020-09-07 2020-09-07 通信制御機器および通信制御機器の制御方法

Publications (1)

Publication Number Publication Date
WO2022049801A1 true WO2022049801A1 (fr) 2022-03-10

Family

ID=80490843

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/006542 WO2022049801A1 (fr) 2020-09-07 2021-02-22 Dispositif de commande de communication et procédé de commande pour dispositif de commande de communication

Country Status (2)

Country Link
JP (1) JP7476733B2 (fr)
WO (1) WO2022049801A1 (fr)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030233497A1 (en) * 2002-06-18 2003-12-18 Chien-Yi Shih DMA controller and method for checking address of data to be transferred with DMA
JP2006178795A (ja) * 2004-12-24 2006-07-06 Fujitsu Ltd Dma回路及びこれを用いたディスクアレイ装置
JP2009032053A (ja) * 2007-07-27 2009-02-12 Sony Corp データ受信システム
JP2010004262A (ja) * 2008-06-19 2010-01-07 Sony Corp 情報受信装置および情報受信方法
JP2010176442A (ja) * 2009-01-30 2010-08-12 Fujitsu Ltd ディスクリプタ転送装置、i/oコントローラ、及びディスクリプタ転送方法
US7921237B1 (en) * 2008-09-29 2011-04-05 Network Appliance, Inc. Preserving data integrity of DMA descriptors

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030233497A1 (en) * 2002-06-18 2003-12-18 Chien-Yi Shih DMA controller and method for checking address of data to be transferred with DMA
JP2006178795A (ja) * 2004-12-24 2006-07-06 Fujitsu Ltd Dma回路及びこれを用いたディスクアレイ装置
JP2009032053A (ja) * 2007-07-27 2009-02-12 Sony Corp データ受信システム
JP2010004262A (ja) * 2008-06-19 2010-01-07 Sony Corp 情報受信装置および情報受信方法
US7921237B1 (en) * 2008-09-29 2011-04-05 Network Appliance, Inc. Preserving data integrity of DMA descriptors
JP2010176442A (ja) * 2009-01-30 2010-08-12 Fujitsu Ltd ディスクリプタ転送装置、i/oコントローラ、及びディスクリプタ転送方法

Also Published As

Publication number Publication date
JP7476733B2 (ja) 2024-05-01
JP2022044302A (ja) 2022-03-17

Similar Documents

Publication Publication Date Title
CN109491958B (zh) 错误处理***和错误处理方法
US7516254B2 (en) Memory control apparatus
EP0132161B1 (fr) Appareil pour commander le traitement de plusieurs interruptions
US8213448B2 (en) Method to support lossless real time data sampling and processing on rapid I/O end-point
CN111694508B (zh) 在基于NVMe的SSD中管理LBA重叠检查的方法和***
US7934043B2 (en) Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle
WO2022049801A1 (fr) Dispositif de commande de communication et procédé de commande pour dispositif de commande de communication
EP1255375B1 (fr) Systeme de partage de donnees memoire de plusieurs stations
US8756356B2 (en) Pipe arbitration using an arbitration circuit to select a control circuit among a plurality of control circuits and by updating state information with a data transfer of a predetermined size
CN113704006B (zh) 通信方法、装置、电子设备、存储介质及片上***
FR2991475B1 (fr) Dispositif de circuit pour systeme ainsi que systeme equipe et procede d'acces en memoire
US20230099487A1 (en) Communication control device and method for controlling communication control device
GB2598666A (en) I3C pending read with retransmission
JP4217386B2 (ja) Fifo装置
JP2520905B2 (ja) シリアル通信制御装置
US7167937B2 (en) Bus system
JP5441219B2 (ja) 半導体装置及びシリアルインタフェース回路
KR950001513B1 (ko) 미니맵(Mini-MAP) 네트워크의 데이타 링크 계층에서 도착통지(acknowledgement) 전송방법
US7987408B2 (en) Data buffering method
JP2009289269A (ja) バッファメモリにおけるメモリの割り当て方法
JP2009289269A6 (ja) バッファメモリにおけるメモリの割り当て方法
JP4527419B2 (ja) プログラムトレース方法およびトレース処理システム
CN118210561A (zh) 一种fpga快速加载方法、装置、设备及介质
JP2009086908A (ja) マイコン装置
JP4327765B2 (ja) バスシステム

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863863

Country of ref document: EP

Kind code of ref document: A1