WO2022049801A1 - Communication control device and control method for communication control device - Google Patents

Communication control device and control method for communication control device 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
French (fr)
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/en

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

The present invention prevents erroneous data from being forwarded by a descriptor, while forwarding data received from a network to main memory at high speeds. A DMAC (121) executes forwarding in accordance with a second descriptor (Dc(Y)) if it is determined that a first descriptor (Dc(X)) is unusable.

Description

通信制御機器および通信制御機器の制御方法Communication control device and control method of communication control device
 本発明は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器等に関する。 The present invention relates to a communication control device or the like that transfers data received from a network to a main memory.
 従来、ネットワークから受信したデータをメインメモリへと転送する通信制御機器について、ディスクリプタによる誤ったデータ転送を防止する技術が知られている。例えば、下掲の特許文献1には、ディスクリプタを読み出すときに、ディスクリプタが正しいか否かを確認して、メモリのデータのDMA転送の可否を判定するDMA回路が開示されている。DMA回路は、ディスクリプタが正しくないと判定すると、DMA転送を行わずに、CPUにエラー通知を行う。そして、エラーを通知されたCPUによって適切な設定がなされた後に、DMA回路は転送を実行する。 Conventionally, a technique for preventing erroneous data transfer by a descriptor is known for a communication control device that transfers data received from a network to a main memory. For example, Patent Document 1 below 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.
日本国特開2006-178795号公報Japanese Patent Application Laid-Open No. 2006-178795
 しかしながら、上述のような従来技術は、「受信したデータを、ディスクリプタに従ってメインメモリへと転送する」というデータ受信処理を、高速に実行することができないという問題がある。例えば、上述のような従来技術は、高速な制御周期(例えば、100μs)で周期的に実行すべきデータ受信処理を、前記制御周期内に完了することは困難である。以下、従来技術の抱える問題の詳細を、図8を用いて説明する。 However, 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. For example, in 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. Hereinafter, the details of the problems of the prior art will be described with reference to FIG.
 図8は、上述のような従来技術において、ディスクリプタに従ってデータをメインメモリへと転送する通信制御機器が前記ディスクリプタの許否(当否)を判定してから、前記データを前記メインメモリへと転送するまでに要する時間等を説明する図である。 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.
 上述のような従来技術において、前記通信制御機器が前記ディスクリプタの誤りを検知した場合、前記通信制御機器は、その検知結果をCPUへと通知する。上述の通知を受けたCPUは、ディスクリプタを再設定する。そして、CPUによって再設定されたディスクリプタに従って、前記通信制御機器は、データをメインメモリへと転送する。 In the above-mentioned conventional technique, 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.
 そのため、図8の(A)に示すように、前記通信制御機器は、CPU(ソフトウェア)によるディスクリプタの再設定処理が完了するまで待機しなければならず、ディスクリプタの誤りを検知してから、データをメインメモリへと転送するまでに要する時間が長い。 Therefore, as shown in FIG. 8A, 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.
 また、一般に通信制御機器は、データを受信してからメインメモリへと転送するまでの間、受信したデータを、一時的な格納領域であるバッファ(例えば、FIFO(First In First Out)方式の格納領域であるデータFIFO)に格納する。そして、通信制御機器は、バッファに格納したデータを、ディスクリプタに従ってメインメモリへと転送する。ただし、通信制御機器の備えるバッファの記憶容量は限られているのが通常である。また、通信制御機器は、いったんバッファにデータを格納した後は、そのデータのメインメモリへの転送が完了するまで、そのデータをバッファに保存し続けておくのが原則である。 Further, in general, 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. However, 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.
 そのため、図8の(B)に示すように、ディスクリプタの許否を判定してから、データをメインメモリへと転送するまでに要する時間が長くなると、受信したデータをバッファに格納することができず、その結果、受信したデータを喪失する可能性がある。 Therefore, as shown in FIG. 8B, if the time required to transfer the data to the main memory after determining the permission or disapproval of the descriptor becomes long, the received data cannot be stored in the buffer. As a result, the received data may be lost.
 図8の(B)に示す例において、従来技術に係る通信制御機器は、データ1を受信した後、さらに、データ2およびデータ3を受信し、受信したデータ1、データ2、および、データ3をバッファへと格納する。そして、前記通信制御機器は、データ1のメインメモリへの転送が完了するまで、つまり、CPU(ソフトウェア)によるディスクリプタの再設定処理が完了するまで、データ1をバッファに保存し続けておく。ただし、バッファの記憶容量は限られているため、前記通信制御機器が受信したデータ1、データ2、および、データ3を格納しているバッファには、新たなデータを格納できるだけの余裕がない。 In the example shown in FIG. 8B, the communication control device according to the prior art 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. However, 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.
 そのため、ソフトウェアによるディスクリプタの再設定処理が完了し、データ1のメインメモリへの転送が完了するまでに、前記通信制御機器がさらにデータ4を受信すると、前記通信制御機器は、データ4を、バッファに格納することができない。そのため、前記通信制御機器は、受信したデータ4をメインメモリへと転送することができず、データ4は失われる。 Therefore, 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.
 図8を用いて説明してきたように、「ディスクリプタの誤りを検知すると、CPUに検知結果を通知し、CPUによって再設定されたディスクリプタに従ってデータをメインメモリへと転送する」という従来技術には、以下の問題がある。すなわち、前記従来技術には、データ転送に要する時間が長くなるという問題があり、また、データ転送に要する時間が長くなった結果、受信したデータが失われる(つまり、メインメモリへと転送できない)可能性があるといった問題がある。 As described with reference to FIG. 8, 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. There are the following problems. That is, 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). There is a problem that there is a possibility.
 本発明の一態様は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができる通信制御機器を実現することを目的とする。 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.
 上記の課題を解決するために、本発明の一態様に係る通信制御機器は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、を備え、前記ディスクリプタは予め複数用意されており、前記転送部は、(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problems, the communication control device according to one aspect of the present invention 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. When the descriptor is determined to be available by the determination 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. When it is determined by the determination unit that the data is not available, 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.
 上記の課題を解決するために、本発明の一態様に係る制御方法は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器の制御方法であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、を含み、前記ディスクリプタは予め複数用意されており、前記転送ステップは、(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 In order to solve the above problems, the control method according to one aspect of the present invention 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. A read step in which a descriptor defining a start address is read, and an area in which the start address specified in the descriptor read in the read step is preset as an area in which the data can be stored in the main memory. When it is in a certain permission area, 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.
 本発明の一態様によれば、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 According to one aspect of 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.
本発明の実施形態1に係る通信制御機器を含むPLCの要部構成を示す図である。It is a figure which shows the main part structure of the PLC including the communication control device which concerns on Embodiment 1 of this invention. 図1のPLCを含む制御システムの概要を示す図である。It is a figure which shows the outline of the control system including PLC of FIG. 本発明の実施形態1に係る通信制御機器が、通常ディスクリプタを順次読み込み、通常ディスクリプタに従ってデータをメインメモリへと転送する例を説明する図である。It is a figure explaining the example that the communication control apparatus which concerns on Embodiment 1 of this invention sequentially reads a normal descriptor and transfers data to a main memory according to a normal descriptor. 本発明の実施形態1に係る通信制御機器が、退避用ディスクリプタを読み込み、退避用ディスクリプタに従ってデータをメインメモリへと転送する例を説明する図である。It is a figure explaining the example that the communication control apparatus which concerns on Embodiment 1 of this invention reads the save descriptor and transfers the data to the main memory according to the save descriptor. 本発明の実施形態1に係る通信制御機器の奏する効果を説明する図である。It is a figure explaining the effect which the communication control apparatus which concerns on Embodiment 1 of this invention has. 標準受信領域を特定する処理、および、判定処理の概要を説明する図である。It is a figure explaining the outline of the process for specifying a standard reception area, and the determination process. データ受信処理の一例を示すフロー図である。It is a flow chart which shows an example of data reception processing. 従来の通信制御機器が、ディスクリプタの許否を判定してから、データをメインメモリへと転送するまでに要する時間等を説明する図である。It is a figure explaining the time required from the conventional communication control device determining whether or not the descriptor is permitted, and then transferring the data to the main memory.
 〔実施形態1〕
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰返さない。本実施の形態においては、機械および設備等の制御対象を制御するPLC(Programmable Logic Controller)1の備える通信制御機器10を「ネットワークから受信したデータをメインメモリへと転送する通信制御機器」の典型例として説明を行なう。また、以下の説明において、「N」、「P」、「Q」、「X」、「Y」等は、各々、「1」以上の整数を示すものとする。
[Embodiment 1]
Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated. In the present embodiment, 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". An example will be given. Further, in the following description, "N", "P", "Q", "X", "Y" and the like each indicate an integer of "1" or more.
 §1.適用例
 本発明の一態様に係る通信制御機器10についての理解を容易にするため、先ず、本発明が適用される場面の一例について、具体的には、通信制御機器10を備えるPLC1を含む制御システム0の概要について、図2を用いて説明する。
§1. Application Example In order to facilitate understanding of the communication control device 10 according to one aspect of the present invention, first, an example of a situation in which the present invention is applied is specifically controlled including a PLC1 including the communication control device 10. The outline of the system 0 will be described with reference to FIG.
 (制御システムの概要)
 図2は、PLC1を含む制御システム0の概要を示す図である。図2に示すように、制御システム0は、PLC1と、ネットワークハブ2と、各々がネットワークハブ2を介してPLC1に接続されているネットワーク3(1)および3(2)とを含んでいる。以下、ネットワーク3(1)と、ネットワーク3(2)とを特に区別する必要がない場合には、単に「ネットワーク3」と称することがある。ネットワーク3は、1つ以上のネットワークデバイスを含んでいる。
(Overview of control system)
FIG. 2 is a diagram showing an outline of control system 0 including PLC1. As shown in FIG. 2, 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. Hereinafter, when it is not necessary to particularly distinguish between the network 3 (1) and the network 3 (2), it may be simply referred to as "network 3". Network 3 includes one or more network devices.
 図2に例示する制御システム0においては、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続している。制御システム0における通信には、ギガ帯域が使用されてもよい。 In the 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.
 PLC1は、制御システム0の全体を制御する制御装置である。ネットワークハブ2は、PLC1と複数のネットワーク3との間の通信を管理するネットワークハブまたはネットワークスイッチである。図2に示す制御システム0においては、PLC1の1つのネットワークポート(すなわち、図1の受信ポート130)に対して、複数のネットワーク3が、例えば、ネットワーク3(1)および3(2)が、存在している。 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. In the control system 0 shown in FIG. 2, 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.
 ここで、ネットワーク3(1)および3(2)のいずれもが制御ネットワークであってもよいし、すなわち、PLC1と通信を行う全てのネットワーク3が制御ネットワークであってもよい。また、ネットワーク3(1)および3(2)のいずれか一方が制御ネットワークであり、他方がデータネットワークであってもよく、つまり、PLC1と通信を行うネットワーク3について、制御ネットワークとデータネットワークとが混在していてもよい。 Here, 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.
 例えば、ネットワーク3が制御ネットワークである場合、PLC1は、生産設備内の入力機器及び出力機器の制御を司る制御装置であり、また、ネットワークデバイスは、例えば、生産設備内の入力機器及び出力機器である。PLC1とネットワークデバイスとは、ネットワーク3を介してサイクリックに通信を行なうことで、INデータ及びOUTデータ(以下、「IOデータ」という)の送受信を行ない、PLC1は、生産設備の全体を制御する。すなわち、ネットワーク3が制御ネットワークである場合、制御システム0は、PLC1をマスタ装置(データ伝送を管理するマスタ装置)とし、ネットワークデバイスをスレーブ装置とするマスタ・スレーブ制御システムと捉えることができる。 For example, when the network 3 is a control network, 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. be. 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.
 ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherCAT(Ethernet for Control Automation Technology:登録商標)規格等の産業用イーサネット(登録商標)規格に準拠するものであってもよい。ネットワーク3が制御ネットワークである場合、ネットワーク3は、EtherNet/IP(登録商標)規格に準拠するものであってもよい。 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.
 以下では、図2におけるPLC1とネットワークデバイスとの間の通信(以下、「ネットワーク通信」とも称する)がEthernet規格に準拠する例について説明する。また、CPU30と通信制御機器10とは、PCIe(Peripheral Component Interconnect Express)によって通信可能に接続されているものとする。 Hereinafter, an example in which communication between PLC1 and a network device in FIG. 2 (hereinafter, also referred to as “network communication”) conforms to the Ethernet standard will be described. Further, it is assumed that the CPU 30 and the communication control device 10 are communicably connected by a PCIe (Peripheral Component Interconnect Express).
 なお、図2には、ネットワークハブ2を介して、複数のネットワーク3が、PLC1に接続する制御システム0を例示したが、制御システム0において、PLC1に、複数のネットワーク3がネットワークハブ2を介して接続することは必須ではない。制御システム0において、1つのネットワーク3(特に、1つの制御ネットワーク)が、ネットワークハブ2を介さずに、PLC1に接続してもよい。例えば、マスタ・スレーブ制御システムである制御システム0において、マスタ装置であるPLC1と、各々がスレーブ装置である1つ以上のネットワークデバイスとを、一筆書きの形式で通信可能に接続してもよい。 Note that 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. In the control system 0, the plurality of networks 3 are connected to the PLC 1 via the network hub 2. It is not essential to connect with. In the control system 0, one network 3 (particularly one control network) may be connected to the PLC 1 without going through the network hub 2. For example, in the control system 0 which is a master / slave control system, 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.
 (本実施形態に係る通信制御機器の概要)
 詳細は図1を用いて後述するが、図2に例示したPLC1は、データ受信処理を実行する通信制御機器10と、PLC1の記憶手段であるメインメモリ20と、メインメモリ20に転送されたデータDtを用いて各種の処理を実行するCPU30とを備えている。
(Outline of communication control device according to this embodiment)
The details will be described later with reference to FIG. 1, but 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.
  (受信データのメインメモリへの転送に係る、一般的な処理について)
 PLC1において、ネットワーク3から制御周期Cc(例えば、100μs)ごとに受信した各種のデータDtは、例えば以下のようにして、メインメモリ20へと転送される。すなわち、先ずCPU30は、「ネットワーク3からPLC1が受信したデータDtを格納すべき、メインメモリ20中の領域」の開始アドレスAsを規定するディスクリプタDcを、メインメモリ20に設定する。例えば、CPU30は、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、通常ディスクリプタDcoを、メインメモリ20に設定する。
(About general processing related to transfer of received data to main memory)
In the PLC 1, 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.
 CPU30は、通常ディスクリプタDcoのメインメモリ20への設定を完了すると、その旨を通信制御機器10へと通知する。CPU30から通常ディスクリプタDcoの設定完了を通知された通信制御機器10は、通知に従ってメインメモリ20を参照し、CPU30によって設定された通常ディスクリプタDcoを読み込む。具体的には、通信制御機器10は、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoを、第一ディスクリプタFIFO125へと格納する。第一ディスクリプタFIFO125は、通常ディスクリプタDcoを格納しておくための格納領域であり、例えばFIFO(First In First Out)方式の格納領域である。 When the CPU 30 completes the setting of the normal descriptor Dco in the main memory 20, it notifies the communication control device 10 to that effect. 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.
 PLC1がネットワーク3からデータDtを受信すると、通信制御機器10は、データ受信処理を実行する。すなわち、通信制御機器10は、先ず、PLC1がネットワーク3から受信したデータDtを、データFIFO127に格納する。データFIFO127は、データDtを一時的に格納しておくバッファ(格納領域)であり、例えばFIFO方式の格納領域である。 When the PLC 1 receives the data Dt from the network 3, 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.
 通信制御機器10は、データFIFO127に格納されているデータDtを、ディスクリプタDcに従ってメインメモリ20に転送し、例えば、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoに従ってメインメモリ20に転送する。具体的には、通信制御機器10は、ディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。 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.
 データDtのメインメモリ20への転送を完了すると、通信制御機器10は、データDtのメインメモリ20への転送に用いたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcを、以下の情報によって更新する。すなわち、通信制御機器10は、「メインメモリ20へと転送したデータDtのデータサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とによって、更新する。したがって、データDtのメインメモリ20への転送に用いられたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcには、「そのデータDtのデータサイズを示す情報」と「データ転送に用いられたことを示す情報」とが追記される。 When the transfer of the data Dt to the main memory 20 is completed, 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.
  (誤ったディスクリプタによるデータの消失等について)
 ディスクリプタDcに規定されている開始アドレスAsに誤りがある場合、そのディスクリプタDcに従ってデータDtをメインメモリ20へと転送することによって、以下のような事態が発生し得る。すなわち、誤った開始アドレスAsを規定したディスクリプタDcに従ってメインメモリ20へと転送された或るデータDt(X)によって、データDt(X)よりも前にメインメモリ20へと転送された別のデータDt(Y)が上書きされる事態が発生し得る。
(About data loss due to incorrect descriptor)
If there is an error in the start address As specified in the descriptor Dc, the following situation may occur by transferring the data Dt to the main memory 20 according to the descriptor Dc. That is, another data transferred to the main memory 20 before the data Dt (X) by one data Dt (X) transferred to the main memory 20 according to the descriptor Dc defining the erroneous start address As. A situation may occur in which Dt (Y) is overwritten.
  (ディスクリプタの許否の判定について)
 誤った開始アドレスAsを規定した通常ディスクリプタDcoを利用することで、データDtを消失するといった事態が発生しないよう、通信制御機器10は、通常ディスクリプタDcoに従って転送を行う前に、通常ディスクリプタDcoの許否を判定する。
(About the judgment of whether or not the descriptor is allowed)
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.
 具体的には、通信制御機器10は、「データDtの転送が許可されている領域」として予め設定しておいた標準受信領域Rgoを用いて、データDtをメインメモリへと転送する際に用いる通常ディスクリプタDcoの許否を判断する。例えば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておき、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出(設定)しておく。 Specifically, 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).
 そして、通信制御機器10は、通常ディスクリプタDcoに規定されている開始アドレスAsが標準受信領域Rgo内にあるかを判定する(第一判定処理FJ)。また、通信制御機器10は、データDtのデータサイズと、通常ディスクリプタDcoに規定されている開始アドレスAsとから、「データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、通信制御機器10は、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する(第二判定処理SJ)。 Then, 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).
 通信制御機器10は、開始アドレスAsが標準受信領域Rgo内にあり、かつ、末尾アドレスAeが標準受信領域Rgo内にあると、その通常ディスクリプタDcoを、データDtの転送に用いることが可能な「利用可能なディスクリプタ」と判定する。通信制御機器10は、開始アドレスAsおよび末尾アドレスAeの少なくとも一方が標準受信領域Rgo内にないと、その通常ディスクリプタDcoを、データDtの転送に用いることのできない「利用不能なディスクリプタ」と判定する。 When the start address As is in the standard reception area Rgo and the end address Ae is in the standard reception area Rgo, 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. ..
  (予め準備しておいた複数のディスクリプタを用いて転送を実行する)
 通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を用いて、転送を実行する。通信制御機器10は、複数のディスクリプタDcを予め準備しており、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であっても、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、転送を実行する。
