WO2017216892A1 - Data transfer device and data transfer method - Google Patents

Data transfer device and data transfer method Download PDF

Info

Publication number
WO2017216892A1
WO2017216892A1 PCT/JP2016/067753 JP2016067753W WO2017216892A1 WO 2017216892 A1 WO2017216892 A1 WO 2017216892A1 JP 2016067753 W JP2016067753 W JP 2016067753W WO 2017216892 A1 WO2017216892 A1 WO 2017216892A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
data
read
offset value
bus
Prior art date
Application number
PCT/JP2016/067753
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 三菱電機株式会社
Priority to PCT/JP2016/067753 priority Critical patent/WO2017216892A1/en
Priority to TW105123544A priority patent/TW201800950A/en
Publication of WO2017216892A1 publication Critical patent/WO2017216892A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Definitions

  • This invention relates to a DMA (Direct Memory Access) device.
  • the present invention relates to a DMA device incorporated in a controller.
  • the processing capacity of the CPU has been improving year by year, and the slow access speed of IO devices and external memory has become a bottleneck for improving performance.
  • the data of external memory and IO device is copied to high-speed memory by DMA, and the high-speed using DMA is referred to the copy of high-speed memory from CPU Is done.
  • an internal memory stores a copy of data stored in an external memory in a data block of a predetermined size.
  • the memory access control program reads the read target data from the external memory and supplies the read read target data to the read request source. Thereafter, the memory access control program reads the data block including the read target data from the external memory, and stores the read data block in the internal memory by using the DMA controller, thereby reducing the access time from the CPU to the memory. It is shortened.
  • Patent Document 2 a data block including less data than all the cache lines of the data cache memory in the processor is written from the input / output adapter to a predetermined position in the memory through the memory bus. If it is determined that this data is contained in the data cache memory, all cache lines containing the data written in the memory are purged. Patent Document 2 proposes a cache coherent DMA write method that can execute a high-speed DMA transaction for a data block having a size smaller than the entire cache line by this purge.
  • a control program for a local memory realizes the following determination function, copy function, and read function by a processor.
  • the determination function determines whether or not the tag address designating access data matches the tag address of the data in the storage area of the temporary storage device corresponding to the line number designating the access data.
  • the duplication function starts the process of duplicating the data stored in the storage area of the temporary storage device in the register before the determination process is completed.
  • the read function reads data from the register when it is determined by the determination function that they match.
  • the processor reduces the data access time from the processor to the temporary storage device by starting the process of writing the data stored in the temporary storage device to the register before the cache hit determination is completed. .
  • An object of the present invention is to provide a technique for performing partial copying of data from an IO device or external memory to a high-speed memory with low overhead.
  • the data transfer device of the present invention When a write request signal that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing is received from the central processing unit, the head address is subtracted from the address by subtracting the head address.
  • Calculate the offset value of the address A request acquisition unit that registers the offset value as a record in a table in association with a record number; The offset value is calculated by adding a head address of a second storage area that is a storage area of the storage device that is read and written by the central processing unit and is different from the first storage area to the offset value.
  • the data transfer apparatus of the present invention includes the request acquisition unit and the data acquisition unit, it is possible to perform partial copying of data of the IO device and external memory to the high-speed memory with low overhead.
  • FIG. 3 is a diagram of the controller 1-1 according to the first embodiment.
  • FIG. 3 is a diagram illustrating the hardware configuration of the DMA 2 in the first embodiment.
  • FIG. 3 is another diagram illustrating the hardware configuration of the DMA 2 in the diagram of the first embodiment.
  • FIG. 3 is a diagram illustrating the address map as viewed from the CPU 50 of the controller 1 in the first embodiment.
  • FIG. 3 is a diagram of the first embodiment, showing an outline of a data transfer method by DMA2.
  • 5 is a flowchart of DMA setting by the S / W 51 in the diagram of the first embodiment.
  • FIG. FIG. 3 is a flowchart of the DMA activation procedure by the S / W 51 in the first embodiment.
  • FIG. 3 is a flowchart of the operation when the slave I / F 10 is written in the diagram of the first embodiment.
  • FIG. 4 is a flowchart of the operation of the table controller 41 in the diagram of the first embodiment.
  • FIG. 3 is a diagram illustrating the operation of the master I / F 20 in the first embodiment.
  • FIG. 4 is a flowchart of the operation after the DMA activation by the S / W 51 in the diagram of the first embodiment.
  • FIG. 3 is a flowchart illustrating an operation when the slave I / F 10 is read in the diagram of the first embodiment.
  • FIG. 3 is a diagram of the first embodiment, showing another hardware configuration of the DMA 2.
  • FIG. 5 is a configuration diagram showing a controller 1-2 of a second embodiment.
  • FIG. 5 is a configuration diagram showing a controller 1-3 of a third embodiment.
  • FIG. 6 is a configuration diagram showing a controller 1-4 of a fourth embodiment.
  • FIG. 6 is a configuration diagram showing a controller
  • a CPU 50 an IO device 70, a slave I / F 10, and a master I / F 20 appear.
  • CPU is an abbreviation for Central Processing Unit.
  • IO is an abbreviation for Input Output.
  • I / F is an abbreviation for Inter Face.
  • FIG. 1 is a configuration diagram of the controller 1-1.
  • FIG. 2 is a diagram showing a hardware configuration of a DMA (Direct Memory Access) device 2 (hereinafter referred to as DMA 2).
  • DMA 2 is a diagram in which DMA 2, the bus bridge circuit 80, the high-speed bus 81, and the low-speed bus 82 are extracted from FIG.
  • the bus bridge circuit 80 is hereinafter referred to as a bus bridge 80.
  • FIG. 3 is a diagram illustrating a relationship between the slave I / F 10 and the master I / F 20 included in the DMA 2 and the processor 801 and the like.
  • the DMA 2 includes a central processing unit CPU 50, an external memory 60, an IO device 70, a bus bridge 80 connecting the high-speed bus 81 and the low-speed bus 82, and the DMA 2.
  • DMA 2 is a data transfer device 902.
  • the high-speed bus 81 is the first bus 981
  • the low-speed bus 82 is the second bus 982 whose data transfer speed is lower than that of the first bus.
  • the CPU 50 and the high-speed bus 81, the external memory 60 and the low-speed bus 82, and the like are connected through connections 101 to 111 described later.
  • the DMA 2 includes a slave I / F 10, a master I / F 20, a 2-port memory 30, and a table management device 40.
  • the 2-port memory 30 is a data storage memory 930.
  • the slave I / F 10 is a request acquisition unit 910.
  • the slave I / F 10 is an interface device that exchanges data with the CPU 50.
  • the master I / F 20 is a data acquisition unit 920.
  • the master / F 20 is an interface device that exchanges data with the IO buffer 71, the external memory 60, and the like.
  • the IO buffer 71, the external memory 60, and the like are storage devices to which data is read and written by the CPU 50. The detailed configuration of the DAM 2 will be described later.
  • the CPU-high-speed bus connection 101 connects the CPU 50 and the high speed bus 81.
  • the low speed bus-external memory connection 102 connects the low speed bus 82 and the external memory 60.
  • the low speed bus-IO device connection 103 connects the low speed bus 82 and the IO device 70.
  • the high-speed bus-slave I / F connection 104 connects the high-speed bus 81 and the slave I / F 10.
  • the master I / F-low speed bus connection 105 connects the master I / F 20 and the low speed bus 82.
  • the slave I / F-master I / F connection 106 connects the slave I / F 10 and the master I / F 20.
  • the slave I / F-table management device connection 107 connects the slave I / F 10 and the table management device 40.
  • the slave I / F-2 port memory connection 108 connects the slave I / F 10 and the 2-port memory 30.
  • the master I / F-2 port memory connection 109 connects the master I / F 20 and the 2-port memory 30.
  • the master I / F-table management device connection 110 connects the master I / F 20 and the table management device 40.
  • the table management apparatus-master I / F connection 111 also connects the master I / F 20 and the table management apparatus 40.
  • the DMA 2 includes a processor 801, a RAM (Random Access Memory) 802, and a ROM (Read Only Memory) 803 as hardware.
  • the ROM 803 stores a program for the processor 801 to realize functions such as the slave I / F 10.
  • the processor 801 reads a program from the ROM 803 and realizes functions of the slave I / F 10, the master I / F 20, the table controller 41, and the like.
  • the correspondence between DMA2 and hardware is as follows. (1)
  • the slave I / F 10 is realized by the processor 801 and the RAM 802. Specifically, the processor 801 implements the function of the slave I / F 10.
  • a program read from the ROM 803 by the processor 801 implements the function of the slave I / F 10.
  • the RAM 802 implements the write buffer 11.
  • the master I / F 20 is realized by the processor 801 and the RAM 802.
  • the processor 801 implements the function of the master I / F 20.
  • a program that the processor 801 reads from the ROM 803 implements the function of the master I / F 20.
  • the RAM 802 implements the base address register 21.
  • the 2-port memory 30 is realized by the RAM 802.
  • the table management device 40 includes a table controller 41, a size register 42, and a table 43.
  • the function of the table controller 41 is realized by the processor 801.
  • the program read from the ROM 803 by the processor 801 implements the function of the table controller 41.
  • the size register 42 is realized by the RAM 802.
  • the table 43 is realized by the RAM 802.
  • a CPU 50 on which “Software 1-1 of controller 1-1” (hereinafter referred to as S / W 51) operates is connected to a high-speed bus 81 via a connection 101.
  • External memory 60 is connected to low speed bus 82 via connection 102.
  • the IO device 70 has an IO device built-in buffer 71 therein.
  • the IO device built-in buffer 71 is referred to as an IO buffer 71.
  • the IO device 70 is connected to the low speed bus 82 via the connection 103.
  • the high speed bus 81 and the low speed bus 82 are connected by a bus bridge 80.
  • the DMA 2 includes a slave I / F 10, a master I / F 20, a 2-port memory 30, and a table management device 40.
  • the slave I / F 10 has a write buffer 11.
  • the master I / F 20 has a base address register 21 for storing the base address of the target device.
  • the 2-port memory 30 has a plurality of data areas 32 each having a unique address 31.
  • the table management device 40 includes a table controller 41, a size register 42 for storing the memory size of the target device, and a table 43.
  • the entry 49 has items of an entry number 44, an entry valid flag 45, a data valid flag 46, an address offset 47, and a status 48.
  • the entry valid flag 45 and the data valid flag 46 are referred to as an entry flag 45 and a data flag 46, respectively.
  • the entry flag 45 is a flag indicating whether the entry 49 is valid or invalid.
  • the data flag 46 is a flag indicating whether the data of the 2-port memory 30 corresponding to the entry number 44 is valid or invalid. In the following description, both the entry flag 45 and the data flag 46 indicate a valid state when described as set, and indicate an invalid state when described as reset.
  • the slave I / F 10 and the master I / F 20 are connected by a connection 106.
  • the slave I / F 10 and the table management device 40 are connected by a connection 107.
  • Slave I / F 10 and 2-port memory 30 are connected by connection 108.
  • the master I / F 20 and the 2-port memory 30 are connected by a connection 109.
  • the master I / F 20 and the table management device 40 are connected by a connection 110.
  • the table management device 40 and the master I / F 20 are connected by a connection 111.
  • the connection 111 is connected by a connection 111 including a read instruction signal 111a for instructing reading and an entry number signal 111b that matches the contents of the entry number 44 of the entry 49 that is the source of the read instruction.
  • the slave I / F 10 is connected to the high-speed bus 81 via the connection 104.
  • the connection 104 includes an address signal 104a, a control signal 104b, a read / write identification signal 104c, a read data signal 104d, a write data signal 104e, and a size signal 104f.
  • the master I / F 20 is connected to the low speed bus 82 via the connection 105.
  • FIG. 4 is an address map 90 of the controller 1-1 as seen from the CPU 50.
  • the head address is the TOP address 90a and the tail address is the BOTTOM address 90b.
  • the address map 90 includes a DMA area 91, an external memory area 92, an IO device buffer area 93, and a DMA setting area 94.
  • the IO device buffer area 93 is a storage area of the IO buffer 71.
  • the external memory area 92 is a storage area of the external memory 60.
  • the DMA area 91 includes a write address 91W included in the write request signal 51W and a read address 91L included in the read request signal 51L. Is a storage area to which (3) The size of the DMA area 91 is set in the size register 42 (step S1 described later). (4) In the DMA area 91, the head address is the DMA area TOP address 91a, and the tail address is the DMA area BOTTOM address 91b. (5) In the external memory area 92, the start address is the external memory area TOP address 92a, and the end address is the external memory area BOTTOM address 92b.
  • the head address is the IO device buffer area TOP address 93a
  • the tail address is the IO device buffer area BOTTOM address 93b.
  • the head address is the DMA setting area TOP address 94a
  • the tail address is the DMA setting area BOTTOM address 94b.
  • the DMA area TOP address 91a and the like are described as follows.
  • the DMA area TOP address 91a is described as TOP / AD91a (DMA).
  • the DMA area BOTTOM address 91b is BOTTOM / AD91b (DMA).
  • the external memory area TOP address 92a is described as TOP / AD 92a.
  • the external memory area BOTTOM address 92b is described as BOTTOM / AD92b.
  • the IO device buffer area TOP address 93a is described as TOP / AD93a (IO).
  • the IO device buffer area BOTTOM address 93a is described as BOTTOM / AF93b (IO).
  • the DMA setting area TOP address 94a is described as TOP / AD 94a.
  • the DMA setting area BOTTOM address 94b is described as BOTTOM / AD94b.
  • FIG. 5 is a diagram showing an outline of a data transfer method by the DMA 2 when the S / W 51 reads the IO buffer 71.
  • DMA2 an outline of a data transfer method by DMA2 will be described.
  • step S01 the S / W 51 operating in the CPU 50 transmits to the slave I / F 10 a write request signal 51W that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing.
  • the first storage area is the DMA area 91
  • the top address is TOP / AD91a (DMA)
  • the end address is BOTTOM / AD91 (DMA).
  • the address belonging to the DMA area 91 which is the first storage area is the write address 91W.
  • ⁇ AD (IO) is a value obtained by subtracting TOP / AD 93 a (IO) from the address AD when a certain address AD belongs to the IO device buffer area 93. That is, ⁇ AD (IO) is an offset value of the address AD with respect to TOP / AD9a (IO). ⁇ AD (IO) is also an offset value of the address AD with respect to TOP / AD91a (DMA) when TOP / AD91a (DMA) is added as the write address 91W.
  • ⁇ AD (IO) may be described as ⁇ AD.
  • step S02 when the slave I / F 10, which is the request acquisition unit 910, receives the write request signal 51W from the S / W 51, the top address TOP / AD 91a (DMA) from the write address 91W included in the write request signal 51W. ) Is subtracted to calculate the offset value ⁇ AD (IO) of the address with respect to TOP / AD91a (DMA).
  • the slave I / F 10 registers ⁇ AD (IO) as a record in the table 43 in association with the record number.
  • the record is an entry 49 in the table 43
  • the record number is an entry number in the table 43.
  • the master I / F 20 that is the data acquisition unit 920 performs the following processing.
  • the master I / F 20 is a storage area used by the IO buffer 71 that is a storage device 971 that is read and written by the CPU 50, and is the head of a second storage area that is different from the DMA area 91 that is the first storage area.
  • the offset value ⁇ AD IO
  • the second storage area is the IO device buffer area 93
  • the top address is TOP / AD93a (IO)
  • the end address is BOTTOM / AD93b (IO).
  • the master I / F 20 reads the data at the converted address. Since the converted address belongs to the IO device buffer area 93, the master I / F 20 reads data from the IO buffer 71.
  • step S04 the master I / F 20 writes the read data in the 2-port memory 30 which is the data storage memory 930 in association with the identifier associated with the record number (entry number).
  • the identifier associated with the record number (entry number) corresponds to the address 31 in the 2-port memory 30.
  • step S05 the S / W 51 transmits to the slave I / F 10 a read request signal 51L that includes a read address 91L that is an address belonging to the DMA area 91 that is the first storage area and requests reading.
  • step S06 when the slave I / F 10 that is the request acquisition unit 910 receives the read request signal 51L from the S / W 51, the slave I / F 10 subtracts TOP / AD91a (DMA) from the read address included in the read request signal 51L.
  • the slave I / F 10 searches whether or not the offset value ⁇ AD (IO) having the same value as the calculated offset value ⁇ AD (IO) is registered in the table 4, and when registered, the offset value registered in the table 43 is registered.
  • Data associated with the identifier (address 31) corresponding to the record number (entry number) corresponding to ⁇ AD (IO) is obtained from the 2-port memory 30 which is the data storage memory 930 (step S07).
  • step S08 the slave I / F 10 transmits the acquired data to the CPU 50.
  • FIG. 6 is a flowchart in which the S / W 51 operating on the CPU 50 performs DMA setting.
  • the S / W 51 sets the size of the IO device buffer area 93 in the size register 42.
  • the S / W 51 may set the start address and end address of the IO device buffer area 93, or may set the address size from the start address to the end address.
  • the S / W 51 uses the CPU 50, connection 101, high-speed bus 81, and connection 104 to write to the slave I / F 10.
  • the slave I / F 10 recognizes the write destination as the size register 42 by the address signal 104a.
  • the slave I / F 10 writes the value of the write data received by the write data signal 104 e in the size register 42 of the table management device 40 using the connection 107.
  • step S 2 the S / W 51 sets the TOP / AD 93 a (IO) of the IO device buffer area 93 in the base address register 21.
  • the S / W 51 writes to the slave I / F 10 using the CPU 50, connection 101, high-speed bus 81, and connection 104.
  • the slave I / F 10 recognizes the write destination as the base address register 21 based on the address signal 104a.
  • the slave I / F 10 writes the write data received by the write data signal 104 e on the connection 104 to the base address register 21 using the connection 106.
  • FIG. 7 is a flowchart showing a procedure for starting DMA by the S / W 51.
  • the S / W 51 determines the “address to be read” of the IO buffer 71 in accordance with the progress of the process.
  • the “address to be read” is an address belonging to the IO device buffer area 93. That is, the address belongs to the storage area of TOP / AD93a (IO) to BOTTOM / AD93b (IO).
  • the “address to be read” may include TOP / AD93a (IO) and BOTTOM / AD93b (IO).
  • the address to be read is AD (IO) k .
  • ⁇ AD (IO) is an address offset value of AD (IO) k with respect to TOP / AD93a (IO).
  • IO address offset value of AD (IO) k with respect to TOP / AD93a (IO).
  • step S104 the S / W 51 adds TOP / AD91a (DMA) to ⁇ AD (IO) as a subtraction result.
  • step S105 the S / W 51 writes to the address obtained in S104. That is, the S / W 51 transmits the write request signal 51W to the slave I / F 10.
  • step S106 the write in step S105 is stored in the write buffer 11 in the slave I / F 10 and later processed by the slave I / F 10.
  • the processing by the slave I / F 10 is after S201 in FIG. After the issuance of a write by the S / W 51, the processing ends when viewed from the S / W 51. In the case of writing to the DMA area 91 in step S105, since the data has no meaning, any value may be written.
  • steps S102 to S107 the process loops as many times as the number of data to be read.
  • FIG. 8 is a flowchart showing an operation when the slave I / F 10 is written by the S / W 51.
  • the subject of the operation in FIG. 8 is the slave I / F 10.
  • step S201 the slave I / F 10 is waiting for a write to the DMA area 91.
  • step S202 the slave I / F 10 receives the write request signal 51W.
  • the slave I / F 10 can recognize the write to the DMA area 91 by the address signal 104a, the control signal 104b, the read / write identification signal 104c, etc. included in the write request signal 51W. If there is a write, the process proceeds to step S203.
  • step S203 the slave I / F 10 uses the connection 107 to check the entry 49 of the table 43 of the table management apparatus 40 and searches for an entry flag 45 set.
  • step S204 when the slave I / F 10 finds the entry 49 in which the entry flag 45 is set (step S204, YES), the process proceeds to step S205.
  • step S205 the slave I / F 10 matches the address offset 47 in the found entry 49 obtained by subtracting TOP / AD91a (DMA) from the written address (write address 91W). Look for entry 49.
  • the address offset 47 is set to ⁇ AD (IO) as in step S210 described later.
  • write address 91W ⁇ AD (IO) + TOP / AD91a (DMA) Therefore, the slave I / F 10 obtains ⁇ AD (IO) by subtracting TOP / AD91a (DMA) from the write address 91W, and creates an entry 49 having an address offset 47 that matches the obtained ⁇ AD (IO). look for.
  • the slave I / F 10 has TOP / AD91a (DMA). For example, TOP / AD91a (DMA) is stored in the write buffer 11. (6) In step S206, the entry flag 45 is set, and the address offset 47 ( ⁇ AD (IO)) matches the value obtained by subtracting the TOP address 91a (DMA) from the write address ( ⁇ AD (IO)).
  • step S213 the slave I / F 10 checks the data flag 46 of the found entry 49. If the data flag 46 is set (step S214; YES), the process proceeds to S209. If the data flag 46 is not set (step S214; NO), the process ends. (8) If YES in step S214, the slave I / F 10 resets the data flag 46 in step S209 and sets the status 48 to “read request not yet”. If the data flag 46 is not set (S214; NO), the slave I / F 10 does nothing because it is already reading.
  • step S206 If the entry flag 45 is set in step S206, and the entry 49 whose address offset 47 matches the value obtained by subtracting the TOP address 91a (DMA) from the write address 91W is not found (step S206). NO), the process proceeds to step S207. (10) In step S207, the slave I / F 10 searches for an entry 49 for which the entry flag 45 is not set. (11) If there is a hit in step S208 (S208: YES), the process proceeds to S209. Therefore, in step S209, the slave I / F 10 resets the data flag 46 and sets the status 48 to “read request not yet”.
  • step S210 the slave I / F 10 sets the address offset 47 obtained by subtracting the TOP address 91a (DMA) from the write address, that is, ⁇ AD (IO) of the offset value acquired from the write address.
  • step S211 the slave I / F 10 sets the entry flag 45 of the hit entry 49.
  • step S208 If no entry 49 for which the entry flag 45 is not set is found in step S208 (step S206; NO), the process proceeds to step S215.
  • step S215 the slave I / F 10 searches for an entry 49 in which the entry flag 45 is set and the data flag 46 is set. If the slave I / F 10 is not found, the slave I / F 10 waits until it is found (step S216). (13) If found (S216; YES), the process proceeds to step S209.
  • step S212 the slave I / F 10 selects one of the entries 49, assuming that the entry 49 is found. From step S212, the process proceeds to step S209. Therefore, the slave I / F 10 performs the processes of step S209, step S210, and step S211.
  • FIG. 9 is a flowchart showing the operation of the table controller 41. The subject of the operation in FIG.
  • step S301 the table controller 41 is searching for an entry 49 in which the entry flag 45 is set, the data flag 46 is reset, and the status 48 is unread request.
  • step S302 If the table controller 41 finds the corresponding entry 49 (S302: YES), the process proceeds to step S303.
  • step S303 the table controller 41 requests the master I / F 20 to read the address offset 47. In this case, the table controller 41 transmits the address offset 47 ( ⁇ AD (IO)) of the found entry 49 and the entry number 44 to the master I / F 20 as a read request. The address offset 47 is transmitted by the read instruction signal 111a, and the entry number 44 is transmitted by the entry number signal 111b.
  • step S304 the table controller 41 sets the status 48 of the found entry 49 to “read requested”.
  • FIG. 10 is a flowchart showing the operation of the master I / F 20.
  • the subject of the operation in FIG. 10 is the master I / F 20.
  • step S401 the master I / F 20 waits for a read instruction from the table controller 41.
  • step S403 the master I / F 20 calculates an address obtained by adding the value of the base address register 21 to the address offset 47 ( ⁇ AD (IO)) received by the read instruction signal 111a.
  • the base address register 21 stores TOP / AD93a (IO) in step S2.
  • the master I / F 20 Address ⁇ AD (IO) + TOP / AD93a (IO) Is converted into an address in the IO device buffer area 93.
  • step S404 the master I / F 20 reads the calculated address value.
  • the master I / F 20 reads data at an address that belongs to the IO device buffer area 93 and is offset by ⁇ AD (IO) from TOP / AD 93 a (IO) that is the top address of the IO device buffer area 93. .
  • step S405 the master I / F 20 calculates the address 31 where the read data is to be stored in the 2-port memory 30 from the entry number signal 111b (entry number).
  • the simplest method for calculating the address 31 is to adopt the contents of the entry number signal 111 b (entry number itself) as the data address in the 2-port memory 30.
  • step S 406 the master I / F 20 writes the read data to the data area 32 of the calculated address 31 of the 2-port memory 30 using the connection 109.
  • step S407 the master I / F 20 uses the connection 110 to set the data flag 46 of the entry 49 indicated by the entry number signal 111b.
  • FIG. 11 is a flowchart of the operation of the S / W 51 after completion of DMA activation.
  • the subject of the operation in FIG. 11 is S / W51.
  • step S501 the S / W 51 can perform processing that is not related to partial copy processing of data to the 2-port memory 30, which is a high-speed memory, after the processing shown in FIG. 7 is completed.
  • the processing proceeds to S503.
  • the S / W 51 subtracts TOP / AD93a (IO) from each address determined in step S101 (S504), adds TOP / AD91a (DMA) (S505), and for all addresses Read is performed (S506). That is, the S / W 51 transmits a read request signal 51L to the slave I / F 10.
  • Steps S504, S505, and S506 are read processes corresponding to steps S103, S104, and S105, which are write processes.
  • FIG. 12 is a flowchart showing the operation of the slave I / F 10 when read from the S / W 51.
  • step S601 the slave I / F 10 waits for a read to the DMA area 91.
  • the slave I / F 10 receives the read request signal 51L from the S / W 51.
  • the read request signal 51L has an address signal 104a, a control signal 104b, a read / write identification signal 104c, and the like.
  • step S602 the slave I / F 10 can recognize the read to the DMA area 91 by the address signal 104a, the control signal 104b, and the read / write identification signal 104c.
  • step S603 the slave I / F 10 uses the connection 107 to check the entry 49 of the table 43 and searches for an entry flag 45 set.
  • step S604 when the entry 49 for which the entry flag 45 is set is found (S604; YES), the process proceeds to step SS605, and when it is not found (S604; NO), the process proceeds to step S612.
  • step S607 the slave I / F 10 checks the data flag 46 of the found entry 49 and waits until it is set (S608). If the setting of the data flag 46 can be confirmed in step S608, the process proceeds to step S609.
  • step S609 the slave I / F 10 uses the address calculation method performed by the master I / F 20 in step S405 and the entry number 44 of the entry 49 in which the data flag 46 is confirmed to be set. An address 31 where 30 read data is stored is calculated.
  • step S610 the slave I / F 10 reads the data stored at the calculated address from the 2-port memory 30 using the connection 108 to obtain read data.
  • step S610 the slave I / F 10 returns the read data to the CPU 50 using the connection 104, the high-speed bus 81, and the connection 101.
  • step S604 If the entry 49 for which the entry flag 45 is set is not found in step S604 (S604; NO), the process proceeds to step S612. (12) In step S612, the slave I / F 10 performs the processing after step S203 when the slave I / F 10 is written by replacing the write address with the read address, and the processing returns to step S603.
  • step S606 (S606; NO)
  • the slave I / F 10 performs step S612, and the process returns to step S603.
  • the S / W 51 can obtain the read data, and thus executes a process using the read data.
  • FIGS. 6 to 12 show the case of DMA transfer of the IO buffer 71.
  • the DMA transfer has been described by taking the IO buffer 71 as an example of a storage device to be read and written by the CPU 50.
  • the external memory The DMA transfer according to the present embodiment can also be applied to 60.
  • the S / W 51 writes the DMA area 91 with an offset. That is, the S / W 51 transmits the write request signal 51W to the slave I / F 10. In response to this write, the DMA 2 recognizes the address to be read, performs read, and stores the read data in the 2-port memory 30. For this reason, after the write request signal 51W is transmitted, the S / W 51 can perform the process of step S501 in FIG. 11, thereby eliminating the complexity when the S / W 51 performs the DMA setting.
  • the address to be read by the DMA can be specified in detail. For this reason, the DMA does not read data that the S / W 51 does not need, but can read data that the S / W 51 needs. Therefore, the consumption of the bus bandwidth can be reduced, and the capacity of the 2-port memory 30 for storing read data can be saved.
  • the S / W 51 obtains necessary data by reading the DMA area 91 instead of reading the data in the IO device buffer area 93. That is, the read of the DMA area 91 requires a shorter number of clocks than the read of the IO device buffer area 93 by the S / W 51.
  • the processing performance of the S / W 51 is improved.
  • the reading of the IO device buffer area 93 by the DMA 2 acquisition of data by the master I / F 20 (S 404 to S 406)) and the processing of the S / W 51 are performed in parallel. For this reason, the transfer completion waiting time of the DMA device 2 of the S / W 51 is eliminated, and the processing performance is improved.
  • FIGS the case where the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 are realized by software is shown in FIGS.
  • the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be realized by hardware.
  • FIG. 13 shows a case where the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 are realized by the processing circuit 99 that is hardware.
  • the processing circuit 99 is connected to the signal line 99a.
  • the processing circuit 99 realizes the functions of “slave I / F 10, master I / F 20, table controller 41” and the functions of the RAM 802 and ROM 803 shown as the processor 801.
  • the processing circuit 99 is a dedicated electronic circuit that realizes the functions of “slave I / F 10, master I / F 20, table controller 41” shown as the processor 801 and the functions of the RAM 802 and ROM 803.
  • the processing circuit 99 includes a single circuit, a composite circuit, a programmed processor, a processor programmed in parallel, a logic IC, a GA (Gate Array), an ASIC (Application Specific Integrated Circuit), or FPGA (Field-Programmable / Gate / Array).
  • slave I / F 10, master I / F 20, and table controller 41 shown as the processor 801 may be realized by one processing circuit 99 or may be realized by being distributed to a plurality of processing circuits 99. .
  • the DMA 2 shown in FIG. 1 may be realized by a combination of software and hardware. That is, some functions of the DMA 2 shown in FIG. 1 may be realized by dedicated hardware, and the remaining functions may be realized by software.
  • the processor 801, the RAM 802, the ROM 803, and the processing circuit 99 are collectively referred to as “processing circuit”. That is, the functions of “slave I / F 10, master I / F 20, table controller 41” and the functions of RAM 802 and ROM 803 are realized by processing circuitry.
  • the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be read as “process”, “procedure”, or “processing”. Further, the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be realized by firmware.
  • the operation of the controller 1-1 and DMA2 in FIG. 1 can be grasped as a method and a program.
  • the program can be stored in a computer-readable recording medium.
  • the program can be realized as a program product.
  • FIG. FIG. 14 is a configuration diagram of the controller 1-2 according to the second embodiment.
  • the controller 1-2 further includes a timer 403 with respect to the controller 1-1 of the first embodiment.
  • the timer 403 is connected to the table management device 40.
  • the timer 403 is a programmable interval timer and periodically generates pulses. When the generated pulse is transmitted to the table management device 40, the table controller 41 resets the data flags 46 of all the entries 49 and sets the status 48 to a read request not yet.
  • the table controller 41 always searches for an entry 49 in which the entry flag 45 is set, the data flag 46 is reset, and the status 48 is unread request.
  • the table controller 41 sets the status 48 of the entry 49 as a read request (S304) and uses the connection 111 to read the address offset 47 to the master I / F 20. Is requested (S303).
  • the address of the IO device buffer area 93 corresponding to the address offset 47 of the entry 49 in which the entry flag 45 is set is periodically read, and the data registered in the 2-port memory 30 is always the last pulse. It coincides with the data in the IO device buffer area 93 after the occurrence.
  • the S / W 51 does not need to perform a write operation of the DMA area 91 for causing the DMA 2 to read the latest data in the IO device buffer area 93. Therefore, the processing performance of the S / W 51 is improved.
  • FIG. FIG. 15 is a configuration diagram of the controller 1-3 according to the third embodiment.
  • the controller 1-3 differs from the controller 1-1 of the first embodiment in the connection of the slave I / F 10 and the master I / F 20 to the bus.
  • the bus bridge 80 and the slave I / F 10 are connected by a bus bridge-slave I / F connection 112, and the connection 105 between the master I / F 20 and the low-speed bus 82 is performed.
  • the master I / F 20 and the bus bridge 80 are connected by a master I / F-bus bridge connection 113.
  • the high-speed bus switch 80a distributes access from the high-speed bus 81 into access to the low-speed bus 82 and access to the slave I / F 10 by address. Further, the low-speed bus switch 80b arbitrates access from the high-speed bus 81 and access from the master I / F 20, thereby enabling both the high-speed bus 81 and the master I / F 20 to access the low-speed bus 82.
  • FIG. 16 is a configuration diagram of the controller 1-4 according to the fourth embodiment.
  • the controller 1-4 differs from the controller 1-1 of the first embodiment in connection to the master I / F 20 bus. Instead of the connection 105 between the master I / F 20 and the low-speed bus 82, the master I / F 20 and the high-speed bus 81 are connected by the master I / F-high-speed bus connection 114.
  • the present invention can be applied even when the DMA 2 cannot be connected to the low-speed bus 82, so that the same effect as that of the first embodiment can be obtained.
  • FIG. 17 is a configuration diagram of the controller 1-5 according to the fifth embodiment.
  • the controller 1-5 is different from the controller 1-1 of the first embodiment in connection to the bus of the slave I / F 10.
  • the low-speed bus 82 and the slave I / F 10 are connected by a low-speed bus-slave I / F connection 115.
  • the present invention can be applied even when the DMA 2 cannot be connected to the high-speed bus 81, so that the same effect as in the first embodiment can be obtained.

