The present invention relates to information processing devices and information processing methods.
As shown in
When a large amount of data stored in a memory is copied to the same memory or a different memory in the information processing device 1, the DMA section 5 is used in order to reduce a load on the CPU 2. The DMA section 5 reads data to the memory, writes data from the memory, and copies data in place of the CPU 2. In general, the CPU 2 provides the DMA section 5 with a copy start instruction in which a storing address of source data (transfer source address), a copy destination address (transfer destination address), and an amount of data to be copied (transfer amount) are specified, thereby causing the DMA section 5 to read the data from the transfer source address and write the data to the transfer destination address. Furthermore, the DMA section 5 copies the source data to the copy destination by repeating these read and write processes up to the transfer amount with increasing the transfer source address and the transfer destination address.
As shown in
There is also a case where the information processing device 1 needs to copy data dispersed in a number of different areas within the same memory or between a plurality of memories in a course of information processing together. In this case, as shown in
Usually, descriptors are often written in part of area in a memory, information of the transfer source address, transfer destination address, and transfer amount corresponding to each area of data to be copied is written, and the number of the transfer source addresses, the transfer destination address, or the transfer amount is equal to the number of the areas to be copied.
In descriptor information DT, descriptors including transfer source address sai, transfer destination address dai, and transfer amount szi (i=1, 2, 3, . . . , N; N is a positive integer) are written, and the number of the descriptors is equal to the number of the areas (N in the case of
As shown in
By using the descriptor-compliant DMA section 6 as described above, since the DMA section 6 sequentially copies data dispersed in different areas in accordance with the descriptors, the CPU 2 can omit operations of setting DMA each time for each area and reduce its load.
Patent reference 1 discloses a DMA transfer device compliant with descriptors. This DMA transfer device further accepts NOP commands, which specifies that DMA transfer is not performed, as the descriptors. Specifically, if the NOP command is specified as the descriptor, this DMA transfer device issues an interrupt signal to the CPU and does not perform the DMA transfer, and when the CPU detects the interrupt signal from the DMA transfer device, it performs data transfer in accordance with the descriptor.
Patent reference 1: Japanese Patent Publication No. 4881140 (paragraphs 0065 to 0074)
In the DMA transfer device compliant with descriptors which is disclosed in Patent reference 1, the CPU needs to manage a transfer source address, a transfer destination address, and a transfer amount for each area to be copied and set them as descriptors. Accordingly, there are problems that as the number of areas to be copied increases, not only a load of managing the addresses and transfer amounts on the CPU but also a load of setting the descriptors increases.
It is an object of the present invention to solve the problems as described above and to reduce a load of managing the transfer source addresses, the transfer destination addresses, and the transfer amounts of the areas to be copied even if the number of areas to be copied becomes large.
An information processing device according to one aspect of the present includes a storage section configured to store video data, a DMA section configured to read video data from the storage section by specifying an address and write the read video data into the storage section or another storage section different from the storage section, an address conversion rule storage section configured to store an address conversion rule for converting the address specified by the DMA section, and an address conversion section configured to convert the address specified by the DMA section in accordance with the address conversion rule; the address conversion rule is a rule for converting addresses of a series of areas to addresses of the video data stored in a plurality of areas in the storage section; the address conversion section includes an address conversion done-or-not determination section; and the address conversion done-or-not determination section determines, by comparing the address with a third area assigned to address conversion, whether the address conversion is done or not done.
An information processing method according to one aspect of the present invention includes an address specification step of specifying an address of video data to be read from a storage section, an address conversion step of converting the address specified in the address specification step in accordance with an address conversion rule, a readout step of reading video data stored at the address converted in the address conversion step from the storage section, and a step of writing the video data read in the readout step into the storage section or another storage section different from the storage section; the address conversion rule is a rule for converting addresses of a series of areas to addresses of the video data stored in a plurality of areas of the storage section; in the address conversion step, whether address conversion is done or not done is determined by comparing the address with a third area assigned to the address conversion.
According to one aspect of the present invention, even if the number of areas to be copied becomes large, they can be handled as one area, and consequently a load of managing the transfer source addresses, the transfer destination addresses, and the transfer amounts of the areas to be copied can be reduced.
The information processing device 100 includes a data storage section 101, a CPU 102, a data processing section 103, an address conversion rule storage section 104, an address conversion section 105, a DMA section 106, and a data bus 107.
The data storage section 101 is a storage section which stores data and programs.
The CPU 102 is a control section which controls individual sections in the information processing device 100. For example, the CPU 102 executes the programs stored in the data storage section 101 to perform reading or writing of the data from or to the data storage section 101, arithmetic processing, and control processing.
The data processing section 103 executes part of the processing of the CPU 102 in place of the CPU 102 to reduce a load on the CPU 102. For example, the data processing section 103 processes data stored in the data storage section 101. Then, the CPU 102 continues subsequent processing by using the data that the data processing section 103 has processed.
In addition, the data processing section 103 generates an address conversion rule by associating addresses of a plurality of areas where the processed data are stored in the data storage section 101 with addresses of a series of unused areas where no data are stored in the data storage section 101. Then, the data processing section 103 stores the generated address conversion rule in the address conversion rule storage section 104. This series of unused areas where no data are stored in the data storage section 101 is referred to as an address conversion area.
The data processing section 103 notifies the CPU 102 of the address conversion area. Then, the CPU 102 instructs the DMA section 106 to transfer the data of the address conversion area.
The address conversion rule storage section 104 holds the address conversion rule set by the data processing section 103. The address conversion rule is a rule of converting addresses specified by the DMA section 106.
The address conversion section 105 converts addresses specified by the DMA section 106 in accordance with the address conversion rule stored in the address conversion rule storage section 104. For example, the address conversion section 105, by referring to the address conversion rule stored in the address conversion rule storage section 104, performs address conversion if a address specified by the DMA section 106 is contained in the address conversion area of the data storage section 101, and does not perform address conversion if it is not contained.
In response to a start instruction from the CPU 102, the DMA section 106 specifies an address, reads data stored in the data storage section 101, and writes (copies) the data into a different area of the data storage section 101. Here, the address specified by the DMA section 106 is converted by the address conversion section 105 as needed.
The operation of the sections of the information processing device 100 will be described below in detail.
The CPU 102 notifies the data processing section 103 of places where target data to be processed are stored in the data storage section 101 in order that the data processing section 103 may execute part of the processing. For example, the CPU 102 notifies the data processing section 103 of areas od1, od2, od3, . . . , odN where target data to be processed are stored, as shown in
In response to a data processing start instruction from the CPU 102, the data processing section 103 starts processing data. Here, as an example of the data processing, a CCTV (closed-circuit television) system 500 shown in
In this case, the monitoring recorder 502 corresponds to the information processing device 100. It is assumed that the received RTP packets are stored in the data storage section 101.
Here descriptions are given on the assumption that the data processing section 103 removes the RTP headers from the RTP packets and extracts the video stream.
As shown in
It is assumed here that each of areas od1, od2, od3, . . . , odN shown in
When the processing by the data processing section 103 proceeds to a predetermined point of time, for example, when the processing of a predetermined amount of data or a predetermined group of data items (a predetermined number of data items) finishes, the data processing section 103 stores an address conversion rule in the address conversion rule storage section 104. The address conversion rule is generated so that address conversion as shown in
At each predetermined point of time, such as each time the processing of a predetermined amount of data or a predetermined group of data items (a predetermined number of data items) is completed, the data processing section 103 stores, in the address conversion rule storage section 104, part of the address conversion rule (hereafter also referred to as a partial address conversion rule). Therefore, the address conversion rule in the address conversion rule storage section 104 is not fixed, and the contents vary depending on the processing of the data processing section 103 proceeds. In addition, the partial address conversion rules that become unnecessary with data copied by the DMA section 106 described later are eliminated (deleted) from the address conversion rule storage section 104. Since the partial address conversion rules are deleted in accordance with the state of transfer by the DMA section 106 like this, the address conversion rule storage section 104 can be kept from becoming unnecessarily large.
The address conversion rule table 120 has a number column 121, a pre-conversion address column 122, an area size column 123, and a post-conversion address column 124. Here a single set of information items stored in each record is a partial address conversion rule.
The number column 121 stores identification numbers 1 to N as partial address conversion rule identification information for identifying individual partial address conversion rules.
The pre-conversion address column 122 stores pre-conversion addresses ma1 to maN.
The area size column 123 stores sizes sz1 to szN of individual data items stored at pre-conversion addresses ma1 to maN.
The post-conversion address column 124 stores post-conversion addresses sa1 to saN.
As above, storing the address conversion rule in the form described above makes it possible for the address conversion section 105 to perform address conversion by means of simple hardware.
The address conversion section 105 executes address conversion in accordance with the address conversion rule stored in the address conversion rule storage section 104. When bus access is made to an address area identified by the pre-conversion address column 122 and the area size column 123 of the address conversion rule table 120 stored in the address conversion rule storage section 104, the address conversion section 105 carries out address conversion in accordance with the address conversion rule table 120. On the other hand, when bus access is made to an area other than the address area identified by the pre-conversion address column 122 and the area size column 123 of the address conversion rule table 120, the address conversion section 105 does not execute address conversion. Address conversion is therefore performed only when a corresponding address conversion rule is present.
For example, in the example in
From a terminal 133 in
When the address conversion rule readout section 130 read a partial address conversion rule, if copying of data of the address area corresponding to another partial address conversion rule that has already been read is finished, it caused the address conversion rule storage section 104 to delete the corresponding record from the address conversion rule table and thereby being able to reduce the storage amount.
The partial address conversion rule returned from the address conversion rule storage section 104 is input from a terminal 135 of the address conversion section 105 and input to the address conversion done-or-not determination section 131. The address conversion done-or-not determination section 131 compares pre-conversion address a0 input from the terminal 133 with the partial address conversion rule input from the terminal 135, and determines whether address conversion is done. For example, if address a0 satisfies this condition: address mai≦address a0≦(address mai+szi−1), for example, the address conversion done-or-not determination section 131 determines that the address conversion by this partial address conversion rule is done. On the other hand, if the condition is not satisfied, the address conversion done-or-not determination section 131 determines that the address conversion by this partial address conversion rule is not done. If the address conversion is done, the address conversion done-or-not determination section 131 outputs address sai+(address a0−address mai), for example, as a post-conversion address, to the address replacement section 132. If the determination result of the address conversion done-or-not determination section 131 indicates that the address conversion is done, the address replacement section 132 outputs the post-conversion address input from the address conversion done-or-not determination section 131. If the determination result of the address conversion done-or-not determination section 131 indicates that the address conversion is not done, the address replacement section 132 outputs pre-conversion address a0 input from the terminal 133. The address output from the address replacement section 132 is output through a terminal 136 from the address conversion section 105, and the output address makes it possible to read out from the data storage section 101.
When the data processing section 103 has finished storing the address conversion rule into the address conversion rule storage section 104, it notifies the CPU 102 of the completion of data processing and of the address conversion area as the storage location of the processed data. In the example shown in
When the CPU 102 receives the notification of completion of data processing from the data processing section 103, it performs settings for copying the data of the processing result to the DMA section 106. In the example shown in
According to the copy start instruction from the CPU 102, the DMA section 106 copies data. Data are read in order of addresses, starting from transfer source address ma1 specified by the CPU 102, and the read data are written sequentially, starting from transfer destination address da1 specified by the CPU 102. When copying of data of transfer amount szA specified by the CPU 102 is completed, the CPU 102 is notified of the completion of data copying.
This process makes a state in which the data in areas sd1 to sdN storing the video stream are stored continuously in order from address da1 specified by the CPU 102. In this process, the CPU 102 has specified just transfer source address ma1, transfer destination address da1, and transfer size szA, and does not need to manage the transfer source address, transfer destination address, and transfer amount for each of areas sd1 to sdN storing the video stream, and descriptor settings for DMA become unnecessary or simple.
When the data processing section 103 stores the partial address conversion rules in the address conversion rule storage section 104, if the identification numbers have been set for areas sd1, sd2, . . . , sdN in
In this case, the address conversion rule readout section 130 in the address conversion section 105 is set to refer to the partial address conversion rules in the address conversion rule table 120 sequentially from identification number 1 when the DMA operation starts. In addition, the address conversion rule readout section 130 obtains from the address conversion done-or-not determination section 131 pre-conversion address ma1 and area size sz1 corresponding to identification number 1 currently under processing. Then, when pre-conversion address a0 input from the terminal 133 reaches or exceeds address ma1+sz1, it is judged to be off the range of the partial address conversion rule of identification number 1, and the referencing operation is changed to refer to the subsequent partial address conversion rules sequentially from identification number 2. In this case, the address conversion rule readout section 130 obtains from the address conversion done-or-not determination section 131 pre-conversion address ma2 and area size sz2 corresponding to identification number 2 currently under processing. Then, when the range of the partial address conversion rule of identification number 2 is exceeded, the address conversion rule readout section 130 changes the referencing operation to refer to the subsequent partial address conversion rules sequentially from identification number 3; in a way like that, the reference start identification number is changed one after another. This makes it easy for the address conversion section 105 to refer to the address conversion rule table 120, and the time needed for address conversion can be reduced. This way can be implemented by so simple hardware that cost of the device is not affected. Incidentally, the address conversion rule readout section 130 may also be configured to read the whole address conversion rule table 120 stored in the address conversion rule storage section 104. In this case, the address conversion rule table 120 is held in a memory (not shown in the drawings) in the address conversion done-or-not determination section 131.
In the configuration shown in
As described above, according to the first embodiment, even if the number of areas to be copied becomes large, a load of managing the transfer source addresses, transfer destination addresses, and transfer amounts for the areas to be copied can be reduced. If descriptors are used, the writing amount of the descriptors set by the CPU 102 can be reduced, and a load of setting descriptors on the CPU 102 can be reduced.
In the CCTV system 500 shown in
The information processing device 200 includes a first data storage section 201A, a second data storage section 201B, a first processing section 240A, and a second processing section 240B.
The first processing section 240A includes a CPU 102, a first data bus 207A, and a first interface section (hereafter referred to as a first I/F section) 208A. The first processing section 240A uses the first data storage section 201A as a temporary storage device for programs and data.
The second processing section 240B includes a DMA section 106, a data processing section 103, an address conversion section 105, an address conversion rule storage section 104, a second data bus 207B, and a second interface section (hereafter referred to as a second I/F section) 208B. The second processing section 240B uses the second data storage section 201B as a temporary storage device for data processing.
Here, the first processing section 240A is a device such as an SoC (System-on-a-Chip) equipped with the CPU 102, and the second processing section 240B can be implemented by a custom circuit with an FPGA (Field Programmable Gate Array) or the like.
Among the components of the information processing device 200 shown in
The first data storage section 201A stores data and programs to be used by the CPU 102.
The CPU 102 executes the programs stored in the data storage section 201A to perform reading or writing of the data from or into the data storage section 201A, arithmetic processing, and control processing.
The first I/F section 208A and the second I/F section 208B are interfaces for sending and receiving data between the first processing section 240A and the second processing section 240B. For example, they perform communication according to a standard such as PCI (Peripheral Component Interconnect)—Express and USB (Universal Serial Bus), to transfer data at a high speed between the first processing section 240A and the second processing section 240B.
In order to cause the data processing section 103 to perform part of the processing of the CPU 102 in place of the CPU 102, the DMA section 106 reads data targeted for the processing from the first data storage section 201A, transfers the data from the first processing section 240A to the second processing section 240B through the first I/F section 208A and the second I/F section 208B, and stores the transferred data in the second data storage section 201B.
In addition, according to a start instruction from the CPU 102, the DMA section 106 specifies addresses to read data stored in the second data storage section 201B and copies the data into the first data storage section 201A. Here, the addresses specified by the DMA section 106 are converted by the address conversion section 105 as needed.
The data processing section 103 executes part of the processing of the CPU 102 in place of the CPU 102 and reduces a load on the CPU 102. It reads target data stored in the second data storage section 201B and performs processing in place of the CPU 102. The data processed by the data processing section 103 are transferred from the second data storage section 201B to the first data storage section 201A by the DMA section 106. Then, the CPU 102 uses the processed data that have been processed by the data processing section 103 and stored in the first data storage section 201A to perform the subsequent processing continuously.
The address conversion rule storage section 104 holds an address conversion rule set by the data processing section 103, in accordance with the result of processing by the data processing section 103.
The address conversion section 105 performs address conversion in accordance with the address conversion rule stored in the address conversion rule storage section 104.
The operation of the components of the information processing device 200 will be described in detail below.
In order to cause the data processing section 103 to execute part of the processing, the CPU 102 sets the DMA section 106 to copy target data to be processed in the first data storage section 201A into the second data storage section 201B. For example, the CPU 102 sets it so that areas od1, od2, od3, . . . , odN storing the target data to be processed in the first data storage section 201A, as shown in
Transfer by the DMA section 106 is performed by one-off DMA as shown in
Setting of the DMA section 106 by the CPU 102 is performed through the first I/F section 208A and the second I/F section 208B, by writing registers in the DMA section 106. When the CPU 102 has finished the setting of the DMA section 106, it instructs the DMA section 106 to start copying. These setting and instruction from the CPU 102 to the DMA section 106 are made through the first I/F section 208A and the second I/F section 208B, by setting registers in the DMA section 106. At this time, address conversion by the address conversion section 105 is not performed, and register write access from the CPU 102 to the DMA section 106 is allowed to pass directly.
According to the instruction from the CPU 102, the DMA section 106 copies target data to be processed from the first data storage section 201A to the second data storage section 201B. When the DMA section 106 has finished copying data, it notifies the CPU 102 of the completion of data copying through the second I/F section 208B and the first I/F section 208A. Receiving the notification of the completion of the data copying, the CPU 102 issues a processing start instruction to the data processing section 103. The processing start instruction is made by writing registers in the data processing section 103 through the first I/F section 208A and the second I/F section 208B.
According to the data processing start instruction from the CPU 102, the data processing section 103 starts processing data. Described below as an example of data processing is a case in which target data to be processed are RTP (Real-time Transport Protocol) packets that are sent from a monitoring camera and transmitted through a network, the RTP headers are eliminated from the RTP packets, and a video stream is extracted, as in the first embodiment.
Each of areas od1#, od2#, od3#, . . . , odN# shown in
When the processing of the data processing section 103 proceeds and the processing of a predetermined amount of data or the processing of a predetermined group of data items is finished, the data processing section 103 generates an address conversion rule and storages the generated address conversion rule in the address conversion rule storage section 104, in the same way as the first embodiment. The address conversion rule is generated so that address conversion as shown in
The address conversion rule stored in the address conversion rule storage section 104 is formed in a table format as shown in
In addition, as in the first embodiment, each time the processing of a predetermined amount data or the processing of a predetermined group of data items (a predetermined number of data items) is finished, the data processing section 103 stores a partial address conversion rule in the address conversion rule storage section 104. Furthermore, address conversion rules which become unnecessary with the DMA section 106 copying data, which will be described later, are eliminated (deleted) from the address conversion rule storage section 104. By setting the address conversion rule as described above, the address conversion rule storage section 104 can be kept from becoming unnecessarily large.
The address conversion section 105 performs address conversion in accordance with the address conversion rule set in the address conversion rule storage section 104, as in the first embodiment. Accordingly, address conversion is performed only when the address conversion rule is present.
When the data processing section 103 has finished storing the address conversion rule in the address conversion rule storage section 104, it notifies the CPU 102 of the completion of data processing and also notifies the location (address conversion area) where the processed data are stored, as in the first embodiment.
Receiving the notification of completion of data processing from the data processing section 103, the CPU 102 performs settings for copying the data of the processing result to the DMA section 106. In the example shown in
According to the copy start instruction from the CPU 102, the DMA section 106 copies data as in the first embodiment. However, the data transfer source is the second data storage section 201B, and the transfer destination is the first data storage section 201A.
This process makes a state in which the data in areas sd1 to sdN storing the video stream are stored continuously in order from address da1 specified by the CPU 102 in the first data storage section 201A. In this process, the CPU 102 has just specified transfer source address ma1, transfer destination address da1, and transfer size szA, and does not need to manage the transfer source address, transfer destination address, and transfer amount for each of areas sd1 to sdN storing the video stream. Consequently, the descriptor settings for DMA becomes unnecessary or simple. Since data copying from the second data storage section 201B to the first data storage section 201A becomes one-off DMA, data transfer through the first I/F section 208A and the second I/F section 208B becomes simple.
As in the first embodiment, when the data processing section 103 stores the partial address conversion rules in the address conversion rule storage section 104, if the identification numbers have been set for areas sd1, sd2, . . . , sdN shown in
In the configuration shown in
In the first and second embodiments described above, an unused address area of the data storage section 101 or the second data storage section 201B is used as the address conversion area, in other words, an unused address is used as a conversion address, but the embodiments are not limited to this example. For example, an imaginary address area which is not presence in the data storage section 101 or the second data storage section 201B can be used as the address conversion area, in other words, an imaginary address can be used as the conversion address.
100, 200 information processing device, 101 data storage section, 201A first data storage section, 201B second data storage section, 102 CPU, 103 data processing section, 104 address conversion rule storage section, 105 address conversion section, 106 DMA section, 107 data bus, 207A first data bus, 207B second data bus, 208A first I/F section, 208B second I/F section, 240A first processing section, 240B second processing section, 500 CCTV system, 501 monitoring camera, 502 monitoring recorder, 503 network.
Number | Date | Country | Kind |
---|---|---|---|
2014-045048 | Mar 2014 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2014/082070 | 12/4/2014 | WO | 00 |