(Execute transfer using multiple descriptors prepared in advance)
When the communication control device 10 determines that a certain normal descriptor Dco (X) is an "unusable descriptor" when transferring the data Dt received from the network 3 to the main memory 20, another descriptor Dc (Y) is determined. ) To execute the transfer. The communication control device 10 prepares a plurality of descriptors Dc in advance, and even if one normal descriptor Dco (X) is an “unusable descriptor”, another descriptor Dc (Y) can be “available”. To execute the transfer.
 通信制御機器10は、先ずその或る通常ディスクリプタDco(X)について、上述の判定を実行し、つまり、その或る通常ディスクリプタDco(X)の当否を判定する。 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.
 通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用可能なディスクリプタ」であると判定すると、その通常ディスクリプタDco(X)に従って、データDtのメインメモリ20への転送を実行する。 When 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).
 通信制御機器10は、その或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、以下の処理を実行する。すなわち、通信制御機器10は、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であるとの判定結果をCPU30に通知することなく、予め準備しておいた別のディスクリプタDc(Y)に従って、データDtの転送を実行する。 When 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.
 つまり、通信制御機器10は、或る通常ディスクリプタDco(X)に加えて、その或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」である場合のために、別のディスクリプタDc(Y)を、予め準備している。 That is, 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.
  (複数の通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する)
 或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合に、通信制御機器10がデータDtの転送を実行するために「利用可能なディスクリプタ」として用いるディスクリプタDcは、例えば通常ディスクリプタDco(Y)である。