Abstract

When a write request signal including an address that belongs to a DMA area and requesting a write is received from a CPU (50), a slave interface (10) subtracts the header address of the DMA area from said address to calculate an offset value of said address to the header address and registers the offset value as a record along with a record number in a table (43). A master interface (20) adds, to the offset value, the header address of an IO device buffer area which is the storage area of an IO buffer (71) read from and written to by the CPU (50) and converts the offset value to an address that belongs to the IO device buffer area, reads out data at the converted address, and writes the read data to a dual-port memory (30) to be associated with an identifier that is associated with the record number.

Description

データ転送装置及びデータ転送方法Data transfer apparatus and data transfer method
 この発明は、DMA(Direct Memory Access)装置に関する。例えばコントローラに組み込まれるDMA装置に関する。 This invention relates to a DMA (Direct Memory Access) device. For example, the present invention relates to a DMA device incorporated in a controller.
 コントローラにおいて、CPUの処理能力は年々向上しており、IOデバイスや外部メモリのアクセス速度の遅さが性能向上のボトルネックになっている。外部メモリやIOデバイスのアクセス速度の遅さ対策のため、DMAにより外部メモリやIOデバイスのデータを高速なメモリにコピーしておき、CPUから高速メモリのコピーを参照する、DMAを使用した高速化が行われる。 In the controller, the processing capacity of the CPU has been improving year by year, and the slow access speed of IO devices and external memory has become a bottleneck for improving performance. In order to take measures against slow access speed of external memory and IO device, the data of external memory and IO device is copied to high-speed memory by DMA, and the high-speed using DMA is referred to the copy of high-speed memory from CPU Is done.
 特許文献1では、内部メモリは外部メモリに格納されているデータの複製を所定サイズのデータブロックで格納している。読み出し対象データの複製が内部メモリに格納されていない場合に、メモリアクセス制御プログラムは、読み出し対象データを外部メモリから読み出し、読み出した読み出し対象データを読み出し要求元に供給する。そして、その後、メモリアクセス制御プログラムは、読み出し対象データを含むデータブロックを外部メモリから読み出し、DMAコントローラを用いて、読み出したデータブロックを内部メモリに格納することで、CPUからメモリへのアクセス時間の短縮している。 In Patent Document 1, an internal memory stores a copy of data stored in an external memory in a data block of a predetermined size. When a copy of the read target data is not stored in the internal memory, the memory access control program reads the read target data from the external memory and supplies the read read target data to the read request source. Thereafter, the memory access control program reads the data block including the read target data from the external memory, and stores the read data block in the internal memory by using the DMA controller, thereby reducing the access time from the CPU to the memory. It is shortened.
 また、特許文献2では、プロセッサ内のデータ・キャッシュ・メモリの全キャッシュ・ラインより少ないデータを含むデータブロックを、入出力アダプタからメモリ・バスを通してメモリ内の所定の位置に書き込む。データ・キャッシュ・メモリ内にこのデータが含まれていると判断された場合には、メモリ内に書き込まれたデータを含む全キャッシュ・ラインがパージされる。特許文献2では、このパージによって、全キャッシュ・ラインよりもサイズが小さいデータブロック用の高速DMAトランザクションを実施できる、キャッシュ・コヒーレントDMA書き込み方法が提案されている。 In Patent Document 2, a data block including less data than all the cache lines of the data cache memory in the processor is written from the input / output adapter to a predetermined position in the memory through the memory bus. If it is determined that this data is contained in the data cache memory, all cache lines containing the data written in the memory are purged. Patent Document 2 proposes a cache coherent DMA write method that can execute a high-speed DMA transaction for a data block having a size smaller than the entire cache line by this purge.
 さらに、特許文献3では、ローカルメモリの制御プログラムが、以下の、判定機能、複製機能、読出機能をプロセッサで実現している。