(Select "Available Descriptor" from multiple normal descriptors)
When a certain normal descriptor Dco (X) is determined to be an "unusable descriptor", the descriptor Dc used by the communication control device 10 as an "usable descriptor" for executing the transfer of data Dt is, for example, a normal descriptor. It is Dco (Y).
 つまり、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、別の通常ディスクリプタDco(Y)を予め準備しておく。そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、「利用可能なディスクリプタ」と判定した別の通常ディスクリプタDco(Y)を用いて、データDtの転送を実行する。 That is, 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.
 例えば、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する際に従うべきディスクリプタDcとして、或る通常ディスクリプタDco(X)を含む複数の通常ディスクリプタDcoを、予め準備している。 For example, 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.
 そして、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その判定結果をCPU30に通知することなく、別の通常ディスクリプタDco(Y)について、その許否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。 Then, when 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).
 つまり、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、その或る通常ディスクリプタDco(X)をスキップし、その或る通常ディスクリプタDco(X)は、データDtの転送に用いない。通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)をさらに読み込み、その別の通常ディスクリプタDco(Y)の拒否を判定する。通信制御機器10は、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 That is, when 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). When 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.
 以上の処理は、以下のように整理することができる。すなわち、通信制御機器10は、予め複数の通常ディスクリプタDcoを準備しておく。そして、通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定する通常ディスクリプタDcoが現れるまで、予め複数用意された通常ディスクリプタDcoを順次読み込み、各々の許否を判定する。通信制御機器10は、予め複数用意された通常ディスクリプタDcoの中から「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って転送を実行する。 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".
 つまり、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する処理である受信処理において、以下のようにして、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。すなわち、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から、データDtの転送に用いるべき「利用可能なディスクリプタ」を選択してもよい。 That is, in the reception process, which is the process of transferring the data Dt received from the network 3 to the main memory 20, 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.
 通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その判定結果をCPU30に通知することはなく、CPU30にその或る通常ディスクリプタDco(X)を正しい内容に再設定させることもない。その代わりに、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から別の通常ディスクリプタDco(Y)を読み込む。そして、通信制御機器10は、別の通常ディスクリプタDco(Y)の許否を判定し、その別の通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」であると判定すると、その別の通常ディスクリプタDco(Y)に従ってデータDtを転送する。 Even if 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).
 通信制御機器10は、或る通常ディスクリプタDco(X)について「利用不能」と判定しても、データDtの転送に用いるべき「利用可能なディスクリプタ」をCPU30に再設定させず、例えば、別の通常ディスクリプタDco(Y)に従って転送を実行する。つまり、通信制御機器10は、予め用意された複数の通常ディスクリプタDcoの中から「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 Even if 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".
 そのため、通信制御機器10は、「利用可能なディスクリプタ」をCPU30に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。 Therefore, 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.
 ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別の通常ディスクリプタDco(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when the transfer is performed using another normal descriptor Dco (Y), the time required for the transfer is time T. It is assumed that it was (Y).
 この時、或る通常ディスクリプタDco(X)と別の通常ディスクリプタDco(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別の通常ディスクリプタDco(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。 At this time, if a certain normal descriptor Dco (X) and another normal descriptor Dco (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when 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 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).
 通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定しても、その或る通常ディスクリプタDco(X)をスキップし、別のディスクリプタDc(Y)に従って転送を実行する。通信制御機器10は、CPU30による「利用可能なディスクリプタ」の再設定を待たずに、予め準備しておいた別のディスクリプタDc(Y)に従って転送を実行するため、時間T(X)とほぼ同じ時間である時間T(Y)で、データDtを転送することができる。 Even if 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.
  (退避用ディスクリプタを「利用可能なディスクリプタ」として用いる)
 或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合に、通信制御機器10がデータDtの転送を実行するために「利用可能なディスクリプタ」として用いるディスクリプタDcは、例えば退避用ディスクリプタDceである。
(Use the save descriptor as the "usable descriptor")
When a certain normal descriptor Dco (X) is determined to be an "unusable descriptor", the descriptor Dc used by the communication control device 10 as an "usable descriptor" for executing the transfer of data Dt is, for example, for saving. Descriptor Dce.
 例えば、CPU30は、通常ディスクリプタDcoとは別に、退避用ディスクリプタDceを、データDtを受信する前に、メインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、退避用ディスクリプタDceを格納しておくための、FIFO方式の格納領域である第二ディスクリプタFIFO126に格納される。すなわち、本実施形態において、ディスクリプタDcは、通常ディスクリプタDcoと退避用ディスクリプタDceとに大別される。 For example, 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.
 具体的には、通信制御機器10は、或る通常ディスクリプタDco(X)以外に、退避用ディスクリプタDceを予め準備している。通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定した場合、退避用ディスクリプタDceを「利用可能なディスクリプタ」として、退避用ディスクリプタDceを用いて、データDtの転送を実行してもよい。 Specifically, the communication control device 10 prepares a descriptor Dce for saving in advance in addition to a certain normal descriptor Dco (X). When the communication control device 10 determines that 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.
 例えば、通信制御機器10は、「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数であるエラー個数Ctが、予め設定しておいた基準個数Nrを超えると、以下の処理を実行する。すなわち、エラー個数Ctが基準個数Nrを超えると、通信制御機器10は、退避用ディスクリプタDce(Y)に従って、データDtをメインメモリ20へと転送する。具体的には、通信制御機器10は、退避用ディスクリプタDce(Y)に規定されている開始アドレスAsを先頭アドレスとするメインメモリ20中の領域に、データDtを転送してもよい。 For example, 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.
 基準個数Nrとして「0」が予め設定されていた場合、通信制御機器10は、以下の処理を実行する。すなわち、通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」と判定すると、他の通常ディスクリプタDcoの当否を判定することなく、退避用ディスクリプタDceを用いて、データDtの転送を実行する。 When "0" is preset as the reference number Nr, 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.
 ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、退避用ディスクリプタDce(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when 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).
 この時、或る通常ディスクリプタDco(X)と退避用ディスクリプタDce(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、退避用ディスクリプタDce(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。 At this time, if a certain normal descriptor Dco (X) and a save descriptor Dce (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when 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).
 これまで説明してきたように、通信制御機器10は、データDtの転送に際して、先ず、或る通常ディスクリプタDco(X)を読み込み、その拒否を判定する。通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数(エラー個数Ct)が、基準個数Nrを超えていないかを判定する。エラー個数Ctが基準個数Nrを超えていないと判定すると、通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から、別の通常ディスクリプタDcoを読み込み、その許否を判定する。或る通常ディスクリプタDco(X)の次に通信制御機器10が読み込む通常ディスクリプタDco(Y)は、或る通常ディスクリプタDco(X)に後行する通常ディスクリプタDcoであり、後行ディスクリプタDcとも称する。 As described above, 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.
 (A)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用可能なディスクリプタ」であると判定すると、「利用可能なディスクリプタ」と判定したその別の通常ディスクリプタDcoに従って、データDtの転送を実行する。 (A) When the communication control device 10 determines that another read normal descriptor Dco is an "usable descriptor", the data Dt is transferred according to the other normal descriptor Dco determined to be an "usable descriptor". To execute.
 (B)通信制御機器10は、読み込んだ別の通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、さらに、「エラー個数Ctが基準個数Nrを超えていないか」を判定する。エラー個数Ctが基準個数Nrを超えていないと判定すると、通信制御機器10は、予め準備しておいた複数の通常ディスクリプタDcoの中から、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。通信制御機器10は、読み込んだ通常ディスクリプタDcoを「利用不能なディスクリプタ」であると判定すると、「エラー個数Ctが基準個数Nrを超えた」と判定するまで、さらに別の通常ディスクリプタDcoを読み込み、その許否を判定する。 (B) When 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.
 読み込んだ通常ディスクリプタDcoの中から、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れると、通信制御機器10は、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoに従って、データDtの転送を実行する。 When the normal descriptor Dco determined to be "available descriptor" appears from the read normal descriptor Dco, the communication control device 10 transfers the data Dt according to the normal descriptor Dco determined to be "available descriptor". Execute.
 そして、通信制御機器10は、「エラー個数Ctが基準個数Nrを超えた」と判定すると、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 Then, when 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.
 つまり、「エラー個数Ctが基準個数Nrを超える」、または、『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』まで、通信制御機器10は、以下の処理を繰り返す。すなわち、通信制御機器10は、予め準備しておいた通常ディスクリプタDcoを順次読み込み、その許否を順次判定する。 That is, 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.
 「エラー個数Ctが基準個数Nrを超える」と、通信制御機器10は、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 When "the number of errors Ct exceeds the reference number Nr", 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.
 『「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoが現れる』と、通信制御機器10は、「利用可能なディスクリプタ」と判定した通常ディスクリプタDcoの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 "A normal descriptor Dco determined to be an" available descriptor "appears", 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.
  (標準受信領域Rgoと退避用受信領域Rgeとの関係について)
 詳細は後述するが、退避用ディスクリプタDce(Y)の規定する開始アドレスAsは、「標準受信領域Rgoとは異なる、メインメモリ20中の領域(後述する「退避用受信領域Rge」)」内にある。言い換えれば、退避用ディスクリプタDce(Y)に従ってデータDtが転送される場合のデータDtの転送先(格納先)の領域である退避用受信領域Rgeと、標準受信領域Rgoとは、メインメモリ20中の互いに異なる領域である。
(Relationship between standard reception area Rgo and backup reception area Rge)
Although the details will be described later, 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. In other words, 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.
 §2.構成例
 これまでに図2を用いて概要を説明してきた通信制御機器10、および、通信制御機器10を含むPLC1について、次に、図1を用いてその詳細を説明していく。
§2. Configuration Example The communication control device 10 whose outline has been described with reference to FIG. 2 and the PLC1 including the communication control device 10 will be described in detail with reference to FIG.
 図1は、PLC1の構成例を示す図である。図1に例示する通り、PLC1は、ハードウェア構成として、通信制御機器10と、メインメモリ20と、CPU30とを含む。PLC1は、さらに、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する不揮発性メモリと、外部装置とPLC1とを接続するためのUSBコネクタなどを含んでもよい。通信制御機器10と、メインメモリ20と、CPU30と、不揮発性メモリ(不図示)との間は、各種のバス(内部バス)を介してそれぞれ結合されている。 FIG. 1 is a diagram showing a configuration example of PLC1. As illustrated in FIG. 1, 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).
 CPU30は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成され、内部クロックに従って順次命令コードを解釈して実行する。CPU30は、ハードウェア構成としては、1つ以上のCPUコアと、ネットワーク制御部とを含んでいる。 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.
 メインメモリ20は、PLC1の記憶手段であり、例えば、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDtが格納される。CPU30は、メインメモリ20に格納されているデータDtに対して、各種の演算処理を実行する。 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.
 メインメモリ20は、揮発性の記憶領域(RAM)であり、ネットワーク3から受信し、CPU30による各種の演算処理の対象となるデータDtの格納に加えて、PLC1へ電源投入後にCPU30で実行されるべき各種プログラムを保持する。また、メインメモリ20は、CPU30による各種プログラムの実行時の作業用メモリとしても使用される。このようなメインメモリ20として、例えば、DRAM(Dynamic Random Access Memory)、SRAM(Static Random Access Memory)等を用いることができる。 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. As such a main memory 20, for example, a DRAM (Dynamic Random Access Memory), a SRAM (Static Random Access Memory), or the like can be used.
 図1に例示するメインメモリ20には、データDtと共に、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によって設定される通常ディスクリプタDcoが格納されている。通常ディスクリプタDcoは、例えば、PLCが受信する特定のデータDtに対応し、対応するデータDtのメインメモリ20中での格納先アドレス(つまり、開始アドレスAs)、対応するデータDtのメインメモリ20中でのデータサイズ等を示す情報を含む。 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.
 前述の通り、PLC1は不図示の不揮発性メモリをさらに備えていてもよく、不揮発性メモリは、各種のプログラムおよびパラメータなどのデータを不揮発的に保持する。これらのデータは、必要に応じて、CPU30がアクセスできるようにメインメモリ20にコピーされる。このような不揮発性メモリは、フラッシュメモリのような半導体メモリを用いることができる。あるいは、ハードディスクドライブのような磁気記録媒体、DVD-RAM(Digital Versatile Disk Random Access Memory)のような光学記録媒体などを用いることもできる。 As described above, 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. As such a non-volatile memory, a semiconductor memory such as a flash memory can be used. Alternatively, 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.
 通信制御機器10は、ネットワーク3からのデータDtを受信し、受信したデータDtをメインメモリ20へと格納(転送)するデータ転送装置であり、例えば、NIC(Network Interface Card)として実現される。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。通信制御機器10は、メインメモリ20、CPU30、および、不揮発性メモリ(不図示)の各々と、データの送受信が可能に構成されている。 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).
 通信制御機器10は、受信ポート130を介してネットワーク3と接続され、ネットワーク3とのデータの遣り取りを制御し、特に、データDtの受信を制御する。通信制御機器10は、例えば、ネットワーク3における物理層およびデータリンク層の機能を提供する。すなわち、通信制御機器10は、ネットワーク3の準拠する規格に従い、送信データの送信およびデータDtの受信を制御する。具体的には、通信制御機器10は、ネットワーク3に接続されているネットワークデバイスからデータDtを受信し、受信したデータDtをデータFIFO127に格納する。 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.
 詳細は後述するが、PLC1は、CPU30ではなく、ハードウェアによる論理回路で構成した通信制御機器10によって、ネットワーク3から受信したデータDtの、メインメモリ20への転送を制御し、特に、転送先を決定する。したがって、PLC1は、CPU30の処理負荷を増大させることなく、ハードウェアによる論理回路で構成した通信制御機器10によって、データDtを、メインメモリ20の所望の領域へと転送することができるとの効果を奏する。 Although the details will be described later, 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.
 図1に例示する通信制御機器10は、機能ブロックとして、IF110と、受信処理部120と、受信ポート130とを備えている。図1に例示する通信制御機器10について、記載の簡潔性を担保するため、送信ポートを介してネットワーク3へと送信データを送信する構成などの、本実施の形態に直接関係のない構成は、省略している。ただし、実施の実情に則して、通信制御機器10は、当該省略された構成を備えてもよい。 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. Regarding the communication control device 10 exemplified in FIG. 1, in order to ensure the simplicity of the description, 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. However, according to the actual situation of implementation, the communication control device 10 may have the omitted configuration.
 IF(Interface)110は、通信制御機器10(特に、DMAC121)が、メインメモリ20、CPU30、および、不揮発性メモリ(不図示)の各々と通信するためのインターフェースである。 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).
 受信ポート130で受信されたデータDt(受信データ)は、データFIFO127へと格納される。 The data Dt (received data) received on the receiving port 130 is stored in the data FIFA 127.
 受信処理部120は、「ネットワーク3から受信したデータDt(具体的には、データFIFO127に格納されているデータDt)を、予め準備されたディスクリプタDcに従って、メインメモリ20へと転送する処理」である受信処理を実行する。受信処理部120は、DMAC121と、アドレス決定部122と、第一ディスクリプタFIFO125と、第二ディスクリプタFIFO126と、データFIFO127とを含んでいる。 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.
 DMAC(Direct Memory Access Controller)121は、メインメモリ20と、第一ディスクリプタFIFO125、第二ディスクリプタFIFO126、および、データFIFO127の各々との間のデータ交換を実行する。 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.
 例えば、DMAC121は、データDtの受信の都度(例えば、制御周期Ccごとに)、データDtの受信前に、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoを読み出して、第一ディスクリプタFIFO125に格納する。また、DMAC121は、CPU30によって、特定のデータDtとは無関係にメインメモリ20に設定された退避用ディスクリプタDceを読み出して、第二ディスクリプタFIFO126に格納する。 For example, 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.
 DMAC121は、データFIFO127に格納されている受信データ(データDt)を、先頭から順に、メインメモリ20へと格納する。DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データFIFO127に格納されているデータDtを転送する。 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.
 DMAC121は、データDtのメインメモリ20への転送を完了すると、ライトバックディスクリプタをメインメモリ20へと転送し、つまり、メインメモリ20中のディスクリプタをライトバックディスクリプタで上書きする。具体的には、DMAC121は、データDtのメインメモリ20への転送に用いたディスクリプタDcに対応する、メインメモリ20中のディスクリプタDcを、ライトバックディスクリプタで上書きする。ライトバックディスクリプタとは、データDtのメインメモリ20への転送に用いたディスクリプタDcに、以下の2つの情報を追記したディスクリプタDcである。すなわち、「そのディスクリプタDcに従ってメインメモリ20へと転送したデータDtの、データサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とを追記したディスクリプタDcである。 When the DMAC 121 completes the transfer of the data Dt to the main memory 20, 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.
 アドレス決定部122は、予め準備しておいた複数のディスクリプタDcの中から、データDtの転送に用いることが可能な「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」の開始アドレスAsを、DMAC121に通知する。アドレス決定部122は、読込部123と、判定部124とを含む。 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.
 判定部124によって、或る通常ディスクリプタDcoが『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定されると、アドレス決定部122は、以下の情報をDMAC121に通知する。すなわち、アドレス決定部122は、『データDtの転送に用いることが可能な「利用可能なディスクリプタ」である』と判定された、その或る通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。 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.
 アドレス決定部122は、読込部123によって退避用ディスクリプタDceが読み込まれると、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。すなわち、アドレス決定部122は、退避用ディスクリプタDceを、データDtの転送に用いることが可能な「利用可能なディスクリプタ」であるとし、退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。 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. ..
 読込部123は、ディスクリプタDcを読み込み、読み込んだディスクリプタDcの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、データDtの転送の転送に際して先ず、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを読み込み、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。 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. ..
 また、読込部123は、判定部124から、或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知されると、以下の判定を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数(エラー個数Ct)が、基準個数Nrを超えていないかを判定する。 Further, when the reading unit 123 is notified by the determination unit 124 of the determination result that a certain normal descriptor Dco is an "unusable descriptor", 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.
 読込部123は、エラー個数Ctが基準個数Nrを超えていないと判定すると、第一ディスクリプタFIFO125を参照して別の通常ディスクリプタDcoを読み込み、その別の通常ディスクリプタDcoの規定する開始アドレスAsを判定部124に通知する。例えば、読込部123は、第一ディスクリプタFIFO125において、或る通常ディスクリプタDcoの次に格納されている通常ディスクリプタDco(つまり、或る通常ディスクリプタDcoの後行ディスクリプタ)を読み込む。 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.
 或る通常ディスクリプタDcoが「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、エラー個数Ctが基準個数Nrを超えるまで、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoを順次読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDcoの規定する開始アドレスAsを、判定部124に通知する。 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.
 読込部123は、エラー個数Ctが基準個数Nrを超えたと判定すると、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDceを読み込む。アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDceの規定する開始アドレスAsを、DMAC121に通知する。 When 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.
 例えば、読込部123は、CPU30から、基準個数Nrを、予め取得しておく。 For example, the reading unit 123 acquires the reference number Nr from the CPU 30 in advance.
 (基準個数の値の一例)
 基準個数Nrは、例えば「3」とするのが望ましい。
(Example of standard number value)
The reference number Nr is preferably "3", for example.
 ここで、通常ディスクリプタDcoがデータDtの転送に「利用不能なディスクリプタ」であると判定される場合として、主に以下の2つのケースが想定される。すなわち、第一に、「通常ディスクリプタDcoの規定する開始アドレスAsが、標準受信領域Rgo内にない(例えば、開始アドレスAsが、標準受信領域Rgoの末尾アドレスを超えたアドレスを示している)」ケースである。第二に、「ネットワーク3から受信したデータDtのデータサイズが想定よりも大きく、末尾アドレスAeが、標準受信領域Rgo内にない」ケースである。 Here, the following two cases are mainly assumed as cases where 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".
 上述の2つの典型的なケースのいずれもが発生したとしても、3つ目の通常ディスクリプタDcoは、データDtの転送に「利用可能なディスクリプタ」であると判定される可能性が高い。通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定される可能性は低く、通常ディスクリプタDcoが3つ続けて「利用不能なディスクリプタ」であると判定された場合には、何らかの異常が発生している可能性がある。 Even if both of the above two typical cases occur, it is highly likely that the third normal descriptor Dco is determined to be an "available descriptor" for the transfer of data Dt. It is unlikely that three normal descriptors Dco will be determined to be "unusable descriptors" in a row, and if three normal descriptors Dco are determined to be "unusable descriptors" in a row, something will happen. An abnormality may have occurred.
 そのため、基準個数Nrを「3」とすることによって、通信制御機器10は、以下の2つの効果を実現することが可能となる。すなわち、第一に、上述の2つの典型的なケースのいずれもが発生したとしても、通信制御機器10は、退避用ディスクリプタDceに従うのではなく、通常ディスクリプタDco(3つ目の通常ディスクリプタDco)に従って、データDtの転送を実行し得る。第二に、通信制御機器10は、何らかの異常が発生した場合であっても、退避用ディスクリプタDceに従って、確実にデータDtの転送を実行することができる。 Therefore, by setting the reference number Nr to "3", 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.
 また、前述の通り、基準個数Nrは、データDtの転送に「利用不能なディスクリプタ」と判定され得る通常ディスクリプタDcoの個数である。そして、複数の通常ディスクリプタDcoの各々が規定する開始アドレスAsの間隔は、例えば、「1.5KByte(キロバイト)」である。そのため、基準個数Nrを「3」とした場合、「1.5*3=4.5Kbyte」の領域が、「転送されるデータDtのために確保しておいたが、実際には使用されなかった領域」、つまり、「無駄な領域」となり得る。「無駄な領域」が増えることになるため、基準個数Nrは、例えば「10」などの大きな値とはしない方が望ましい。そこで、基準個数Nrは、例えば「3」などの小さな値とするのが望ましい。 Further, as described above, 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 interval of the start address As defined by each of the plurality of normal descriptors Dco is, for example, "1.5 KByte (kilobytes)". Therefore, when the reference number Nr is set to "3", the area of "1.5 * 3 = 4.5Kbyte" is reserved for the "transferred data Dt", but is not actually used. It can be a "data area", that is, a "useless area". Since the "waste area" increases, it is desirable that the reference number Nr is not set to a large value such as "10". Therefore, it is desirable that the reference number Nr is a small value such as "3".
 (基準個数の決定方法例)
 読込部123は、CPU30から、基準個数Nr自体に代えて、基準個数Nrを決定する方法を予め取得しておいてもよい。例えば、読込部123は、「CPU30によって設定された通常ディスクリプタDcoであって、判定部124が許否を未だ判定していない通常ディスクリプタDcoの個数Xから、『2』を減じた値を基準個数Nrとする」という決定方法を予め取得してもよい。ただし、基準個数Nrは「0」以上の整数とする。そして、読込部123は、予め取得した上述の決定方法に基づいて基準個数Nrを決定し、決定した基準個数Nrを利用してもよい。上述の個数Xは、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoであって、判定部124が許否を未だ判定していない通常ディスクリプタDcoの個数」と言い換えることもできる。
(Example of how to determine the standard number)
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. For example, 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. However, the reference number Nr is an integer of "0" or more. Then, 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".
 例えば、個数Xが「1」である場合、判定部124が或る通常ディスクリプタDcoを「利用不能なディスクリプタ」と判定すると、判定部124が拒否を判定すべき次の通常ディスクリプタDcoは残っていない。そのため、読込部123は、基準個数Nrを「0」とするのが望ましい。 For example, when the number X is "1" and the determination unit 124 determines that a certain normal descriptor Dco is an "unusable descriptor", the next normal descriptor Dco to which the determination unit 124 should determine rejection does not remain. .. Therefore, it is desirable that the reading unit 123 sets the reference number Nr to "0".
 例えば、個数Xが「4」である場合、読込部123は、基準個数Nrを「2=4-2」とするのが望ましい。個数Xが「4」である場合、メインメモリ20へと転送すべきデータDtが複数(例えば、2つ)あったとしても、通信制御機器10は、基準個数Nrを「2」とすることで、それら複数のデータDtの各々を、通常ディスクリプタDcoに従って転送し得る。 For example, when the number X is "4", it is desirable that the reading unit 123 sets the reference number Nr to "2 = 4-2". When the number X is "4", even if there are a plurality of data Dts (for example, two) to be transferred to the main memory 20, 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.
 例えば、第一ディスクリプタFIFO125に許否を未判定の4つの通常ディスクリプタDcoが格納されている場合、通信制御機器10は、上述の決定方法に基づいて、基準個数Nrを「2」に決定する。そして、通信制御機器10は、第一のデータDt(0)および第二のデータDt(1)の各々の転送に際して、以下の処理を実行し得る。 For example, when four normal descriptors Dco whose permission / rejection has not been determined are stored in the first descriptor FIFA 125, 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).
 すなわち、通信制御機器10は、第一の通常ディスクリプタDco(0)および第二の通常ディスクリプタDco(1)を、第一のデータDt(0)の転送に「利用不能なディスクリプタ」と判定しても、第三の通常ディスクリプタDco(2)の拒否を判定する。そして、通信制御機器10は、第三の通常ディスクリプタDco(2)を、第一のデータDt(0)の転送に「利用可能なディスクリプタ」と判定すると、第三の通常ディスクリプタDco(2)に従って、第一のデータDt(0)を転送する。 That is, 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.
 また、通信制御機器10は、第四の通常ディスクリプタDco(3)の拒否を判定する。そして、通信制御機器10は、第四の通常ディスクリプタDco(3)を、第二のデータDt(1)の転送に「利用可能なディスクリプタ」と判定すると、第四の通常ディスクリプタDco(3)に従って、第二のデータDt(1)を転送する。 Further, 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.
 上述の通り、「個数Xから、『2』を減じた値を基準個数Nrとする」という決定方法に基づいて基準個数Nrを決定することによって、通信制御機器10は、以下の効果を実現することができる。すなわち、通信制御機器10は、メインメモリ20へと転送すべきデータDtが複数あったとしても、それら複数のデータDtの各々を、通常ディスクリプタDcoに従って、メインメモリ20へと転送し得るという効果を実現することができる。 As described above, 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.
 判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの拒否を判定し、例えば、その通常ディスクリプタDcoの規定する開始アドレスAsを用いて、第一判定処理FJおよび第二判定処理SJを実行する。 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.
 第一判定処理FJとして、判定部124は、読込部123から、「読込部123によって読み込まれた通常ディスクリプタDcoの開始アドレスAs」を通知されると、通知された開始アドレスAsが標準受信領域Rgo内にあるかを判定する。 As the first determination process FJ, 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.
 また、判定部124は、読込部123から通知された開始アドレスAsと、データDtのデータサイズとから、「開始アドレスAsを先頭アドレスとする領域に、データDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、判定部124は、第二判定処理SJとして、算出した末尾アドレスAeが標準受信領域Rgo内にあるかを判定する。 Further, 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.
 判定部124は、開始アドレスAsが標準受信領域Rgo内にあり、かつ、末尾アドレスAeが標準受信領域Rgo内にあると、「読込部123によって読み込まれた通常ディスクリプタDco」を、データDtの転送に「利用可能なディスクリプタ」と判定する。アドレス決定部122は、判定部124によって「利用可能なディスクリプタ」である』と判定された通常ディスクリプタDcoの規定する開始アドレスAsを、DMAC121に通知する。 When the start address As is in the standard reception area Rgo and the end address Ae is in the standard receive 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".
 判定部124は、開始アドレスAsおよび末尾アドレスAeの少なくとも一方が標準受信領域Rgo内にないと、「読込部123によって読み込まれた通常ディスクリプタDco」を、データDtの転送に「利用不能なディスクリプタ」と判定する。判定部124は、「読込部123によって読み込まれた通常ディスクリプタDco」を「利用不能なディスクリプタ」と判定したという判定結果を、読込部123に通知する。 If at least one of the start address As and the end address Ae is not in the standard reception area Rgo, 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".
 例えば、判定部124は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。そして、判定部124は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。 For example, 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.
 第一ディスクリプタFIFO125には、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、通常ディスクリプタDcoのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から通常ディスクリプタDcoを読み出す。そして、DMAC121は、読み出した通常ディスクリプタDcoを、第一ディスクリプタFIFO125に格納する。 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. When the CPU 30 completes the setting of the normal descriptor Dco to the main memory 20 and issues a reception permission to the communication control device 10, 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.
 第二ディスクリプタFIFO126には、CPU30によってメインメモリ20に設定された退避用ディスクリプタDceが格納され、例えば、FIFO(first in, first out、先入れ先出し)方式で格納される。CPU30が、退避用ディスクリプタDceのメインメモリ20への設定を完了して、通信制御機器10に受信許可を発行すると、通信制御機器10(具体的には、DMAC121)は、メインメモリ20から退避用ディスクリプタDceを読み出す。そして、DMAC121は、読み出した退避用ディスクリプタDceを、第二ディスクリプタFIFO126に格納する。 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. When the CPU 30 completes the setting of the save descriptor Dce in the main memory 20 and issues reception permission to the communication control device 10, the communication control device 10 (specifically, DMAC121) is for saving from the main memory 20. Read the descriptor Dce. Then, the DMAC 121 stores the read save descriptor Dce in the second descriptor FIFO 126.
 データFIFO127には、PLC1(特に、通信制御機器10)がネットワーク3から受信したデータDt(受信データ)が一時的に格納され、例えば、FIFO方式で格納される。 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.
  (通常ディスクリプタと退避用ディスクリプタとの区別について)
 本実施形態において、ディスクリプタDcは予め複数用意され、通常ディスクリプタDcoと、退避用ディスクリプタDceとに大別することができる。
(Regarding the distinction between normal descriptors and save descriptors)
In the present embodiment, a plurality of descriptors Dc are prepared in advance, and can be roughly classified into a normal descriptor Dco and a save descriptor Dce.
 通常ディスクリプタDcoは、PLC1がデータDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前に、CPU30によってメインメモリ20に設定される。CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって第一ディスクリプタFIFO125に格納される。 Normally, 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.
 退避用ディスクリプタDceは、データDtの受信とは無関係に、CPU30によってメインメモリ20に予め設定される。CPU30によってメインメモリ20に設定された退避用ディスクリプタDceは、DMAC121によって第二ディスクリプタFIFO126に格納される。 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.
 例えば、CPU30は、或るデータDt(X)を受信する前に、その或るデータDt(X)を転送すべきメインメモリ20中の領域(特に、その先頭アドレス)を指示するために、メインメモリ20に通常ディスクリプタDco(X)を設定する。CPU30は、或るデータDt(X)を転送すべきメインメモリ20中の領域を指示するために、メインメモリ20に通常ディスクリプタDco(X1)、Dco(X2)、Dco(X3)、・・・、Dco(Xn)を設定してもよい。そして、CPU30によってメインメモリ20に設定された通常ディスクリプタDco(X)(または、通常ディスクリプタDco(X1)、Dco(X2)、Dco(X3)、・・・、Dco(Xn))は、第一ディスクリプタFIFO125に格納される。つまり、通常ディスクリプタDcoは、PLCが受信する特定のデータDtに対応する(または、対応すべき)ディスクリプタDcであり、例えば、通常ディスクリプタDco(X)は、PLCが受信する特定の或るデータDt(X)に対応する。 For example, 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. Then, 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. That is, 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).
 これに対して、退避用ディスクリプタDceは、PLCが受信する特定のデータDtには対応しないディスクリプタDcであり、PLCが受信する任意のデータDtについて、その転送先(特に、その先頭アドレス)を規定するディスクリプタDcである。「退避用ディスクリプタDceの規定する開始アドレスAs」を先頭アドレスとする、メインメモリ20中の領域は、退避用受信領域Rge(退避用領域)とも称される。退避用受信領域Rgeは、PLCが受信する任意のデータDtを格納可能な領域であり、「特定のデータDtを格納すべき領域としてCPU30が指定する領域(つまり、標準受信領域Rgo(許可領域))」とは異なる。 On the other hand, 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.
 これまで図1を用いてその構成例を説明してきた通信制御機器10について、次に、通信制御機器10が実行する受信処理の具体例等を、図3から図5を用いて説明していく。 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. ..
 (『通常ディスクリプタの中から「利用可能なディスクリプタ」を選択する』例)
 図3は、通信制御機器10が、予め準備された複数の通常ディスクリプタDcoを順次読み込み、「利用可能」と判定した通常ディスクリプタDcoに従って、データDtをメインメモリ20へと転送する例を説明する図である。図3に示す例では、データFIFO127に、データDt(0)およびデータDt(1)がFIFO方式で格納されている。また、第一ディスクリプタFIFO125には、通常ディスクリプタDco(0)、Dco(1)、Dco(2)、・・・、Dco(N)が予め格納されている。
("Select" available descriptor "from normal descriptors" example)
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. In the example shown in FIG. 3, 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.
  (先頭のデータの転送例)
 通信制御機器10は、データFIFO127の先頭に格納されたデータDt(0)を転送するために、先ず、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)の拒否を判定する。
(Example of transferring the first data)
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.
 具体的には、先ず、読込部123は、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)を読み込み、通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、判定部124に通知する。 Specifically, first, 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.
 判定部124は、開始アドレスAs(0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As (0) is within the preset standard reception area Rgo (first determination FJ).
 また、判定部124は、データDt(0)のデータサイズと、開始アドレスAs(0)とから、「通常ディスクリプタDco(0)に従ってデータDt(0)を転送した場合の転送後の領域」の末尾アドレスAe(0,0)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(0,0)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 Further, 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).
 判定部124は、開始アドレスAs(0)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(0,0)が標準受信領域Rgo内にあると、通常ディスクリプタDco(0)が、データDt(0)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(0)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、DMAC121に通知する。 In the determination unit 124, when the start address As (0) is in the standard reception area Rgo and the end address Ae (0,0) is in the standard reception area Rgo, 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.
 DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(0)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)』を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。 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.
 DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(0)には、「データDt(0)のデータサイズを示す情報」と、「データDt(0)の転送に用いられたことを示す情報」とが追記される。 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.
  (次のデータの転送例)
 通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125において通常ディスクリプタDco(0)の次に格納されている通常ディスクリプタDco(1)の拒否を判定する。つまり、通信制御機器10は、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoであって、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。
(Example of transferring the following data)
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. ..
 具体的には、先ず、読込部123は、通常ディスクリプタDco(1)を読み込み、通常ディスクリプタDco(1)に規定されている開始アドレスAs(1)を、判定部124に通知する。 Specifically, first, 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).
 判定部124は、開始アドレスAs(1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As (1) is within the preset standard reception area Rgo (first determination FJ).
 また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(1)とから、「通常ディスクリプタDco(1)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,1)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,1)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 Further, 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).
 図3に示すように、通常ディスクリプタDco(1)には、CPU30が通常ディスクリプタDco(1)で設定したつもりの、標準受信領域Rgo内の開始アドレスAs’(1)に代えて、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。 As shown in FIG. 3, in the normal descriptor Dco (1), 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.
 判定部124は、開始アドレスAs(1)が標準受信領域Rgo内にないことを確認すると、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定する。判定部124は、この判定結果を、CPU30に通知することなく、読込部123に通知する。 When the determination unit 124 confirms that the start address As (1) is not in the standard receive area Rgo, 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.
 通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、第一ディスクリプタFIFO125において通常ディスクリプタDco(1)の次に格納されている通常ディスクリプタDco(2)を読み込む。そして、読込部123は、読み込んだ通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、判定部124に通知する。 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).
 判定部124は、開始アドレスAs(2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第一判定FJ)。 The determination unit 124 determines whether the start address As (2) is within the preset standard reception area Rgo (first determination FJ).
 また、判定部124は、データDt(1)のデータサイズと、開始アドレスAs(2)とから、「通常ディスクリプタDco(2)に従ってデータDt(1)を転送した場合の転送後の領域」の末尾アドレスAe(1,2)を算出する。そして、通信制御機器10は、算出した末尾アドレスAe(1,2)が、予め設定しておいた標準受信領域Rgo内にあるかを判定する(第二判定SJ)。 Further, 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).
 判定部124は、開始アドレスAs(2)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(1,2)が標準受信領域Rgo内にあると、通常ディスクリプタDco(2)がデータDt(1)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(1)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)を、DMAC121に通知する。 In the determination unit 124, when the start address As (2) is in the standard reception area Rgo and the end address Ae (1, 2) is in the standard reception area Rgo, 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.
 DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(1)の転送に「利用可能なディスクリプタ」である通常ディスクリプタDco(2)に規定されている開始アドレスAs(2)』を先頭アドレスとするメインメモリ20中の領域に、データDt(1)を転送する。 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.
 DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(2)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の通常ディスクリプタDco(2)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。 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.
  (通常ディスクリプタの個数について)
 ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU30(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU30は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。
(Regarding the number of normal descriptors)
Here, in general, the CPU 30 (software) 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.
 その代わりに、一般にCPU30(ソフトウェア)は、或る情報を受信する前に、その或る情報を常に受信できるように、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。 Instead, 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.
 つまり、CPU30は、例えば制御周期CcごとにPLC1が受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、PLC1がデータDtを受信する前に、予めメインメモリ20に設定しておく。そして、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoは、DMAC121によって、第一ディスクリプタFIFO125に格納される。 That is, for example, 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.
 そのため、データFIFO127に格納されているデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。したがって、アドレス決定部122(特に、判定部124)は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができる。 Therefore, the number of normal descriptors Dco stored in the first descriptor FIFA 125 is sufficiently larger than the number of data Dt stored in the data FIFA 127. Therefore, the address determination unit 122 (particularly, the determination unit 124) 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.
  (CPUがディスクリプタの拒否を把握する方法について)
 前述の通り、DMAC121は、データDtの転送を完了すると、転送に用いた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoをライトバックディスクリプタで上書きする。その結果、転送に用いられた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoには、「データDtのデータサイズを示す情報」と、「データDtの転送に用いられたことを示す情報」とが追記される。
(How the CPU knows when a descriptor is rejected)
As described above, when the transfer of the data Dt is completed, 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. As a result, 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.
 したがって、CPU30は、「データDtの転送に用いられたことを示す情報」を参照することによって、メインメモリ20中の通常ディスクリプタDcoについて、その許否を把握することができる。 Therefore, 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".
 例えば、DMAC121は、転送に用いられた通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「結果フラグ」を、「0」から「1」へと更新する。CPU30は、「結果フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、どの通常ディスクリプタDcoが転送に用いられ、どの通常ディスクリプタDcoが転送に用いられなかったかを把握することができる。 For example, 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. Update to. 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".
 また、DMAC121は、転送に用いられなかった通常ディスクリプタDcoに対応する、メインメモリ20中の通常ディスクリプタDcoについて、通常ディスクリプタDco中の項目の一つである「破棄フラグ」を、「0」から「1」へと更新してもよい。CPU30は、「破棄フラグ」によって、メインメモリ20中の通常ディスクリプタDcoの内、データDtの転送に用いられなかった通常ディスクリプタDcoを把握することができる。 Further, 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".
 (『退避用ディスクリプタを「利用可能なディスクリプタ」として用いる』例)
 図4は、通信制御機器10が、退避用ディスクリプタDceを読み込み、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する例を説明する図である。通信制御機器10(特に、DMAC121)は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、予め設定しておいた基準個数Nrを超えると、以下の処理を実行する。すなわち、エラー個数Ctが基準個数Nrを超えると、DMAC121は、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。
(Example of "using a descriptor for saving as a" usable descriptor "")
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. In the communication control device 10 (particularly, the DMAC121), 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.
 図4に示す例では、データFIFO127に、データDt(0)およびデータDt(1)がFIFO方式で格納されている。また、第一ディスクリプタFIFO125には、通常ディスクリプタDco(0)、Dco(1)、Dco(2)、・・・、Dco(N)が予め格納されている。さらに、第二ディスクリプタFIFO126には、退避用ディスクリプタDce(Z)が予め格納されている。また、CPU30によって、基準個数Nrとして「0」が予め設定されている。 In the example shown in FIG. 4, 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.
  (先頭のデータの転送例)
 図4に示す例において、通信制御機器10がデータDt(0)の転送に際して実行する処理は、図3に例示した処理と同様である。すなわち、通信制御機器10は、図3に示すのと同様に、データFIFO127の先頭に格納されたデータDt(0)を転送するために、先ず、第一ディスクリプタFIFO125の先頭に格納された通常ディスクリプタDco(0)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(0)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of transferring the first data)
In the example shown in FIG. 4, 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).
 判定部124は、開始アドレスAs(0)が標準受信領域Rgo内にあり、かつ、末尾アドレスAe(0,0)が標準受信領域Rgo内にあると、通常ディスクリプタDco(0)がデータDt(0)の転送に「利用可能なディスクリプタ」であると判定する。アドレス決定部122は、判定部124によってデータDt(0)の転送に「利用可能なディスクリプタ」であると判定された通常ディスクリプタDco(0)に規定されている開始アドレスAs(0)を、DMAC121に通知する。 In the determination unit 124, when the start address As (0) is in the standard reception area Rgo and the end address Ae (0,0) is in the standard reception area Rgo, 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.
 DMAC121は、アドレス決定部122から通知された開始アドレスAs(0)を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。 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.
 DMAC121は、データDt(0)のメインメモリ20への転送を完了すると、メインメモリ20中の通常ディスクリプタDco(0)をライトバックディスクリプタで上書きする。 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.
  (次のデータの転送例)
 通信制御機器10は、データDt(1)を転送するために、第一ディスクリプタFIFO125に格納されており、かつ、その拒否を判定していない通常ディスクリプタDcoの先頭である、通常ディスクリプタDco(1)の拒否を判定する。すなわち、判定部124は、通常ディスクリプタDco(1)に対して、第一判定FJおよび第二判定SJを実行する。