(1)判定機能は、アクセスデータを指定するタグアドレスと、アクセスデータを指定するライン番号と対応する一時記憶装置の記憶領域におけるデータのタグアドレスとが、一致するか否かを判定する。
(2)複製機能は、判定処理が完了する前に、一時記憶装置の記憶領域に記憶されているデータを、レジスタに複製する処理を開始する。
(3)読出機能は、判定機能で一致すると判定された場合に、レジスタからデータを読み出す。
(4)プロセッサは、キャッシュヒット判定が完了する前に、一時記憶装置に記憶されたデータをレジスタへ書き込む処理を開始することにより、プロセッサからの一時記憶装置へのデータアクセス時間を小さくしている。
Further, in Patent Document 3, a control program for a local memory realizes the following determination function, copy function, and read function by a processor.
(1) The determination function determines whether or not the tag address designating access data matches the tag address of the data in the storage area of the temporary storage device corresponding to the line number designating the access data.
(2) The duplication function starts the process of duplicating the data stored in the storage area of the temporary storage device in the register before the determination process is completed.
(3) The read function reads data from the register when it is determined by the determination function that they match.
(4) The processor reduces the data access time from the processor to the temporary storage device by starting the process of writing the data stored in the temporary storage device to the register before the cache hit determination is completed. .
特開2011-070253号公報JP 2011-070253 A 特開平7-271670号公報JP 7-271670 A 特開2008-262390号公報JP 2008-262390 A
 コントローラの使用するIOデバイスや外部メモリのメモリサイズは大きくなってきているため、DMAでこれらのメモリの内容を高速メモリにコピーしようとすると、IOデバイス、外部メモリのリードのために、バス帯域が不足したり、高速メモリの容量が不足する課題がある。DMAがコピーする領域を、software(S/W)が実際に参照する部分のみに限定することで、上記課題は解決できる。 Since the memory size of IO devices and external memory used by the controller is increasing, when trying to copy the contents of these memories to high-speed memory using DMA, the bus bandwidth is reduced due to reading of the IO devices and external memory. There is a problem that it is insufficient or the capacity of the high-speed memory is insufficient. The above problem can be solved by limiting the area copied by the DMA to only the part that is actually referred to by software (S / W).
 しかし、コントローラではS/Wが「参照する部分」が処理の状態により変わったり、IOデバイスや外部メモリの一部をリードしないと次にS/Wが「参照する部分」が決定できないという課題がある。そのため、部分的な転送を行おうとすると、S/Wで転送する部分を判定した後に、転送領域をDMAに設定してDMA起動をしなければならず、設定のオーバーヘッドにより、性能が向上しないという課題がある。 However, in the controller, there is a problem that the S / W “referenced part” changes depending on the processing state, or the S / W cannot determine the “referenced part” next without reading a part of the IO device or the external memory. is there. Therefore, if partial transfer is to be performed, after determining the part to be transferred by S / W, the transfer area must be set to DMA and DMA activation must be performed, and the performance will not improve due to the setting overhead. There are challenges.
 この発明は、IOデバイスや外部メモリのデータの高速メモリへの部分的なコピーを、オーバーヘッドを少なく行う技術の提供を目的とする。 An object of the present invention is to provide a technique for performing partial copying of data from an IO device or external memory to a high-speed memory with low overhead.
 この発明のデータ転送装置は、
 先頭アドレスから末尾アドレスまで続く第1の記憶領域に属するアドレスを含むと共に書き込みを要求する書き込み要求信号を中央処理装置から受信した場合に前記アドレスから前記先頭アドレスを減算することによって前記先頭アドレスに対する前記アドレスのオフセット値を計算し、
 前記オフセット値をレコードとしてレコード番号と対応付けてテーブルに登録する要求取得部と、
 前記中央処理装置によって読み書きされる記憶装置の記憶領域であって前記第1の記憶領域と異なる記憶領域である第2の記憶領域の先頭アドレスを前記オフセット値に加算することによって前記オフセット値を前記第2の記憶領域に属するアドレスに変換し、変換された前記アドレスのデータを読み取り、読み取ったデータを、前記レコード番号と対応付けられた識別子と対応付けて、データ格納メモリに書き込むデータ取得部と
を備えることを特徴とする。
The data transfer device of the present invention
When a write request signal that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing is received from the central processing unit, the head address is subtracted from the address by subtracting the head address. Calculate the offset value of the address
A request acquisition unit that registers the offset value as a record in a table in association with a record number;
The offset value is calculated by adding a head address of a second storage area that is a storage area of the storage device that is read and written by the central processing unit and is different from the first storage area to the offset value. A data acquisition unit for converting to an address belonging to a second storage area, reading the data of the converted address, and writing the read data in a data storage memory in association with an identifier associated with the record number; It is characterized by providing.
 この発明のデータ転送装置は、要求取得部とデータ取得部とを備えたので、IOデバイスや外部メモリのデータの高速メモリへの部分的なコピーを、オーバーヘッドを少なく行うことができる。 Since the data transfer apparatus of the present invention includes the request acquisition unit and the data acquisition unit, it is possible to perform partial copying of data of the IO device and external memory to the high-speed memory with low overhead.
実施の形態1の図で、コントローラ1-1の構成図。FIG. 3 is a diagram of the controller 1-1 according to the first embodiment. 実施の形態1の図で、DMA2のハードウェア構成を示す図。FIG. 3 is a diagram illustrating the hardware configuration of the DMA 2 in the first embodiment. 実施の形態1の図で、DMA2のハードウェア構成を示す別の構成図。FIG. 3 is another diagram illustrating the hardware configuration of the DMA 2 in the diagram of the first embodiment. 実施の形態1の図で、コントローラ1のCPU50から見たアドレスマップを示す図。FIG. 3 is a diagram illustrating the address map as viewed from the CPU 50 of the controller 1 in the first embodiment. 実施の形態1の図で、DMA2によるデータ転送方法の概要を示す図。FIG. 3 is a diagram of the first embodiment, showing an outline of a data transfer method by DMA2. 実施の形態1の図で、S/W51によるDMA設定のフローチャート。5 is a flowchart of DMA setting by the S / W 51 in the diagram of the first embodiment. FIG. 実施の形態1の図で、S/W51によるDMA起動手順を示すフローチャート。FIG. 3 is a flowchart of the DMA activation procedure by the S / W 51 in the first embodiment. 実施の形態1の図で、スレーブI/F10がライトされた時の動作のフローチャート。FIG. 3 is a flowchart of the operation when the slave I / F 10 is written in the diagram of the first embodiment. 実施の形態1の図で、テーブルコントローラ41の動作のフローチャート。FIG. 4 is a flowchart of the operation of the table controller 41 in the diagram of the first embodiment. 実施の形態1の図で、マスタI/F20の動作を示すフローチャート。FIG. 3 is a diagram illustrating the operation of the master I / F 20 in the first embodiment. 実施の形態1の図で、S/W51によるDMA起動後の動作のフローチャート。FIG. 4 is a flowchart of the operation after the DMA activation by the S / W 51 in the diagram of the first embodiment. 実施の形態1の図で、スレーブI/F10がリードされた時の動作を示すフローチャート。FIG. 3 is a flowchart illustrating an operation when the slave I / F 10 is read in the diagram of the first embodiment. 実施の形態1の図で、DMA2の他のハードウェア構成を示す図。FIG. 3 is a diagram of the first embodiment, showing another hardware configuration of the DMA 2. 実施の形態2のコントローラ1-2を示す構成図。FIG. 5 is a configuration diagram showing a controller 1-2 of a second embodiment. 実施の形態3のコントローラ1-3を示す構成図。FIG. 5 is a configuration diagram showing a controller 1-3 of a third embodiment. 実施の形態4のコントローラ1-4を示す構成図。FIG. 6 is a configuration diagram showing a controller 1-4 of a fourth embodiment. 実施の形態5のコントローラ1-5を示す構成図。FIG. 6 is a configuration diagram showing a controller 1-5 of a fifth embodiment.
 以下、本発明の実施の形態について、図を用いて説明する。なお、各図中、同一または相当する部分には、同一符号を付している。実施の形態の説明において、同一または相当する部分については、説明を適宜省略または簡略化する。
 なお、以下の実施の形態には、CPU50、IOデバイス70、スレーブI/F10、マスタI/F20が登場する。CPUはCentral Processing Unitの略である。IOはInput Outputの略である。I/FはInter Faceの略である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the same code | symbol is attached | subjected to the part which is the same or it corresponds in each figure. In the description of the embodiments, the description of the same or corresponding parts will be omitted or simplified as appropriate.
In the following embodiment, a CPU 50, an IO device 70, a slave I / F 10, and a master I / F 20 appear. CPU is an abbreviation for Central Processing Unit. IO is an abbreviation for Input Output. I / F is an abbreviation for Inter Face.
 実施の形態1.
***構成の説明***
 図1から図13を参照して実施の形態1のコントローラ1-1を説明する。まず、図1~図3を用いて、コントローラ1-1の構成を説明する。図1は、コントローラ1-1の構成図である。図2は、DMA(Direct Memory Access)装置2(以下、DMA2と記す)のハードウェア構成を示す図である。図2は図1から、DMA2と、バスブリッジ回路80、高速バス81、低速バス82を抜き出した図である。バスブリッジ回路80は以下ではバスブリッジ80と記す。図3は、DMA2の備えるスレーブI/F10、マスタI/F20等と、プロセッサ801等との関係を示す図である。
Embodiment 1 FIG.
*** Explanation of configuration ***
The controller 1-1 according to the first embodiment will be described with reference to FIGS. First, the configuration of the controller 1-1 will be described with reference to FIGS. FIG. 1 is a configuration diagram of the controller 1-1. FIG. 2 is a diagram showing a hardware configuration of a DMA (Direct Memory Access) device 2 (hereinafter referred to as DMA 2). FIG. 2 is a diagram in which DMA 2, the bus bridge circuit 80, the high-speed bus 81, and the low-speed bus 82 are extracted from FIG. The bus bridge circuit 80 is hereinafter referred to as a bus bridge 80. FIG. 3 is a diagram illustrating a relationship between the slave I / F 10 and the master I / F 20 included in the DMA 2 and the processor 801 and the like.
 図1に示すように、DMA2は、中央処理装置であるCPU50、外部メモリ60、IOデバイス70、高速バス81と低速バス82を接続するバスブリッジ80及びDMA2を備えている。DMA2はデータ転送装置902である。高速バス81は第1のバス981であり、低速バス82は第1のバスよりもでデータの転送速度が遅い第2のバス982である。また後述する接続101~接続111によって、CPU50と高速バス81、外部メモリ60と低速バス82などが接続される。 As shown in FIG. 1, the DMA 2 includes a central processing unit CPU 50, an external memory 60, an IO device 70, a bus bridge 80 connecting the high-speed bus 81 and the low-speed bus 82, and the DMA 2. DMA 2 is a data transfer device 902. The high-speed bus 81 is the first bus 981, and the low-speed bus 82 is the second bus 982 whose data transfer speed is lower than that of the first bus. Further, the CPU 50 and the high-speed bus 81, the external memory 60 and the low-speed bus 82, and the like are connected through connections 101 to 111 described later.
 図1に示すように、DMA2は、スレーブI/F10、マスタI/F20、2ポートメモリ30、テーブル管理装置40を備える。2ポートメモリ30はデータ格納メモリ930である。スレーブI/F10は要求取得部910である。スレーブI/F10は、CPU50とデータをやり取りするインタフェース装置である。