(Example of transferring the following data)
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). Judge the refusal of. That is, the determination unit 124 executes the first determination FJ and the second determination SJ with respect to the normal descriptor Dco (1).
 図4に示す例においても、図3に示したのと同様に、通常ディスクリプタDco(1)には、標準受信領域Rgo外の開始アドレスAs(1)が規定されている。 Also in the example shown in FIG. 4, as shown in FIG. 3, the normal descriptor Dco (1) defines the start address As (1) outside the standard reception area Rgo.
 そのため、判定部124は、開始アドレスAs(1)が標準受信領域Rgo内にないことを確認し、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定する。判定部124は、この判定結果を、CPU30に通知することなく、読込部123に通知する。 Therefore, 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.
 通常ディスクリプタDco(1)が「利用不能なディスクリプタ」であるとの判定結果を通知された読込部123は、以下の処理を実行する。すなわち、読込部123は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctが、基準個数Nrを超えたか否かを判定する。 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.
 前述の通り、図4に示す例において、基準個数Nr「0」である。また、判定部124は、通常ディスクリプタDco(1)を「利用不能なディスクリプタ」であると判定しているから、判定部124が「利用不能なディスクリプタ」であると判定した通常ディスクリプタDcoの個数であるエラー個数Ctは、「1」となる。 As described above, in the example shown in FIG. 4, 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".
 そのため、読込部123は、「エラー個数Ctが基準個数Nrを超えた」と判定する。そして、「エラー個数Ctが基準個数Nrを超えた」と判定した読込部123は、第二ディスクリプタFIFO126に格納されている退避用ディスクリプタDce(Z)を読み込む。 Therefore, 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.
 アドレス決定部122は、読込部123によって読み込まれた退避用ディスクリプタDce(Z)に規定されている開始アドレスAs(Z)を、DMAC121に通知する。 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.
 DMAC121は、アドレス決定部122から通知される『データDtの転送に「利用可能なディスクリプタ」に規定されている開始アドレスAs』を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。DMAC121は、『データDt(1)の転送に「利用可能なディスクリプタ」である退避用ディスクリプタDce(Z)に規定されている開始アドレスAs(Z)』を先頭アドレスとするメインメモリ20中の領域に、データDt(0)を転送する。 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.
 DMAC121は、データDt(1)のメインメモリ20への転送を完了すると、メインメモリ20中の退避用ディスクリプタDce(Z)をライトバックディスクリプタで上書きする。その結果、メインメモリ20中の退避用ディスクリプタDce(Z)には、「データDt(1)のデータサイズを示す情報」と、「データDt(1)の転送に用いられたことを示す情報」とが追記される。 When the DMAC 121 completes the transfer of the data Dt (1) to the main memory 20, the save descriptor Dce (Z) in the main memory 20 is overwritten by the write back descriptor. As a result, in the save descriptor Dce (Z) in the main memory 20, "information indicating the data size of the data Dt (1)" and "information indicating that the data Dt (1) has been transferred". Is added.
  (退避用ディスクリプタによって規定される転送領域について)
 図4に示すように、退避用ディスクリプタDce(Y)の規定する開始アドレスAsが存在する退避用受信領域Rgeと、標準受信領域Rgoとは、メインメモリ20中の互いに異なる領域とするのが望ましい。
(About the transfer area specified by the descriptor for saving)
As shown in FIG. 4, it is desirable that the save receive area Rge in which the start address As defined by the save descriptor Dce (Y) exists and the standard receive area Rgo are different areas in the main memory 20. ..
 退避用ディスクリプタDce(Y)の規定する開始アドレスAsが標準受信領域Rgo内にある場合、以下の事象が発生し得る。すなわち、退避用ディスクリプタDce(Y)に従って標準受信領域Rgo内に転送されたデータDt(1)が、通常ディスクリプタDcoに従って標準受信領域Rgo内に転送された他のデータDtによって更新(上書き)されてしまうといった事象が発生し得る。 When 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.
 そして、CPU30がデータDt(1)を用いた処理を実行する前に、データDt(1)が他のデータDtによって上書きされてしまうと、当然、CPU30は、データDt(1)を用いた処理を実行することができない。 Then, if the data Dt (1) is overwritten by another data Dt before the CPU 30 executes the process using the data Dt (1), the CPU 30 naturally performs the process using the data Dt (1). Cannot be executed.
 このような事象を回避するためには、例えば、「データDt(1)が転送された領域と、通常ディスクリプタDcoに従って別のデータDtが転送される領域とが重複するかを判断する処理」などの煩雑な処理が必要となる。 In order to avoid such an event, for example, "a process of determining whether the area to which the data Dt (1) is transferred overlaps with the area to which another data Dt is transferred according to the normal descriptor Dco" or the like. Complicated processing is required.
 退避用受信領域Rgeと標準受信領域Rgoとを互いに異なる領域としておくことで、上述の煩雑な処理を要することなく、上述の事象を回避することができる。つまり、退避用受信領域Rgeと標準受信領域Rgoとを分けることで、「退避用ディスクリプタDceに従って転送された或るデータDtが、通常ディスクリプタDcoに従って転送される別のデータDtによって上書きされる」といった事象を簡易に回避できる。 By setting the backup reception area Rge and the standard reception area Rgo as different areas from each other, 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.
 (本実施形態に係る通信制御装置が実現する効果について)
 図5は、通信制御機器10の奏する効果を説明する図である。図5の(A)は、図8の(A)と同様であり、ディスクリプタDcに従ってデータDtをメインメモリ20へと転送する従来までの通信制御機器について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。
(About the effect realized by the communication control device according to this embodiment)
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.
 従来までの通信制御機器は、或るディスクリプタDc(X)について、アドレス(開始アドレスAs)等の異常を検知すると、以下の処理を実行する。すなわち、従来までの通信制御機器は、或るディスクリプタDc(X)の誤りを検知すると、その検知結果をCPUへと通知し、CPU(ソフトウェア)に、その或るディスクリプタDc(X)を再設定させる。例えば、従来までの通信制御機器は、CPU30に、「異常なアドレスを規定した或るディスクリプタDc(X)」を、「正しいアドレスを規定した或るディスクリプタDc(X’)」に、書き換えさせる。 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".
 そのため、従来までの通信制御機器は、CPUによる或るディスクリプタDc(X)の再設定処理が完了するまで待機しなければならず、或るディスクリプタDc(X)の誤りを検知してから、データDtをメインメモリ20へと転送するまでに要する時間が長い。従来までの通信制御機器は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、ソフトウェアによるディスクリプタDcの再設定処理の完了を待つ必要がある。 Therefore, 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. ..
 図5の(B)は、通信制御機器10について、ディスクリプタDcの許否を判定してから、データDtを転送するまでに要する時間等を説明する図である。 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.
 通信制御機器10は、或る通常ディスクリプタDco(X)を「利用不能なディスクリプタ」であると判定すると、別のディスクリプタDc(Y)を「利用可能なディスクリプタ」として用いて、データDtの転送を実行する。そのため、図5の(B)に示すように、通信制御機器10は、ディスクリプタDcの開始アドレスAs等の異常を検知してから、データDtの転送を実行するまでの間に、CPU30によるディスクリプタDcの再設定処理の完了を待つ必要がない。 When 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.
 ここで、例えば、或る通常ディスクリプタDco(X)が「利用可能なディスクリプタ」であったため、その或る通常ディスクリプタDco(X)を用いて転送を行う場合に、転送までに要する時間が時間T(X)であったとする。また、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別のディスクリプタDc(Y)を用いて転送を行うことになった場合に、転送までに要する時間が時間T(Y)であったとする。 Here, for example, since a certain normal descriptor Dco (X) is an "available descriptor", when a transfer is performed using the certain normal descriptor Dco (X), the time required for the transfer is time T. It is assumed that it was (X). Further, since a certain normal descriptor Dco (X) is an "unusable descriptor", when 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).
 この時、或る通常ディスクリプタDco(X)と別のディスクリプタDc(Y)とが予め用意されている場合、時間T(X)と時間T(Y)との差は、十分に小さくなる。特に、通信制御機器10をハードウェアによる論理回路で構成した場合、時間T(X)と時間T(Y)との差は、無視できるほどに小さくすることができる。つまり、通信制御機器10は、或る通常ディスクリプタDco(X)が「利用不能なディスクリプタ」であったため、別のディスクリプタDc(Y)を用いて転送を行うことになった場合にも、時間T(X)とほぼ同じ時間で、データDtを転送できる。 At this time, if a certain normal descriptor Dco (X) and another descriptor Dc (Y) are prepared in advance, the difference between the time T (X) and the time T (Y) becomes sufficiently small. In particular, when 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 transfer is performed using another descriptor Dc (Y), the time T Data Dt can be transferred in almost the same time as (X).
 (通信制御機器についての整理)
 これまでに図1から図5を用いて説明してきた内容は、以下のように整理することができる。すなわち、通信制御機器10は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器である。通信制御機器10は、読込部123と、判定部124と、DMAC121(転送部)とを備えている。