マスタI/F20はデータ取得部920である。マスタ/F20は、IOバッファ71、外部メモリ60等とデータをやり取りするインタフェース装置である。IOバッファ71、外部メモリ60等は、CPU50によってデータが読み書きされる記憶装置である。なお、DAM2の詳細な構成は後述する。
As shown in FIG. 1, the DMA 2 includes a slave I / F 10, a master I / F 20, a 2-port memory 30, and a table management device 40. The 2-port memory 30 is a data storage memory 930. The slave I / F 10 is a request acquisition unit 910. The slave I / F 10 is an interface device that exchanges data with the CPU 50.
The master I / F 20 is a data acquisition unit 920. The master / F 20 is an interface device that exchanges data with the IO buffer 71, the external memory 60, and the like. The IO buffer 71, the external memory 60, and the like are storage devices to which data is read and written by the CPU 50. The detailed configuration of the DAM 2 will be described later.
 図1のコントローラ1-1では、CPU-高速バス接続101からテーブル管理装置-マスタI/F接続111の11個の接続がある。これらを以下の(1)~(11)で説明する。下記(1)~(11)に示すCPU-高速バス接続101等は、以下の実施の形態の説明では接続101等のように記す。
(1)CPU-高速バス接続101は、CPU50と高速バス81とを接続する。
(2)低速バス-外部メモリ接続102は、低速バス82と外部メモリ60とを接続する。
(3)低速バス-IOデバイス接続103は、低速バス82とIOデバイス70とを接続する。
(4)高速バス-スレーブI/F接続104は、高速バス81とスレーブI/F10とを接続する。
(5)マスタI/F-低速バス接続105は、マスタI/F20と低速バス82とを接続する。
(6)スレーブI/F-マスタI/F接続106は、スレーブI/F10とマスタI/F20とを接続する。
(7)スレーブI/F-テーブル管理装置接続107は、スレーブI/F10とテーブル管理装置40とを接続する。
(8)スレーブI/F-2ポートメモリ接続108は、スレーブI/F10と2ポートメモリ30とを接続する。
(9)マスタI/F-2ポートメモリ接続109は、マスタI/F20と2ポートメモリ30とを接続する。
(10)マスタI/F-テーブル管理装置接続110は、マスタI/F20とテーブル管理装置40とを接続する。
(11)テーブル管理装置-マスタI/F接続111も、マスタI/F20とテーブル管理装置40とを接続する。
In the controller 1-1 of FIG. 1, there are 11 connections from the CPU-high speed bus connection 101 to the table management apparatus-master I / F connection 111. These will be described in the following (1) to (11). The CPU-high-speed bus connection 101 and the like shown in the following (1) to (11) are described as the connection 101 and the like in the following description of the embodiment.
(1) The CPU-high speed bus connection 101 connects the CPU 50 and the high speed bus 81.
(2) The low speed bus-external memory connection 102 connects the low speed bus 82 and the external memory 60.
(3) The low speed bus-IO device connection 103 connects the low speed bus 82 and the IO device 70.
(4) The high-speed bus-slave I / F connection 104 connects the high-speed bus 81 and the slave I / F 10.
(5) The master I / F-low speed bus connection 105 connects the master I / F 20 and the low speed bus 82.
(6) The slave I / F-master I / F connection 106 connects the slave I / F 10 and the master I / F 20.
(7) The slave I / F-table management device connection 107 connects the slave I / F 10 and the table management device 40.
(8) The slave I / F-2 port memory connection 108 connects the slave I / F 10 and the 2-port memory 30.
(9) The master I / F-2 port memory connection 109 connects the master I / F 20 and the 2-port memory 30.
(10) The master I / F-table management device connection 110 connects the master I / F 20 and the table management device 40.
(11) The table management apparatus-master I / F connection 111 also connects the master I / F 20 and the table management apparatus 40.
 図2に示すように、DMA2はハードウェアとして、プロセッサ801、RAM(Random Access Memory)802、ROM(Read Only Memory)803を備える。ROM803には、プロセッサ801がスレーブI/F10等の機能を実現するプログラムが記憶されている。プロセッサ801はROM803からプログラムを読み出し、スレーブI/F10、マスタI/F20、テーブルコントローラ41等の機能を実現する。図3に示すように、DMA2とハードウェアとの対応は以下のようである。
(1)スレーブI/F10は、プロセッサ801とRAM802とによって実現される。具体的にはプロセッサ801がスレーブI/F10の機能を実現する。より具体的にはプロセッサ801がROM803から読み込むプログラムがスレーブI/F10の機能を実現する。RAM802はライトバッファ11を実現する。
(2)マスタI/F20は、プロセッサ801とRAM802とによって実現される。具体的にはプロセッサ801がマスタI/F20の機能を実現する。より具体的にはプロセッサ801がROM803から読み込むプログラムがマスタI/F20の機能を実現する。RAM802は、ベースアドレスレジスタ21を実現する。
(3)2ポートメモリ30は、RAM802によって実現される。
(4)テーブル管理装置40はテーブルコントローラ41、サイズレジスタ42、テーブル43を備える。テーブルコントローラ41の機能は、プロセッサ801によって実現される。具体的にはプロセッサ801がROM803から読み込むプログラムがテーブルコントローラ41の機能を実現する。サイズレジスタ42はRAM802によって実現される。テーブル43はRAM802によって実現される。
As shown in FIG. 2, the DMA 2 includes a processor 801, a RAM (Random Access Memory) 802, and a ROM (Read Only Memory) 803 as hardware. The ROM 803 stores a program for the processor 801 to realize functions such as the slave I / F 10. The processor 801 reads a program from the ROM 803 and realizes functions of the slave I / F 10, the master I / F 20, the table controller 41, and the like. As shown in FIG. 3, the correspondence between DMA2 and hardware is as follows.
(1) The slave I / F 10 is realized by the processor 801 and the RAM 802. Specifically, the processor 801 implements the function of the slave I / F 10. More specifically, a program read from the ROM 803 by the processor 801 implements the function of the slave I / F 10. The RAM 802 implements the write buffer 11.
(2) The master I / F 20 is realized by the processor 801 and the RAM 802. Specifically, the processor 801 implements the function of the master I / F 20. More specifically, a program that the processor 801 reads from the ROM 803 implements the function of the master I / F 20. The RAM 802 implements the base address register 21.
(3) The 2-port memory 30 is realized by the RAM 802.
(4) The table management device 40 includes a table controller 41, a size register 42, and a table 43. The function of the table controller 41 is realized by the processor 801. Specifically, the program read from the ROM 803 by the processor 801 implements the function of the table controller 41. The size register 42 is realized by the RAM 802. The table 43 is realized by the RAM 802.
 図1に示すように、「コントローラ1-1のSoftware51」(以下、S/W51と記す)が動作するCPU50は、接続101を介して高速バス81に接続されている。外部メモリ60は、接続102を介して低速バス82に接続されている。IOデバイス70は、IOデバイス内蔵バッファ71をその内部に有する。IOデバイス内蔵バッファ71は、以下、IOバッファ71と記す。IOデバイス70は、接続103を介して、低速バス82と接続されている。高速バス81と低速バス82とは、バスブリッジ80により接続されている。 As shown in FIG. 1, a CPU 50 on which “Software 1-1 of controller 1-1” (hereinafter referred to as S / W 51) operates is connected to a high-speed bus 81 via a connection 101. External memory 60 is connected to low speed bus 82 via connection 102. The IO device 70 has an IO device built-in buffer 71 therein. Hereinafter, the IO device built-in buffer 71 is referred to as an IO buffer 71. The IO device 70 is connected to the low speed bus 82 via the connection 103. The high speed bus 81 and the low speed bus 82 are connected by a bus bridge 80.
 DMA2は、スレーブI/F10、マスタI/F20、2ポートメモリ30、テーブル管理装置40を備えている。
(1)スレーブI/F10は、ライトバッファ11を持つ。
(2)マスタI/F20は、ターゲットデバイスのベースアドレスを格納するベースアドレスレジスタ21を有する。
(3)2ポートメモリ30は、それぞれ固有のアドレス31を持つ複数のデータ領域32を持つ。
(4)テーブル管理装置40は、テーブルコントローラ41、ターゲットデバイスのメモリサイズを格納するサイズレジスタ42、テーブル43を備えている。
The DMA 2 includes a slave I / F 10, a master I / F 20, a 2-port memory 30, and a table management device 40.
(1) The slave I / F 10 has a write buffer 11.
(2) The master I / F 20 has a base address register 21 for storing the base address of the target device.
(3) The 2-port memory 30 has a plurality of data areas 32 each having a unique address 31.
(4) The table management device 40 includes a table controller 41, a size register 42 for storing the memory size of the target device, and a table 43.
 テーブル43は、複数のエントリ49が登録される。エントリ49は、エントリ番号44、エントリバリッドフラグ45、データバリッドフラグ46、アドレスオフセット47、ステータス48の各項目を有する。エントリバリッドフラグ45、データバリッドフラグ46は、以下では、エントリフラグ45、データフラグ46と記す。エントリフラグ45は、エントリ49が有効状態か無効状態かを示すフラグである。データフラグ46は、エントリ番号44に対応する、2ポートメモリ30のデータが有効状態か無効状態かを示すフラグである。以下の説明では、エントリフラグ45とデータフラグ46とは、いずれも、セットと記載した場合は有効状態を示し、リセットと記載した場合は無効状態を示す。 In the table 43, a plurality of entries 49 are registered. The entry 49 has items of an entry number 44, an entry valid flag 45, a data valid flag 46, an address offset 47, and a status 48. Hereinafter, the entry valid flag 45 and the data valid flag 46 are referred to as an entry flag 45 and a data flag 46, respectively. The entry flag 45 is a flag indicating whether the entry 49 is valid or invalid. The data flag 46 is a flag indicating whether the data of the 2-port memory 30 corresponding to the entry number 44 is valid or invalid. In the following description, both the entry flag 45 and the data flag 46 indicate a valid state when described as set, and indicate an invalid state when described as reset.
 スレーブI/F10とマスタI/F20とは、接続106で接続されている。スレーブI/F10とテーブル管理装置40とは、接続107で接続されている。スレーブI/F10と2ポートメモリ30とは、接続108で接続されている。マスタI/F20と2ポートメモリ30とは、接続109で接続されている。マスタI/F20とテーブル管理装置40とは、接続110で接続されている。さらにテーブル管理装置40とマスタI/F20とは、接続111で接続されている。接続111は、リードを指示するリード指示信号111aと、リード指示の元となったエントリ49のエントリ番号44の内容と一致するエントリ番号信号111bとを含む接続111で接続されている。 The slave I / F 10 and the master I / F 20 are connected by a connection 106. The slave I / F 10 and the table management device 40 are connected by a connection 107. Slave I / F 10 and 2-port memory 30 are connected by connection 108. The master I / F 20 and the 2-port memory 30 are connected by a connection 109. The master I / F 20 and the table management device 40 are connected by a connection 110. Further, the table management device 40 and the master I / F 20 are connected by a connection 111. The connection 111 is connected by a connection 111 including a read instruction signal 111a for instructing reading and an entry number signal 111b that matches the contents of the entry number 44 of the entry 49 that is the source of the read instruction.
 スレーブI/F10は、高速バス81と、接続104を介して接続されている。接続104は、内部に、アドレス信号104a、制御信号104b、リードライト識別信号104c、リードデータ信号104d、ライトデータ信号104e、サイズ信号104fを有する。 The slave I / F 10 is connected to the high-speed bus 81 via the connection 104. The connection 104 includes an address signal 104a, a control signal 104b, a read / write identification signal 104c, a read data signal 104d, a write data signal 104e, and a size signal 104f.
 マスタI/F20は、低速バス82と、接続105を介して接続されている。 The master I / F 20 is connected to the low speed bus 82 via the connection 105.
 図4は、CPU50からみた、コントローラ1-1のアドレスマップ90である。
(1)アドレスマップ90において、先頭アドレスはTOPアドレス90aであり、末尾アドレスはBOTTOMアドレス90bである。
(2)アドレスマップ90は、DMA領域91、外部メモリ領域92、IOデバイスバッファ領域93、DMA設定領域94を有している。IOデバイスバッファ領域93は、IOバッファ71の記憶領域である。外部メモリ領域92は、外部メモリ60の記憶領域である。DMA領域91は、S/W51が書き込み要求信号51W、読み出し要求信号51LをスレーブI/F10に送信する場合に、書き込み要求信号51Wに含まれるライトアドレス91W、読み出し要求信号51Lに含まれるリードアドレス91Lの属する記憶領域である。
(3)DMA領域91のサイズは、サイズレジスタ42に設定される(後述のステップS1)。
(4)DMA領域91において、先頭アドレスはDMA領域TOPアドレス91aであり、末尾アドレスはDMA領域BOTTOMアドレス91bである。
(5)外部メモリ領域92において、先頭アドレスは外部メモリ領域TOPアドレス92aであり、末尾アドレスは外部メモリ領域BOTTOMアドレス92bである。
(6)IOデバイスバッファ領域93において、先頭アドレスはIOデバイスバッファ領域TOPアドレス93aであり、末尾アドレスはIOデバイスバッファ領域BOTTOMアドレス93bである。
(7)DMA設定領域94において、先頭アドレスはDMA設定領域TOPアドレス94aであり、末尾アドレスはDMA設定領域BOTTOMアドレス94bである。
FIG. 4 is an address map 90 of the controller 1-1 as seen from the CPU 50.
(1) In the address map 90, the head address is the TOP address 90a and the tail address is the BOTTOM address 90b.
(2) The address map 90 includes a DMA area 91, an external memory area 92, an IO device buffer area 93, and a DMA setting area 94. The IO device buffer area 93 is a storage area of the IO buffer 71. The external memory area 92 is a storage area of the external memory 60. When the S / W 51 transmits the write request signal 51W and the read request signal 51L to the slave I / F 10, the DMA area 91 includes a write address 91W included in the write request signal 51W and a read address 91L included in the read request signal 51L. Is a storage area to which
(3) The size of the DMA area 91 is set in the size register 42 (step S1 described later).
(4) In the DMA area 91, the head address is the DMA area TOP address 91a, and the tail address is the DMA area BOTTOM address 91b.
(5) In the external memory area 92, the start address is the external memory area TOP address 92a, and the end address is the external memory area BOTTOM address 92b.
(6) In the IO device buffer area 93, the head address is the IO device buffer area TOP address 93a, and the tail address is the IO device buffer area BOTTOM address 93b.
(7) In the DMA setting area 94, the head address is the DMA setting area TOP address 94a, and the tail address is the DMA setting area BOTTOM address 94b.
 以下では、DMA領域TOPアドレス91a等は以下のように記す。
(1.1)DMA領域TOPアドレス91aは、TOP/AD91a(DMA)と記す。
(1.2)DMA領域BOTTOMアドレス91bは、BOTTOM/AD91b(DMA)とす。
(2.1)外部メモリ領域TOPアドレス92aは、TOP/AD92aと記す。
(2.2)外部メモリ領域BOTTOMアドレス92bは、BOTTOM/AD92bと記す。
(3.1)IOデバイスバッファ領域TOPアドレス93aは、TOP/AD93a(IO)と記す。
(3.2)IOデバイスバッファ領域BOTTOMアドレス93aは、BOTTOM/AF93b(IO)と記す。
(4.1)DMA設定領域TOPアドレス94aは、TOP/AD94aと記す。
(4.2)DMA設定領域BOTTOMアドレス94bは、BOTTOM/AD94bと記す。
In the following, the DMA area TOP address 91a and the like are described as follows.
(1.1) The DMA area TOP address 91a is described as TOP / AD91a (DMA).
(1.2) The DMA area BOTTOM address 91b is BOTTOM / AD91b (DMA).
(2.1) The external memory area TOP address 92a is described as TOP / AD 92a.
(2.2) The external memory area BOTTOM address 92b is described as BOTTOM / AD92b.
(3.1) The IO device buffer area TOP address 93a is described as TOP / AD93a (IO).
(3.2) The IO device buffer area BOTTOM address 93a is described as BOTTOM / AF93b (IO).
(4.1) The DMA setting area TOP address 94a is described as TOP / AD 94a.
(4.2) The DMA setting area BOTTOM address 94b is described as BOTTOM / AD94b.
***動作の説明***
 図5は、S/W51がIOバッファ71をリードする際の、DMA2によるデータ転送方法の概要を示す図である。
 図5を参照して、まず、DMA2によるデータ転送方法の概要を述べる。