(Arrangement of communication control equipment)
The contents described so far using FIGS. 1 to 5 can be organized as follows. That is, 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).
 読込部123は、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。 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.
 判定部124は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsが、メインメモリ20においてデータDtを格納可能な領域として予め設定された領域である標準受信領域Rgo(許可領域)内にあるかを判定する。判定部124は、開始アドレスAsが標準受信領域Rgo内にあると、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。 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".
 DMAC121は、読込部123によって読み込まれたディスクリプタDcに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 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.
 通信制御機器10において、ディスクリプタDcは予め複数用意されている。そして、読込部123は、予め複数用意されたディスクリプタDcの中から先ず、例えば第一のディスクリプタDc(X)(特に、第一の通常ディスクリプタDco(X))を読み込む。 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.
 (A)DMAC121は、第一のディスクリプタDc(X)が、判定部124によって「利用可能である」と判定されると、以下の転送を実行する。すなわち、DMAC121は、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。 (A) 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.
 (B)DMAC121は、第一のディスクリプタDc(X)が判定部124によって「利用可能でない」と判定されると、以下の転送を実行する。すなわち、DMAC121は、予め複数用意されたディスクリプタDcの内、読込部123によって第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、DMAC121は、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 (B) 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.
 前記の構成によれば、通信制御機器10は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、通信制御機器10は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。 According to the above configuration, when 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). As a specific example, 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.
 また、通信制御機器10は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、通信制御機器10は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 Further, when 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).
 つまり、通信制御機器10は、読み込んだ第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、その判定結果をCPU30等に通知することはない。開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、通信制御機器10は、CPU30等に第一のディスクリプタDc(X)を正しいものに再設定させることはない。通信制御機器10は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定すると、予め用意された第二のディスクリプタDc(Y)をさらに読み込む。そして、通信制御機器10は、読み込んだ第二のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。 That is, even when 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. When 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).
 通信制御機器10は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 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".
 そのため、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。 Therefore, 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.
 つまり、通信制御機器10は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。 That is, 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.
 特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。 In particular, 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.
 通信制御機器10は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。 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.
 ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that 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).
 ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。 When 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.
 特に、通信制御機器10は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。 In particular, 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.
 ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, 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.
 したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、通信制御機器10は、ディスクリプタDcによる誤ったデータDt転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。 Therefore, 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.
 通信制御機器10において、判定部124は、以下の2つの条件が共に満たされる場合に、読込部123によって読み込まれたディスクリプタDcを「利用可能である」と判定する。すなわち、判定部124は、(A)ディスクリプタDcの規定する開始アドレスAsが、標準受信領域Rgo内にあるという条件と、(B)末尾アドレスAeが標準受信領域Rgo内にあるという条件とが共に満たされる場合に、「利用可能である」と判定する。 In the communication control device 10, 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".
 末尾アドレスAeは、読込部123によって読み込まれたディスクリプタDcに従ってデータDtを転送した場合の転送後の領域の末尾アドレスである。末尾アドレスAeは、受信したデータDtのデータサイズと、読込部123によって読み込まれたディスクリプタDcの規定する開始アドレスAsとから算出される。 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.
 前記の構成によれば、通信制御機器10は、受信したデータDtのデータサイズと、読込部123によって読み込まれたディスクリプタDcの規定する開始アドレスAsとから、末尾アドレスAeを算出する。そして、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAsが標準受信領域Rgo内にあり」、かつ、「末尾アドレスAeが標準受信領域Rgo内にある」と、読み込んだディスクリプタDcを「利用可能である」と判定する。 According to the above configuration, 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".
 ここで、「読み込んだディスクリプタDcの規定する開始アドレスAsが標準受信領域Rgo内にある」場合であっても、「末尾アドレスAeが標準受信領域Rgo内にない」時がある。そのような時には、読み込んだディスクリプタDcは、受信したデータDtの転送先を決定するディスクリプタDcとしては不適切であり、つまり、受信したデータDtの転送先を決定するディスクリプタDcとしては利用することができない(利用不能である)。 Here, even if "the start address As specified by the read descriptor Dc is in the standard reception area Rgo", there are times when "the end address Ae is not in the standard reception area Rgo". In such a case, 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).
 そこで、通信制御機器10は、「読み込んだディスクリプタDcの規定する開始アドレスAs」に加えて、受信したデータDtのデータサイズをも考慮して、「読み込んだディスクリプタDcが利用可能か否か(つまり、ディスクリプタDcの許否)」を判定する。 Therefore, 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.
 通信制御機器10は、開始アドレスAsに加えて、受信したデータDtのデータサイズを考慮することで、予め複数用意されたディスクリプタDcの中から、受信したデータDtの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。 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.
 通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。例えば、通信制御機器10は、CPU30から、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを、予め取得しておく。 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.
 前記の構成によれば、通信制御機器10は、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとを予め取得しておく。そして、通信制御機器10は、取得した標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出する。 According to the above configuration, 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.
 したがって、通信制御機器10は、予め取得した、標準受信領域Rgoの先頭アドレスと標準受信領域Rgoのデータサイズとから、標準受信領域Rgoを算出することができるとの効果を奏する。 Therefore, 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.
 通信制御機器10は、第一ディスクリプタFIFO125(格納部)をさらに備えている。第一ディスクリプタFIFO125には、「データDtを受信しようとする都度(例えば、制御周期Ccごとに)、データDtを受信する前にメインメモリ20に設定されるディスクリプタDc」である通常ディスクリプタDcoが格納される。 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.
 データDtの転送に際して読込部123が最初に読み読み、判定部124によって最初にその当否を判定される第一のディスクリプタDc(X)は、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoである。例えば、データDtの転送に際して読込部123が最初に読み読み、判定部124によって最初にその当否を判定される第一のディスクリプタDc(X)は、通常ディスクリプタDco(X)である。 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. .. For example, 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).
 DMAC121は、(A)通常ディスクリプタDco(X)が「利用可能でない」と判定され、かつ、(B)別の通常ディスクリプタDco(Y)が「利用可能である」と判定されると、通常ディスクリプタDco(Y)に従って転送を実行する。 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).
 別の通常ディスクリプタDco(Y)は、読込部123によって第一のディスクリプタDc(X)(つまり、通常ディスクリプタDco(X))よりも後に読み込まれる通常ディスクリプタDcoである。つまり、通常ディスクリプタDco(Y)は、通常ディスクリプタDco(X)に後行する通常ディスクリプタDcoであり、通常ディスクリプタDco(X)の後行ディスクリプタDcである。 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).
 通常ディスクリプタDco(Y)が判定部124によって「利用可能である」と判定されると、DMAC121は、通常ディスクリプタDco(Y)を「利用可能なディスクリプタ」として、通常ディスクリプタDco(Y)に従って転送を実行する。具体的には、DMAC121は、通常ディスクリプタDco(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 When the normal descriptor Dco (Y) is determined to be "available" by the determination unit 124, 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.
 例えば、通常ディスクリプタDco(P)が「利用可能でない」と判定され、かつ、通常ディスクリプタDco(P)の次に読み込まれた通常ディスクリプタDco(Q)が「利用可能である」と判定されると、DMAC121は、以下の転送を実行する。すなわち、DMAC121は、読込部123によって通常ディスクリプタDco(P)の次に読み込まれ、判定部124によって「利用可能である」と判定された通常ディスクリプタDco(Q)に従って、データDtを転送する。 For example, if the normal descriptor Dco (P) is determined to be "not available" and the normal descriptor Dco (Q) read next to the normal descriptor Dco (P) is determined to be "available". , 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.
 例えば、通常ディスクリプタDco(P)およびDco(Q)が「利用可能でない」と判定され、通常ディスクリプタDco(Q)の次に読み込まれた通常ディスクリプタDco(R)が「利用可能である」と判定されると、DMAC121は、以下を実行する。すなわち、DMAC121は、読込部123によって通常ディスクリプタDco(Q)の次に読み込まれ、判定部124によって「利用可能である」と判定された通常ディスクリプタDco(R)に従って、データDtを転送する。 For example, 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.
 前記の構成によれば、通信制御機器10は、第一ディスクリプタFIFO125に格納された通常ディスクリプタDco(X)を「利用可能である」と判定すると、通常ディスクリプタDco(X)に従って転送を実行する。具体的には、通信制御機器10は、「利用可能である」と判定した通常ディスクリプタDco(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。 According to the above configuration, when 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”.
 また、通信制御機器10は、通常ディスクリプタDco(X)を「利用可能でない」と判定し、かつ、通常ディスクリプタDco(Y)を「利用可能である」と判定すると、通常ディスクリプタDco(Y)に従って転送を実行する。例えば、通信制御機器10は、通常ディスクリプタDco(X)を「利用可能でない」と判定すると、第一ディスクリプタFIFO125に格納されている後行ディスクリプタDcである通常ディスクリプタDco(Y)をさらに読み込む。そして、通信制御機器10は、読み込んだ通常ディスクリプタDco(Y)を「利用可能である」と判定すると、通常ディスクリプタDco(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 Further, when 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. Then, when 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.
 ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個のデータDt(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個のデータDt(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個のデータDtとして送信されるのかを計算していない。 Here, in general, the CPU or the like (software) 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.
 その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(メインメモリ20へと転送できるように)、十分な数(個数)の通常ディスクリプタDcoを、メインメモリ20に設定しておく。つまり、CPU30等は、ネットワーク3から受信すべきデータDtの個数に比して十分余裕のある個数の通常ディスクリプタDcoを、データDtを受信する前に、予めメインメモリ20に設定しておく。 Instead, 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.
 そして、CPU30等によってメインメモリ20に設定された通常ディスクリプタDcoは、第一ディスクリプタFIFO125に格納される。そのため、ネットワーク3から受信すべきデータDtの個数に比して、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoの個数は、十分に多い。 Then, 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.
 したがって、通信制御機器10は、転送すべきデータDtの個数に比して十分多い個数の通常ディスクリプタDcoの中から、データDtの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。 Therefore, the effect that 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.
 通信制御機器10は、第一ディスクリプタFIFO125とは異なる第二ディスクリプタFIFO126をさらに備えている。通信制御機器10において、エラー個数Ctが、予め設定された基準個数Nrを超えると、読込部123は、第二ディスクリプタFIFO126に予め格納されているディスクリプタDcである退避用ディスクリプタDceを読み込む。DMAC121は、読込部123によって読み込まれた退避用ディスクリプタDceを、データDtの転送に「利用可能なディスクリプタ」として、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 The communication control device 10 further includes a second descriptor FIFA 126 different from the first descriptor FIFA 125. In the communication control device 10, when the error number Ct exceeds the preset reference number Nr, 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.
 エラー個数Ctは、第一ディスクリプタFIFO125に格納され、読込部123によって読み込まれた通常ディスクリプタDcoであって、判定部124によって「利用可能でない」と判定された通常ディスクリプタDcoの個数である。 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.
 前記の構成によれば、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、第二ディスクリプタFIFO126に予め格納されている退避用ディスクリプタDceを読み込む。そして、通信制御機器10は、退避用ディスクリプタDceを、データDtの転送に「利用可能なディスクリプタ」として、退避用ディスクリプタDceに規定されている開始アドレスAsを先頭アドレスとする領域に、前記データDtを転送する。 According to the above configuration, when the error number Ct exceeds the reference number Nr, 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.
 ここで、エラー個数Ctが基準個数Nrを超えている場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分に、異常が発生している可能性がある。そして、その場合、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。 Here, when the error number Ct exceeds the reference number Nr, there is a possibility that an abnormality has occurred in all or most of the "normal descriptor Dco stored in the first descriptor FIFO 125". .. Then, in that case, it is impossible or takes a lot of time to select the "available descriptor" from the "normal descriptor Dco stored in the first descriptor FIFO 125".
 そこで、通信制御機器10は、エラー個数Ctが基準個数Nrを超えると、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」に代えて、退避用ディスクリプタDceに従って、データDtを転送する。 Therefore, when the error number Ct exceeds the reference number Nr, 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".
 したがって、通信制御機器10は、「第一ディスクリプタFIFO125に格納されている通常ディスクリプタDco」の全て、または、その大部分について、異常が発生している場合にも、データDtを確実かつ高速に転送することができるとの効果を奏する。 Therefore, 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.
 通信制御機器10において、退避用ディスクリプタDceの規定する開始アドレスAsは、メインメモリ20においてデータDtを格納可能な領域であって、標準受信領域Rgoとは異なる領域(退避用受信領域Rge)内にある。 In the communication control device 10, 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.
 前記の構成によれば、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtをメインメモリ20へと転送する場合、以下の領域にデータDtを転送する。すなわち、通信制御機器10は、退避用ディスクリプタDceに従ってデータDtを、標準受信領域Rgoとは異なる領域である退避用受信領域Rgeへと転送する。言い換えれば、退避用ディスクリプタDceに従ってデータDtが転送される領域である退避用受信領域Rgeは、標準受信領域Rgoとは異なる。 According to the above configuration, when 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. In other words, 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.
 退避用ディスクリプタDceの規定する開始アドレスAsが標準受信領域Rgo内にある場合、退避用ディスクリプタDceに従って標準受信領域Rgo内に転送された或るデータDt(X)について、以下の事象が発生し得る。すなわち、その或るデータDt(X)が、第一ディスクリプタFIFO125に格納されている通常ディスクリプタDcoに従って標準受信領域Rgo内に転送される別のデータDt(Y)によって、上書きされてしまう可能性がある。 When the start address As specified by the backup descriptor Dce is in 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.
 そして、上述のような事態を防ぐためには、例えば、「或るデータDt(X)が転送された領域と、別のデータDt(Y)が転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 Then, in order to prevent the above-mentioned situation, for example, it is determined whether the area to which a certain data Dt (X) is transferred overlaps with the area to which another data Dt (Y) is transferred. Complicated processing such as processing is required.
 これに対して、退避用ディスクリプタDceの規定する開始アドレスAsが標準受信領域Rgo内にない場合、退避用ディスクリプタDceに従って転送された上述の或るデータDt(X)が、上述の別のデータDt(Y)によって上書きされることはない。 On the other hand, when the start address As specified by the save descriptor Dce is not in the standard reception area Rgo, the above-mentioned certain data Dt (X) transferred according to the save descriptor Dce is the above-mentioned another data Dt. It is not overwritten by (Y).
 したがって、通信制御機器10は、「退避用ディスクリプタDceに従って転送されたデータDt(X)が、通常ディスクリプタDcoに従って転送されるデータDt(Y)で上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。 Therefore, 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.
 §3.動作例
 (本実施形態に係る通信制御装置が実現する処理の全体概要について)
 図6は、標準受信領域Rgo(許可領域)を特定する処理、および、判定処理の概要を説明する図である。通信制御機器10は、「受信したデータDtの転送先(特に、その開始アドレスAs)を決定し、決定した転送先にデータDtを転送する」処理であるデータ受信処理を実行する前に、標準受信領域Rgoを特定する処理を実行しておく。また、標準受信領域Rgoを特定した後に通信制御機器10が実行するデータ受信処理は、2つの判定処理を含み、具体的には、第一判定処理FJおよび第二判定処理SJを含む。
§3. Operation example (Overview of the processing realized by the communication control device according to this embodiment)
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. Further, 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.
 図6の(A)は、通信制御機器10がデータ受信処理を実行する前に特定しておく標準受信領域Rgoについて、説明する図である。通信制御機器10は、予めCPU30から、「標準受信領域Rgoの先頭アドレス」を示す情報と、「標準受信領域Rgoのデータサイズ」を示す情報とを取得しておく。通信制御機器10は、CPU30から取得しておいた、「標準受信領域Rgoの先頭アドレス」と「標準受信領域Rgoのデータサイズ」とから、図6の(A)に示すように、標準受信領域Rgoを特定する。 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.
 図6の(A)は、通信制御機器10が実行するデータ受信処理に含まれる第一判定処理FJおよび第二判定処理SJの概要を説明する図である。 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.
 第一判定処理FJにおいて、通信制御機器10(特に、判定部124)は、「読込部123によって読み込まれたディスクリプタDc(特に、通常ディスクリプタDco)において規定されている開始アドレスAsが、標準受信領域Rgo内であるか」を判定する。判定部124は、CPU30によって通常ディスクリプタDcoがメインメモリ20に設定された時点以降に、第一判定処理FJを実行することができる。より正確には、判定部124は、CPU30によってメインメモリ20に設定された通常ディスクリプタDcoが第一ディスクリプタFIFO125に格納された時点以降に、第一判定処理FJを実行することができる。つまり、判定部124は、データDtを受信する前であっても、第一ディスクリプタFIFO125に通常ディスクリプタDcoが格納された時点以降であれば、第一判定処理FJを実行することができる。 In the first determination process FJ, the communication control device 10 (particularly, the determination unit 124) 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.
 これに対して、第二判定処理SJは、データDtを受信した時点以降に、通信制御機器10(特に、判定部124)によって実行される。判定部124は、PLC1がデータDtを受信すると、より正確には、PLC1が受信したデータDtがデータFIFO127に格納されると、データDtのデータサイズを計測する。判定部124は、計測したデータDtのデータサイズと、通常ディスクリプタDcoにおいて規定されている開始アドレスAsとから、「通常ディスクリプタDcoに従ってデータDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する。そして、第二判定処理SJにおいて、判定部124は、末尾アドレスAeが標準受信領域Rgo内であるかを判定する。 On the other hand, 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.
 ここで、第一判定処理FJは、データDtを受信する前であっても実行することができるが、第一判定処理FJを、データDtを受信する前に実行することは必須ではない。例えば、データDtを受信した後に、第一判定処理FJを実行してもよいし、データDtの受信と並行して第一判定処理FJを実行してもよい。 Here, 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. For example, 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.
 (データ受信処理の概要について)
 図7は、通信制御機器10が実行するデータ受信処理の一例を示すフロー図である。アドレス決定部122は、判定部124によって「利用不能なディスクリプタ」であると判定された通常ディスクリプタDcoの個数であるエラー個数Ctを、「0」とする(S110)。読込部123は、第一ディスクリプタFIFO125を参照して、未だ判定部124によってその当否を判定されていない通常ディスクリプタDcoを読み込む(S120)。読込部123は、読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを、判定部124に通知する。判定部124は、「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にあるか」を判定する(S130)(第一判定処理FJ)。
(Overview of data reception processing)
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).
 判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されると(S130でYES)、通信制御機器10はデータDtを受信し(S140)、受信したデータDtをデータFIFO127に格納する。 When the determination unit 124 determines that "the start address As notified from the reading unit 123 is in the standard reception area Rgo" (YES in S130), the communication control device 10 receives the data Dt (S140). The received data Dt is stored in the data FIFA 127.
 データDtがデータFIFO127に格納されると、判定部124は、データFIFO127に格納されたデータDtのデータサイズを計測する。判定部124は、計測したデータDtのデータサイズと、読込部123から通知された開始アドレスAsとから、「通常ディスクリプタDcoに従ってデータDtを転送した場合の転送後の領域」の末尾アドレスAeを算出する(S150)。そして、判定部124は、「S140にて算出した末尾アドレスAeが、標準受信領域Rgo内にあるか」を判定する(S160)(第二判定処理SJ)。 When the 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).
 判定部124によって「S140にて算出した末尾アドレスAeが、標準受信領域Rgo内にある」と判定されると(S160でYES)、アドレス決定部122は、以下の処理を実行する。すなわち、アドレス決定部122は、読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAsを、DMAC121に通知する。 When the determination unit 124 determines that "the end address Ae calculated in S140 is in the standard reception area Rgo" (YES in S160), 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.
 DMAC121は、読込部123が最後に読み込んだディスクリプタDcに従ってデータDtを転送する(S170)。つまり、DMAC121は、アドレス決定部122から通知された「読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAs」を先頭アドレスとするメインメモリ20中の領域に、データDtを転送する。 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.
 判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にない」と判定されると(S130でNO)、アドレス決定部122は、エラー個数Ctを「1」だけカウントアップする(S180)。読込部123は、S180で「1」だけカウントアップされたエラー個数Ctについて、「基準個数Nrを超えたか」を判定する(S190)。 When the determination unit 124 determines that "the start address As notified from the reading unit 123 is not in the standard reception area Rgo" (NO in S130), 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).
 S180で「1」だけカウントアップされたエラー個数Ctが「基準個数Nrを超えたと判定すると(S190でYES)、読込部123は、第二ディスクリプタFIFO126に予め格納されている退避用ディスクリプタDceを読み込む(S200)。そして、アドレス決定部122は、読込部123によって最後に読み込まれたディスクリプタDcに規定されている開始アドレスAsを、DMAC121に通知する。つまり、アドレス決定部122は、S200で読込部123によって読み込まれた退避用ディスクリプタDceに規定されている開始アドレスAsを、DMAC121に通知する。 When it is determined in S180 that the error number Ct counted up by "1" exceeds the reference number Nr (YES in 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.
 S180で「1」だけカウントアップされたエラー個数Ctが「基準個数Nrを超えていない」と判定すると(S190でYES)、読込部123は、第一ディスクリプタFIFO125に格納されている次の通常ディスクリプタDcoを読み込む(S210)。つまり、読込部123は、第一ディスクリプタFIFO125に格納されており、未だ判定部124によってその当否を判定されていない通常ディスクリプタDcoのうち、その先頭の通常ディスクリプタDcoを読み込む。読込部123は、読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを、判定部124に通知する。判定部124は、読込部123から、読込部123が読み込んだ通常ディスクリプタDcoに規定されている開始アドレスAsを通知されると、S130の処理を実行する。 When it is determined in S180 that the error number Ct counted up by "1" does not exceed the "reference number Nr" (YES in S190), 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. When the reading unit 123 notifies the start address As specified in the normal descriptor Dco read by the reading unit 123, the determination unit 124 executes the process of S130.
 図7は、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信する例を示している。しかしながら、通信制御機器10がデータDtを受信するタイミングが、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定された後であることは必須ではない。 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.
 前述の通り、第一判定処理FJを、データDtを受信する前に実行することは必須ではない。例えば、S130の判定(第一判定処理FJ)の前に、S140(データDtの受信)を実行してもよい。 As described above, it is not essential to execute the first determination process FJ before receiving the data Dt. For example, S140 (reception of data Dt) may be executed before the determination of S130 (first determination process FJ).
 言い換えれば、判定部124によって「読込部123から通知された開始アドレスAsが、標準受信領域Rgo内にある」と判定されてから、通信制御機器10がデータDtを受信することは必須ではない。第一処理FJにおいて、判定部124は、読込部123によって読み込まれた通常ディスクリプタDcoの中から、「開始アドレスAsが、標準受信領域Rgo内にある」と判定する通常ディスクリプタDcoを発見できればよい。 In other words, it is not essential for the communication control device 10 to receive 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". In the first processing 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.
 第一処理FJにおいて「開始アドレスAsが、標準受信領域Rgo内にある」通常ディスクリプタDcoが発見されるタイミングと、通信制御機器10がデータDtを受信するタイミングとの先後は問わない。例えば、第一処理FJにおいて「開始アドレスAsが、標準受信領域Rgo内にある」通常ディスクリプタDcoが発見される前に、通信制御機器10がデータDtを受信してもよい。例えば、或るディスクリプタDcについてS130で「NO」と判定された後、別のディスクリプタDcが読み込まれる前、または、別のディスクリプタDcについてS130の判定が実行される前までに、通信制御機器10がデータDtを受信してもよい。 It does not matter whether the timing at which the normal descriptor Dco "the start address As is in the standard reception area Rgo" is discovered in the first processing FJ and the timing at which the communication control device 10 receives the data Dt are unpredictable. For example, 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.
 これまで図7を用いて説明してきた通信制御機器10の実行する処理は、以下のように整理することができる。すなわち、通信制御機器10の実行する制御方法は、ネットワーク3から受信したデータDtをメインメモリ20へと転送する通信制御機器の制御方法である。前記制御方法は、読込ステップ(S120、S200、および、S210)と、判定ステップ(S130およびS160)と、転送ステップ(S170)とを含んでいる。 The processes executed by the communication control device 10 described so far using FIG. 7 can be organized as follows. That is, 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).
 読込ステップは、データDtを格納すべき領域の開始アドレスAsを規定するディスクリプタDcを読み込む。 The read step reads the descriptor Dc that defines the start address As of the area where the data Dt should be stored.
 判定ステップは、読込ステップにて読み込まれたディスクリプタDcの規定する開始アドレスAsが、標準受信領域Rgo(許可領域)内にあると、読込ステップにて読み込まれたディスクリプタDcを「利用可能である」と判定する。標準受信領域Rgoは、メインメモリ20においてデータDtを格納可能な領域として予め設定されている。 In the determination step, if the start address As specified by the descriptor Dc read in the read step is in the standard reception area Rgo (permitted area), 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.
 転送ステップは、読込ステップにて読み込まれたディスクリプタDcの規定する開始アドレスAsを先頭アドレスとする領域に、データDtを転送する。 In the transfer step, 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.
 通信制御機器10において、ディスクリプタDcは予め複数用意されている。 A plurality of descriptors Dc are prepared in advance in the communication control device 10.
 転送ステップは、(A)予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一のディスクリプタDc(X)が、判定ステップにて「利用可能である」と判定されると、以下の転送を実行する。すなわち、読込ステップは、第一のディスクリプタDc(X)に規定されている開始アドレスAs(X)を先頭アドレスとする領域に、データDtを転送する。例えば、転送ステップは、予め複数用意されたディスクリプタDcの内、読込ステップにて読み込まれた第一の通常ディスクリプタDco(X)が、判定ステップにて「利用可能である」と判定されると、第一の通常ディスクリプタDco(X)に従って転送を行う。 In the transfer step, (A) among the plurality of descriptors Dc prepared in advance, the first descriptor Dc (X) read in the read step is determined to be "available" in the determination step. Perform the following transfer. That is, 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. For example, in the transfer step, among the plurality of descriptors Dc prepared in advance, 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).
 転送ステップは、(B)第一のディスクリプタDc(X)が判定ステップにて「利用可能でない」と判定されると、以下の転送を実行する。すなわち、転送ステップは、予め複数用意されたディスクリプタDcの内、読込ステップにて第一のディスクリプタDc(X)よりも後に読み込まれた第二のディスクリプタDc(Y)に従って、データDtを転送する。具体例には、転送ステップは、第二のディスクリプタDc(Y)に規定されている開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 In the transfer step, (B) when the first descriptor Dc (X) is determined to be "not available" in the determination step, the following transfer is executed. That is, 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. As a specific example, 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.
 前記の構成によれば、前記制御方法は、予め複数用意されたディスクリプタDcの中から読み込んだ第一のディスクリプタDc(X)を「利用可能である」と判定すると、第一のディスクリプタDc(X)に従って、データDtを転送する。具体例には、前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)を先頭アドレスとする領域にデータDtを転送する。 According to the above configuration, when 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.
 また、前記制御方法は、第一のディスクリプタDc(X)を「利用可能でない」と判定すると、予め複数用意されたディスクリプタDcの中からさらに、第二のディスクリプタDc(Y)を読み込む。そして、前記制御方法は、第二のディスクリプタDc(Y)の規定する開始アドレスAs(Y)を先頭アドレスとする領域に、データDtを転送する。 Further, in the control method, when it is determined that the first descriptor Dc (X) is "not available", 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.
 つまり、前記制御方法は、読み込んだ第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、その判定結果をCPU30等に通知することはない。開始アドレスAs(X)が標準受信領域Rgo内にないと判定した場合にも、前記制御方法は、CPU30等に第一のディスクリプタDc(X)を正しいものに再設定させることはない。前記制御方法は、第一のディスクリプタDc(X)の規定する開始アドレスAs(X)が標準受信領域Rgo内にないと判定すると、予め用意された第二のディスクリプタDc(Y)をさらに読み込む。そして、前記制御方法は、読み込んだ第二のディスクリプタDc(Y)に従って、データDtをメインメモリ20へと転送する。 That is, even when it is determined that the start address As (X) defined by the first descriptor Dc (X) read is not in the standard reception area Rgo, 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.
 前記制御方法は、予め複数用意されたディスクリプタDcの中からデータDtの転送に「利用可能なディスクリプタ」を選択し、選択した「利用可能なディスクリプタ」に従って、データDtを転送する。 In the control method, "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".
 そのため、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止することができる。また、前記制御方法は、データDtの転送に「利用可能なディスクリプタ」をCPU30等に再設定させる場合に比べて、データDtの転送に要する時間を短縮することができる。 Therefore, the 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.
 つまり、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを高速にメインメモリ20へと転送することができるとの効果を奏する。 That is, the 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.
 特に、「読み込んだディスクリプタDcに規定されている開始アドレスAsが、標準受信領域Rgo内にあるか否か」の判定は、データDtをネットワーク3から受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理を、データDtを受信する前に実行することができる。 In particular, 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.
 前記制御方法は、「ディスクリプタDcによる誤ったデータ転送」を防止するための処理をデータDtの受信前に実行しておくことで、データDtを受信してからデータDtをメインメモリ20へと転送するまでの時間を短縮できるという効果を奏する。 In the control method, 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.
 ここで、通信制御機器10は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。通信制御機器10は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that 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).
 ディスクリプタDcの拒否を判定する通信制御機器10を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された通信制御機器10は、CPU30等にディスクリプタDcの拒否を判定させる場合に比べて高速に、ディスクリプタDcの拒否を判定することができるとの効果を奏する。 When 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.
 特に、前記制御方法は、CPU30等によるディスクリプタDcの再設定を必要とせずに、予め複数用意されたディスクリプタDcの中から、データDtの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタDcに従って転送を実行する。 In particular, the 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.
 ハードウェアによる論理回路で構成した場合、通信制御機器10は、データDtの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタDcの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、通信制御機器10は、予め複数用意されたディスクリプタDcの中から選択したディスクリプタDcに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, 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.
 したがって、通信制御機器10をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタDcによる誤ったデータ転送を防止しつつ、ネットワーク3から受信したデータDtを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device 10 is configured by a logic circuit by hardware, 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.
 §4.変形例
 (ネットワーク構成例について)
 図2に例示した制御システム0において、複数のネットワーク3が、ネットワークハブ2を介して、PLC1に接続している。しかしながら、制御システム0において、1つのネットワーク3がネットワークハブ2を介さずにPLC1に接続し、例えば、PLC1と、1つ以上のネットワークデバイスとが、一筆書きの形式で互いに通信可能に接続されていてもよい。