*** Explanation of operation ***
FIG. 5 is a diagram showing an outline of a data transfer method by the DMA 2 when the S / W 51 reads the IO buffer 71.
With reference to FIG. 5, first, an outline of a data transfer method by DMA2 will be described.
 ステップS01において、CPU50で動作するS/W51は、先頭アドレスから末尾アドレスまで続く第1の記憶領域に属するアドレスを含むと共に書き込みを要求する書き込み要求信号51WをスレーブI/F10に送信する。ここで第1の記憶領域とはDMA領域91であり、先頭アドレスはTOP/AD91a(DMA),末尾アドレスはBOTTOM/AD91(DMA)である。また、第1の記憶領域であるDMA領域91に属するアドレスとは、ライトアドレス91Wである。
 ライトアドレス91W=[ΔAD(IO)+TOP/AD91a(DMA)]
ここでΔAD(IO)は、有るアドレスADがIOデバイスバッファ領域93に属する場合、アドレスADからTOP/AD93a(IO)を減算した値である。つまりΔAD(IO)はTOP/AD9a(IO)に対するアドレスADのオフセット値である。またΔAD(IO)は、ライトアドレス91WとしてTOP/AD91a(DMA)を加えた場合、TOP/AD91a(DMA)に対するアドレスADのオフセット値でもある。ΔAD(IO)は、ΔADと記載する場合もある。
In step S01, the S / W 51 operating in the CPU 50 transmits to the slave I / F 10 a write request signal 51W that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing. Here, the first storage area is the DMA area 91, the top address is TOP / AD91a (DMA), and the end address is BOTTOM / AD91 (DMA). The address belonging to the DMA area 91 which is the first storage area is the write address 91W.
Write address 91W = [ΔAD (IO) + TOP / AD91a (DMA)]
Here, ΔAD (IO) is a value obtained by subtracting TOP / AD 93 a (IO) from the address AD when a certain address AD belongs to the IO device buffer area 93. That is, ΔAD (IO) is an offset value of the address AD with respect to TOP / AD9a (IO). ΔAD (IO) is also an offset value of the address AD with respect to TOP / AD91a (DMA) when TOP / AD91a (DMA) is added as the write address 91W. ΔAD (IO) may be described as ΔAD.
 ステップS02において、要求取得部910であるスレーブI/F10は、書き込み要求信号51WをS/W51から受信した場合に、書き込み要求信号51Wに含まれるライトアドレス91Wから先頭アドレスであるTOP/AD91a(DMA)を減算することによって、TOP/AD91a(DMA)に対するアドレスのオフセット値ΔAD(IO)を計算する。スレーブI/F10は、ΔAD(IO)をレコードとしてレコード番号と対応付けてテーブル43に登録する。ここでレコードとはテーブル43のエントリ49であり、レコード番号とはテーブル43のエントリ番号である。 In step S02, when the slave I / F 10, which is the request acquisition unit 910, receives the write request signal 51W from the S / W 51, the top address TOP / AD 91a (DMA) from the write address 91W included in the write request signal 51W. ) Is subtracted to calculate the offset value ΔAD (IO) of the address with respect to TOP / AD91a (DMA). The slave I / F 10 registers ΔAD (IO) as a record in the table 43 in association with the record number. Here, the record is an entry 49 in the table 43, and the record number is an entry number in the table 43.
 ステップS03において、データ取得部920であるマスタI/F20は、以下の処理を行う。マスタI/F20は、CPU50によって読み書きされる記憶装置971であるIOバッファ71が使用する記憶領域であって第1の記憶領域であるDMA領域91と異なる記憶領域である第2の記憶領域の先頭アドレスをオフセット値ΔADに加算することによって、オフセット値のΔAD(IO)を第2の記憶領域に属するアドレスに変換する。ここで第2の記憶領域とはIOデバイスバッファ領域93であり、先頭アドレスはTOP/AD93a(IO),末尾アドレスはBOTTOM/AD93b(IO)である。
変換されたアドレスは、
 アドレス=ΔAD(IO)+TOP/AD93a(IO)
である。マスタI/F20は、変換されたアドレスのデータを読み取る。変換されたアドレスはIOデバイスバッファ領域93に属するアドレスであるので、マスタI/F20は、IOバッファ71からデータをリードする。
In step S03, the master I / F 20 that is the data acquisition unit 920 performs the following processing. The master I / F 20 is a storage area used by the IO buffer 71 that is a storage device 971 that is read and written by the CPU 50, and is the head of a second storage area that is different from the DMA area 91 that is the first storage area. By adding the address to the offset value ΔAD, the offset value ΔAD (IO) is converted into an address belonging to the second storage area. Here, the second storage area is the IO device buffer area 93, the top address is TOP / AD93a (IO), and the end address is BOTTOM / AD93b (IO).
The translated address is
Address = ΔAD (IO) + TOP / AD93a (IO)
It is. The master I / F 20 reads the data at the converted address. Since the converted address belongs to the IO device buffer area 93, the master I / F 20 reads data from the IO buffer 71.
 ステップS04において、マスタI/F20は、読み取ったデータを、レコード番号(エントリ番号)と対応付けられた識別子と対応付けて、データ格納メモリ930である2ポートメモリ30に書き込む。ここでレコード番号(エントリ番号)と対応付けられた識別子とは、2ポートメモリ30におけるアドレス31が該当する。 In step S04, the master I / F 20 writes the read data in the 2-port memory 30 which is the data storage memory 930 in association with the identifier associated with the record number (entry number). Here, the identifier associated with the record number (entry number) corresponds to the address 31 in the 2-port memory 30.
 次に、S/W51がリード要求信号を送信した場合を説明する。ステップS05において、S/W51は、第1の記憶領域であるDMA領域91に属するアドレスであるリードアドレス91Lを含むと共に読み出しを要求する読み出し要求信号51LをスレーブI/F10に送信する。リードアドレス91Lはライトアドレス91Wと同様であり、以下である。
 リードアドレス91L=[ΔAD(IO)+TOP/AD91a(DMA)]
Next, a case where the S / W 51 transmits a read request signal will be described. In step S05, the S / W 51 transmits to the slave I / F 10 a read request signal 51L that includes a read address 91L that is an address belonging to the DMA area 91 that is the first storage area and requests reading. The read address 91L is the same as the write address 91W and is as follows.
Read address 91L = [ΔAD (IO) + TOP / AD91a (DMA)]
 ステップS06において、要求取得部910であるスレーブI/F10は、読み出し要求信号51LをS/W51から受信した場合に、読み出し要求信号51Lに含まれるリードアドレスからTOP/AD91a(DMA)を減算することによってTOP/AD91a(DMA)に対するアドレスのオフセット値ΔAD(IO)を計算する。スレーブI/F10は、計算したオフセット値ΔAD(IO)と同じ値のオフセット値ΔAD(IO)がテーブル4に登録されているか探索し、登録されている場合に、テーブル43に登録されたオフセット値ΔAD(IO)に対応するレコード番号(エントリ番号)に対応する識別子(アドレス31)と対応付けられたデータをデータ格納メモリ930である2ポートメモリ30から取得する(ステップS07)。 In step S06, when the slave I / F 10 that is the request acquisition unit 910 receives the read request signal 51L from the S / W 51, the slave I / F 10 subtracts TOP / AD91a (DMA) from the read address included in the read request signal 51L. To calculate an address offset value ΔAD (IO) for TOP / AD91a (DMA). The slave I / F 10 searches whether or not the offset value ΔAD (IO) having the same value as the calculated offset value ΔAD (IO) is registered in the table 4, and when registered, the offset value registered in the table 43 is registered. Data associated with the identifier (address 31) corresponding to the record number (entry number) corresponding to ΔAD (IO) is obtained from the 2-port memory 30 which is the data storage memory 930 (step S07).
 ステップS08において、スレーブI/F10は、取得したデータをCPU50に送信する。 In step S08, the slave I / F 10 transmits the acquired data to the CPU 50.
 次に、図6~図12を用いて、S/W51がIOバッファ71をリードする際の、DMA2によるデータ転送方法を詳しく説明する。 Next, a data transfer method by the DMA 2 when the S / W 51 reads the IO buffer 71 will be described in detail with reference to FIGS.
 図6は、CPU50で動作するS/W51が、DMA設定を行うフローチャートである。 FIG. 6 is a flowchart in which the S / W 51 operating on the CPU 50 performs DMA setting.
 ステップS1において、S/W51は、IOデバイスバッファ領域93のサイズをサイズレジスタ42に設定する。設定例としては、S/W51は、IOデバイスバッファ領域93の先頭アドレスと末尾アドレスを設定してもよいし、先頭アドレスから末尾アドレスまでのアドレスサイズを設定しても良い。S/W51は、CPU50、接続101、高速バス81、接続104を使用して、スレーブI/F10にライトを行う。スレーブI/F10は、アドレス信号104aにより、ライト先をサイズレジスタ42と認識する。スレーブI/F10は、ライトデータ信号104eにより受信したライトデータを、接続107を使用して、テーブル管理装置40のサイズレジスタ42に値を書き込む。 In step S1, the S / W 51 sets the size of the IO device buffer area 93 in the size register 42. As a setting example, the S / W 51 may set the start address and end address of the IO device buffer area 93, or may set the address size from the start address to the end address. The S / W 51 uses the CPU 50, connection 101, high-speed bus 81, and connection 104 to write to the slave I / F 10. The slave I / F 10 recognizes the write destination as the size register 42 by the address signal 104a. The slave I / F 10 writes the value of the write data received by the write data signal 104 e in the size register 42 of the table management device 40 using the connection 107.
 ステップS2において、S/W51は、IOデバイスバッファ領域93のTOP/AD93a(IO)を、ベースアドレスレジスタ21に設定する。この場合、S/W51は、CPU50、接続101、高速バス81、接続104を使用して、スレーブI/F10にライトを行う。スレーブI/F10は、アドレス信号104aにより、ライト先をベースアドレスレジスタ21と認識する。スレーブI/F10は、接続104のライトデータ信号104eにより受信したライトデータを、接続106を使用して、ベースアドレスレジスタ21に書き込む。 In step S 2, the S / W 51 sets the TOP / AD 93 a (IO) of the IO device buffer area 93 in the base address register 21. In this case, the S / W 51 writes to the slave I / F 10 using the CPU 50, connection 101, high-speed bus 81, and connection 104. The slave I / F 10 recognizes the write destination as the base address register 21 based on the address signal 104a. The slave I / F 10 writes the write data received by the write data signal 104 e on the connection 104 to the base address register 21 using the connection 106.
 図7は、S/W51によるDMA起動の手順を示すフローチャートである。 FIG. 7 is a flowchart showing a procedure for starting DMA by the S / W 51.
 ステップS101において、S/W51は、処理の進捗に応じて、IOバッファ71の「リードすべきアドレス」を決定する。リードすべきアドレスは複数あっても良い。ここで「リードすべきアドレス」は、IOデバイスバッファ領域93に属するアドレスである。つまり、TOP/AD93a(IO)~BOTTOM/AD93b(IO)の記憶領域に属するアドレスである。「リードすべきアドレス」は、TOP/AD93a(IO)及びBOTTOM/AD93b(IO)を含んでもよい。リードすべきアドレスをAD(IO)とする。 In step S101, the S / W 51 determines the “address to be read” of the IO buffer 71 in accordance with the progress of the process. There may be a plurality of addresses to be read. Here, the “address to be read” is an address belonging to the IO device buffer area 93. That is, the address belongs to the storage area of TOP / AD93a (IO) to BOTTOM / AD93b (IO). The “address to be read” may include TOP / AD93a (IO) and BOTTOM / AD93b (IO). The address to be read is AD (IO) k .
 ステップS103において、S/W51は、リードすべき各アドレス(k=1,2,...)であるAD(IO)からTOP/AD93a(IO)を減算する。ΔAD(IO)は、TOP/AD93a(IO)に対するAD(IO)のアドレスオフセットの値である。例として、TOP/AD93a(IO)のアドレスが「3001」であり、AD(IO)k=1のアドレスが「3004」であれば、
 ΔAD(IO)=AD(IO)k=1-TOP/AD93a(IO)=3004-3001=3
である。これは、AD(IO)k=1が、IOデバイスバッファ領域93において、TOP/AD93a(IO)から3番目であることを示す。
In step S103, the S / W 51 subtracts TOP / AD93a (IO) from AD (IO) k which is each address (k = 1, 2,...) To be read. ΔAD (IO) is an address offset value of AD (IO) k with respect to TOP / AD93a (IO). As an example, if the address of TOP / AD93a (IO) is “3001” and the address of AD (IO) k = 1 is “3004”,
ΔAD (IO) = AD (IO) k = 1− TOP / AD93a (IO) = 3004-3001 = 3
It is. This indicates that AD (IO) k = 1 is the third in the IO device buffer area 93 from TOP / AD 93a (IO).
 ステップS104において、S/W51は、減算結果のΔAD(IO)に、TOP/AD91a(DMA)を加算する。 In step S104, the S / W 51 adds TOP / AD91a (DMA) to ΔAD (IO) as a subtraction result.
 ステップS105において、S/W51は、S104で求めたアドレスに対してライトを行う。つまりS/W51は、書き込み要求信号51WをスレーブI/F10に送信する。AD(IO)k=1を例とすれば、S/W51は、
 ライトアドレス91W=ΔAD(IO)+TOP/AD91a(DMA)
を計算することで、IOデバイスバッファ領域93においてTOP/AD93a(IO)から3番目のアドレスを、DMA領域91において、TOP/AD91a(DMA)から3番目のアドレスに変換する。
In step S105, the S / W 51 writes to the address obtained in S104. That is, the S / W 51 transmits the write request signal 51W to the slave I / F 10. Taking AD (IO) k = 1 as an example, S / W 51 is
Write address 91W = ΔAD (IO) + TOP / AD91a (DMA)
Is calculated, and the third address from TOP / AD 93a (IO) in the IO device buffer area 93 is converted into the third address from TOP / AD 91a (DMA) in the DMA area 91.
 ステップS106において、ステップS105のライトは、スレーブI/F10内のライトバッファ11に格納され、後にスレーブI/F10によって処理される。スレーブI/F10による処理は、後述する図8のS201等以降である。S/W51によるライト発行後は、S/W51から見ると、処理は終了する。ステップS105におけるDMA領域91へのライトの場合はデータは意味を持たないため、いかなる値をライトしても良い。 In step S106, the write in step S105 is stored in the write buffer 11 in the slave I / F 10 and later processed by the slave I / F 10. The processing by the slave I / F 10 is after S201 in FIG. After the issuance of a write by the S / W 51, the processing ends when viewed from the S / W 51. In the case of writing to the DMA area 91 in step S105, since the data has no meaning, any value may be written.
 ステップS102~ステップS107において、処理は、リードすべきデータの数だけ、ループする。 In steps S102 to S107, the process loops as many times as the number of data to be read.
 図8は、スレーブI/F10がS/W51によってライトされた時の動作を示すフローチャートである。図8の動作の主体はスレーブI/F10である。 FIG. 8 is a flowchart showing an operation when the slave I / F 10 is written by the S / W 51. The subject of the operation in FIG. 8 is the slave I / F 10.
(1)ステップS201において、スレーブI/F10は、DMA領域91へのライトを待っている。
(2)ステップS202において、スレーブI/F10は書き込み要求信号51Wを受信する。スレーブI/F10は、書き込み要求信号51Wに含まれる、アドレス信号104a、制御信号104b、リードライト識別信号104c等によって、DMA領域91へのライトを認識できる。ライト有りの場合、処理はステップS203に進む。
(3)ステップS203において、スレーブI/F10は、接続107を使用して、テーブル管理装置40のテーブル43のエントリ49をチェックし、エントリフラグ45がセットされているものを探す。なお、最初はエントリ49が登録されていないので、処理は、ステップS204でNO→ステップS212→ステップS209→ステップS210→ステップS211に進む。
(4)ステップS204において、スレーブI/F10は、エントリフラグ45がセットされているエントリ49を発見した場合(ステップS204,YES)、処理はステップS205に進む。
(5)ステップS205において、スレーブI/F10は、発見されたエントリ49の中で、アドレスオフセット47が、ライトされたアドレス(ライトアドレス91W)からTOP/AD91a(DMA)を減算したものに一致するエントリ49を探す。なお、アドレスオフセット47は、後述するステップS210のように、ΔAD(IO)が設定されている。
 つまり、ライトアドレス91W=ΔAD(IO)+TOP/AD91a(DMA)
であるので、スレーブI/F10は、ライトアドレス91WからTOP/AD91a(DMA)を減算することでΔAD(IO)を取得し、取得したΔAD(IO)に一致するアドレスオフセット47を持つエントリ49を探す。なお、スレーブI/F10はTOP/AD91a(DMA)を保有している。例えば、TOP/AD91a(DMA)はライトバッファ11に格納されている。
(6)ステップS206において、エントリフラグ45がセットされていて、かつ、アドレスオフセット47(ΔAD(IO))が、ライトアドレスからTOPアドレス91a(DMA)を減算したもの(ΔAD(IO))に一致するエントリ49が見つかった場合(ステップS206;YES)は、処理はステップS213に進む。
(7)ステップS213において、スレーブI/F10は、発見したエントリ49のデータフラグ46をチェックする。データフラグ46がセットされている場合(ステップS214;YES)は、処理はS209に進み、セットされていない場合(ステップS214;NO)は、処理は終了する。
(8)ステップS214でYESの場合、スレーブI/F10は、ステップS209において、データフラグ46をリセットし、ステータス48を「リード要求未」にする。データフラグ46がセットされていない場合は(S214;NO)、すでにリード中であるため、スレーブI/F10は、何もしない。
(1) In step S201, the slave I / F 10 is waiting for a write to the DMA area 91.
(2) In step S202, the slave I / F 10 receives the write request signal 51W. The slave I / F 10 can recognize the write to the DMA area 91 by the address signal 104a, the control signal 104b, the read / write identification signal 104c, etc. included in the write request signal 51W. If there is a write, the process proceeds to step S203.
(3) In step S203, the slave I / F 10 uses the connection 107 to check the entry 49 of the table 43 of the table management apparatus 40 and searches for an entry flag 45 set. Since entry 49 is not registered at first, the process proceeds from step S204 to step NO → step S212 → step S209 → step S210 → step S211.
(4) In step S204, when the slave I / F 10 finds the entry 49 in which the entry flag 45 is set (step S204, YES), the process proceeds to step S205.
(5) In step S205, the slave I / F 10 matches the address offset 47 in the found entry 49 obtained by subtracting TOP / AD91a (DMA) from the written address (write address 91W). Look for entry 49. The address offset 47 is set to ΔAD (IO) as in step S210 described later.
That is, write address 91W = ΔAD (IO) + TOP / AD91a (DMA)
Therefore, the slave I / F 10 obtains ΔAD (IO) by subtracting TOP / AD91a (DMA) from the write address 91W, and creates an entry 49 having an address offset 47 that matches the obtained ΔAD (IO). look for. The slave I / F 10 has TOP / AD91a (DMA). For example, TOP / AD91a (DMA) is stored in the write buffer 11.
(6) In step S206, the entry flag 45 is set, and the address offset 47 (ΔAD (IO)) matches the value obtained by subtracting the TOP address 91a (DMA) from the write address (ΔAD (IO)). If the entry 49 to be found is found (step S206; YES), the process proceeds to step S213.
(7) In step S213, the slave I / F 10 checks the data flag 46 of the found entry 49. If the data flag 46 is set (step S214; YES), the process proceeds to S209. If the data flag 46 is not set (step S214; NO), the process ends.
(8) If YES in step S214, the slave I / F 10 resets the data flag 46 in step S209 and sets the status 48 to “read request not yet”. If the data flag 46 is not set (S214; NO), the slave I / F 10 does nothing because it is already reading.
(9)ステップS206において、エントリフラグ45がセットされていて、かつ、アドレスオフセット47が、ライトアドレス91WからTOPアドレス91a(DMA)を減算したものに一致するエントリ49が見つからなかった場合(ステップS206;NO)、処理はステップS207に進む。
(10)ステップS207において、スレーブI/F10は、エントリフラグ45がセットされていないエントリ49を探し出す。
(11)ステップS208でヒットした場合(S208:YES)、処理はS209へ進む。よって、ステップS209において、スレーブI/F10は、データフラグ46をリセットし、ステータス48を「リード要求未」とする。ステップS210において、スレーブI/F10は、アドレスオフセット47に、ライトアドレスからTOPアドレス91a(DMA)を減算したもの、つまり、ライトアドレスから取得されたオフセット値のΔAD(IO)をセットする。ステップS211において、スレーブI/F10は、ヒットしたエントリ49のエントリフラグ45をセットする。
(9) If the entry flag 45 is set in step S206, and the entry 49 whose address offset 47 matches the value obtained by subtracting the TOP address 91a (DMA) from the write address 91W is not found (step S206). NO), the process proceeds to step S207.
(10) In step S207, the slave I / F 10 searches for an entry 49 for which the entry flag 45 is not set.
(11) If there is a hit in step S208 (S208: YES), the process proceeds to S209. Therefore, in step S209, the slave I / F 10 resets the data flag 46 and sets the status 48 to “read request not yet”. In step S210, the slave I / F 10 sets the address offset 47 obtained by subtracting the TOP address 91a (DMA) from the write address, that is, ΔAD (IO) of the offset value acquired from the write address. In step S211, the slave I / F 10 sets the entry flag 45 of the hit entry 49.
(12)ステップS208において、エントリフラグ45がセットされていないエントリ49が見つからなかった場合(ステップS206;NO)、処理はステップS215に進む。ステップS215において、スレーブI/F10は、エントリフラグ45がセットされていて、かつ、データフラグ46がセットされているエントリ49を探す。スレーブI/F10は、見つからなかった場合は、見つかるまで待つ(ステップS216)。
(13)見つかった場合は(S216;YES)、処理はステップS209に進む。
(12) If no entry 49 for which the entry flag 45 is not set is found in step S208 (step S206; NO), the process proceeds to step S215. In step S215, the slave I / F 10 searches for an entry 49 in which the entry flag 45 is set and the data flag 46 is set. If the slave I / F 10 is not found, the slave I / F 10 waits until it is found (step S216).
(13) If found (S216; YES), the process proceeds to step S209.
(14)ステップS204において、エントリフラグ45がセットされているエントリ49が見つからなかった場合は(S204;NO)、処理はステップS212に進む。ステップS212において、スレーブI/F10は、エントリ49が見つかったものとして、いずれかのエントリ49を選択する。ステップS212から処理はステップS209に進む。よって、スレーブI/F10は、ステップS209、ステップS210、ステップS211の処理を実施する。 (14) If the entry 49 in which the entry flag 45 is set is not found in step S204 (S204; NO), the process proceeds to step S212. In step S212, the slave I / F 10 selects one of the entries 49, assuming that the entry 49 is found. From step S212, the process proceeds to step S209. Therefore, the slave I / F 10 performs the processes of step S209, step S210, and step S211.
 図9は、テーブルコントローラ41の動作を示すフローチャートである。図9の動作の主体はテーブルコントローラ41である。 FIG. 9 is a flowchart showing the operation of the table controller 41. The subject of the operation in FIG.
(1)ステップS301において、テーブルコントローラ41は、エントリフラグ45がセット、かつデータフラグ46がリセット、かつステータス48がリード要求未のエントリ49を探している。
(2)テーブルコントローラ41が該当するエントリ49を発見した場合(S302:YES)、処理はステップS303に進む。
(3)ステップS303において、テーブルコントローラ41は、マスタI/F20に、アドレスオフセット47のリードを要求する。この場合、テーブルコントローラ41は、リード要求として、発見したエントリ49のアドレスオフセット47(ΔAD(IO))と、エントリ番号44とをマスタI/F20に送信する。アドレスオフセット47はリード指示信号111aで送信され、エントリ番号44はエントリ番号信号111bで送信される。
(4)ステップS304において、テーブルコントローラ41は、発見したエントリ49のステータス48を「リード要求済」とする、
(1) In step S301, the table controller 41 is searching for an entry 49 in which the entry flag 45 is set, the data flag 46 is reset, and the status 48 is unread request.
(2) If the table controller 41 finds the corresponding entry 49 (S302: YES), the process proceeds to step S303.
(3) In step S303, the table controller 41 requests the master I / F 20 to read the address offset 47. In this case, the table controller 41 transmits the address offset 47 (ΔAD (IO)) of the found entry 49 and the entry number 44 to the master I / F 20 as a read request. The address offset 47 is transmitted by the read instruction signal 111a, and the entry number 44 is transmitted by the entry number signal 111b.
(4) In step S304, the table controller 41 sets the status 48 of the found entry 49 to “read requested”.
 図10は、マスタI/F20の動作を示すフローチャートである。図10の動作の主体はマスタI/F20である。 FIG. 10 is a flowchart showing the operation of the master I / F 20. The subject of the operation in FIG. 10 is the master I / F 20.
(1)ステップS401において、マスタI/F20は、テーブルコントローラ41からのリード指示を待っている。
(2)ステップS402において、マスタI/F20がリード指示を受信した場合、処理はステップS403に進む。
(3)ステップS403において、マスタI/F20は、リード指示信号111aで受信したアドレスオフセット47(ΔAD(IO))にベースアドレスレジスタ21の値を加算したアドレスを算出する。ベースアドレスレジスタ21にはステップS2でTOP/AD93a(IO)が格納されている。
 つまり、マスタI/F20は、
 アドレス=ΔAD(IO)+TOP/AD93a(IO)
を計算することで、ΔAD(IO)をIOデバイスバッファ領域93におけるアドレスに変換する。
(4)ステップS404において、マスタI/F20は、算出したアドレスの値をリードする。つまり、マスタI/F20は、IOデバイスバッファ領域93に属するアドレスであって、IOデバイスバッファ領域93の先頭アドレスであるTOP/AD93a(IO)からΔAD(IO)だけオフセットしたアドレスのデータをリードする。
 リードされるアドレスは、
 アドレス=ΔAD(IO)+TOP/AD93a(IO)
であるから、S/W51がデータを要求するIOバッファ71のアドレスに一致している。
(1) In step S401, the master I / F 20 waits for a read instruction from the table controller 41.
(2) If the master I / F 20 receives a read instruction in step S402, the process proceeds to step S403.
(3) In step S403, the master I / F 20 calculates an address obtained by adding the value of the base address register 21 to the address offset 47 (ΔAD (IO)) received by the read instruction signal 111a. The base address register 21 stores TOP / AD93a (IO) in step S2.
In other words, the master I / F 20
Address = ΔAD (IO) + TOP / AD93a (IO)
Is converted into an address in the IO device buffer area 93.
(4) In step S404, the master I / F 20 reads the calculated address value. That is, the master I / F 20 reads data at an address that belongs to the IO device buffer area 93 and is offset by ΔAD (IO) from TOP / AD 93 a (IO) that is the top address of the IO device buffer area 93. .
The address to be read is
Address = ΔAD (IO) + TOP / AD93a (IO)
Therefore, the S / W 51 matches the address of the IO buffer 71 that requests data.
(5)ステップS405において、マスタI/F20は、エントリ番号信号111b(エントリ番号)から、2ポートメモリ30において、リードデータを格納すべきアドレス31を算出する。最も簡単なアドレス31の算出方法は、エントリ番号信号111bの内容(エントリ番号そのもの)を、2ポートメモリ30におけるデータのアドレスとして採用することである。
(6)ステップS406において、マスタI/F20は、リードしたデータを、接続109を使用して、2ポートメモリ30の算出したアドレス31のデータ領域32にライトする。ステップS407において、マスタI/F20は、接続110を使用して、エントリ番号信号111bの示すエントリ49のデータフラグ46をセットする。
(5) In step S405, the master I / F 20 calculates the address 31 where the read data is to be stored in the 2-port memory 30 from the entry number signal 111b (entry number). The simplest method for calculating the address 31 is to adopt the contents of the entry number signal 111 b (entry number itself) as the data address in the 2-port memory 30.
(6) In step S 406, the master I / F 20 writes the read data to the data area 32 of the calculated address 31 of the 2-port memory 30 using the connection 109. In step S407, the master I / F 20 uses the connection 110 to set the data flag 46 of the entry 49 indicated by the entry number signal 111b.
 図11は、DMA起動完了後のS/W51の動作のフローチャートである。図11の動作の主体はS/W51である。 FIG. 11 is a flowchart of the operation of the S / W 51 after completion of DMA activation. The subject of the operation in FIG. 11 is S / W51.
(1)ステップS501において、S/W51は、図7に示す処理の完了後、高速メモリである2ポートメモリ30へのデータの部分的なコピー処理に関係ない処理を行うことができる。それらの関係のない処理が完了した場合(S502;NO)、処理はS503に進む。
(2)S/W51は、ステップS101で決定した各アドレスからTOP/AD93a(IO)を減算し(S504)、TOP/AD91a(DMA)を加算し(S505)、そして、全てのアドレスに対してリードを行う(S506)。つまり、S/W51は読み出し要求信号51LをスレーブI/F10に送信する。
(3)ステップS504、ステップS505、ステップS506は、ライト処理であるステップS103、ステップS104,ステップS105に対応するリード処理である。
(1) In step S501, the S / W 51 can perform processing that is not related to partial copy processing of data to the 2-port memory 30, which is a high-speed memory, after the processing shown in FIG. 7 is completed. When the processing not related to them is completed (S502; NO), the processing proceeds to S503.
(2) The S / W 51 subtracts TOP / AD93a (IO) from each address determined in step S101 (S504), adds TOP / AD91a (DMA) (S505), and for all addresses Read is performed (S506). That is, the S / W 51 transmits a read request signal 51L to the slave I / F 10.
(3) Steps S504, S505, and S506 are read processes corresponding to steps S103, S104, and S105, which are write processes.
 図12は、S/W51からリードされた時のスレーブI/F10の動作を示すフローチャートである。 FIG. 12 is a flowchart showing the operation of the slave I / F 10 when read from the S / W 51.
(1)ステップS601において、スレーブI/F10は、DMA領域91へのリードを待っている。
(2)スレーブI/F10はS/W51から読み出し要求信号51Lを受信する。読み出し要求信号51Lは、アドレス信号104a、制御信号104b、リードライト識別信号104c等を持つ。ステップS602において、スレーブI/F10は、アドレス信号104a、制御信号104b、リードライト識別信号104cにより、DMA領域91へのリードを認識できる。
(3)ステップS603において、スレーブI/F10は、接続107を使用して、テーブル43のエントリ49をチェックし、エントリフラグ45がセットされているものを探す。
(4)ステップS604において、エントリフラグ45がセットされているエントリ49が見つかった場合(S604;YES)、処理はステップSS605に進み、見つからない場合(S604;NO)、処理はステップS612に進む。
(1) In step S601, the slave I / F 10 waits for a read to the DMA area 91.
(2) The slave I / F 10 receives the read request signal 51L from the S / W 51. The read request signal 51L has an address signal 104a, a control signal 104b, a read / write identification signal 104c, and the like. In step S602, the slave I / F 10 can recognize the read to the DMA area 91 by the address signal 104a, the control signal 104b, and the read / write identification signal 104c.
(3) In step S603, the slave I / F 10 uses the connection 107 to check the entry 49 of the table 43 and searches for an entry flag 45 set.
(4) In step S604, when the entry 49 for which the entry flag 45 is set is found (S604; YES), the process proceeds to step SS605, and when it is not found (S604; NO), the process proceeds to step S612.
(5)ステップS605において、スレーブI/F10は、見つけられたエントリ49の中から、アドレスオフセットが、リードされたアドレスからTOPアドレス91a(DMA)を減算したものに一致するエントリ49を探す。つまり、リードアドレス91L=ΔAD(IO)+TOP/AD91a(DMA)であるので、スレーブI/F10は、リードアドレス91LからTOP/AD91a(DMA)を減算することでΔAD(IO)を取得し、取得したΔAD(IO)に一致するアドレスオフセット47を持つエントリ49を探す。
(6)ステップS606において、アドレスオフセット47が、ΔAD(IO)に一致するエントリ49が見つかった場合、処理はステップS607に進み、見つからない場合、処理はステップS612に進む。
(5) In step S605, the slave I / F 10 searches for the entry 49 in which the address offset matches the one obtained by subtracting the TOP address 91a (DMA) from the read address. That is, since the read address 91L = ΔAD (IO) + TOP / AD91a (DMA), the slave I / F 10 acquires ΔAD (IO) by subtracting TOP / AD91a (DMA) from the read address 91L. The entry 49 having the address offset 47 that matches the ΔAD (IO) is searched.
(6) If an entry 49 whose address offset 47 matches ΔAD (IO) is found in step S606, the process proceeds to step S607. If not found, the process proceeds to step S612.
(7)ステップS607において、スレーブI/F10は、見つかったエントリ49のデータフラグ46をチェックし、セットされるまでウェイトする(S608)。
 ステップS608において、データフラグ46のセットが確認できた場合、処理はステップS609に進む。