§4. Modification example (about network configuration example)
In the control system 0 exemplified in FIG. 2, a plurality of networks 3 are connected to the PLC 1 via the network hub 2. However, in control system 0, 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.
 (付記事項)
 本発明の一態様に係る通信制御機器は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、を備え、前記ディスクリプタは予め複数用意されており、前記転送部は、(A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。
(Additional notes)
The communication control device according to one aspect of the present invention 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.
 前記の構成によれば、前記通信制御機器は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記通信制御機器は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when 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. Further, when 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.
 つまり、前記通信制御機器は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記通信制御機器は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 That is, even if 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. When 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".
 そのため、前記通信制御機器は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 Therefore, 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.
 つまり、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 That is, 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.
 特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記通信制御機器は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, 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.
 ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that 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).
 ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When 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.
 特に、前記通信制御機器は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, 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.
 ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, 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.
 したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記通信制御機器は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is 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.
 本発明の一態様に係る通信制御機器において、前記判定部は、(A)前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記許可領域内にあり、かつ、(B)受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスとから算出する、前記データを転送した場合の転送後の領域の末尾アドレスが前記許可領域内にある場合に、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定してもよい。 In the communication control device according to one aspect of the present invention, in the determination unit, (A) the start address specified in the descriptor read by the reading unit is in the permitted area, and (B). ) The end address of the transferred area when the data is transferred, which is calculated from the data size of the received data and the start address specified in the descriptor read by the reading unit, is the permitted area. If it is inside, it may be determined that the descriptor read by the reading unit is available.
 前記の構成によれば、前記通信制御機器は、受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタの規定する前記開始アドレスとから、前記末尾アドレスを算出する。そして、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にあり」、かつ、「前記末尾アドレスが前記許可領域内にある」と判定すると、読み込んだ前記ディスクリプタを利用可能であると判定する。 According to the above configuration, 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.
 ここで、「読み込んだディスクリプタの規定する開始アドレスが前記許可領域内にある」場合であっても、「前記末尾アドレスが前記許可領域内にない」時がある。そのような時には、読み込んだディスクリプタは、受信したデータの転送先を決定するディスクリプタとしては不適切であり、つまり、受信したデータの転送先を決定するディスクリプタとしては利用することができない(利用不能である)。 Here, even if "the start address specified by the read descriptor is in the permitted area", there are times when "the end address is not in the permitted area". In such a case, 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).
 そこで、前記通信制御機器は、「読み込んだディスクリプタの規定する開始アドレス」に加えて、受信したデータのデータサイズをも考慮して、「読み込んだディスクリプタが利用可能か否か」を判定する。 Therefore, 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".
 したがって、前記通信制御機器は、開始アドレスに加えて、受信したデータのデータサイズをも考慮することで、予め複数用意されたディスクリプタの中から、受信したデータの転送に「利用可能なディスクリプタ」を、より正確に選択できるとの効果を奏する。 Therefore, 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 according to one aspect of the present invention may calculate the permitted area from the start address of the permitted area and the data size of the permitted area acquired in advance.
 前記の構成によれば、前記通信制御機器は、前記許可領域の先頭アドレスと前記許可領域のデータサイズとを予め取得しておき、取得した前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出する。 According to the above configuration, 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.
 したがって、前記通信制御機器は、予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出することができるとの効果を奏する。 Therefore, 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.
 本発明の一態様に係る通信制御機器は、前記データを受信しようとする都度、前記データを受信する前に前記メインメモリに設定される前記ディスクリプタを格納する格納部をさらに備え、前記第一ディスクリプタは前記格納部に格納されており、前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 The communication control device according to one aspect of the present invention 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.
 前記の構成によれば、前記通信制御機器は、前記格納部に格納された第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。 According to the above configuration, when 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.
 また、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定し、かつ、前記後行ディスクリプタを「利用可能である」と判定すると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに従って転送を実行する。例えば、前記通信制御機器は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記格納部に格納されている前記後行ディスクリプタをさらに読み込む。そして、前記通信制御機器は、読み込んだ前記後行ディスクリプタが「利用可能である」と判定すると、前記後行ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 Further, when the communication control device determines that the first descriptor is "not available" and the trailing descriptor is "available", 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.
 ここで一般に、或る情報(例えば、数メガバイト(Mbyte)の画像情報)が、何個の前記データ(より正確には、何個のフレームデータ)として送信されるのかを、CPU等(ソフトウェア)は計算していない。例えば、1個の前記データ(フレームデータ)のデータサイズが、通常は「1.5キロバイト(Kbyte)」である場合であっても、CPU等は、その或る情報が、何個の前記データとして送信されるのかを計算していない。 Here, in general, the CPU or the like (software) 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.
 その代わりに、一般にCPU等は、或る情報を受信する前に、その或る情報を常に受信できるように(前記メインメモリへと転送できるように)、十分な数(個数)の前記ディスクリプタを、前記メインメモリに設定しておく。つまり、CPU等は、ネットワークから受信すべき前記データの個数に比して十分余裕のある個数の前記ディスクリプタを、前記データを受信する前に、予め前記メインメモリに設定しておく。 Instead, 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.
 そして、CPU等によって前記メインメモリに設定された前記ディスクリプタは、前記格納部に格納される。そのため、ネットワークから受信すべき前記データの個数に比して、前記格納部に格納されている前記ディスクリプタの個数は、十分に多い。 Then, 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.
 したがって、前記通信制御機器は、転送すべき前記データの個数に比して十分多い個数の前記ディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択することができるとの効果を奏する。 Therefore, 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.
 本発明の一態様に係る通信制御機器において、前記格納部に格納され、前記読込部によって読み込まれた前記ディスクリプタであって、前記判定部によって利用可能でないと判定された前記ディスクリプタの個数が、予め設定された基準個数を超えると、前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送してもよい。 In the communication control device according to one aspect of the present invention, 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. When the set reference number is exceeded, 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.
 前記の構成によれば、前記通信制御機器は、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えると、前記第二格納部に予め格納されている前記退避用ディスクリプタを読み込む。そして、前記通信制御機器は、前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, 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.
 ここで、読み込んだ「前記格納部に格納されたディスクリプタ」であって、利用不能と判定したディスクリプタの個数が、前記基準個数を超えている場合、以下の事象が発生している可能性がある。すなわち、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している可能性がある。そして、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分に、異常が発生している場合、「前記格納部に格納されたディスクリプタ」の中から「利用可能なディスクリプタ」を選択するのは不可能であり、または、多大の時間を要する。 Here, if the number of descriptors determined to be unusable in the read "descriptor stored in the storage unit" exceeds the reference number, the following events may have occurred. .. That is, there is a possibility that an abnormality has occurred in all or most of the "descriptors stored in the storage unit". Then, when an abnormality occurs in all or most of the "descriptors stored in the storage unit", "usable descriptors" are selected from the "descriptors stored in the storage unit". It is impossible or time consuming to choose.
 そこで、前記通信制御機器は、「前記格納部に格納されており、利用不能と判定した」ディスクリプタの個数が、前記基準個数を超えると、「前記格納部に格納されたディスクリプタ」に代えて、前記退避用ディスクリプタに従って、前記データを転送する。 Therefore, when the number of descriptors "stored in the storage unit and determined to be unusable" exceeds the reference number, the communication control device replaces the "descriptor stored in the storage unit". The data is transferred according to the save descriptor.
 したがって、前記通信制御機器は、「前記格納部に格納されたディスクリプタ」の全て、または、その大部分について、異常が発生している場合にも、前記データを前記メインメモリへと、確実かつ高速に転送することができるとの効果を奏する。 Therefore, 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.
 本発明の一態様に係る通信制御機器において、前記退避用ディスクリプタの規定する開始アドレスは、前記メインメモリにおいて前記データを格納可能な領域であって、前記許可領域とは異なる領域内にあってもよい。 In the communication control device according to one aspect of the present invention, 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.
 前記の構成によれば、前記通信制御機器は、前記退避用ディスクリプタに従って前記データを前記メインメモリへと転送する場合、前記退避用ディスクリプタに従って前記データを、前記許可領域とは異なる領域へと転送する。言い換えれば、前記退避用ディスクリプタに従って前記データが転送される領域は、前記許可領域とは異なる。 According to the above configuration, when 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. .. In other words, the area to which the data is transferred according to the save descriptor is different from the permitted area.
 前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にある場合、以下の事象が発生し得る。すなわち、前記退避用ディスクリプタに従って前記許可領域内に転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って前記許可領域内に転送される別のデータによって、上書きされてしまう可能性がある。 When the start address specified by the save descriptor is within 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.
 そして、上述のような事態を防ぐためには、例えば、「前記或るデータが転送された領域と、前記別のデータが転送される領域とが、重複するか」を判断する処理などの煩雑な処理が必要となる。 Then, in order to prevent the above-mentioned situation, for example, a complicated process of determining "whether the area to which the certain data is transferred overlaps with the area to which the other data is transferred" is complicated. Processing is required.
 これに対して、前記退避用ディスクリプタの規定する開始アドレスが前記許可領域内にない場合、前記退避用ディスクリプタに従って前記メインメモリへと転送された前記或るデータが、前記別のデータによって上書きされてしまうことはない。 On the other hand, when the start address specified by the save descriptor is not in the permitted area, the certain data transferred to the main memory according to the save descriptor is overwritten by the other data. It won't end up.
 したがって、前記通信制御機器は、「前記退避用ディスクリプタに従って転送された或るデータが、前記格納部に格納されている前記ディスクリプタに従って転送される別のデータで上書きされる」といった事態を、煩雑な処理を要せず回避できるとの効果を奏する。 Therefore, 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.
 本発明の一態様に係る制御方法は、ネットワークから受信したデータをメインメモリへと転送する通信制御機器の制御方法であって、前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、を含み、前記ディスクリプタは予め複数用意されており、前記転送ステップは、(A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、(B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 The control method according to one aspect of the present invention 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. When 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. When it is determined that the data can be used in the determination step, 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.
 前記の構成によれば、前記制御方法は、前記予め複数用意されたディスクリプタの中から読み込んだ第一ディスクリプタを「利用可能である」と判定すると、前記第一ディスクリプタの規定する開始アドレスを先頭アドレスとする領域にデータを転送する。また、前記制御方法は、前記第一ディスクリプタを「利用可能でない」と判定すると、前記予め複数用意されたディスクリプタの中からさらに、前記第二ディスクリプタを読み込む。そして、前記制御方法は、前記第二ディスクリプタの規定する前記開始アドレスを先頭アドレスとする領域に、前記データを転送する。 According to the above configuration, when 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. Further, when 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.
 つまり、前記制御方法は、読み込んだ前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定した場合にも、その判定結果をCPU等に通知することはなく、CPU等に前記第一ディスクリプタを正しいものに再設定させることはない。前記制御方法は、前記第一ディスクリプタの規定する開始アドレスが前記許可領域内にないと判定すると、予め用意された前記第二ディスクリプタをさらに読み込み、読み込んだ前記第二ディスクリプタに従って、前記データをメインメモリへと転送する。 That is, even if 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. When 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".
 そのため、前記制御方法は、前記ディスクリプタによる誤ったデータ転送を防止することができ、また、前記データの転送に「利用可能なディスクリプタ」をCPU等に再設定させる場合に比べて、前記データの転送に要する時間を短縮することができる。 Therefore, the 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.
 つまり、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを高速にメインメモリへと転送することができるとの効果を奏する。 That is, the 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.
 特に、「読み込んだディスクリプタに規定されている開始アドレスが、前記許可領域内にあるか否か」の判定は、前記データをネットワークから受信する前であっても、実行可能である。そのため、前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を、前記データを受信する前に実行することができる。 In particular, 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 control method can execute a process for preventing "erroneous data transfer by the descriptor" before receiving the data.
 前記制御方法は、「ディスクリプタによる誤ったデータ転送」を防止するための処理を前記データの受信前に実行しておくことで、前記データを受信してから前記データを前記メインメモリへと転送するまでの時間を短縮できるという効果を奏する。 In the control method, 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.
 ここで、前記通信制御機器は、NIC(Network Interface Card、ネットワーク・インターフェイス・カード)として実現されるのが望ましい。前記通信制御機器は、典型的には、FPGA(Field-Programmable gate array)またはASIC(Application Specific Integrated Circuit)等のハードウェアによる論理回路で構成される。 Here, it is desirable that 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).
 ディスクリプタの拒否を判定する前記通信制御機器を、ハードウェアによる論理回路で構成した場合、以下の効果を実現することができる。すなわち、一般的に、処理内容が同じであれば、ハードウェアによる処理の方が、ソフトウェア(具体的には、CPU)による処理よりも、高速で実行することができる。そのため、ハードウェアによる論理回路で構成された前記通信制御機器は、CPUにディスクリプタの拒否を判定させる場合に比べて高速に、ディスクリプタの拒否を判定することができるとの効果を奏する。 When 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.
 特に、前記制御方法は、CPU等によりディスクリプタの再設定を必要とせずに、予め複数用意されたディスクリプタの中から、前記データの転送に「利用可能なディスクリプタ」を選択し、選択したディスクリプタに従って転送を実行する。 In particular, in the control method, "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.
 ハードウェアによる論理回路で構成した場合、前記通信制御機器は、前記データの転送に「利用可能なディスクリプタ」を予め複数用意されたディスクリプタの中から選択する処理を極めて高速に実行することができる。また、ハードウェアによる論理回路で構成した場合、前記通信制御機器は、予め複数用意されたディスクリプタの中から選択したディスクリプタに従って、極めて高速に転送を実行することができる。 When configured with a logic circuit by hardware, 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.
 したがって、前記通信制御機器をハードウェアによる論理回路で構成した場合、前記制御方法は、ディスクリプタによる誤ったデータ転送を防止しつつ、ネットワークから受信したデータを極めて高速に転送することができるとの効果を奏する。 Therefore, when the communication control device is configured by a logic circuit by hardware, 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.
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope of the claims, and the embodiments obtained by appropriately combining the technical means disclosed in the different embodiments. Is also included in the technical scope of the present invention.
    3 ネットワーク
   10 通信制御機器
   20 メインメモリ
   30 CPU
  121 DMAC(転送部)
  123 読込部
  124 判定部
  125 第一ディスクリプタFIFO(格納部)
  126 第二ディスクリプタFIFO(第二格納部)
   Ae 末尾アドレス
   As 開始アドレス
   Ct エラー個数
   Dc ディスクリプタ
  Dce 退避用ディスクリプタ
  Dco 通常ディスクリプタ
   Dt データ
   Nr 基準個数
  Rgo 標準受信領域(許可領域)
 S120 読込ステップ
 S130 判定ステップ
 S160 判定ステップ
 S170 転送ステップ
 S200 読込ステップ
 S210 読込ステップ
3 Network 10 Communication control device 20 Main memory 30 CPU
121 DMAC (transfer section)
123 Read unit 124 Judgment unit 125 First descriptor FIFO (storage unit)
126 Second descriptor FIFO (second storage)
Ae End address As Start address Ct Number of errors Dc Descriptor Dce Descriptor for backup Dco Normal descriptor Dt Data Nr Reference number Rgo Standard reception area (permitted area)
S120 read step S130 judgment step S160 judgment step S170 transfer step S200 read step S210 read step

Claims (7)

  1.  ネットワークから受信したデータをメインメモリへと転送する通信制御機器であって、
     前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込部と、
     前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する判定部と、
     前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送部と、
    を備え、
     前記ディスクリプタは予め複数用意されており、
     前記転送部は、
     (A)前記予め複数用意されたディスクリプタの内、前記読込部によって読み込まれた第一ディスクリプタが、前記判定部によって利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
     (B)前記第一ディスクリプタが前記判定部によって利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
    通信制御機器。
    A communication control device that transfers data received from the network to the main memory.
    A read unit that reads a descriptor that specifies the start address of the area where the data should be stored, and
    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 reads the data. A determination unit that determines that the descriptor is available, and
    A transfer unit that transfers the data to an area whose start address is the start address specified in the descriptor read by the read unit.
    Equipped with
    Multiple descriptors are prepared in advance,
    The transfer unit
    (A) When it is determined that the first descriptor read by the reading unit among the plurality of descriptors prepared in advance can be used by the determination unit, the start specified in the first descriptor is specified. Transfer the data to the area starting from the address,
    (B) When it is determined by the determination unit that the first descriptor is not available, it is defined as the second descriptor read by the reading unit after the first descriptor among the plurality of descriptors prepared in advance. A communication control device that transfers the data to an area whose start address is the start address.
  2.  前記判定部は、(A)前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記許可領域内にあり、かつ、(B)受信した前記データのデータサイズと、前記読込部によって読み込まれた前記ディスクリプタに規定されている前記開始アドレスとから算出する、前記データを転送した場合の転送後の領域の末尾アドレスが前記許可領域内にある場合に、前記読込部によって読み込まれた前記ディスクリプタを利用可能であると判定する
    請求項1に記載の通信制御機器。
    In the determination unit, (A) the start address specified in the descriptor read by the reading unit is in the permitted area, and (B) the data size of the received data and the reading are performed. When the end address of the transferred area when the data is transferred, which is calculated from the start address specified in the descriptor read by the unit, is within the permitted area, the data is read by the read unit. The communication control device according to claim 1, wherein it is determined that the descriptor can be used.
  3.  予め取得した、前記許可領域の先頭アドレスと前記許可領域のデータサイズとから、前記許可領域を算出する
    請求項1または2に記載の通信制御機器。
    The communication control device according to claim 1 or 2, wherein the permission area is calculated from the start address of the permission area and the data size of the permission area acquired in advance.
  4.  前記データを受信しようとする都度、前記データを受信する前に前記メインメモリに設定される前記ディスクリプタを格納する格納部をさらに備え、
     前記第一ディスクリプタは前記格納部に格納されており、
     前記転送部は、(A)前記第一ディスクリプタが前記判定部によって利用可能でないと判定され、かつ、(B)前記格納部に格納されていた前記第一ディスクリプタとは異なる前記ディスクリプタであって、前記読込部によって前記第一ディスクリプタよりも後に読み込まれた前記ディスクリプタである後行ディスクリプタが、前記判定部によって利用可能であると判定されると、前記後行ディスクリプタを前記第二ディスクリプタとして、前記後行ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
    請求項1から3のいずれか1項に記載の通信制御機器。
    Each time the data is to be received, a storage unit for storing the descriptor set in the main memory before receiving the data is further provided.
    The first descriptor is stored in the storage unit, and is stored in the storage unit.
    The transfer unit is the descriptor that is different from (A) the first descriptor determined by the determination unit and (B) the first descriptor stored in the storage unit. When it is determined by the determination unit that the trailing descriptor, which is the descriptor read after the first descriptor by the reading unit, is available, the trailing descriptor is used as the second descriptor, and the latter is described. The communication control device according to any one of claims 1 to 3, wherein the data is transferred to an area having the start address specified in the line descriptor as a start address.
  5.  前記格納部に格納され、前記読込部によって読み込まれた前記ディスクリプタであって、前記判定部によって利用可能でないと判定された前記ディスクリプタの個数が、予め設定された基準個数を超えると、
     前記読込部は、前記格納部とは異なる第二格納部に予め格納されている前記ディスクリプタである退避用ディスクリプタを読み込み、
     前記転送部は、前記読込部によって読み込まれた前記退避用ディスクリプタを前記第二ディスクリプタとして、前記退避用ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
    請求項4に記載の通信制御機器。
    When 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 exceeds a preset reference number,
    The reading unit reads a save descriptor which is the descriptor stored in advance in a second storage unit different from the storage unit, and reads the descriptor.
    A claim that the transfer unit transfers the data to an area in which the save descriptor read by the read unit is used as the second descriptor and the start address specified in the save descriptor is the start address. The communication control device according to 4.
  6.  前記退避用ディスクリプタの規定する開始アドレスは、前記メインメモリにおいて前記データを格納可能な領域であって、前記許可領域とは異なる領域内にある
    請求項5に記載の通信制御機器。
    The communication control device according to claim 5, wherein the start address specified by the save descriptor is an area in which the data can be stored in the main memory and is in an area different from the permitted area.
  7.  ネットワークから受信したデータをメインメモリへと転送する通信制御機器の制御方法であって、
     前記データを格納すべき領域の開始アドレスを規定するディスクリプタを読み込む読込ステップと、
     前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスが、前記メインメモリにおいて前記データを格納可能な領域として予め設定された領域である許可領域内にあると、前記読込ステップにて読み込まれた前記ディスクリプタを利用可能であると判定する判定ステップと、
     前記読込ステップにて読み込まれた前記ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する転送ステップと、
    を含み、
     前記ディスクリプタは予め複数用意されており、
     前記転送ステップは、
     (A)前記予め複数用意されたディスクリプタの内、前記読込ステップにて読み込まれた第一ディスクリプタが、前記判定ステップにて利用可能であると判定されると、前記第一ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送し、
     (B)前記第一ディスクリプタが前記判定ステップにて利用可能でないと判定されると、前記予め複数用意されたディスクリプタの内、前記読込ステップにて前記第一ディスクリプタよりも後に読み込まれた第二ディスクリプタに規定されている前記開始アドレスを先頭アドレスとする領域に、前記データを転送する
    制御方法。
    It is a control method of a communication control device that transfers data received from the network to the main memory.
    A read step that reads a descriptor that specifies the start address of the area where the data should be stored, and
    When the start address specified in the descriptor read in the read step is within the permitted area which is a preset area for storing the data in the main memory, the read step is performed. And the determination step of determining that the descriptor read in
    A transfer step of transferring the data to an area having the start address specified in the descriptor read in the read step as a start address, and a transfer step.
    Including
    Multiple descriptors are prepared in advance,
    The transfer step is
    (A) Among the plurality of descriptors prepared in advance, when it is determined that the first descriptor read in the reading step can be used in the determination step, it is specified in the first descriptor. The data is transferred to the area having the start address as the start address, and the data is transferred.
    (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. A control method for transferring the data to an area having the start address as the start address specified in 1.
PCT/JP2021/006542 2020-09-07 2021-02-22 Communication control device and control method for communication control device WO2022049801A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020149861A JP7476733B2 (en) 2020-09-07 2020-09-07 COMMUNICATION CONTROL DEVICE AND METHOD FOR CONTROLLING COMMUNICATION CONTROL DEVICE
JP2020-149861 2020-09-07

Publications (1)

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

Family

ID=80490843

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/006542 WO2022049801A1 (en) 2020-09-07 2021-02-22 Communication control device and control method for communication control device

Country Status (2)

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

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 (en) * 2004-12-24 2006-07-06 Fujitsu Ltd Dma circuit and disk array device using it
JP2009032053A (en) * 2007-07-27 2009-02-12 Sony Corp Data reception system
JP2010004262A (en) * 2008-06-19 2010-01-07 Sony Corp Information reception device and information reception method
JP2010176442A (en) * 2009-01-30 2010-08-12 Fujitsu Ltd Descriptor transfer device, i/o controller and descriptor transfer method
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 (en) * 2004-12-24 2006-07-06 Fujitsu Ltd Dma circuit and disk array device using it
JP2009032053A (en) * 2007-07-27 2009-02-12 Sony Corp Data reception system
JP2010004262A (en) * 2008-06-19 2010-01-07 Sony Corp Information reception device and information reception method
US7921237B1 (en) * 2008-09-29 2011-04-05 Network Appliance, Inc. Preserving data integrity of DMA descriptors
JP2010176442A (en) * 2009-01-30 2010-08-12 Fujitsu Ltd Descriptor transfer device, i/o controller and descriptor transfer method

Also Published As

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

Similar Documents

Publication Publication Date Title
US7076719B2 (en) Bus system and retry method
CN109491958B (en) Error processing system and error processing method
US7516254B2 (en) Memory control apparatus
EP0132161B1 (en) Apparatus for controlling a plurality of interruption processings
US7934043B2 (en) Data processing apparatus for controlling access to a memory based upon detection of completion of a DMA bus cycle
US8213448B2 (en) Method to support lossless real time data sampling and processing on rapid I/O end-point
CN111694508B (en) Method and system for managing LBA overlap checking in NVMe-based SSDs
WO2022049801A1 (en) Communication control device and control method for communication control device
EP1255375B1 (en) Plural station memory data sharing system
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 (en) Communication method, device, electronic equipment, storage medium and system on chip
FR2991475B1 (en) SYSTEM CIRCUIT DEVICE AND SYSTEM EQUIPPED WITH MEMORY ACCESS METHOD
US20230099487A1 (en) Communication control device and method for controlling communication control device
JP4217386B2 (en) FIFO device
JP2520905B2 (en) Serial communication controller
JP2006285872A (en) Multi-cpu system
JP5441219B2 (en) Semiconductor device and serial interface circuit
KR950001513B1 (en) Acknowledgement transmission method in data link layer of mini-map network
JP2009289269A (en) Method for allocating memory in buffer memory
JP2009289269A6 (en) Memory allocation method in buffer memory
JP4527419B2 (en) Program trace method and trace processing system
CN118210561A (en) FPGA rapid loading method, device, equipment and medium
JP2009086908A (en) Microcomputer device
JP4327765B2 (en) Bus system
US20070130411A1 (en) Data buffering method

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