(8)ステップS609において、スレーブI/F10は、ステップS405でマスタI/F20が行うアドレス算出方法と、データフラグ46のセットが確認されたエントリ49のエントリ番号44とを用いて、2ポートメモリ30のリードデータが格納されているアドレス31を算出する。
(9)ステップS610において、スレーブI/F10は、接続108を使用して、2ポートメモリ30から、算出したアドレスに格納されているデータをリードして、リードデータを得る。
(10)ステップS610において、スレーブI/F10は、リードデータを、接続104、高速バス81、接続101を使用して、CPU50に返送する。
(7) In step S607, the slave I / F 10 checks the data flag 46 of the found entry 49 and waits until it is set (S608).
If the setting of the data flag 46 can be confirmed in step S608, the process proceeds to step S609.
(8) In step S609, the slave I / F 10 uses the address calculation method performed by the master I / F 20 in step S405 and the entry number 44 of the entry 49 in which the data flag 46 is confirmed to be set. An address 31 where 30 read data is stored is calculated.
(9) In step S610, the slave I / F 10 reads the data stored at the calculated address from the 2-port memory 30 using the connection 108 to obtain read data.
(10) In step S610, the slave I / F 10 returns the read data to the CPU 50 using the connection 104, the high-speed bus 81, and the connection 101.
(11)ステップS604において、エントリフラグ45がセットされているエントリ49が発見されない場合(S604;NO)、処理はステップS612に進む。
(12)ステップS612において、スレーブI/F10は、スレーブI/F10がライトされた時の処理のステップS203以降を、ライトアドレスをリードアドレスに置き換えて実施し、処理はステップS603に戻る。
(11) If the entry 49 for which the entry flag 45 is set is not found in step S604 (S604; NO), the process proceeds to step S612.
(12) In step S612, the slave I / F 10 performs the processing after step S203 when the slave I / F 10 is written by replacing the write address with the read address, and the processing returns to step S603.
(13)また、ステップS606において該当するエントリが見つからなかった場合(S606;NO)も、スレーブI/F10はステップS612を実施し、処理はステップS603に戻る。 (13) Also, if no corresponding entry is found in step S606 (S606; NO), the slave I / F 10 performs step S612, and the process returns to step S603.
 スレーブI/F10がリードされた時の動作が完了すると、S/W51は、リードデータを得ることができるので、リードデータを使用する処理を実行する。 When the operation when the slave I / F 10 is read is completed, the S / W 51 can obtain the read data, and thus executes a process using the read data.
 以上、図6~図12に示した例は、IOバッファ71のDMA転送の場合を示している。つまり、CPU50によって読み書きされる記憶装置として、IOバッファ71を例にDMA転送を説明したが、ベースアドレスレジスタ21と、サイズレジスタ42の設定を変更することで、IOバッファ71と同様に、外部メモリ60にも本実施の形態によるDMA転送を適用することができる。 The examples shown in FIGS. 6 to 12 show the case of DMA transfer of the IO buffer 71. In other words, the DMA transfer has been described by taking the IO buffer 71 as an example of a storage device to be read and written by the CPU 50. However, by changing the settings of the base address register 21 and the size register 42, the external memory The DMA transfer according to the present embodiment can also be applied to 60.
***実施の形態1の効果***
 以上のように、本実施の形態によれば、以下の効果を得ることができる。
(1)S/W51がオフセットを持って、DMA領域91をライトする。つまり、S/W51は、書き込み要求信号51WをスレーブI/F10に送信する。このライトに対して、DMA2は、リードすべきアドレスを認識し、リードを行い、リードしたデータを2ポートメモリ30に蓄える。このため、書き込み要求信号51Wの送信後は、S/W51は図11のステップS501の処理ができるので、S/W51がDMA設定する際の煩雑さが解消される。
(2)ライトアドレス91W(ΔAD(IO)+TOP/AD(DMA))により、DMAがリードすべきアドレスを細かく指定できる。このため、DMAは、S/W51が必要としないデータはリードせず、S/W51が必要とするデータをリードすることができる。よって、バス帯域の消費を少なく抑えることができ、また、リードデータをためておく2ポートメモリ30の容量も節約できる。
(3)また、S/W51はIOデバイスバッファ領域93のデータをリードする代わりに、DMA領域91をリードすることで、必要なデータを得る。つまり、DMA領域91のリードはS/W51によるIOデバイスバッファ領域93のリードに比べて短いクロック数で済む。このため、S/W51の処理性能が向上する。
(4)さらに、DMA2の起動後における、DMA2によるIOデバイスバッファ領域93のリード(マスタI/F20によるデータの取得(S404~S406))と、S/W51の処理は並行して行われる。このため、S/W51のDMA装置2の転送完了待ち時間はなくなり、処理性能が向上する。
*** Effects of Embodiment 1 ***
As described above, according to the present embodiment, the following effects can be obtained.
(1) The S / W 51 writes the DMA area 91 with an offset. That is, the S / W 51 transmits the write request signal 51W to the slave I / F 10. In response to this write, the DMA 2 recognizes the address to be read, performs read, and stores the read data in the 2-port memory 30. For this reason, after the write request signal 51W is transmitted, the S / W 51 can perform the process of step S501 in FIG. 11, thereby eliminating the complexity when the S / W 51 performs the DMA setting.
(2) With the write address 91W (ΔAD (IO) + TOP / AD (DMA)), the address to be read by the DMA can be specified in detail. For this reason, the DMA does not read data that the S / W 51 does not need, but can read data that the S / W 51 needs. Therefore, the consumption of the bus bandwidth can be reduced, and the capacity of the 2-port memory 30 for storing read data can be saved.
(3) Further, the S / W 51 obtains necessary data by reading the DMA area 91 instead of reading the data in the IO device buffer area 93. That is, the read of the DMA area 91 requires a shorter number of clocks than the read of the IO device buffer area 93 by the S / W 51. For this reason, the processing performance of the S / W 51 is improved.
(4) Further, after the DMA 2 is activated, the reading of the IO device buffer area 93 by the DMA 2 (acquisition of data by the master I / F 20 (S 404 to S 406)) and the processing of the S / W 51 are performed in parallel. For this reason, the transfer completion waiting time of the DMA device 2 of the S / W 51 is eliminated, and the processing performance is improved.
***他の構成***
 また、本実施の形態では図2、図3により、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能がソフトウェアで実現される場合を示したが、変形例として、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能がハードウェアで実現されてもよい。図13は、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能が、ハードウェアである処理回路99で実現される場合を示す。処理回路99は信号線99aに接続している。処理回路99によって、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能及びRAM802,ROM803の機能を実現する。処理回路99は、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能及びRAM802,ROM803の機能を実現する専用の電子回路である。処理回路99は、具体的には、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA(Gate・Array)、ASIC(Application・Specific・Integrated・Circuit)、又は、FPGA(Field-Programmable・Gate・Array)である。
*** Other configurations ***
Further, in the present embodiment, the case where the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 are realized by software is shown in FIGS. The functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be realized by hardware. FIG. 13 shows a case where the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 are realized by the processing circuit 99 that is hardware. The processing circuit 99 is connected to the signal line 99a. The processing circuit 99 realizes the functions of “slave I / F 10, master I / F 20, table controller 41” and the functions of the RAM 802 and ROM 803 shown as the processor 801. The processing circuit 99 is a dedicated electronic circuit that realizes the functions of “slave I / F 10, master I / F 20, table controller 41” shown as the processor 801 and the functions of the RAM 802 and ROM 803. Specifically, the processing circuit 99 includes a single circuit, a composite circuit, a programmed processor, a processor programmed in parallel, a logic IC, a GA (Gate Array), an ASIC (Application Specific Integrated Circuit), or FPGA (Field-Programmable / Gate / Array).
 プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能は、1つの処理回路99で実現されてもよいし、複数の処理回路99に分散して実現されてもよい。 The functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be realized by one processing circuit 99 or may be realized by being distributed to a plurality of processing circuits 99. .
 別の変形例として、図1に示すDMA2がソフトウェアとハードウェアとの組合せで実現されてもよい。即ち、図1に示すDMA2の一部の機能が専用のハードウェアで実現され、残りの機能がソフトウェアで実現されてもよい。 As another modification, the DMA 2 shown in FIG. 1 may be realized by a combination of software and hardware. That is, some functions of the DMA 2 shown in FIG. 1 may be realized by dedicated hardware, and the remaining functions may be realized by software.
 プロセッサ801、RAM802、ROM803、及び処理回路99を、総称して「プロセッシングサーキットリ」という。つまり、「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能及びRAM802,ROM803の機能は、プロセッシングサーキットリにより実現される。 The processor 801, the RAM 802, the ROM 803, and the processing circuit 99 are collectively referred to as “processing circuit”. That is, the functions of “slave I / F 10, master I / F 20, table controller 41” and the functions of RAM 802 and ROM 803 are realized by processing circuitry.
 プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能を、「工程」又は「手順」又は「処理」に読み替えてもよい。また、プロセッサ801として示す「スレーブI/F10、マスタI/F20、テーブルコントローラ41」の機能をファームウェアで実現してもよい。 The functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be read as “process”, “procedure”, or “processing”. Further, the functions of “slave I / F 10, master I / F 20, and table controller 41” shown as the processor 801 may be realized by firmware.
 また、図1にコントローラ1-1、DMA2の動作は、方法、プログラムとして把握できる。プログラムはコンピュータ読取可能な記録媒体に格納できる。またプログラムはプログラムプロダクトとして実現できる。 Also, the operation of the controller 1-1 and DMA2 in FIG. 1 can be grasped as a method and a program. The program can be stored in a computer-readable recording medium. The program can be realized as a program product.
 実施の形態2.
 図14は、実施の形態2のコントローラ1-2の構成図である。図14に示すように、コントローラ1-2は、実施の形態1のコントローラ1-1に対して、さらにタイマ403を備えている。タイマ403は、テーブル管理装置40に接続されている。タイマ403はプログラマブルなインターバルタイマであり、周期的にパルスを発生する。発生したパルスがテーブル管理装置40に伝達されると、テーブルコントローラ41は、すべてのエントリ49のデータフラグ46をリセットし、ステータス48をリード要求未にセットする。
Embodiment 2. FIG.
FIG. 14 is a configuration diagram of the controller 1-2 according to the second embodiment. As shown in FIG. 14, the controller 1-2 further includes a timer 403 with respect to the controller 1-1 of the first embodiment. The timer 403 is connected to the table management device 40. The timer 403 is a programmable interval timer and periodically generates pulses. When the generated pulse is transmitted to the table management device 40, the table controller 41 resets the data flags 46 of all the entries 49 and sets the status 48 to a read request not yet.
 テーブルコントローラ41は、図9のステップS301、ステップS302に示す通り、常に、エントリフラグ45がセット、かつデータフラグ46がリセット、かつステータス48がリード要求未のエントリ49を探している。そのようなエントリ49が存在した場合、テーブルコントローラ41は、そのエントリ49のステータス48をリード要求済として(S304)、接続111を使用して、マスタI/F20に対して、アドレスオフセット47のリードを要求する(S303)。 As shown in steps S301 and S302 of FIG. 9, the table controller 41 always searches for an entry 49 in which the entry flag 45 is set, the data flag 46 is reset, and the status 48 is unread request. When such an entry 49 exists, the table controller 41 sets the status 48 of the entry 49 as a read request (S304) and uses the connection 111 to read the address offset 47 to the master I / F 20. Is requested (S303).
 これにより、エントリフラグ45がセットされているエントリ49のアドレスオフセット47に対応するIOデバイスバッファ領域93のアドレスが周期的に読み出され、2ポートメモリ30に登録されたデータが、常に最後のパルス発生時以降のIOデバイスバッファ領域93のデータに一致するようになる。 As a result, the address of the IO device buffer area 93 corresponding to the address offset 47 of the entry 49 in which the entry flag 45 is set is periodically read, and the data registered in the 2-port memory 30 is always the last pulse. It coincides with the data in the IO device buffer area 93 after the occurrence.
 その結果、IOバッファ71のリードすべきアドレスの変更がない限り、S/W51は、DMA2にIOデバイスバッファ領域93の最新のデータをリードさせるためのDMA領域91のライト動作が不要になる。よって、S/W51の処理性能は向上する。 As a result, unless the address to be read of the IO buffer 71 is changed, the S / W 51 does not need to perform a write operation of the DMA area 91 for causing the DMA 2 to read the latest data in the IO device buffer area 93. Therefore, the processing performance of the S / W 51 is improved.
 実施の形態3.
 図15は、実施の形態3のコントローラ1-3の構成図である。コントローラ1-3は実施の形態1のコントローラ1-1に対して、スレーブI/F10、マスタI/F20のバスへの接続が異なる。高速バス81とスレーブI/F10との接続104の代わりに、バスブリッジ80とスレーブI/F10がバスブリッジ-スレーブI/F接続112で接続され、マスタI/F20と低速バス82との接続105の代わりに、マスタI/F20とバスブリッジ80とがマスタI/F-バスブリッジ接続113で接続される。バスブリッジ80内では、高速バススイッチ80aが高速バス81からのアクセスをアドレスにより低速バス82へのアクセスとスレーブI/F10へのアクセスに振り分ける。また、低速バススイッチ80bが高速バス81からのアクセスとマスタI/F20からのアクセスを調停することで、高速バス81とマスタI/F20の双方の低速バス82アクセスを可能にする。
Embodiment 3 FIG.
FIG. 15 is a configuration diagram of the controller 1-3 according to the third embodiment. The controller 1-3 differs from the controller 1-1 of the first embodiment in the connection of the slave I / F 10 and the master I / F 20 to the bus. Instead of the connection 104 between the high-speed bus 81 and the slave I / F 10, the bus bridge 80 and the slave I / F 10 are connected by a bus bridge-slave I / F connection 112, and the connection 105 between the master I / F 20 and the low-speed bus 82 is performed. Instead, the master I / F 20 and the bus bridge 80 are connected by a master I / F-bus bridge connection 113. In the bus bridge 80, the high-speed bus switch 80a distributes access from the high-speed bus 81 into access to the low-speed bus 82 and access to the slave I / F 10 by address. Further, the low-speed bus switch 80b arbitrates access from the high-speed bus 81 and access from the master I / F 20, thereby enabling both the high-speed bus 81 and the master I / F 20 to access the low-speed bus 82.
 この接続により、高速バス81と低速バス82にDMA2を接続できない場合においても、本発明を適用できるため、実施の形態1と同じ効果を得ることができる。 Because of this connection, even when the DMA 2 cannot be connected to the high-speed bus 81 and the low-speed bus 82, the present invention can be applied, so that the same effect as in the first embodiment can be obtained.
 実施の形態4.
 図16は、実施の形態4のコントローラ1-4の構成図である。コントローラ1-4は実施の形態1のコントローラ1-1に対して、マスタI/F20のバスへの接続が異なる。マスタI/F20と低速バス82との接続105の代わりに、マスタI/F20と高速バス81とをマスタI/F-高速バス接続114で接続する。
Embodiment 4 FIG.
FIG. 16 is a configuration diagram of the controller 1-4 according to the fourth embodiment. The controller 1-4 differs from the controller 1-1 of the first embodiment in connection to the master I / F 20 bus. Instead of the connection 105 between the master I / F 20 and the low-speed bus 82, the master I / F 20 and the high-speed bus 81 are connected by the master I / F-high-speed bus connection 114.
 この接続により、低速バス82にDMA2を接続できない場合においても本発明を適用することができるため、実施の形態1と同じ効果を得ることができる。 By this connection, the present invention can be applied even when the DMA 2 cannot be connected to the low-speed bus 82, so that the same effect as that of the first embodiment can be obtained.
 実施の形態5.
 図17は、実施の形態5のコントローラ1-5の構成図である。コントローラ1-5は実施の形態1のコントローラ1-1に対して、スレーブI/F10のバスへの接続が異なる。高速バス81とスレーブI/F10との接続104の代わりに低速バス82とスレーブI/F10とを低速バス-スレーブI/F接続115で接続する。
Embodiment 5 FIG.
FIG. 17 is a configuration diagram of the controller 1-5 according to the fifth embodiment. The controller 1-5 is different from the controller 1-1 of the first embodiment in connection to the bus of the slave I / F 10. Instead of the connection 104 between the high-speed bus 81 and the slave I / F 10, the low-speed bus 82 and the slave I / F 10 are connected by a low-speed bus-slave I / F connection 115.
 この接続により、高速バス81にDMA2を接続できない場合においても本発明を適用することができるため、実施の形態1と同じ効果を得ることができる。 Because of this connection, the present invention can be applied even when the DMA 2 cannot be connected to the high-speed bus 81, so that the same effect as in the first embodiment can be obtained.
 以上、本発明の実施の形態について説明したが、これらの実施の形態のうち、2つ以上を組み合わせて実施しても構わない。あるいは、これらの実施の形態のうち、1つを部分的に実施しても構わない。あるいは、これらの実施の形態のうち、2つ以上を部分的に組み合わせて実施しても構わない。なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。 Although the embodiments of the present invention have been described above, two or more of these embodiments may be implemented in combination. Alternatively, one of these embodiments may be partially implemented. Alternatively, two or more of these embodiments may be partially combined. In addition, this invention is not limited to these embodiment, A various change is possible as needed.
 1-1,1-2,1-3,1-4,1-5 コントローラ、2 DMA、10 スレーブI/F、11 ライトバッファ、20 マスタI/F、21 ベースアドレスレジスタ、30 2ポートメモリ、31 アドレス、32 データ領域、40 テーブル管理装置、41 テーブルコントローラ、42 サイズレジスタ、43 テーブル、44 エントリ番号、45 エントリフラグ、46 データフラグ、47 アドレスオフセット、48 ステータス、49 エントリ、50 CPU、51 S/W、51W 書き込み要求信号、51L 読み出し要求信号、60 外部メモリ、70 IOデバイス、71 IOバッファ、80 バスブリッジ、80a 高速バススイッチ、80b 低速バススイッチ、81 高速バス、82 低速バス、90 アドレスマップ、90a TOPアドレス、90b BOTTOMアドレス、91 DMA領域、91W ライトアドレス、91L リードアドレス、91a TOP/AD、91b BOTTOM/AD、92 外部メモリ領域、92a TOPアドレス、92b BOTTOMアドレス、93 IOデバイスバッファ領域、93a TOP/AD、93b BOTTOM/AD、94 DMA設定領域、94a TOP/AD、94b BOTTOM/AD、99 処理回路、99a 信号線、101~111 接続、104a アドレス信号、104b 制御信号、104c リードライト識別信号、104d リードデータ信号、104e ライトデータ信号、104f サイズ信号、111a リード指示信号、111b エントリ番号信号、112 バスブリッジ-スレーブI/F接続、113 マスタI/F-バスブリッジ接続、114 マスタI/F-高速バス接続、115 低速バス-スレーブI/F接続、403 タイマ、801 プロセッサ、802 RAM、803 ROM、910 要求取得部、920 データ取得部、930 データ格納メモリ、971 記憶装置、981 第1のバス、982 第2のバス。 1-1, 1-2, 1-3, 1-4, 1-5 controller, 2 DMA, 10 slave I / F, 11 write buffer, 20 master I / F, 21 base address register, 30 2-port memory, 31 address, 32 data area, 40 table management device, 41 table controller, 42 size register, 43 table, 44 entry number, 45 entry flag, 46 data flag, 47 address offset, 48 status, 49 entry, 50 CPU, 51 S / W, 51W write request signal, 51L read request signal, 60 external memory, 70 IO device, 71 IO buffer, 80 bus bridge, 80a high speed bus switch, 80b low speed bus switch, 81 high speed bus, 82 low speed 90 address map, 90a TOP address, 90b BOTTOM address, 91 DMA area, 91W write address, 91L read address, 91a TOP / AD, 91b BOTTOM / AD, 92 external memory area, 92a TOP address, 92b BOTTOM address, 93 IO device buffer area, 93a TOP / AD, 93b BOTTOM / AD, 94 DMA setting area, 94a TOP / AD, 94b BOTTOM / AD, 99 processing circuit, 99a signal line, 101-111 connection, 104a address signal, 104b control signal 104c read / write identification signal, 104d read data signal, 104e write data signal, 104f size signal, 111a read instruction signal, 11 b Entry number signal, 112 bus bridge-slave I / F connection, 113 master I / F-bus bridge connection, 114 master I / F-high speed bus connection, 115 low speed bus-slave I / F connection, 403 timer, 801 processor 802 RAM, 803 ROM, 910 request acquisition unit, 920 data acquisition unit, 930 data storage memory, 971 storage device, 981 first bus, 982 second bus.

Claims (8)

  1.  先頭アドレスから末尾アドレスまで続く第1の記憶領域に属するアドレスを含むと共に書き込みを要求する書き込み要求信号を中央処理装置から受信した場合に前記アドレスから前記先頭アドレスを減算することによって前記先頭アドレスに対する前記アドレスのオフセット値を計算し、
     前記オフセット値をレコードとしてレコード番号と対応付けてテーブルに登録する要求取得部と、
     前記中央処理装置によって読み書きされる記憶装置の記憶領域であって前記第1の記憶領域と異なる記憶領域である第2の記憶領域の先頭アドレスを前記オフセット値に加算することによって前記オフセット値を前記第2の記憶領域に属するアドレスに変換し、変換された前記アドレスのデータを読み取り、読み取ったデータを、前記レコード番号と対応付けられた識別子と対応付けて、データ格納メモリに書き込むデータ取得部と
    を備えるデータ転送装置。
    When a write request signal that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing is received from the central processing unit, the head address is subtracted from the address by subtracting the head address. Calculate the offset value of the address
    A request acquisition unit that registers the offset value as a record in a table in association with a record number;
    The offset value is calculated by adding a head address of a second storage area that is a storage area of the storage device that is read and written by the central processing unit and is different from the first storage area to the offset value. A data acquisition unit for converting to an address belonging to a second storage area, reading the data of the converted address, and writing the read data in a data storage memory in association with an identifier associated with the record number; A data transfer device comprising:
  2.  前記要求取得部は、
     前記第1の記憶領域に属するアドレスを含むと共に読み出しを要求する読み出し要求信号を前記中央処理装置から受信した場合に前記読み出し要求信号に含まれる前記アドレスから前記第1の記憶領域の前記先頭アドレスを減算することによって前記先頭アドレスに対する前記アドレスのオフセット値を計算し、
     計算した前記オフセット値と同じ値のオフセット値が前記テーブルに登録されている場合に、前記テーブルに登録された前記オフセット値に対応する前記レコード番号に対応する前記識別子と対応付けられた前記データを前記データ格納メモリから取得し、
     取得した前記データを前記中央処理装置に送信する請求項1に記載のデータ転送装置。
    The request acquisition unit
    When the read request signal including the address belonging to the first storage area and requesting the read is received from the central processing unit, the start address of the first storage area is determined from the address included in the read request signal. Calculate the offset value of the address with respect to the start address by subtracting,
    When an offset value having the same value as the calculated offset value is registered in the table, the data associated with the identifier corresponding to the record number corresponding to the offset value registered in the table is Obtained from the data storage memory,
    The data transfer device according to claim 1, wherein the acquired data is transmitted to the central processing unit.
  3.  前記要求取得部と前記データ取得部とは、
     第1のバスと前記第1のバスよりも転送速度の遅い第2のバスとを接続するバスブリッジ回路に接続される請求項1または請求項2に記載のデータ転送装置。
    The request acquisition unit and the data acquisition unit are:
    The data transfer device according to claim 1, wherein the data transfer device is connected to a bus bridge circuit that connects a first bus and a second bus having a transfer speed slower than that of the first bus.
  4.  前記要求取得部と前記データ取得部とは、
     バスブリッジ回路によって接続される第1のバスと前記第1のバスよりも転送速度の遅い第2のバスとのうち、前記第1のバスに接続される請求項1または請求項2に記載のデータ転送装置。
    The request acquisition unit and the data acquisition unit are:
    3. The device according to claim 1, wherein the first bus connected by the bus bridge circuit and the second bus having a slower transfer speed than the first bus are connected to the first bus. 4. Data transfer device.
  5.  前記要求取得部と前記データ取得部とは、
     バスブリッジ回路によって接続される第1のバスと前記第1のバスよりも転送速度の遅い第2のバスとのうち、前記第2のバスに接続される請求項1または請求項2に記載のデータ転送装置。
    The request acquisition unit and the data acquisition unit are:
    3. The device according to claim 1, wherein the first bus connected by the bus bridge circuit and the second bus having a slower transfer speed than the first bus are connected to the second bus. 4. Data transfer device.
  6.  前記テーブルは、
     前記レコードの項目として、前記データ取得部によって取得された前記データの有効状態と無効状態とのいずれかの状態を示すデータフラグを有し、
     前記データ取得部は、
     前記データを前記データ格納メモリに書き込んだ場合に、書き込まれた前記データと前記レコード番号で対応付けられている前記レコードの前記データフラグを有効に設定し、
     前記テーブルは、
     周期的にパルスを発生するタイマ装置の前記パルスにより、前記データフラグが無効状態にされる請求項1から請求項5のいずれか一項に記載のデータ転送装置。
    The table is
    As an item of the record, it has a data flag indicating either the valid state or invalid state of the data acquired by the data acquisition unit,
    The data acquisition unit
    When the data is written to the data storage memory, the data flag of the record associated with the written data and the record number is set to be valid,
    The table is
    The data transfer device according to any one of claims 1 to 5, wherein the data flag is invalidated by the pulse of the timer device that periodically generates a pulse.
  7.  テーブルと、データ格納メモリを有するデータ転送装置が、
     先頭アドレスから末尾アドレスまで続く第1の記憶領域に属するアドレスを含むと共に書き込みを要求する書き込み要求信号が中央処理装置から送信された場合に前記アドレスから前記先頭アドレスを減算することによって前記先頭アドレスに対する前記アドレスのオフセット値を計算し、
     前記オフセット値をレコードとしてレコード番号と対応付けて前記テーブルに登録し、
     前記中央処理装置によって読み書きされる記憶装置の記憶領域であって前記第1の記憶領域と異なる記憶領域である第2の記憶領域の先頭アドレスを前記オフセット値に加算することによって前記オフセット値を前記第2の記憶領域に属するアドレスに変換し、
     変換された前記アドレスのデータを読み取り、
     読み取ったデータを、前記レコード番号と対応付けられた識別子と対応付けて、前記データ格納メモリに書き込むデータ転送方法。
    A data transfer device having a table and a data storage memory;
    When a write request signal that includes an address belonging to the first storage area that continues from the head address to the tail address and requests writing is transmitted from the central processing unit, the head address is subtracted from the address by subtracting the head address. Calculate the offset value of the address,
    The offset value is registered as a record in the table in association with the record number,
    The offset value is calculated by adding a head address of a second storage area that is a storage area of the storage device that is read and written by the central processing unit and is different from the first storage area to the offset value. Converted to an address belonging to the second storage area,
    Read the data of the converted address,
    A data transfer method for writing read data in the data storage memory in association with an identifier associated with the record number.
  8.  前記データ転送装置は、
     前記第1の記憶領域に属するアドレスを含むと共に読み出しを要求する読み出し要求信号を前記中央処理装置が送信した場合に前記読み出し要求信号に含まれる前記アドレスから前記第1の記憶領域の前記先頭アドレスを減算することによって前記先頭アドレスに対する前記アドレスのオフセット値を計算し、
     計算した前記オフセット値と同じ値のオフセット値が前記テーブルに登録されている場合に、前記テーブルに登録された前記オフセット値に対応する前記レコード番号に対応する前記識別子と対応付けられた前記データを前記データ格納メモリから取得し、
     取得した前記データを前記中央処理装置に送信する請求項7に記載のデータ転送方法。
    The data transfer device
    When the central processing unit transmits a read request signal that includes an address belonging to the first storage area and requests reading, the head address of the first storage area is determined from the address included in the read request signal. Calculate the offset value of the address with respect to the start address by subtracting,
    When an offset value having the same value as the calculated offset value is registered in the table, the data associated with the identifier corresponding to the record number corresponding to the offset value registered in the table is Obtained from the data storage memory,
    The data transfer method according to claim 7, wherein the acquired data is transmitted to the central processing unit.
PCT/JP2016/067753 2016-06-15 2016-06-15 Data transfer device and data transfer method WO2017216892A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2016/067753 WO2017216892A1 (en) 2016-06-15 2016-06-15 Data transfer device and data transfer method
TW105123544A TW201800950A (en) 2016-06-15 2016-07-26 Data transfer device and data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/067753 WO2017216892A1 (en) 2016-06-15 2016-06-15 Data transfer device and data transfer method

Publications (1)

Publication Number Publication Date
WO2017216892A1 true WO2017216892A1 (en) 2017-12-21

Family

ID=60664125

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/067753 WO2017216892A1 (en) 2016-06-15 2016-06-15 Data transfer device and data transfer method

Country Status (2)

Country Link
TW (1) TW201800950A (en)
WO (1) WO2017216892A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590512A (en) * 2021-07-30 2021-11-02 眸芯科技(上海)有限公司 Self-starting DMA device capable of directly connecting peripheral equipment and application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263424A (en) * 1995-03-20 1996-10-11 Fujitsu Ltd Computer system
JP2006072473A (en) * 2004-08-31 2006-03-16 Fuji Xerox Co Ltd Data transfer method and device
JP2010237770A (en) * 2009-03-30 2010-10-21 Toshiba Corp Information processing apparatus, bridge device, and information processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263424A (en) * 1995-03-20 1996-10-11 Fujitsu Ltd Computer system
JP2006072473A (en) * 2004-08-31 2006-03-16 Fuji Xerox Co Ltd Data transfer method and device
JP2010237770A (en) * 2009-03-30 2010-10-21 Toshiba Corp Information processing apparatus, bridge device, and information processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590512A (en) * 2021-07-30 2021-11-02 眸芯科技(上海)有限公司 Self-starting DMA device capable of directly connecting peripheral equipment and application
CN113590512B (en) * 2021-07-30 2023-09-29 眸芯科技(上海)有限公司 Self-starting DMA device capable of directly connecting peripheral equipment and application

Also Published As

Publication number Publication date
TW201800950A (en) 2018-01-01

Similar Documents

Publication Publication Date Title
US11237728B2 (en) Method for accessing extended memory, device, and system
TWI651620B (en) Data processing system and method for processing multiple transactions
EP3639146B1 (en) Low power multi-core coherency
TW552515B (en) Input/output (I/O) address translation in a bridge proximate to a local I/O bus
US20120054380A1 (en) Opportunistic improvement of mmio request handling based on target reporting of space requirements
EP3335124B1 (en) Register files for i/o packet compression
US20230195633A1 (en) Memory management device
US10467138B2 (en) Caching policies for processing units on multiple sockets
JP4434534B2 (en) Processor system
JP2007048296A (en) Method, apparatus and system for invalidating multiple address cache entries
TWI759397B (en) Apparatus, master device, processing unit, and method for compare-and-swap transaction
WO2017216892A1 (en) Data transfer device and data transfer method
JP6249117B1 (en) Information processing device
JP2003345648A5 (en)
JP2010079536A (en) Memory access control circuit and memory access control method
JP7463855B2 (en) Information processing device and program
TWI243999B (en) Apparatus and related method for maintaining read caching data of south bridge with north bridge
EP3992802A1 (en) Input/output device operational modes for a system with memory pools
WO2022004837A1 (en) Information processing device, information processing method, and recording medium for information processing program
JP6565729B2 (en) Arithmetic processing device, control device, information processing device, and control method for information processing device
CN109791521B (en) Apparatus and method for providing primitive subsets of data access
JP2001229074A (en) Memory controller and information processor and memory control chip
CN114846455A (en) System dma engine offload
JP2020057251A (en) Information processor
JP2019164491A (en) Information processing apparatus and cache control apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16905447

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16905447

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP