WO2006013839A1 - アレイ型演算装置 - Google Patents

アレイ型演算装置 Download PDF

Info

Publication number
WO2006013839A1
WO2006013839A1 PCT/JP2005/014077 JP2005014077W WO2006013839A1 WO 2006013839 A1 WO2006013839 A1 WO 2006013839A1 JP 2005014077 W JP2005014077 W JP 2005014077W WO 2006013839 A1 WO2006013839 A1 WO 2006013839A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
control information
array
processor
data
Prior art date
Application number
PCT/JP2005/014077
Other languages
English (en)
French (fr)
Inventor
Hiroyuki Morishita
Takeshi Tanaka
Masaki Maeda
Yorihiko Wakayama
Original Assignee
Matsushita Electric Industrial Co., Ltd.
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 Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Priority to US11/572,701 priority Critical patent/US7606996B2/en
Priority to JP2006531472A priority patent/JP4213750B2/ja
Publication of WO2006013839A1 publication Critical patent/WO2006013839A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/80Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
    • G06F15/8007Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors single instruction multiple data [SIMD] multiprocessors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3842Speculative instruction execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline or look ahead using a plurality of independent parallel functional units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/43Hardware specially adapted for motion estimation or compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode

Definitions

  • the present invention relates to a signal processing LSI for use in video and audio equipment using a digital signal such as a DVD recorder or a digital TV, and more particularly to an image signal processing LSI.
  • MPEG Moving Picture Experts Group
  • MPEG coding L SI has been installed in various devices due to recent various types of digital AV devices, for example, DVD recorders and monofilar devices that are stationary devices.
  • digital AV devices for example, DVD recorders and monofilar devices that are stationary devices.
  • camcorders an application called MPEG2 encoding runs.
  • the DVD recorder which is a stationary device, is required to execute an algorithm that guarantees higher image quality than a camcorder, which is a mono device.
  • the MPEG code is briefly described.
  • the motion vector representing how much the subject of the current frame has moved in which direction in the past or future frame! Preserves the brightness and the amount of change in color difference.
  • This process of obtaining a motion vector is called a motion vector search process (see Fig. 1), and this process has a very large processing amount compared to general image processing such as resizing filter and motion compensation. There are features.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 09-0222404
  • the present invention provides a two-dimensional array-type operation that realizes efficient parallel processing by controlling the two-dimensional array-type arithmetic device more flexibly by software and does not increase the area of the hardware.
  • the purpose is to provide a device.
  • an array-type arithmetic unit of the present invention includes a processor array configured by a plurality of ordered processor elements, and an instruction acquisition unit that acquires one instruction per cycle. And operation control information for controlling the operation of the processor element of the first order is created for each cycle, and the first operation is based on the created operation control information and one instruction acquired by the instruction acquisition means.
  • a means for generating instructions for the processor elements of the rank and operation control information for controlling the operation of the processor elements after the next rank are created for controlling the operation of the processor elements of the previous rank for each cycle. Created based on the operation control information, and based on the created operation control information and one instruction acquired by the instruction acquisition means, the processor elements after the next order are processed. And a means for generating an instruction to the client.
  • the array type arithmetic unit according to the present invention has the above-described configuration, so that a plurality of processor elements (Processor elements: ⁇ "P_t ⁇ " and! /, One) are obtained by one instruction. Because different operations can be performed, flexible processing can be performed using multiple PEs.
  • the processor array is composed of a plurality of processor elements connected by signal lines, and the operation result of each processor element is transmitted to the next-order processor element via the signal line every cycle. You can do it.
  • the array-type arithmetic unit can transmit the PE operation result to the subsequent PE.
  • the array type arithmetic unit further includes basic control information generating means for generating basic control information every cycle, and the operation control information for controlling the operation of the first rank processor element is The basic control information may be created based on the basic control information generated by the basic control information generating means.
  • each of the processor elements includes data acquisition means for acquiring a plurality of types of data
  • the operation control information is a specification that specifies a type of data used when each processor element executes an instruction.
  • Each processor element including information may use data acquired in accordance with the designation information in execution. This makes it possible to change the data used when executing each PE, so that more flexible processing can be performed.
  • the operation control information is information that specifies whether or not to execute one instruction acquired by the instruction acquisition means, and is an instruction that the operation control information is to be executed.
  • the processor element may execute the instruction, and if the operation control information is an instruction not to execute, the power supply to the corresponding processor element may be suppressed.
  • the power supply to the PE can be performed without executing the calculation, so that the power consumption can be reduced.
  • the array type arithmetic unit of the present invention is a processor array having a two-dimensional array structure of M rows and XN columns, which has M rows of N processor elements connected by signal lines, The processor array connected so that the calculation result of the mouth sensor element can be transmitted to the processor element in the next row, basic control information generating means for generating basic control information for each cycle, and one for each cycle Based on the basic control information generated by the basic control information generating means, instruction acquisition means for acquiring instructions and operation control information for controlling the operation of the processor element in the first row for each cycle are created. Based on the generated operation control information and one instruction acquired by the instruction acquisition means, a means for generating an instruction for the first line, and a movement of processor elements of 2 to M lines per cycle.
  • the operation control information for controlling the operation is created based on the operation control information created for controlling the operation of the processor element in the previous line, and the created operation control information and one instruction acquired by the instruction acquisition means
  • N means for generating instructions for the processor elements of the 2 to M rows, and the N processor elements arranged in each row of the processor array execute instructions for the row. It is good also as a characteristic. [0017] This allows a plurality of PEs to perform different operations by issuing one instruction to a two-dimensional array type arithmetic unit, so that more flexible processing can be performed. It ’s a little tricky.
  • FIG. 1 is a diagram showing a search method for motion vector search processing.
  • FIG. 2 (a) shows the configuration of the reference image 100
  • FIG. 2 (b) shows the configuration of the target image 200.
  • FIG. 3 is a diagram showing an example of a conventional array processor.
  • FIG. 4 is a diagram showing a configuration of a peripheral portion related to the array type arithmetic unit 1000.
  • FIG. 5 is a diagram showing details of the configuration of the array type arithmetic unit 1000.
  • FIG. 6 is a diagram showing a method of supplying a reference image 100 to a PE array 1100.
  • FIG. 7 is a diagram showing a method for supplying control information (tokens) to an instruction generation unit (3100, etc.).
  • FIG. 8 is a diagram showing a transition of contents stored in a correlation storage unit 2400 of each PE.
  • FIG. 9 is a flowchart showing processing for obtaining a correlation between a target image 200 and a reference image 100 in the array type arithmetic unit 1000 according to the first embodiment.
  • FIG. 10 is a flowchart showing processing of “exec_array” in the first exemplary embodiment.
  • FIG. 11 is a flowchart showing processing of a PE according to the first embodiment.
  • FIG. 12 (a) is a flowchart showing processing of a control information generation unit of Embodiment 1.
  • FIG. 12B is a flowchart showing processing of the instruction generation unit of the first embodiment.
  • FIG. 13 is a diagram showing the token and PE operations of Embodiment 1 on a time axis.
  • FIG. 14 is a diagram showing an example of a program according to the first embodiment.
  • FIG. 15 is a diagram showing the token and PE operations of Embodiment 2 on a time axis.
  • FIG. 16 is a diagram showing an example of a program according to the second embodiment.
  • FIG. 17 is a diagram showing details of the configuration of the array type arithmetic unit 1000 according to the third embodiment.
  • FIG. 18 is a flowchart showing processing for obtaining a correlation between a target image 200 and a reference image 100 in the array type arithmetic apparatus 1000 according to the third embodiment.
  • FIG. 19 is a flowchart showing processing of “exec_array” in the third embodiment.
  • FIG. 20 is a flowchart showing processing of a PE according to the third embodiment.
  • FIG. 21 (a) is a flowchart showing the processing of the control information generating unit 3000 of the third embodiment
  • FIG. 21 (b) shows the processing of the instruction generating unit (3100, etc.) of the third embodiment. It is a flow chart.
  • FIG. 22 is a diagram showing the token and PE operations of the third embodiment on the time axis.
  • FIG. 23 is a diagram showing an example of a program according to the third embodiment.
  • FIG. 24 is a diagram showing an example of a target image of Embodiment 4 and a reference image supplied to the PE array.
  • ⁇ 25 A flowchart showing a process for obtaining the correlation between the target image 200 and the reference image 100 in the array type arithmetic unit 1000 according to the fourth embodiment.
  • FIG. 26 is a flowchart showing processing of “exec_array” in the fourth embodiment.
  • FIG. 27 is a flowchart showing processing of a PE according to the fourth embodiment.
  • FIG. 28 (a) is a flowchart showing the processing of the control information generating unit 3000 of the fourth embodiment
  • FIG. 28 (b) shows the processing of the instruction generating unit (3100, etc.) of the fourth embodiment. It is a flow chart.
  • FIG. 29 is a diagram showing the token and PE operations of Embodiment 4 on the time axis.
  • FIG. 30 is a diagram showing an example of a program according to the fourth embodiment.
  • the array type arithmetic unit according to the present invention is a two-dimensional array type arithmetic unit, which reduces the number of instruction memories and instruction decoders, and controls software instructions for controlling arithmetic units arranged in an array type. By suppressing the length, the expansion of the scale of instruction memory and instruction decoder is to be suppressed.
  • SIMD Single Instruction Multi Data
  • !! methods are widely known. This is because software is issued by issuing a common instruction to the computing unit in the developed direction. This is to reduce the cost required for control. This method is particularly suitable for pixel processing where each PE performs the same operation.
  • the number of instructions is significantly reduced compared to issuing independent operation instructions to each PE, but the arrays used for the motion vector search process and the image recognition process described above are It is a large-scale one, and even the instructions for several rows (or columns) have a large effect on the instruction memory size and instruction decoder. Basically, as many instruction memories and instruction decoders as there are rows are required.
  • the instruction memory and the instruction decoder are each provided, and the instruction memory size is reduced by further reducing the instruction length, resulting in the LSI. Trying to suppress the increase in area.
  • the two-dimensional array type arithmetic device of the present embodiment performs motion vector search processing in MPEG encoding processing.
  • FIG. 1 is a diagram showing a search method for motion vector search processing.
  • the target screen 20 is a current encoding target frame, and the target image 200 is a so-called macroblock.
  • the reference screen 10 is a past or future frame for calculating a motion vector
  • the reference image 100 is a range in which a similar portion of the target image 200 is searched.
  • the portion having the highest similarity to the macroblock is searched by shifting one pixel at a time from the upper left to the lower right (reference image 100-1, reference image 100-2).
  • FIG. 2 is a diagram illustrating the configuration of the reference image 100 and the target image 200.
  • Fig. 2 (a) shows the reference image 100, where the upper left pixel is "R (0,0)" and the pixel position is expressed in the xy coordinate system.
  • FIG. 2B shows the target image 200, and the upper left pixel is expressed as “T (0,0)” as in FIG. 2A.
  • R (x, y)” or “Rxy” represents a pixel of the reference image 100
  • T (x, y)” or “Txy” represents a pixel of the target image 200.
  • the mouth represents the pixel of the reference image 100
  • the circle represents the pixel of the target image 200.
  • FIG. 1 the configuration of a two-dimensional array type arithmetic unit 1000 that is useful in the present invention will be described with reference to FIGS. 4 and 5.
  • FIG. 1 the configuration of a two-dimensional array type arithmetic unit 1000 that is useful in the present invention will be described with reference to FIGS. 4 and 5.
  • FIG. 1 the configuration of a two-dimensional array type arithmetic unit 1000 that is useful in the present invention will be described with reference to FIGS. 4 and 5.
  • FIG. 4 is a diagram showing a configuration of a peripheral part related to the array type arithmetic unit 1000.
  • FIG. 4 in addition to the array type arithmetic unit 1000, a program counter 1001, an instruction memory 1002, an instruction issuing unit 1003, a program storage unit 1004, and a memory cache 1005 are shown.
  • Each of these functional units and each PE, etc. shall be connected by the number of data signal lines corresponding to the number of bits to be transmitted.
  • the program storage unit 1004 stores a software program that also has instruction stream power indicating the operation of the arithmetic unit, and the program counter 1001 indicates an instruction to be executed next, stored in the program storage unit 1004.
  • the instruction pointed to by the program counter 1001 is fetched into the instruction memory 1002, and the instruction issuing unit 1003 decodes the instruction in the instruction memory 1002, and issues a control signal that is a common instruction to the entire array type arithmetic unit 1000.
  • the memory cache 1005 stores data used by the array type arithmetic device 1000.
  • This array-type arithmetic unit 1000 includes a PE array 1100 composed of 30 PEs (PE00, etc.) arranged in a two-dimensional array of 5 rows x 6 columns, a control information generation unit 3000, and an instruction generation unit (3100-3500). Composed.
  • Each PE and each generation unit are connected by a bus so that signals can be transmitted.
  • Each generation unit shall be composed of logic circuits.
  • the array type arithmetic unit 1000 has two features. The first is to control 30 PEs with one instruction (InstO) input from the external instruction issuing unit 1 003, and the control information generator 3000 described below and instructions to each line (Inst00 to Inst40) ) For generating an instruction generation unit (3100, etc.). The other is that each PE is connected in the column direction not only in the row direction, but is connected by the bus 1009 so that data can be transmitted and received.
  • FIG. 5 is a diagram showing details of the configuration of the array type arithmetic unit 1000. For convenience of explanation, only some PEs are shown here.
  • the array type arithmetic unit 1000 includes a plurality of PE 2000s, a control information generation unit 3000, a plurality of instruction generation units (3100, etc.), and an addition unit 1200.
  • a cycle is a fixed clock cycle that is a reference for processing (the same applies hereinafter).
  • the control information generation unit 3000 includes a counter storage unit 3010, which stores a counter. Control information is generated according to the value of this counter.
  • the counter storage unit 3010 also stores the latest generated control information.
  • control information generated here is the basis for controlling the operation of each PE.
  • the instruction generation unit 3100 receives the instruction information issued from the instruction issue unit 1003 and the control information issued from the control information generation unit 3000, and the PE of the PE array 1100 for one row (PE 00 to PE05). Generates an instruction to control the arithmetic processing.
  • control information generation unit 3000 When generating a command here, it creates control information for itself based on the control information received from the control information generation unit 3000, and creates a PE command based on the created control information. Or create it before sending out the control information. In other words, the received control information is different from the control information sent out.
  • the received control information is the same as the control information to be sent out.
  • the control information is used as it is, but in the fourth embodiment described later, the received control information is processed and sent to the next command generation unit.
  • the command generation unit 3100 includes a control information storage unit 3110 and stores the control information received from the control information generation unit 3000. Before storing new control information, the control information stored here is transmitted to the instruction generation unit 3200, and the instruction generation unit 3200 generates an instruction based on the received control information. .
  • the instruction generation unit (3200, 3300, 3400, 3500) has the same function as the instruction generation unit 3100, but the previous instruction generation unit is not the control information issued by the control information generation unit 3000. The difference is that the control information received from is used to generate instructions to control the arithmetic processing of the arithmetic units (PE10 to PE15, etc.) in each row.
  • the instruction generation unit (3200 to 3500) stores control information in each control information storage unit (3210, 3310, etc.), and sends control information to be sequentially stored.
  • PE00 (2000) includes a calculation unit 2100, a target data storage unit 2200, a reference data storage unit 2300, and a correlation storage unit 2400.
  • the target data storage unit 2200 stores 1-pixel data of the target image 200. Specifically, each of 30 PEs (see Fig. 4) stores data of 30 pixels (see Fig. 2 (b)) of the target image 200.
  • the target data storage unit 2200 of PE00 stores data of the pixel “T (0,0)”
  • the target data storage unit 2200 of PE10 stores data of the pixel “ ⁇ (1,0)”.
  • the reference data storage unit 2300 performs fe data for one pixel (see FIG. 2A) of the reference image 100. .
  • the target data storage unit 2200 stores different pixel data for each PE, and the force reference data storage unit 2300 is different for each PE column. That is, the reference data storage unit 2300 of PEs in the same column stores the same data.
  • the reference data storage unit 2300 reads and stores reference data stored in the memory cache 1005.
  • the reference data storage unit 2300 of PEOO and PE10 stores the data of pixel “R00”.
  • the reference data storage unit 2300 of PE01 and PE11 stores the data of pixel “R10”. I remember.
  • the computing unit 2100 calculates the strength of the correlation between the target data stored in the target data storage unit 2200 and the reference data stored in the reference data storage unit 2300, and the correlation storage unit 2400 I remember this.
  • the strength of the correlation is judged by using SAD (Sum of Absolute Difference).
  • the correlation storage unit 2400 stores the received data passed from the PE of the previous row as much as the result data of the computation unit 2100 of the own PE. It also has the function of sending stored data to the PE in the next row (see bus 1009). Details of this will be described later with reference to FIG.
  • Adder 1200 outputs the value obtained by adding the outputs of the PE power of the last row as well as the power of array type arithmetic unit 1000.
  • This value is a correlation value between the target image 200 and the reference image 100. The correlation is the strongest, that is, the sum of the absolute differences is the smallest, and the positional force moving image vector of the reference image is obtained.
  • FIG. 6 is a diagram showing a method of supplying the reference image 100 to the eyelid array 1100.
  • the cocoon array 1100 is obtained by arranging the target image 200 of FIG. 2B on the PE array of the array type arithmetic unit 1000. Specifically, it is stored in the target data storage unit 2200 (see FIG. 5).
  • the target image 200 is held on the PE array of the array type arithmetic unit 1000, and the reference image 100 is supplied for each line of 6 pixels across.
  • the first line (R00 to R50) of the reference image 100 is supplied to the cycle “Cyc 0” 1 ⁇ 1
  • the same reference data is supplied to the PE array 1100 in units of columns. Specifically, it is stored in the reference data storage unit 2300 (see FIGS. 5 and 7).
  • FIG. 7 is a diagram showing a method for supplying control information to an instruction generation unit (3100, etc.).
  • control information is supplied from the array-type arithmetic unit 1000 in a time series from “Cycle 0” to “Cycle 3”, and the state of the operation is described.
  • control information generated by the control information generation unit 3000 is represented as “tokenO”, “tokenl”, etc.
  • the PE and instruction generation unit (3100, etc.) represent each storage unit and its contents.
  • a dotted line arrow indicates transmission of the contents of the storage unit.
  • control information “tokenO” generated by the control information generation unit 3000 is stored in the control information storage unit 3110 of the instruction generation unit 3100.
  • the control information is generated by the control information generation unit 3000 in the previous cycle, and the power stored in the counter storage unit 3010 is “tokenl”. Is described.
  • PE00 and PE01 perform an operation, and store the result in the correlation storage unit 2400. .
  • control information “tokenl” generated by the control information generation unit 3000 is stored in the control information storage unit 3110 of the instruction generation unit 3100, and the control information storage unit 3120 of the instruction generation unit 3200. Stores the control information “tokenO” stored in the control information storage unit 3110 of the instruction generation unit 3100.
  • the instruction generating unit (3100, etc.) Based on the control information “tokenO” and the like and the instruction “InstO” issued by the instruction issuing unit 1003, the instruction generating unit (3100, etc.) generates an instruction to be sent to each row of the PE array.
  • FIG. 8 is a diagram showing transition of contents stored in the correlation storage unit 2400 of each PE.
  • the contents stored in the correlation storage unit 2400 of each PE are sent to the correlation storage unit 2400 of the PE in the next row in time series, and the state of the operation is described! /
  • the contents of the correlation storage unit 2400 include two types of data. One is the computation result data 2410 of the computation unit 2100 of the own PE, and the other is the reception data 2420 sent from the PE in the previous row.
  • the sum of the computation result data 2410 and the received data 2420 in which the PE of the last row, here PE20, and the force is also sent is a correlation value 2401 of one row of the target image and the reference image.
  • the sum of the correlation values sent from the PE column in the last row is the correlation value 2402 of the reference image shifted by 1 pixel from the target image.
  • the correlation values for one row of the reference image 100 and the target image 200 that are sequentially shifted by one pixel in the Y direction are output.
  • the correlation value between the target screen and the reference screen can be obtained by summing up the output of each row.
  • the functional unit that executes these processes is composed of a combinational sequential circuit and executes the following processes (the same applies to FIG. 18 and the like).
  • FIG. 9 is a flowchart showing processing for obtaining the correlation between the target image 200 and the reference image 100 by the array type arithmetic unit 1000.
  • the reference image 100 one macroblock, that is, a position having the highest correlation with the target image 200 is obtained by shifting the reference image 100 by one pixel.
  • each target data is read from the target image 200 to the target data storage unit 2200 of each PE (step S100, see FIG. 6).
  • a value is set in the counter storage unit 3010 of the control information generation unit 3000 (step S110).
  • the value set here is the number of rows of the reference image 100. For example, “8” is set.
  • the leading address for one row supplied to the array type arithmetic unit 1000 is loaded into the register 0 (step S120).
  • the load destination is not limited to register 0, but depends on the system. For example, when supplying “R00”, “R10” to “R50” (see FIG. 6), the address of the pixel data “R00” stored in the memory cache 10 05 is loaded. Remember! If not, read the memory cache.
  • step S130 a process for taking a correlation with the target image 200 is executed (step S130). This process is executed by the instruction issuing unit 1003 issuing “exec_array” as an instruction.
  • the correlation between one row of the reference image 100 and all the rows of the target image 200 is obtained.
  • the reference data supplied in the 0th cycle 101 of FIG. 6 and the target image 200 on the PE array 1100 are calculated.
  • Step S 150 If the calculation is not performed up to the last row of the reference image 100 (Step S 150: NO), the address of the next row, for example, the address of the pixel data of “R01” is set in the register 0 and the process is repeated (Step S 120 forces are also step S 140).
  • the calculation up to the last row of the reference image 100 means that the calculation of the target image T (x, 0) and the reference image R (x, 8) is completed.
  • “Exec_array” is processed 13 times, the number of lines of the image and the number of lines of the target image.
  • step S150 When the calculation is completed up to the last row of the reference image 100 (step S150: YES), the process moves to the next column and the calculation is performed (step S110 to step S150).
  • Step 120 Load the address of the pixel data of "R10" of "R10” "R20” to “R60” for 6 pixels with the reference image shifted to the right by 1 pixel to register 0 (Step 120) .
  • the process is terminated. This completes the calculation of the target image 200, which is one microblock, and the motion vector is also calculated for the place force with the strongest correlation output in the calculation result output (step S140).
  • FIG. 10 is a flowchart showing the processing of “exec_array”.
  • control information generation unit 3000 generates new control information (token), and generates an instruction generation unit. (3100, etc.) sends the stored control information to the next command generator (step S210).
  • the instruction generator that received the control information receives the exec-array issued from the instruction issuer 1003.
  • the command is generated from the command and the control information stored in the control information storage unit (3110, etc.), and transmitted to the PE of the corresponding row (step S220).
  • Each PE that has received the generated instruction performs arithmetic processing (step S240).
  • control information generation unit 3000 in step S210 and the instruction generation unit (such as 3100) in step 230 will be described later with reference to FIG.
  • FIG. 11 is a flowchart showing the processing of the PE.
  • step S300 execution
  • the memory cache 1005 is referred to and the reference data storage of each PE is performed by referring to the destination indicated by register 0.
  • the reference data corresponding to the part 2300 is read (step S305). Specifically, data is read from the memory corresponding to each column of the PE array in which the instruction issuing unit 1003 has written the corresponding data at the time of instruction decoding.
  • the calculation unit 2100 obtains an absolute difference between the target data in the target data storage unit 2200 and the reference data in the reference data storage unit 2300 (step S310), and the calculation result is calculated in the correlation storage unit 2400.
  • the result data 2410 is stored (see step S320, FIG. 8).
  • the operation result data and the received data 2420 are added and sent to the PE of the next row, and the PE of the next row that has received the data stores it in the received data 2420 in its own PE.
  • step S300 cancel
  • FIG. 12 (a) is a flowchart showing the processing of the control information generation unit.
  • an “Invalid” token is generated (Step S41O).
  • step S410: ⁇ 0) If the value of the counter “Counter” is not “0” (step S410: ⁇ 0), a “Va lid” token is generated (step S411).
  • the generated token is sent to the instruction generation unit 3100 and stored in the control information storage unit 3110.
  • Each of the instruction generation units (such as 3100) performs the same processing as described below.
  • FIG. 12 (b) is a flowchart showing the processing of the instruction generation unit.
  • the token stored in control information storage unit 3110 is transmitted to the next command generation unit (step S450), and the token is received from the previous command generation unit or control information generation unit (step S460). ).
  • Step S470 Valid
  • Step S470: Invalid an instruction to execute the “exec_array” instruction is generated
  • Step S472 If the token is “Valid” (Step S470: Valid), an instruction to execute the “exec_array” instruction is generated (Step S471). If the token is rinvalidj (Step S470: Invalid), the “exec_array” instruction is not executed. A cancel instruction is generated (step S472).
  • the generated operation instruction is sent to each PE, and the token is stored in the control information storage unit 3110.
  • FIG. 13 is a diagram showing the operations of the token and the PE on the time axis.
  • the horizontal axis shows the time axis in cycle units, and shows the operation of the control information generator 3000 and the operations of the first to fifth rows of the PE array 1100! /.
  • is the token that is the basis of the instruction, and here represents the token stored in the counter storage unit 3010 or each control information storage unit (3110, etc.), “val” indicates Valid, “Iv Is It shall represent Invalid. That is, the PE in the “val” row performs the operation, and the PE in the “Iv” row does not perform the operation.
  • the table below shows the calculation results (5200, 5210) and shows the pixels that correlate the target image with the reference image.
  • the data “T 00” “ ⁇ 10” “ ⁇ 20” “ ⁇ 30” “ ⁇ 40” “ ⁇ 50” in the first row of the target image 200 arranged in the first row of the PE array 1100 is supplied to the PE array.
  • the calculation of the absolute value of the difference between the data ⁇ R00 '', ⁇ R10 '', ⁇ R20 '', ⁇ R30 '', ⁇ R40 '' and ⁇ R50 '' in the first row of the reference image 100 is performed. Passed to the computation element in the second row (see Figure 6 and Figure 7).
  • the data ROO to R50 of the first row of the reference image 100 are supplied to the second to fifth rows of the PE array, but no calculation is performed.
  • ”“ R11 ”“ R21 ”“ R31 ”“ R41J “R51” are calculated to obtain the absolute difference, and the result is passed to the PE in the second row through the output bus from the calculation element.
  • the data “ ⁇ 01”, “ ⁇ 11”, “ ⁇ 21”, “ ⁇ 31”, “ ⁇ 41”, “ ⁇ 51”, and the second row of the reference image are placed in the second row of the PE array.
  • FIG. 14 is a diagram illustrating an example of a program.
  • the program instruction list 5300 describes the operation 5302 for each program instruction 5301.
  • an operation according to the value of the control information (token) is shown.
  • ⁇ (1” is described as “ ⁇ & 1”
  • “Valid” is described as “val” (same as in FIG. 16, FIG. 23, and FIG. 30).
  • the token “Invalid” In this case, “exec_array” indicates “nop”, that is, no execution, and “Valid” indicates “exec”, that is, execute.
  • “Ld [addr], r0” 5400 is an instruction to load the address of the reference data into the register 0.
  • “exec_array rOj is an instruction to perform an operation on the previous reference data pointed to by register 0.
  • Embodiment 2 is different from Embodiment 1 in that when the evaluation value of the correlation strength at a certain timing is equal to or greater than a predetermined value, the subsequent calculation is canceled as unnecessary.
  • FIG. 15 is a diagram showing the operations of the token and the PE on the time axis.
  • a canceling method outputs a signal from a circuit that evaluates the value of SAD to an instruction generation unit (3100, etc.) to generate a cancel instruction indicating that the operation is stopped.
  • the unnecessary computation portion 6200 can be stopped and the power consumption can be reduced.
  • FIG. 16 is a diagram showing an example of a program.
  • the program instruction list 5300 and the like can be executed in the same manner as in the first embodiment (see FIG. 14).
  • the present embodiment performs the same calculation as that of the first embodiment, but differs in that the execution speed is increased.
  • Fig. 13 which shows the token and PE operations of the first embodiment on the time axis
  • the calculation of the target image and the first column of the reference image is performed in cycles “Cyc-l" to "Cyc 12".
  • the operation is performed and PE exists.
  • the PE that has not performed this calculation is also allowed to perform the calculation.
  • FIG. 22 is a diagram showing the token and PE operations of the third embodiment on the time axis. As shown in the figure, the calculation with the first column of the reference image is performed in cycles “Cyc-l” to “Cyc 12” as in the first embodiment (see FIG. 13). The operation of is different in that it starts from the cycle “Cyc 8”.
  • Embodiment 1 there are two types of instructions to PE, execution or cancellation, but in this embodiment, “execute with data in the first row” and “execute with data in the second row”. ”And“ Cancel ”can be generated.
  • FIG. 17 is a diagram illustrating details of the configuration of the array type arithmetic unit 1000 according to the third embodiment.
  • Embodiment 1 The difference from the configuration of Embodiment 1 (see FIG. 5) is that two memory caches are used. Of course, it doesn't have to be physically two.
  • Both memory cache 0 (1006) and memory cache 1 (1007) are connected to the reference data storage unit 2300, and each PE can select whether to read data.
  • FIG. 18 is a flowchart showing processing for obtaining the correlation between the target image 200 and the reference image 100 by the array type arithmetic unit 1000. This process differs from the process in the first embodiment (see FIG. 9) in that two counters are set and that two lines of reference image data are used.
  • each target data is read from the target image 200 into the target data storage unit 2200 of each PE (step S 100, see FIG. 6).
  • a value is set in the counter storage unit 3010 of the control information generation unit 3000 (step S501).
  • “CounterO” is set to the number of rows of the reference image 100 “8”, and “Counterl” is set to “0”. To do. In this case, “CounterO” is the active counter. If “Counterl” is set to “8”, “Counterl” becomes the active counter.
  • step S502 the leading addresses of two rows supplied to the array type arithmetic unit 1000 are loaded into the register 0 and the register 1 (step S502).
  • step S130 "exe array” is executed (step S130), and the operation result is output (step S140).
  • step S140 The calculation process is repeated until the last line of the reference image 100 (from step SI 20 to step S 150).
  • FIG. 19 is a flowchart showing the processing of “exec_array”.
  • step S503 This is almost the same as 1 (see Fig. 10).
  • the force PE processing (step S503) is different.
  • FIG. Figure 20 is a flow chart showing PE processing.
  • This processing differs from the processing in Embodiment 1 (see FIG. 11) in that when the reference data is read into the reference data storage unit 2300 of each PE, memory cache 0 or memory cache 1 is read. is there.
  • memory cache 0 or memory cache 1 is read. is there.
  • FIG. 22 from cycle “Cyc 9” to “Cyc 11”, data for two rows of reference images is required, and it is necessary to specify which data to read for each row of the PE array.
  • step S300 execution
  • memory cache 0 1006 pointed to by register 0 or memory cache 1 (1007 pointed to by register 1)
  • step S504 To read the reference image into the reference data storage unit 2300 of each PE.
  • the calculation unit 2100 obtains an absolute difference between the target data in the target data storage unit 2200 and the reference data in the reference data storage unit 2300 (step S310), and stores the calculation result as a correlation.
  • the result is stored in the calculation result data 2410 of the part 2400 (step S320).
  • the operation result data and the received data 2420 are added and sent to the PE of the next row, and the PE of the next row that has received the data is stored in the received data 2420 in its own PE.
  • step S300 cancel
  • FIG. 21 illustrates the processing of the control information generation unit 3000 and the processing of the instruction generation unit (3100, etc.).
  • FIG. 21A is a flowchart showing the processing of the control information generation unit 3000 of the third embodiment.
  • three types of commands are generated with the three types of control information.
  • the control information generation unit 3000 generates tokens as control information using two counters.
  • a token is generated based on the values of the two counters “CounterO” and “Counterl” (step S510).
  • Control information generation section 3000 generates control information indicating the execution of computation for a period of "CounterO"> 0 or "Counterl”> 0.
  • the means for determining the active counter may be a signal from the instruction issuing unit 1003, or when one counter completes counting, it is no longer active and the other is active. Good. The latter method is used here.
  • FIG. 21 (b) is a flowchart showing the processing of the instruction generation unit (3100, etc.).
  • the instruction generation unit (3100, etc.) performs the same processing as in the first embodiment.
  • the token stored in the control information storage unit 3110 is transmitted to the next instruction generation unit (step S550), and the token is received from the previous instruction generation unit or the control information generation unit (step S560). .
  • step S570 Based on the received token (step S570), a command to be executed by the PE is generated.
  • step S571 If the token is "Invalid”, the "exec_array” instruction is not executed and an instruction is generated (step S571). If rValid.selOj is used, the "exec_array” instruction is executed using “data_selO". However, in the case of “Valid, sell”, an instruction for executing the “exec_array” instruction is generated using “data_sell” (step S573).
  • the generated operation instruction is sent to each PE (step S575), and the token is stored in the control information storage unit 3110 (step S580).
  • Figure 22 shows the token and PE operations on the time axis.
  • the PEs in the first and second lines execute the instruction generated by the “Valid, sell” token
  • the PEs in the fourth and fifth lines are “ The instruction generated with the “Valid, selO” token is executed.
  • the PE in the third row is not executed, and the correlation storage unit 2400 of each PE is cleared. Sequentially, PEs are canceled (7100), resulting in delimitation of the reference image sequence.
  • FIG. 23 is a diagram illustrating an example of a program according to the third embodiment.
  • the program instruction list 7300 describes the operation 7302 for each program instruction 7301. It is listed. In addition, an operation according to the value of the control information (token) is shown. For example, in the case of the token “Invalid” 7303, ⁇ 6 (; _ && ”is ⁇ 0”, that is, the execution is not performed. In the case of ⁇ (1 ⁇ 10) 7304, “execute using € ⁇ & _ 3610” “In the case of V alid.sellj 7305, it indicates“ execute using data_sell ”! /.
  • Lofp [addr], rO, rl” 7400 is an instruction to register the address of the reference image row in register 0 and register 1.
  • register 0 is loaded with the address indicated by [addr]
  • register 1 is simultaneously loaded with the address indicated by [addr] + of fset.
  • This offset is a difference value from the address of a certain row data, and may be given in advance or generated at an appropriate time. As an example given in advance, there is an address difference between the last row data of a certain column and the first row data of the next column in the reference image.
  • execution_array r0 rlj 7401 is an instruction to perform an operation using two reference image lines indicated by the register 0 and the register 1".
  • the evaluation is performed using a bow I for a certain period of time, rather than obtaining the correlation with the reference image using all the pixels of the target image 200.
  • This method is effective for reducing the amount of calculation, and is particularly effective for a battery-driven mopile device having a finite power.
  • the correlation is obtained by thinning the target image into a checkered pattern, that is, using every other pixel in a grid pattern.
  • FIG. 24 is a diagram illustrating an example of the target image and the reference image supplied to the PE array according to the fourth embodiment.
  • the target image 8200 and the target image 8210 are arranged on the PE array 1100, that is, stored in the target data storage unit 2200 of the PE.
  • the target image 8200 and the target image 8210 are the same. [0111] Of the two target images (8200, 8210), only the pixel data to be calculated is arranged, and the target image (8201, 8011) is created on the PE array 1100.
  • the reference image 100 creates two reference images (8011, 8021) by combining the odd-numbered and even-numbered reference data for two rows (8010, 8020).
  • one row having 7 pixel power is supplied as one row 8010 having 6 pixels and one row 8020 having 6 pixel power shifted by 1 pixel. This makes it possible to search for two horizontal positions at the same time.
  • Two-stage reference data 8011 is created from the reference data 8010, and two-stage reference data 8021 is created from the reference data 8020, and an odd-numbered reference data 8100 and an even-numbered reference data 8101 are created.
  • the configuration of the array type arithmetic unit 1000 of the present embodiment is the same as that of the third embodiment (see FIG. 17).
  • FIG. 25 is a flowchart showing processing for obtaining the correlation between the target image 200 and the reference image 100 by the array type arithmetic unit 1000.
  • This processing differs from the processing in Embodiment 1 (see FIG. 9) in that the target data to be set in the PE is thinned out, and the two reference data lines are divided into odd and even numbers. The point is to set the memory cache 0 and memory cache 1 separately.
  • Embodiment 3 This is the same as Embodiment 3 in that two lines of reference data are used. However, in Embodiment 3, 2 The power to set the second row to another memory cache while using the first row because there is a period of using the data for the row at the same time.
  • the data in the two memory caches is the same Since it is used for a period, it is different in that it is set at the same time.
  • the data in the memory cache is used alternately.
  • each target data is read from the target image 200 to the target data storage unit 2200 of each PE (step S601).
  • the target images (8201, 8011) in FIG. 24, which are target images obtained by thinning the target image 200 in a pinecone pattern, are set.
  • a value is set in the counter storage unit 3010 of the control information generation unit 3000 (step S110). For example, “8” is set in “Counter”.
  • the addresses of two rows of data supplied to the array type arithmetic unit 1000 are loaded into the register 0 and the register 1 (step S602).
  • the address of reference data 8100 in FIG. 24 is loaded into register 0, and the address of reference data 8101 is loaded into register 1.
  • step S130 “exe array” is executed (step S130), and the calculation result is output (step S140). The calculation process is repeated until the last line of the reference image 100 (from step SI 20 to step S 150).
  • step S160 When the calculation is performed up to the last column of the reference image 100 (step S160), the process is terminated.
  • FIG. 26 is a flowchart showing the processing of “exec_array”.
  • step S603 This is almost the same as 1 (see Fig. 10).
  • the processing of force PE (step S603) is different.
  • FIG. Figure 27 is a flow chart showing PE processing.
  • This process is different from the process in Embodiment 1 (see FIG. 11) in that the reference data storage unit 2300 of each PE reads the reference data from the memory cache 0 and the memory cache 1. It is a point to read alternately.
  • the target data of “T01”, “ ⁇ 20”, “ ⁇ 40” and so on is set in the PE of the first row of the PE array 1100, so refer to “R0y”, “R2y”, and “R4y”
  • the target data from “T11” “ ⁇ 31” “ ⁇ 51” is set in the PE of the second row of PE array 1100. This is because it is necessary to perform operations with reference data “Rly”, “R3y”, and “R5y”.
  • step S300 execution
  • the memory cache 0 (1006) pointed to by register 0 or the memory cache 1 (1007 pointed to by register 1)
  • the reference data is read into the reference data storage unit 2300 of each PE (step S604).
  • the calculation unit 2100 obtains an absolute difference between the target data in the target data storage unit 2200 and the reference data in the reference data storage unit 2300 (step S310), and the calculation result is calculated in the correlation storage unit 2400.
  • the result data 2410 is stored (step S320). After that, the operation result data and the received data 2420 are added and sent to the PE of the next row, and the PE of the next row that has received the data stores it in the received data 2420 in its own PE.
  • step S300 cancel
  • FIG. 28 illustrates the processing of the control information generation unit 3000 and the processing of the instruction generation unit (3100, etc.).
  • FIG. 28 (a) is a flowchart showing processing of the control information generation unit 3000 of the fourth embodiment.
  • a token is generated based on the value of the counter “Counter” (step S610).
  • the counter value is decremented by 1 (step S620).
  • FIG. 28 (b) is a flowchart showing the processing of the instruction generation unit (3100, etc.).
  • the instruction generation unit (3100, etc.) performs the same processing as in the first embodiment.
  • the token stored in the control information storage unit 3110 is transmitted to the next instruction generation unit (step S650), and the token is received from the previous instruction generation unit or the control information generation unit (step S660). ).
  • step S670 If the token is “Invalid” (step S670), do not execute the “exec_array” instruction! Generate an instruction (step S671), and if rvalid, sel0j, execute the “exec_array” instruction using “data_sel0” (Step S672), and in the case of “Valid, sell”, an instruction to execute the “e X ec_array” instruction using “data_sell” is generated (step S673).
  • the generated operation instruction is sent to each PE (step S685), and the token is stored in the control information storage unit 3110 (step S690).
  • Figure 29 shows the token and PE operations on the time axis.
  • the valid token issued by the control information generator 3000 is generated based on either “Valid, selO” or “Valid, sell” for the PE of each line of the force PE array that is “Valid, selO”.
  • the ordered command will be passed.
  • the token in the first line of the PE array is “Valid, selO”.
  • the token on the second line is “Valid, sel 1” obtained by inverting the token on the first line, and the token on the first line is “Valid, selO”.
  • 1st line PE, 3rd line PE and 5th line PE were generated with "Valid, selO” tokens, 2nd line PE and 4th line PEs with "Valid, sell” tokens. Execute the instruction.
  • FIG. 30 is a diagram illustrating an example of a program according to the fourth embodiment.
  • the program instruction list 8600 describes an operation 8602 for each program instruction 8601. In addition, an operation according to the value of the control information (token) is shown.
  • "ld [addr], rO, rl" 8700 is an instruction to load the address of the next reference image into register 0 and register 1. Specifically, register 0 is loaded with the address indicated by [addr], and register 1 is simultaneously loaded with the address indicated by [addr] + offset. For example, when the reference data 8100 and the reference data 8101 in FIG. 24 are continuously present in the memory, [addr] is the address of the reference data 8100, and offset is the length of the reference data 8100.
  • “Exec_array rOrl” 8701 is an instruction to perform an operation using the previous reference data pointed to by register 0 or register 1.
  • Exec_array rO rl 8701 and “exec_array rO rl” 8702 have the same instruction, but which register is used depends on the token.
  • the array type arithmetic unit according to the present invention has been described based on the embodiment.
  • the execution device can be partially modified, and the present invention is not limited to the above-described embodiment. Of course. That is,
  • each PE in the PE array is adjacent in the row direction and is operated by providing an instruction generation unit for each row, but is adjacent to each other including the column direction and the diagonal only in the row direction. Connect each PE and set up an instruction generator.
  • an instruction generated based on a token can be sent to any PE in the PE array.
  • the data input destination used by each PE can be dynamically changed by register settings and tokens, and PEs that execute instructions can be determined, that is, the scope of application can be determined. Execution becomes possible.
  • the PE array is realized by hardware, but may be realized by using dynamically reconfigurable hardware.
  • the dynamically reconfigurable hardware means that the hardware logical structure can be dynamically changed by giving configuration information to the programmable wiring that connects each logic of the hardware. .
  • the reference data is converted by inverting the token.
  • information indicating whether the conversion circuit is in an even position or an odd position may be fixed. Snow That is, the register to be read is fixed for each row of the PE array.
  • the array-type arithmetic device that is useful in the present invention can realize flexible and high-performance processing with a simple device, and is particularly useful as an arithmetic unit of an image processing LSI.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Image Processing (AREA)
  • Multi Processors (AREA)

Abstract

 アレイ型演算装置は、順に配置された複数のプロセッサエレメントで構成されたプロセッサアレイを備え、1サイクル毎に、1個の命令を発行し、1サイクル毎に、最初のプロセッサエレメントの動作を制御する為の動作制御情報を作成し、作成した動作制御情報と1個の命令とに基づき、最初のプロセッサエレメントに対する命令を生成し、他のプロセッサエレメントの動作を制御する為の動作制御情報を、1つ前のプロセッサエレメントの動作を制御する為に作成した動作制御情報を基に作成し、作成した動作制御情報と前記命令取得手段で取得した1個の命令とに基づき、前記プロセッサエレメントに対する命令を生成する。

Description

明 細 書
アレイ型演算装置
技術分野
[0001] 本発明は DVDレコーダやデジタル TV等、デジタル信号を用いた映像、音響機器 に用いる信号処理 LSIに関するものであり、特に、画像信号処理 LSIに関する。 背景技術
[0002] 近年、地上波デジタル放送などに代表されるように、動画像のデジタル化が進んで いる。
それに伴い動画像の圧縮化の技術が開発され、 MPEG (Moving Picture Experts Group)符号ィ匕は、画像の中の動く部分だけを検出して保存することにより高効率圧 縮を実現している。
[0003] さらに、近年のデジタル AV機器等の多様ィ匕により、様々な機器に MPEG符号化 L SIが搭載されるに至っており、例えば、据え置き機器である DVDレコーダとモノくィル 機器であるカムコーダとでは、 MPEG2エンコードというアプリケーションが動作する。 この場合、同じ MPEG2エンコーダというアプリケーションであっても、据え置き機器 である DVDレコーダでは、モノくィル機器であるカムコーダに比べ、より高画質を保障 するアルゴリズムの実行が要求される。
[0004] この要求に対応するためには、共通のハードウェア上で、ソフトウェアにより用途に 応じた柔軟な処理を実現することが望ま ヽ。
ここで、 MPEG符号ィ匕について簡単に説明すると、この方式では、現フレームの被 写体が過去又は未来のフレームでどの方向にどの程度動!、たかを表す動きベクトル と、動きベクトルだけでは表せな力つた輝度と色差の変化量とを保存して 、る。
[0005] この動きベクトルを求める処理を動きベクトル探索処理(図 1参照)といい、この処理 は、一般的なリサイズフィルタや動き補償等の画像処理に比べて処理量が非常に大 きくなるという特徴がある。
というのは、通常、例えば 16 X 16ピクセルのマクロブロックと呼ばれる単位(図 1 :対 象画像 200)で、そのブロックが過去又は未来のフレーム(図 1 :参照画像 100)のど こに移動したのかを 1ピクセルずつずらしながら検索し、最も類似度が高い部分を見 つけ、動きベクトルを求める力もである。このマクロブロックは、例えば、 720 X 480ド ットのフレームの場合 1350個となり、そのすべてについて、検索がなされる。
[0006] 従って、 MPEG符号ィ匕においては、動きベクトル探索処理の性能が重要になる。
この動きベクトル探索処理は、同様な処理の繰り返しであることから、複数の演算器 を 1次元方向又は 2次元方向に展開した演算装置を使用して処理性能を向上させる 技術が開発されている。
現在、一般的な画像処理では 1次元方向に展開した演算装置が使用されているが 、これは、並列使用できる演算器の個数が少なぐ動作周波数の低減、すなわち電 圧の低下が充分には実現できない場合が多い。従って、熱及び消費電力の問題か ら、モパイル機器や家電機器への適用は、並列使用できる演算器の個数がより多ぐ 動作周波数の低減をより図ることができる 2次元方向に展開した演算装置 (以下、「2 次元アレイ型演算装置」 t 、う。 )を使用する方が望ま 、。
[0007] この 2次元アレイ型演算装置の性能向上技術として、複数の演算器間のデータ通 信の際に発生する待ち時間の低減を図る技術が開示されている (特許文献 1参照)。 特許文献 1:特開平 09— 022404号公報
発明の開示
発明が解決しょうとする課題
[0008] しかし、 2次元アレイ型演算装置は、制御する演算器の数が格段に増えることから、 これらの演算器をソフトウェアで制御し、機器に応じて異なるアルゴリズムを実現させ るためには、ソフトウェアの命令長が伸びることは必然である。
その結果、それらの命令をフェッチする先の命令メモリ、及びその命令を解読する 為の命令デコーダの規模が大きくなり、ハードウ アの面積増加となり、結果的に LSI のコスト増につながり妥当ではない。
[0009] そこで、本発明は、ソフトウェアによって、 2次元アレイ型演算装置をより柔軟に制御 して効率的な並列処理を実現し、かつ、ハードウ アの面積が大きくならないような 2 次元アレイ型演算装置の提供を目的とする。
課題を解決するための手段 [0010] 上記課題を解決する為に、本発明のアレイ型演算装置は、順序付けられた複数の プロセッサエレメントで構成されたプロセッサアレイと、 1サイクル毎に、 1個の命令を 取得する命令取得手段と、 1サイクル毎に、第 1順位のプロセッサエレメントの動作を 制御する為の動作制御情報を作成し、作成した動作制御情報と前記命令取得手段 で取得した 1個の命令とに基づき、第 1順位のプロセッサエレメントに対する命令を生 成する手段と、 1サイクル毎に、次順位以降のプロセッサエレメントの動作を制御する 為の動作制御情報を、前順位のプロセッサエレメントの動作を制御する為に作成した 動作制御情報を基に作成し、作成した動作制御情報と前記命令取得手段で取得し た 1個の命令とに基づき、前記次順位以降のプロセッサエレメントに対する命令を生 成する手段とを備えることを特徴とする。
発明の効果
[0011] 本発明に係るアレイ型演算装置は、上述の構成を備えることにより、 1つの命令によ つて、複数のプロセッサエレメント(P rocessor element 以 ρ 「P_t^」と!/、つ。 )に異なる 動作をさせることができるようになるので、複数の PEを使用して柔軟な処理を行うこと ができるようになる。
また、命令数が少なくなることにより、実行に必要なハードウ ア資源も少なくて済 むようになる。
[0012] また、前記プロセッサアレイは、信号線で連結された複数のプロセッサエレメントで 構成され、 1サイクル毎に、各プロセッサエレメントの演算結果を、前記信号線を介し て次順位のプロセッサエレメントに伝達することとしてもよ 、。
これによりアレイ型演算装置は、 PEの演算結果を後続の PEに伝達することができ
、複数 PEの演算結果を用いた処理を一度に行うことが出来るので、処理速度を改善 することが出来るようになる。
[0013] また、前記アレイ型演算装置は、更に、 1サイクル毎に、基本制御情報を生成する 基本制御情報生成手段を備え、第 1順位のプロセッサエレメントの動作を制御する為 の動作制御情報は、前記基本制御情報生成手段で生成された基本制御情報を基 に作成されることとしてもよ 、。
これにより、 1つの制御情報を生成することで、全ての PEの動作に影響を与えること が出来るので、同じ PEアレイを使用して、様々な処理を行うことが出来るようになる。
[0014] また、前記プロセッサエレメントは、それぞれ、複数種類のデータを取得するデータ 取得手段を備え、前記動作制御情報は、各プロセッサエレメントが命令を実行する際 に使用するデータの種類を指定する指定情報を含み、前記各プロセッサエレメントは 、実行に際して、前記指定情報に応じて取得したデータを使用することとしてもよい。 これにより、 PEごとに実行する際に使用するデータを変更することが出来るので、よ り柔軟な処理を行うことが出来るようになる。
[0015] また、前記動作制御情報は、前記命令取得手段で取得した 1個の命令を実行する か否かを指定する情報であって、前記動作制御情報が実行する旨の指示である場 合には、前記プロセッサエレメントは前記命令を実行し、前記動作制御情報が実行し ない旨の指示である場合には、該当するプロセッサエレメントへの電力供給を抑止す ることとしてちよい。
これにより、演算を実行しな 、PEへの電源供給を行なわな 、ようにすることが出来 るので、消費電力を減らすことが出来るようになる。
[0016] また、本発明のアレイ型演算装置は、信号線で連結された N個のプロセッサエレメ ントを M行有した、 M行 X N列の 2次元アレイ構造のプロセッサアレイであって、各プ 口セッサエレメントの演算結果を、次行のプロセッサエレメントに伝達可能に接続され たプロセッサアレイと、 1サイクル毎に、基本制御情報を生成する基本制御情報生成 手段と、 1サイクル毎に、 1個の命令を取得する命令取得手段と、 1サイクル毎に、最 初の行のプロセッサエレメントの動作を制御する為の動作制御情報を前記基本制御 情報生成手段で生成された基本制御情報を基に作成し、作成した動作制御情報と 前記命令取得手段で取得した 1個の命令とに基づき、最初の行に対する命令を生成 する手段と、 1サイクル毎に、 2〜M行のプロセッサエレメントの動作を制御する為の 動作制御情報を前行のプロセッサエレメントの動作を制御する為に作成した動作制 御情報を基に作成し、作成した動作制御情報と前記命令取得手段で取得した 1個の 命令とに基づき、前記 2〜M行のプロセッサエレメントに対する命令を生成する手段 とを備え、前記プロセッサアレイのそれぞれの行に配列されて 、る N個の前記プロセ ッサエレメントは、当該行に対する命令を実行することを特徴とすることとしてもよい。 [0017] これにより、 2次元アレイ型の演算装置に対して、 1つの命令を発行することで、複数 の PEに異なる動作をさせることができるようになるので、より柔軟な処理を行うことが でさるよう〖こなる。
図面の簡単な説明
[0018] [図 1]動きベクトル探索処理の探索方法を示す図である。
[図 2]図 2 (a)は、参照画像 100の構成を表し、図 2 (b)は、対象画像 200の構成を表 す図である。
[図 3]従来のアレイプロセッサの例を示す図である。
[図 4]アレイ型演算装置 1000と関連する周辺部の構成を表す図である。
[図 5]アレイ型演算装置 1000の構成の詳細を表す図である。
[図 6]参照画像 100を PEアレイ 1100へ供給する方法を示す図である。
[図 7]制御情報(トークン)を命令生成部(3100等)に供給する方法を示す図である。
[図 8]各 PEの相関記憶部 2400に記憶されている内容の遷移を示す図である。
[図 9]実施形態 1のアレイ型演算装置 1000で対象画像 200と参照画像 100との相関 を求める処理を示すフローチャートである。
[図 10]実施形態 1の「exec_array」の処理を示すフローチャートである。
[図 11]実施形態 1の PEの処理を示すフローチャートである。
[図 12]図 12 (a)は、実施形態 1の制御情報生成部の処理を示すフローチャートであり
、図 12 (b)は、実施形態 1の命令生成部の処理を示すフローチャートである。
[図 13]実施形態 1のトークンと PEの動作を時間軸上にあらわした図である。
[図 14]実施形態 1のプログラムの例を示す図である。
[図 15]実施形態 2のトークンと PEの動作を時間軸上にあらわした図である。
[図 16]実施形態 2のプログラムの例を示す図である。
[図 17]実施形態 3のアレイ型演算装置 1000の構成の詳細を表す図である。
[図 18]実施形態 3のアレイ型演算装置 1000で対象画像 200と参照画像 100との相 関を求める処理を示すフローチャートである。
[図 19]実施形態 3の「exec_array」の処理を示すフローチャートである。
[図 20]実施形態 3の PEの処理を示すフローチャートである。 [図 21]図 21 (a)は、実施形態 3の制御情報生成部 3000の処理を示すフローチャート であり、図 21 (b)は、実施形態 3の命令生成部(3100等)の処理を示すフローチヤ一 トである。
[図 22]実施形態 3のトークンと PEの動作を時間軸上にあらわした図である。
[図 23]実施形態 3のプログラムの例を示す図である。
[図 24]実施形態 4の対象画像及び PEアレイに供給する参照画像の例を示す図であ る。
圆 25]実施形態 4のアレイ型演算装置 1000で対象画像 200と参照画像 100との相 関を求める処理を示すフローチャートである。
[図 26]実施形態 4の「exec_array」の処理を示すフローチャートである。
[図 27]実施形態 4の PEの処理を示すフローチャートである。
[図 28]図 28 (a)は、実施形態 4の制御情報生成部 3000の処理を示すフローチャート であり、図 28 (b)は、実施形態 4の命令生成部(3100等)の処理を示すフローチヤ一 トである。
[図 29]実施形態 4のトークンと PEの動作を時間軸上にあらわした図である。
[図 30]実施形態 4のプログラムの例を示す図である。
符号の説明
100 参照画像
200 対象画像
1000 アレイ型演算装置
1001 プログラムカウンタ
1002 命令メモリ
1003 命令発行部
1004 プログラム記憶部
1005 メモリキャッシュ
1006 メモリキャッシュ 0
1007 メモリキャッシュ 1
1009 ノ ス 1100 PEアレイ
1200 加算部
2000 PE
2100 演算部
2200 対象データ記憶部
2300 参照データ記憶部
2400 相関記憶部
2410 演算結果データ
2420 受信データ
3000 制御情報生成部
3010 カウンタ記憶部
3110、 3210、 3310 制御情報記憶部
5201、 5211、 6100 演算結果
5300、 7300、 8600 プログラム命令ジス卜
発明を実施するための最良の形態
[0020] <実施形態 1 >
<概要 >
本発明に係るアレイ型演算装置は、 2次元アレイ型演算装置であり、命令メモリ、及 び命令デコーダの数は減らした上で、アレイ型に配列された演算器を制御等するソ フトウェアの命令長を抑えることにより、命令メモリ、及び命令デコーダの規模の拡大 を抑えようとするものである。
[0021] 例えば、図 3 (a)で示すように、演算器アレイを構成するそれぞれの PEに独立の演 算命令を発行した場合、 PE数分の命令が必要となる。この場合、基本的に、 PE数分 の命令デコーダと命令メモリが必要となる。
また、図 3 (b)に示すような 1次元アレイ型演算装置においても、同様の課題が発生 する。
[0022] その解決法として、 SIMD (Single Instruction Multi Data)と!、う方式が広く知られて おり、これは、展開した方向の演算器には共通の命令を発行することで、ソフトウェア 制御のために必要となるコストを削減するというものである。この方法は、各 PEが同様 の動作を行うような画素処理に特に適して 、る。
し力し、この方法であっても、全ての PEに対して 1つの命令で指示を出すには、命 令長が長くなりすぎ現実的ではないため、例えば、図 3 (b)に示すように行 (又は列) 単位で命令を発行して!/ヽる。
[0023] SIMD方式を採用することによって、各 PEに独立の演算命令を発行する場合に比 ベて命令数は格段に減ったものの、前述した動きベクトル探索処理や画像認識処理 に用いられるアレイは大規模なものであり、行 (又は列)数分の命令であっても、命令 メモリサイズや命令デコーダに対する影響は大きい。基本的に、行数分の命令メモリ と命令デコーダが必要となる。
[0024] 本発明に係る 2次元アレイ型演算装置では、命令メモリ及び命令デコーダをそれぞ れ 1つとした上で、さらに命令長を削減することにより命令メモリサイズ等を小さくし、 結果的に LSIの面積の増加を抑えようとして 、る。
それとともに、例えば MPEG符号ィ匕処理のアルゴリズムの変更などが容易に出来る 柔軟性をも実現する。
[0025] 以下、本発明の実施形態の 2次元アレイ型演算装置について説明する。
本実施形態の 2次元アレイ型演算装置は、 MPEG符号化処理における動きべタト ル探索処理を行うものである。
<動きべタトル探索 >
図 1を用いて、動きベクトル探索処理にっ 、て簡単に説明する。
[0026] 図 1は、動きベクトル探索処理の探索方法を示す図である。
対象画面 20は、現在の符号化対象フレームであり、対象画像 200は、いわゆるマク ロブロックである。
また、参照画面 10は、動きベクトルを算出するための過去又は未来のフレームであ り、参照画像 100は、対象画像 200の類似部分を検索する範囲である。
[0027] 参照画像 100の中で、左上から右下まで、マクロブロックと最も類似度が高い部分 を、 1ピクセルずつずらして検索する(参照画像 100— 1、参照画像 100— 2)。
図 2は、参照画像 100と対象画像 200との構成を表す図である。 図 2 (a)は、参照画像 100であり、左上のピクセルを「R(0,0)」とし、 xy座標系でピク セルの位置を表すものとする。また、図 2 (b)は、対象画像 200であり、図 2 (a)と同様 に、左上のピクセルを「T(0,0)」と表すものとする。
[0028] 以下の説明で、「R(x,y)」又は「Rxy」は参照画像 100のピクセルを表し、「T(x,y)」又 は「Txy」は対象画像 200のピクセルを表すものとする。また、図面において、口は参 照画像 100のピクセルを、〇は対象画像 200のピクセルを表すものとする。
<構成>
以下、図 4及び図 5を用いて、本発明に力かる 2次元のアレイ型演算装置 1000の 構成を説明する。
[0029] 図 4は、アレイ型演算装置 1000と関連する周辺部の構成を表す図である。
この図 4では、アレイ型演算装置 1000のほかに、プログラムカウンタ 1001、命令メ モリ 1002、命令発行部 1003、プログラム記憶部 1004及びメモリキャッシュ 1005を 記載している。
これらの各機能部及び各 PE等は、伝送するビット数に応じた本数のデータ信号線 で接続されて ヽるものとする。
[0030] プログラム記憶部 1004は、演算器の動作を示す命令ストリーム力もなるソフトウェア プログラムを記憶しており、プログラムカウンタ 1001は、プログラム記憶部 1004に記 憶されて 、る次に実行する命令を指して 、る。
プログラムカウンタ 1001が指す命令を、命令メモリ 1002にフェッチし、命令発行部 1003は、命令メモリ 1002の命令をデコードし、アレイ型演算装置 1000全体に共通 の命令である制御信号を発行する。
[0031] メモリキャッシュ 1005は、アレイ型演算装置 1000で使用するデータを記憶する。
次に、アレイ型演算装置 1000の構成について説明する。
このアレイ型演算装置 1000は、 5行 X 6列の 2次元に配列された 30個の PE (PE00 等)で成る PEアレイ 1100と、制御情報生成部 3000及び命令生成部(3100〜3500 )で構成される。
[0032] 各 PE及び各生成部はそれぞれバスで連結され、信号を伝達できるようになって!/ヽ る。また各生成部は論理回路で構成されて ヽるものとする。 ここで、本アレイ型演算装置 1000の特徴は 2つある。 1つは、外部の命令発行部 1 003から入力される 1つの命令(InstO)で 30個の PEを制御するために、以下に説明 する制御情報生成部 3000と各行への命令 (Inst00〜Inst40)を生成する命令生成部 (3100等)を有する点である。また、もう 1つは、各 PEが行方向だけでなぐ列方向に もバス 1009で連結されデータを送受信できるようになつている点である。
[0033] 次に、図 5を用いて、各機能部について説明する。
図 5は、アレイ型演算装置 1000の構成の詳細を表す図である。ここでは、説明の便 宜上、一部の PE等のみを記載している。
アレイ型演算装置 1000は、複数の PE2000、制御情報生成部 3000、複数の命令 生成部(3100等)及び加算部 1200で構成される。
[0034] まず、 1サイクルごとに、制御情報生成部 3000は制御情報を、命令発行部 1003は 命令情報を発行する。ここで、サイクルとは、処理の基準となる一定のクロックサイク ルである(以下、同様。)。
制御情報生成部 3000は、カウンタ記憶部 3010を有し、ここには、カウンタを記憶し ておく。このカウンタの値に応じて制御情報を生成する。このカウンタ記憶部 3010に は、生成した最新の制御情報も記憶しておくものとする。
[0035] ここで生成する制御情報は、各 PEの動作を制御する基本となるものといえる。
命令生成部 3100は、命令発行部 1003から発行された命令情報と、制御情報生 成部 3000から発行された制御情報とを受け取り、 PEアレイ 1100の 1行分の PE (PE 00〜PE05)の演算処理を制御する命令を生成する。
ここで命令を生成する際には、制御情報生成部 3000から受取った制御情報を基 に自分用の制御情報を作成し、作成した制御情報を基に PE用の命令を作成する。 または、制御情報を送り出す前に作成する。つまり、受取った制御情報と送り出す制 御情報とが、異なるということである。
[0036] 但し、受取った制御情報と送り出す制御情報とが同じでょ 、場合も動作目的によつ ては当然ある。例えば、本実施形態 1では、制御情報はそのまま使用するが、後で説 明する実施形態 4では受取った制御情報を加工して次の命令生成部に送り出して 、 る。 またさらに、命令生成部 3100は制御情報記憶部 3110を有し、制御情報生成部 3 000から受信した制御情報を記憶する。新たな制御情報を記憶する前に、ここに記 憶しておいた制御情報を命令生成部 3200に送信し、命令生成部 3200は、受取つ た制御情報を基に命令を生成することになる。
[0037] 命令生成部(3200、 3300、 3400、 3500)は、命令生成部 3100と同様の機能を 有するが、制御情報生成部 3000から発行された制御情報ではなぐ 1つ前の命令生 成部から受取った制御情報を使用して各行の演算器 (PE10〜PE15等)の演算処理 を制御する命令を生成する点が異なる。
また、命令生成部(3200〜3500)は、命令生成部 3100と同様に、各制御情報記 憶部(3210、 3310等)に制御情報を記憶し、順次記憶する制御情報を送っていく。
[0038] 次に、 PEについて説明する。これらはすべて同じ構成をとるため、 PE00 (2000) のみを説明する。
PE00 (2000)は、演算部 2100、対象データ記憶部 2200、参照データ記憶部 23 00及び相関記憶部 2400で構成される。
対象データ記憶部 2200は、対象画像 200の 1ピクセルのデータを記憶する。具体 的には、 30個の PE (図 4参照)はそれぞれ、対象画像 200の 30個のピクセル(図 2 ( b)参照)のデータを記憶する。
[0039] 例えば、 PE00の対象データ記憶部 2200は、ピクセル「T(0,0)」のデータを記憶し、 PE10の対象データ記憶部 2200は、ピクセル「Τ(1,0)」のデータを記憶する。
参照データ記憶部 2300は、参照画像 100の 1ピクセル(図 2 (a)参照)のデータを feす。。
但し、対象データ記憶部 2200は PEごとに異なるピクセルのデータを記憶して 、た 力 参照データ記憶部 2300は PEの列ごとに異なる点で相違する。すなわち、同じ 列の PEの参照データ記憶部 2300は同じデータを記憶している。
[0040] この参照データ記憶部 2300には、メモリキャッシュ 1005に記憶されている参照デ ータを読み込み記憶する。
例えば、 PEOOと PE10の参照データ記憶部 2300は、ピクセル「R00」のデータを記 憶する力 PE01と PE11の参照データ記憶部 2300は、ピクセル「R10」のデータを記 憶する。
[0041] 演算部 2100は、対象データ記憶部 2200に記憶されている対象データと参照デー タ記憶部 2300に記憶されている参照データとの相関の強さを計算し、相関記憶部 2 400〖こ記憶する。相関の強さは、 SAD (Sum of Absolute Difference)を用いて判断す るちのとする。
相関記憶部 2400は、自 PEの演算部 2100の結果データのほ力、 1つ前の行の PE から渡された受信データを記憶する。また、記憶しているデータを次の行の PEに送 信する機能も有する (バス 1009参照)。この詳細は、図 8を用いて、後で説明する。
[0042] 加算部 1200は、最終行の PE力もの出力を加算した値を、アレイ型演算装置 1000 力も出力する。この値は、対象画像 200と参照画像 100の相関値となり、最も相関が 強 、、すなわち最も差分絶対値の合計が小さ 、参照画像の位置力 動画ベクトルを 求めることになる。
次に、本アレイ型演算装置 1000での、相関値を求める方法を、制御情報等の各デ ータの流れを示して説明し、その後、アレイ型演算装置 1000処理の流れを説明する
[0043] <相関の求め方 >
次に、図 6〜図 8を用いて、アレイ型演算装置 1000が対象画像 200と参照画像 10 0との相関を求める手順について説明する。図では、便宜上、「T(0,0)」は「T00」等と 記載している(以下の図で、同様)。
ここでは、 ΡΕアレイ 1100への参照画像 100の供給の方法、制御情報の伝達方法 及び相関記憶部 2400の内容の遷移のそれぞれについて、図を用いて説明する。
[0044] < ΡΕアレイへの参照画像 100の供給の方法 >
図 6は、参照画像 100を ΡΕアレイ 1100へ供給する方法を示す図である。
ΡΕアレイ 1100は、図 2 (b)の対象画像 200をアレイ型演算装置 1000の PEアレイ 上に配置したものである。具体的には、対象データ記憶部 2200に記憶している(図 5参照)。
[0045] 対象画像 200をアレイ型演算装置 1000の PEアレイ上に保持し、参照画像 100を 横 6画素の 1ラインずつ供給する。 例えば、サイクル「Cyc 0」1Ο1に参照画像 100の最初のライン(R00〜R50)を供給し た場合、 PEアレイ 1100に列単位で同じ参照データが供給される。具体的には、参 照データ記憶部 2300に記憶される(図 5及び図 7参照)。
[0046] 続くサイクル「Cyc 1」 102に参照画像 100の 2行目のライン(R01〜R51)を供給した 場合も同様に、行単位で同じ参照画像が供給され、サイクル「Cyc yj 103に最後の 行のライン (R0y〜R5y)を供給した場合まで、同様の供給が成される。
<制御情報の伝達方法 >
図 7は、制御情報を命令生成部(3100等)に供給する方法を示す図である。
[0047] 図 7では、「Cycle 0」から「Cycle 3」まで時系列に、アレイ型演算装置 1000で制御 情報が供給されて 、く様子を記載して 、る。
図では、制御情報生成部 3000が生成する制御情報を「tokenO」「tokenl」等と表し 、 PE及び命令生成部(3100等)では、各記憶部と、その内容を表しているものとする 。また、点線矢印は、記憶部の内容の送出を示している。
[0048] まず、 rcycle 0」では、制御情報生成部 3000で生成された制御情報「tokenO」が、 命令生成部 3100の制御情報記憶部 3110に記憶されている。実際には、制御情報 生成部 3000で制御情報が生成されるのは、 1つ前のサイクルであり、カウンタ記憶 部 3010には「tokenl」が記憶されている力 ここでは説明の便宜上「tokenO」と記載 する。
[0049] このサイクルで、 PE00と PE01は、演算を行ない、その結果を相関記憶部 2400に feす。。
次に、「Cycle 1」では、制御情報生成部 3000で生成された制御情報「tokenl」が、 命令生成部 3100の制御情報記憶部 3110に記憶され、命令生成部 3200の制御情 報記憶部 3120には、命令生成部 3100の制御情報記憶部 3110に記憶されていた 制御情報「tokenO」が記憶される。
[0050] このように、「Cycle 3」「Cycle 4Jと順次「tokenO」が送られて!/、く。
この制御情報「tokenO」等と命令発行部 1003が発行した命令「InstO」等とを基に、 命令生成部(3100等)は PEアレイの各行に送る命令を生成することになる。
尚、 PEの相関記憶部 2400の「result」は、演算結果を表し、詳細は以下に説明す る。
[0051] <相関記憶部 2400の内容の遷移 >
図 8は各 PEの相関記憶部 2400に記憶されている内容の遷移を示す図である。 ここでは、各 PEの相関記憶部 2400に記憶されている内容を、時系列に順次、次 の行の PEの相関記憶部 2400に送出して 、く様子を記載して!/、る。
また、 1列の PEの相関記憶部 2400のみを記載している。各列ごとの動作は同じだ 力もである。また、図 7の PEアレイの 1列目の PEの相関記憶部 2400の内容を記載し ている。
[0052] ここでは、説明の便宜上、対象画像 200のうち「T(0,0)」「Τ(0,1)」「Τ(0,2)」の 3ピクセ ルを対象画像とし、参照画像 100のうち「R(0,0)」「R(0,1)」「R(0,2)」「R(0,3)」の 4ピクセ ルを参照画像として説明する。従って、 PEアレイも「ΡΕ00」 ΓΡΕΙΟ]「PE20」の 3つとし て説明する。
相関記憶部 2400の内容は、 2種類のデータが含まれている。 1っは自 PEの演算 部 2100の演算結果データ 2410であり、もう 1つは、 1つ前の行の PEから送られた受 信データ 2420である。
[0053] 実際には、対象データと参照データの相関値の合計を記憶している力 ここでは内 容を明確にするために相関を取ったピクセルを表している。例えば、「T(0,0)+R(0,0)」 は、「T(0,0)」と「R(0,0)」の相関値を表し、「T(0,0)+R(0,0) T(0,1)+R(0,1)」は、「T(0,0)」と 「R(0,0)」の相関値と「T(0, 1)」と「R(0, 1)」の相関値との合計値を表す。
「Cycle 0」において、「PE00」の相関記憶部 2400の演算結果データ 2410には「T(0 ,0)+R(0,0)」が記憶され、受信データ 2420には何も記憶されていない。前行の PEは 存在しないからである。
[0054] 次に、「Cycle 1」では、「PE00」の演算結果データ 2410には「T(0,0)+R(0,1)」が記憶 され、受信データ 2420には何も記憶されて ヽな 、。
また、「PE01」の相関記憶部 2400の演算結果データ 2410には「T(0,1)+R(0,1)」が 記憶され、受信データ 2420には「Cycle 0」時の「PE00」の相関記憶部 2400の演算 結果データ 2410と受信データ 2420との合計が記憶される。
[0055] このように、順次、演算結果データ 2410と受信データ 2420との合計を次行の PE に送っていく。
すると、最後の行の PE、ここでは PE20、力も送出される演算結果データ 2410と受 信データ 2420との合計は、対象画像と参照画像の 1行分の相関値 2401となる。
[0056] 具体的には、「T(0,0)」「Τ(0,1)」「Τ(0,2)」と「R(0,0)」「R(0,1)」「R(0,2)」との相関値であ る。
その次のサイクルで最後の行の PEカゝら送出される相関値の合計は、対象画像と 1 ピクセルずれた参照画像の相関値 2402となる。
具体的には、「T(0,0)」「Τ(0,1)」「Τ(0,2)」と「R(0,1)」「R(0,2)」「R(0,3)」との相関値であ る。
[0057] このように、順次、 1ピクセルずつ Y方向にずらした参照画像 100と対象画像 200と の 1行分の相関値が出力されることになる。
本説明では、 1列分について説明したが、各行の出力を合計することにより対象画 面と参照画面の相関値が求まる。
<アレイ型演算装置の処理の流れ >
図 9〜図 13を用いて、アレイ型演算装置 1000の動作について説明する。
[0058] これらの処理を実行する機能部は組合せ順序回路で構成され、以下の処理を実行 している(図 18等も同様)。
まず、図 9は、アレイ型演算装置 1000で対象画像 200と参照画像 100との相関を 求める処理を示すフローチャートである。参照画像 100の中で、 1つのマクロブロック 、すなわち対象画像 200と最も相関の高い位置を、参照画像 100を 1ピクセルずつ ずらしながら求める。
[0059] 最初に、対象画像 200から、各 PEの対象データ記憶部 2200にそれぞれの対象デ 一タを読込む (ステップ S 100、図 6参照)。
制御情報生成部 3000のカウンタ記憶部 3010に値をセットする (ステップ S110)。 ここでセットする値は、参照画像 100の行数である。例えば、「8」をセットする。
[0060] 次に、参照画像 100のうち、アレイ型演算装置 1000に供給する 1行分の先頭アド レスをレジスタ 0にロードする(ステップ S120)。尚、ロード先はレジスタ 0に限られず、 システムに依存する。 例えば、「R00」「R10」〜「R50」を供給する場合には(図 6参照)、メモリキャッシュ 10 05に記憶されて!、る「R00」のピクセルデータのアドレスをロードする。記憶されて!、な い場合は、メモリキャッシュに読込む処理を行う。
[0061] レジスタ 0に参照画像のアドレスがロードされたら、対象画像 200との相関を取る処 理を実行する(ステップ S130)。この処理は、命令発行部 1003が、命令として「exec_ array」を発行することで実行される。
この「exec_array」の実行で、参照画像 100の 1行と対象画像 200の全行との相関が 取られることになる。例えば、図 6の第 0サイクル 101で供給される参照データと PEァ レイ 1100上の対象画像 200とが演算される。
[0062] 「exec_array」の処理が終了したら、 PEアレイ 1100の最終行の PEからの出力をカロ 算部 1200で合計した値を出力する (ステップ S 140)。
参照画像 100の最終行まで演算していなければ (ステップ S 150 : NO)、レジスタ 0 に次の行のアドレス、例えば、「R01」のピクセルデータのアドレスをセットして、処理を 繰り返す (ステップ S 120力もステップ S 140)。
[0063] ここで、参照画像 100の最終行まで演算するとは、対象画像 T(x,0)と参照画像 R(x,8 )との演算が終了するまでをいい、具体的には、参照画像の行数と対象画像の行数と を足した回数、 13回「exec_array」の処理を行う。
参照画像 100の最終行まで演算を終了したら (ステップ S 150 : YES)、次列に移り 、演算を行なう(ステップ S 110〜ステップ S 150)。
[0064] 参照画像を 1ピクセル右にずらした 6ピクセル分のデータ、「R10」「R20」〜「R60」の「 R10」のピクセルデータのアドレスをレジスタ 0にロードし (ステップ 120)処理を行う。 参照画像 100の最終列まで演算したら (ステップ S 160)処理を終了する。 これで、 1マイクロブロックである対象画像 200の演算が終了することになり、演算結 果の出力(ステップ S140)で出力された相関が最も強い場所力も動きベクトルを算出 する。
[0065] 次に、図 10を用いて、「exec_array」の処理について説明する。
図 10は、「exec_array」の処理を示すフローチャートである。
まず、制御情報生成部 3000は、新しい制御情報(トークン)を生成し、命令生成部 (3100等)は記憶している制御情報を次の命令生成部に送る (ステップ S210)。 制御情報を受取った命令生成部は、命令発行部 1003から発行された「exec— array
」命令と、制御情報記憶部(3110等)に記憶する制御情報とから、命令を生成し、該 当する行の PEに送信する (ステップ S220)。
[0066] 生成された命令を受取った各 PEは、演算処理を行う(ステップ S240)。
これらの 3つの処理は、 1サイクルずつずれながら並行して行われる。
図 11を用いて、 PEの処理について説明する。
ステップ S210の制御情報生成部 3000の処理と、ステップ 230の命令生成部(310 0等)の詳細は、図 12を用いて、後で説明する。
[0067] 図 11は、 PEの処理を示すフローチャートである。
命令生成部(3100等)から送られた命令力 実行するという命令であれば (ステップ S300 :実行)、メモリキャッシュ 1005力ゝら、レジスタ 0の指す先を参照して各 PEの参 照データ記憶部 2300に該当する参照データを読込む (ステップ S305)。具体的に は、命令発行部 1003が命令デコード時に該当するデータを書き込んでおいた PEァ レイの各列に対応したメモリから、データが読込まれる。
[0068] 次に、演算部 2100は、対象データ記憶部 2200の対象データと参照データ記憶部 2300の参照データとの差分絶対値を求め (ステップ S310)、演算結果を、相関記憶 部 2400の演算結果データ 2410に記憶する(ステップ S320、図 8参照)。
その後、演算結果データと受信データ 2420を加算して次行の PEに送り、データを 受取った次行の PEは、自 PE内の受信データ 2420に記憶する。
[0069] 一方、命令生成部(3100等)から送られた命令力 キャンセルという命令であれば( ステップ S300:キャンセル)、何もしな!、で終了する。
次に、図 12を用いて、制御情報生成部 3000の処理と、命令生成部(3100等)の 処理について説明する。これらの処理は、同じサイクルで実行される。
まず、図 12 (a)を用いて、制御情報生成部 3000の処理について説明する。図 12 ( a)は、制御情報生成部の処理を示すフローチャートである。
[0070] 生成される制御情報は、「Valid」「Invalid」のうちのいずれかが生成されるものとする カウンタ記憶部 3010に記憶されているカウンタ「Counter」(図 9 :ステップ S110参 照)の値が「0」の場合 (ステップ S41O :==0)には、「Invalid」トークンを生成し (ステップ S412)、カウンタ「Counter」の値が「0」でないの場合 (ステップ S410 :≠0)には、「Va lid」トークンを生成する(ステップ S411)。生成したトークンは、命令生成部 3100に送 り、制御情報記憶部 3110に記憶させる。
[0071] また、トークンを生成後、カウンタ「Counter」の値から「1」を減算する。この場合、 0 以下になる場合は「0」とする。
次に、図 12 (b)を用いて、命令生成部(3100等)の処理について説明する。命令 生成部(3100等)のそれぞれは、以下説明する処理と同様の処理を行う。
図 12 (b)は、命令生成部の処理を示すフローチャートである。
[0072] まず、制御情報記憶部 3110に記憶しているトークンを次の命令生成部に送信し( ステップ S450)、前の命令生成部又は制御情報生成部からトークンを受信する (ステ ップ S460)。
受信したトークンを基に、 PEに実行させる命令を生成する。
トークンが「Valid」の場合 (ステップ S470: Valid)は「exec_array」命令を実行する命 令を生成し (ステップ S471)、 rinvalidjの場合 (ステップ S470: Invalid)は「exec_array 」命令を実行しな 、キャンセル命令を生成する (ステップ S472)。
[0073] すなわち、トークンの値に応じて、 PEアレイの行単位で、実行するか否かを制御す ることがでさる。
生成した演算命令は、各 PEに送られ、トークンは制御情報記憶部 3110に記憶す る。
以下に、制御情報生成部 3000が作成したトークンと PEの実行の関係について説 明する。
[0074] 図 13は、トークンと PEの動作を時間軸上にあらわした図である。
横軸に時間軸をサイクル単位で示しており、制御情報生成部 3000の動作、及び P Eアレイ 1100の第 1行〜第 5行の動作を示して!/、る。
ここで、〇は、命令の基となったトークンであり、ここではカウンタ記憶部 3010又は 各制御情報記憶部(3110等)が記憶しているトークンを表し、「val」は Validを、「Iv」は Invalidをあらわすものとする。すなわち、「val」の行の PEは演算を実行し、「Iv」の行の PEは演算を実行しない。
[0075] また、ここでは、第 1列の PEの動作のみを示している。各列の動作は同じだからで ある。
下部の表は、演算結果(5200、 5210)であり、対象画像と参照画像の相関を取つ たピクセルを示している。
サイクル「Cyc=- 1」の時、 Counter5100は「8」であることから、「Value」トークンが作 成される。このとき、 PEは、何も行わない。
[0076] サイクル「Cyc=0」の時は、 Counter5100は「7」であり、「Value」トークンが作成され、 サイクル「Cyc=-l」の時作成されたトークンは PEアレイ第 1行の PEに移動している。 従って、 PEアレイの第 1行の PEのみが実行される。
すなわち、 PEアレイ 1100の第 1行に配置された対象画像 200の第 1行のデータ「T 00」「Τ10」「Τ20」「Τ30」「Τ40」「Τ50」と、 PEアレイに対して供給された参照画像 100 の第 1行のデータ「R00」「R10」「R20」「R30」「R40」「R50」との間で差分絶対値を求め る演算が行われ、その結果は、バスを通じて、第 2行の演算要素に受け渡される(図 6 、図 7参照)。
[0077] PEアレイの第 2行〜第 5行までも、参照画像 100の第 1行のデータ ROO〜R50は 供給されているが、演算は行なわない。
同様に、サイクル「Cyc=l」の時は、 PEアレイの第 1行の PEと第 2行の PEとが実行さ れる。
すなわち、 PEアレイの第 1行に配置された、対象画像の第 1行のデータ「Τ00」 ΓΤ10 」「Τ20」「Τ30」「Τ40」「Τ50」と、参照画像の第 2行のデータ「R01」「R11」「R21」「R31」「 R41J「R51」との間で差分絶対値を求める演算が行われ、その結果は、演算要素から の出力バスを通じて、第 2行の PEに受け渡される。同サイクルにおいて、 PEアレイの 第 2行に配置された、対象画像の第 2行のデータ「Τ01」「Τ11」「Τ21」「Τ31」「Τ41」「Τ5 1」と、参照画像の第 2行の画像データ「R01」「R11」「R21」「R31」「R41」「R51」との間で 差分絶対値を求める演算が行われ、その結果と、前サイクルの前行の演算結果の和 力 演算要素からの出力バスを通じて、第 3行の PEに受け渡される。 [0078] 同様の演算動作を繰り返すと、サイクル「Cyc=5」の時には、 | TOO〜T50— ROO 〜R50 I + I T01〜T51— R01〜R51 | + | T02〜T52— R02〜R52 | + | T 03〜T53— R03〜R53 | + | T04〜T54— R04〜R54 | の演算結果 5201力 第 5行の PE出力として得られ、これを水平方向に加算したもの力 相関の強さの評価 値となる。
[0079] また同様に、サイクル「Cyc=6」の時には、 | TOO〜T50— R01〜R51 | + | T01 〜T51— R02〜R52 | + | T02〜T52— R03〜R53 | + | T03〜T53— R04〜 R54 I + I T04〜T54— R05〜R55 | の演算結果が出力として得られ、以後次々 と、垂直方向にずらした位置の相関の強さの評価値が求められる。
また、サイクル「Cyc=7」以降は、 Counter5100は「0」であり、「Invalid」トークンが作 成される。サイクル「Cyc=8」の時は、「Invalid」トークンが PEアレイ第 1行の PEに移動 している。従って、 PEアレイの第 2行〜第 5行の PEのみが実行される。
[0080] 制御情報生成部 3000は、 Counterに「8」をセットしてから、参照画像の行数「8」と 対象画像の行数「5」と区切り「1」を加算した分の制御情報を生成して、参照画像 1列 の処理が終了したことになる。従って、サイクル「Cyc=13」力も参照画像の 2列目のピ クセル「R10」〜「R15」との相関を求める処理が始まり、サイクル「Cyc=19」で、演算結 果 5211が、第 5行の PE出力として得られる。
[0081] 演算結果の動きにあわせて、演算必要な期間のみ PEを実行させることで、不要な 演算を停止することができ、消費電力の削減が実現できる。図 13では、斜線の引か れた「Iv」のトークンに対応する行の PEの電源の供給を抑止することで、消費電力を 削減できる。
次に、図 14は、プログラムの例を示す図である。
[0082] プログラム命令リスト 5300には、プログラム命令 5301ごとの動作 5302について記 載している。また、制御情報(トークン)の値に応じての動作を示している。この図 14 では、「^^^(1」を「^^&1」、「Valid」を「val」と記載している(図 16、図 23、図 30で同様) 例えば、トークン「Invalid」の場合は、「exec_array」は「nop」、すなわち実行は行なわ ず、「Valid」の場合は「exec」、すなわち実行するを示している。 [0083] 「ld[addr],r0」 5400は、レジスタ 0に参照データのアドレスをロードする指示である。 また、「exec_array rOjは、レジスタ 0の指す先の参照データで演算を行なう指示であ る。
<実施形態 2>
本実施形態は、あるタイミングの相関の強さの評価値が所定値以上であった場合、 以後の演算を不要なものとしてキャンセルする点力、実施形態 1と異なる。
[0084] 図 15は、トークンと PEの動作を時間軸上にあらわした図である。
具体的には、演算結果 6100が、ある値以上の相関の強さを持っていると判定され た場合、実際には SADの値がある一定値以下であった場合には、「Cyc 6」以降の演 算をキャンセルする。
rCyc n」からは、別の対象画像の演算が始まる。
[0085] キャンセルの方法は、例えば、 SADの値を評価する回路から、命令生成部(3100 等)に対して信号を出力し、演算停止を示すキャンセル命令を生成させる。これにより 不要な演算部分 6200を停止することができ、消費電力の削減が実現できる。
次に、図 16は、プログラムの例を示す図である。
プログラム命令リスト 5300などは、実施形態 1と同じもので実行が可能である(図 14 参照)。
<実施形態 3 >
<概要 >
本実施形態は、実施形態 1と同じ演算を行なうが、実行速度を速めたものである点 が異なる。
[0086] 実施形態 1のトークンと PEの動作を時間軸上にあらわした図である図 13において、 対象画像と参照画像の 1列目との演算は、サイクル「Cyc - l」〜「Cyc 12」までであり、 2列目との演算はサイクル「Cyc 13」から始まる。この場合、サイクル「Cyc 7」〜「Cyc 1 7Jまでは、演算を行なって 、な 、PEが存在する。
本実施形態は、この演算を行なっていない PEにも演算を行なわせようとするもので ある。
[0087] 図 22は、実施形態 3のトークンと PEの動作を時間軸上にあらわした図である。 図に示すように、参照画像の 1列目との演算はサイクル「Cyc - l」〜「Cyc 12」に行 われる点は実施形態 1 (図 13参照)と同じであるが、 2行目との演算はサイクル「Cyc 8 」から始まる点が異なる。
このような動作を実施させるためには、「Cyc 9」から「Cyc 11」までは、参照画像の 1 行目と 2行目のデータをえり分けて各 PEの参照データ記憶部に読込む必要がある。
[0088] すなわち、実施形態 1では、 PEへの命令は演算実行かキャンセルの 2種類であつ たが、本実施形態では、「1行目のデータで実行」、「2行目のデータで実行」及び「キ ヤンセル」の 3種類の命令を生成できる点が異なる。
以下、本実施形態 3の構成等を説明する。
<構成>
図 17は、実施形態 3のアレイ型演算装置 1000の構成の詳細を表す図である。
[0089] 実施形態 1の構成(図 5参照)との違いは、メモリキャッシュを 2つ使用する点である 。もちろん、物理的に 2つである必要はない。
メモリキャッシュ 0 (1006)とメモリキャッシュ 1 (1007)は、両方とも参照データ記憶 部 2300につながっており、各 PEは、どちら力もデータを読込むかを選択できるもの とする。
[0090] <動作 >
次に、図 18〜図 21を用いて、本実施形態のアレイ型演算装置 1000の処理につい て説明する。基本的な処理の流れは実施形態 1 (図 9〜図 12)と同じであるので、相 違点を中心に説明する。
図 18は、アレイ型演算装置 1000で対象画像 200と参照画像 100との相関を求め る処理を示すフローチャートである。この処理において、実施形態 1での処理(図 9参 照)と異なる点は、 2つのカウンタをセットする点と、参照画像のデータを 2行分使用す る^;である。
[0091] 最初に、対象画像 200から、各 PEの対象データ記憶部 2200にそれぞれの対象デ 一タを読込む (ステップ S 100、図 6参照)。
制御情報生成部 3000のカウンタ記憶部 3010に値をセットする (ステップ S501)。 ここでは、「CounterO」に参照画像 100の行数「8」をセットし、「Counterl」の「0」をセッ トする。この場合、「CounterO」がアクティブカウンタとなる。尚、「Counterl」に「8」がセ ットされた場合は、「Counterl」がアクティブカウンタとなる。
[0092] 次に、参照画像 100のうち、アレイ型演算装置 1000に供給する 2行分の先頭アド レスをレジスタ 0及びレジスタ 1にロードする(ステップ S502)。
同時に 2行分のデータを必要とする場合があるからであり、一方の行を演算してい る途中で他方の行のロードを開始する、という処理を交互に繰り返すことになる(図 2 2参照)。
[0093] その後、「exe array」の実行を行い (ステップ S130)、演算結果を出力する(ステツ プ S140)。 参照画像 100の最終行まで演算処理を繰り返す (ステップ SI 20からス テツプ S 150)。
参照画像 100の最終列まで演算したら (ステップ S 160)処理を終了する。 図 19は、「exec_array」の処理を示すフローチャートであり、処理内容は、実施形態
1とほぼ同じである(図 10参照)力 PEの処理 (ステップ S503)が異なる。
[0094] 図 20を用いて、 PEの処理につ!、て説明する。図 20は、 PEの処理を示すフローチ ヤートである。
この処理で、実施形態 1での処理(図 11参照)と異なる点は、各 PEの参照データ記 憶部 2300に参照データを読込む場合に、メモリキャッシュ 0またはメモリキャッシュ 1 力 読込む点である。例えば、図 22で、サイクル「Cyc 9」〜「Cyc 11」までは、参照画 像 2行分のデータが必要となり、 PEアレイの各行ごとにどちらのデータを読込むかを 指定する必要がある。
[0095] 命令生成部(3100等)から送られた命令力 実行するという命令であれば (ステップ S300 :実行)、レジスタ 0の指すメモリキャッシュ 0 (1006)又はレジスタ 1の指すメモリ キャッシュ 1 (1007)から、各 PEの参照データ記憶部 2300に参照画像を読込む (ス テツプ S 504)。
どちらのメモリキャッシュ力 データを読むかは、命令生成部力 渡される命令で指 示されている。この命令については、図 21を用いて後で説明する。
[0096] 次に、演算部 2100は、対象データ記憶部 2200の対象データと参照データ記憶部 2300の参照データとの差分絶対値を求め (ステップ S310)、演算結果を、相関記憶 部 2400の演算結果データ 2410に記憶する(ステップ S320)。その後、演算結果デ ータと受信データ 2420を加算して次行の PEに送り、データを受取った次行の PEは 、 自 PE内の受信データ 2420に記憶する。
[0097] 一方、命令生成部(3100等)から送られた命令力 キャンセルという命令であれば( ステップ S300:キャンセル)、何もしな!、で終了する。
図 21は、制御情報生成部 3000の処理と、命令生成部(3100等)の処理について 説明する。
まず、図 21 (a)を用いて、制御情報生成部 3000の処理について説明する。図 21 ( a)は、実施形態 3の制御情報生成部 3000の処理を示すフローチャートである。
[0098] 本実施形態では、上述のように 3種類の制御情報で、 3種類の命令を生成する。
制御情報生成部 3000は、 2つのカウンタを使用して制御情報であるトークンの生 成を行う。
ここでは、制御情報生成部 3000でのトークンの生成について説明する。 「CounterO」と「Counterl」の 2つのカウンタの値によって、トークンを生成する(ステツ プ S510)。
[0099] 制御情報生成部 3000では、「CounterO」 >0または、「Counterl」 >0の期間、演算 実行を示す制御情報を発生する。ここでは、どちらか一方のカウンタがアクティブであ るものとする。アクティブなカウンタを決定する手段は、命令発行部 1003からの信号 であってもよいし、一方のカウンタがカウント完了になった時点で、自身がアクティブ 状態でなくなり、他方がアクティブになるというものでもよい。ここでは、後者の方法を 取っている。
[0100] rCounterOjと「Counterl」とが共に「0」の場合には、「Invalid」トークンを生成する(ス テツプ S511)。
「CounterO」力^≠0」の場合には、「Valid,selO」トークンを (ステップ S512)、「Counte rl」力^≠0」の場合には、「Valid,sell」トークンを生成する(ステップ S513)。尚、「Cou nterOjと「Counterl」とが共に「半 0」の場合は、エラーとする。
[0101] 「selO」とは、レジスタ 0の指す先のデータを使用する旨の指示であり、「sell」は、レ ジスタ 1の指す先のデータを使用する旨の指示である。 PEは、この指示により、メモリ キャッシュ 0とメモリキャッシュ 1のどちら力もデータを読込むかを決定することになる。 トークン作成後に、「≠0」であったカウンタ、すなわちアクティブカウンタの値を 1減 算する(ステップ S 520)。
[0102] 次に、図 21 (b)を用いて、命令生成部(3100等)の処理について説明する。図 21 ( b)は、命令生成部(3100等)の処理を示すフローチャートである。
命令生成部(3100等)は、実施形態 1と同様、それぞれは同様の処理を行う。
まず、制御情報記憶部 3110に記憶して 、るトークンを次の命令生成部に送信し( ステップ S550)、前の命令生成部又は制御情報生成部からトークンを受信する (ステ ップ S 560)。
[0103] 受信したトークンを基に (ステップ S570)、 PEに実行させる命令を生成する。
トークンが「Invalid」の場合は「exec_array」命令を実行しな 、命令を生成し (ステップ S571)、 rValid.selOjの場合は「data_selO」を使用して「exec_array」命令を実行する命 令を生成し (ステップ S572)、「Valid,sell」の場合は「data_sell」を使用して「exec_arra y」命令を実行する命令を生成する (ステップ S573)。
[0104] 生成した演算命令は、各 PEに送られ (ステップ S575)、トークンは制御情報記憶部 3110に記憶する(ステップ S580)。
以下に、制御情報生成部 3000が作成したトークンと PEの実行の関係について説 明する。
図 22は、トークンと PEの動作を時間軸上にあらわした図である。
[0105] rCounterOj >0の場合に発行されたトークンは「Valid,selO」であり、「Counterl」 >0 の場合に発行されたトークンは「Valid,sell」である。
従って、例えば、サイクル「Cyc 10」では、 1行目と 2行目の PEは、「Valid,sell」トーク ンで生成された命令を実行し、 4行目と 5行目の PEは、「Valid,selO」トークンで生成さ れた命令を実行する。尚、 3行目の PEは実行を行なわず、各 PEの相関記憶部 240 0がクリアされる。順次、 PEがキャンセルされることで(7100)、参照画像の列の区切 りとなる。
[0106] 次に、図 23は、実施形態 3のプログラムの例を示す図である。
プログラム命令リスト 7300には、プログラム命令 7301ごとの動作 7302について記 載している。また、制御情報(トークン)の値に応じての動作を示している。 例えば、トークン「Invalid」7303の場合は、 ^ 6(;_& &」は^0」、すなわち実行は 行なわず、 ^(1^10」7304の場合は「€^&_3610を使用して実行」することを示し、「V alid.sellj 7305の場合は「data_sellを使用して実行」することを示して!/、る。
[0107] 「ldp[addr],rO,rl」 7400は、レジスタ 0及びレジスタ 1に、参照画像行のアドレスを口 ードする指示である。
具体的には、レジスタ 0に [addr]が示すアドレスをロードし、レジスタ 1には [addr] +of fset が示すアドレスを同時にロードする。この offsetは、ある行データのアドレスとの 差分値であり、予め与えられているものであっても、適時生成するものであってもよい 。予め与えられている例として、参照画像において、ある列の最後の行データと、次 列の最初の行データとのアドレスの差がある。
[0108] また、「exec_array r0 rlj 7401は、レジスタ 0及びレジスタ 1の指す先の参照画像 2 行分を用いて演算を行なう指示である。
<実施形態 4 >
<概要 >
本実施形態は、対象画像 200の全てのピクセルを用いて参照画像との相関を求め るのではなく、一定の間弓 Iきをして評価を行うものである。
[0109] この方法は、演算量を削減するために有効であり、電力が有限であるバッテリ駆動 のモパイル機器などにぉ 、て特に有効である。
ピクセルを間引く際の有効な間引き方として、市松模様に間引く手法が知られてい る。
本実施形態では、対象画像を市松模様に間引いて、すなわち、格子状に 1つおき のピクセルを用いて相関を求める。
[0110] 図 24は、実施形態 4の対象画像及び PEアレイに供給する参照画像の例を示す図 である。
本実施形態では、対象画像 8200と対象画像 8210との 2つを、 PEアレイ 1100上に 配置、すなわち、 PEの対象データ記憶部 2200に記憶する。この対象画像 8200と 対象画像 8210は、同じものである。 [0111] 2つの対象画像(8200、 8210)のうち、演算対象のピクセルのデータのみを配置し て、 PEアレイ 1100上に対象画像(8201、 8011)を作成する。
巿松模様型に間引くことによって、 2つの横 6画素、縦 5画素を同時にマッピングす ることがでさる。
一方、参照画像 100の方は、 2行分 (8010、 8020)を、それぞれ奇数番目と偶数 番目の参照データをまとめて、 2つの参照画像(8011、 8021)を作成する。
[0112] すなわち、参照画像を供給する場合に、 7画素力もなる 1行を、 6画素からなる 1行 8 010と、 1画素ずれた 6画素力もなる 1行 8020として供給する。これにより、同時に 2 位置の水平方向位置を探索することができるようになる。
参照データ 8010からは 2段の参照データ 8011が、参照データ 8020からは 2段の 参照データ 8021が作成され、それぞれ合わせて、奇数番目の参照データ 8100と偶 数番目の参照データ 8101を作成する。
[0113] ここで作成したような PEアレイ 1100上の対象画像(8201、 8011)と参照データ(8 011、 8021)とで演算を行なう。
従って、参照データ 2つ分を一度に演算するので、簡易な制御回路によって、処理 時間および消費電力を大幅に削減できることになる。
尚、本実施形態のアレイ型演算装置 1000の構成は、実施形態 3のものと同じであ る(図 17参照)。
[0114] <動作 >
次に、図 25〜図 28を用いて、本実施形態のアレイ型演算装置 1000の処理につい て説明する。基本的な処理の流れは実施形態 1 (図 9〜図 11)と同じであるので、相 違点を中心に説明する。
図 25は、アレイ型演算装置 1000で対象画像 200と参照画像 100との相関を求め る処理を示すフローチャートである。この処理において、実施形態 1での処理(図 9参 照)と異なる点は、 PEにセットする対象データが間引いたものである点と、参照デー タ 2行分を奇数番目と偶数番目とに分けてメモリキャッシュ 0とメモリキャッシュ 1との 2 つにセットする点である。
[0115] 参照データを 2行分使用する点で実施形態 3と共通する。しかし、実施形態 3では 2 行分のデータを同時に使用する期間があるために、 1行目を使用している途中で 2行 目を別のメモリキャッシュにセットする力 実施形態 4では 2つのメモリキャッシュのデ ータは同じ期間で使用するため、同時にセットする点が異なる。また、実施形態 4で は、メモリキャッシュのデータを交互に使用する。
[0116] 最初に、対象画像 200から、各 PEの対象データ記憶部 2200にそれぞれの対象デ 一タを読込む (ステップ S601)。
例えば、対象画像 200を巿松模様状に間引いた対象画像である図 24の対象画像 (8201、 8011)をセッ卜する。
制御情報生成部 3000のカウンタ記憶部 3010に値をセットする (ステップ S110)。 例えば、「Counter」に「8」をセットする。
[0117] 次に、参照画像 100のうち、アレイ型演算装置 1000に供給する 2行分データのアド レスをレジスタ 0及びレジスタ 1にロードする(ステップ S602)。
例えば、図 24の参照データ 8100のアドレスをレジスタ 0に、参照データ 8101のァ ドレスをレジスタ 1にロードする。
その後、「exe array」の実行を行い (ステップ S130)、演算結果を出力する (ステツ プ S140)。 参照画像 100の最終行まで演算処理を繰り返す (ステップ SI 20からス テツプ S 150)。
[0118] 参照画像 100の最終列まで演算したら (ステップ S 160)処理を終了する。
図 26は、「exec_array」の処理を示すフローチャートであり、処理内容は、実施形態
1とほぼ同じである(図 10参照)力 PEの処理 (ステップ S603)が異なる。
図 27を用いて、 PEの処理について説明する。図 27は、 PEの処理を示すフローチ ヤートである。
[0119] この処理は、実施形態 1での処理(図 11参照)と異なる点は、各 PEの参照データ記 憶部 2300に参照データを読込む場合に、メモリキャッシュ 0とメモリキャッシュ 1とから 交互に読込む点である。
例えば、図 29で、 PEアレイ 1100の 1行目の PEには、 「T01」「Τ20」「Τ40」〜の対象 データがセットされているので、 「R0y」「R2y」「R4y」〜の参照データと演算し、 PEァレ ィ 1100の 2行目の PEには、「T11」「Τ31」「Τ51」〜の対象データがセットされているの で、「Rly」「R3y」「R5y」〜の参照データと演算をする必要があるからである。
[0120] 命令生成部(3100等)から送られた命令力 実行するという命令であれば (ステップ S300 :実行)、レジスタ 0の指すメモリキャッシュ 0 (1006)又はレジスタ 1の指すメモリ キャッシュ 1 (1007)から、各 PEの参照データ記憶部 2300に参照データを読込む( ステップ S604)。
どちらのメモリキャッシュ力 データを読むかは、命令生成部力 渡される命令で指 示されている。この命令については、図 28を用いて後で説明する。
[0121] 次に、演算部 2100は、対象データ記憶部 2200の対象データと参照データ記憶部 2300の参照データとの差分絶対値を求め (ステップ S310)、演算結果を、相関記憶 部 2400の演算結果データ 2410に記憶する(ステップ S320)。その後、演算結果デ ータと受信データ 2420を加算して次行の PEに送り、データを受取った次行の PEは 、自 PE内の受信データ 2420に記憶する。
[0122] 一方、命令生成部(3100等)から送られた命令力 キャンセルという命令であれば( ステップ S300:キャンセル)、何もしな!、で終了する。
図 28は、制御情報生成部 3000の処理と、命令生成部(3100等)の処理について 説明する。
まず、図 28 (a)を用いて、制御情報生成部 3000の処理について説明する。図 28 ( a)は、実施形態 4の制御情報生成部 3000の処理を示すフローチャートである。
[0123] ここでは、制御情報生成部 3000でのトークンの生成について説明する。
カウンタ「Counter」の値によって、トークンを生成する(ステップ S610)。
制御情報生成部 3000では、「Counter」が「==0」の場合には、「Invalid」トークンを生 成し (ステップ S611)、「Counter」が「≠0」の場合には、「Valid,selO」トークンを生成す る(ステップ S 612)。
[0124] 「selO」とは、レジスタ 0の指す先のデータを使用する旨の指示である。
トークン作成後に、「Counter」の値を 1減算する(ステップ S620)。
次に、図 28 (b)を用いて、命令生成部(3100等)の処理について説明する。図 28 ( b)は、命令生成部(3100等)の処理を示すフローチャートである。
命令生成部(3100等)は、実施形態 1と同様、それぞれは同様の処理を行う。 [0125] まず、制御情報記憶部 3110に記憶しているトークンを次の命令生成部に送信し( ステップ S650)、前の命令生成部又は制御情報生成部からトークンを受信する (ステ ップ S660)。
受信したトークンを基に、 PEに実行させる命令を生成する。
トークンが「Invalid」の場合 (ステップ S670)は「exec_array」命令を実行しな!、命令 を生成し (ステップ S671)、 rvalid,sel0jの場合は「data_sel0」を使用して「exec_array」 命令を実行する命令を生成し (ステップ S672)、 「Valid,sell」の場合は「data_sell」を 使用して「eXec_array」命令を実行する命令を生成する (ステップ S673)。
[0126] その後、トークンを反転させて、「sel0」であった場合には「sell」に、「sell」であった 場合には「sel0」にする(ステップ S680)。すなわち、次の行の PEで読むメモリキヤッ シュを換えるためである。
生成した演算命令は、各 PEに送られ (ステップ S685)、トークンは制御情報記憶部 3110に記憶する(ステップ S690)。
[0127] 以下に、制御情報生成部 3000が作成したトークンと PEの実行の関係について説 明する。
図 29は、トークンと PEの動作を時間軸上にあらわした図である。
制御情報生成部 3000で発行される Validトークンは、「Valid,selO」である力 PEァレ ィの各行の PEでは、「Valid,selO」と「Valid,sell」とのどちらかを基に生成された命令が 渡ること〖こなる。
[0128] 従って、例えば、サイクル「Cyc 0」では、 PEアレイ 1行目のトークンは「Valid,selO」で ある。サイクル「Cyc 0」では、 2行目のトークンは 1行目のトークンを反転した「Valid,sel 1」で、 1行目のトークンは「Valid,selO」である。
すなわち、 1行目の PEと 3行目の PEと 5行目の PEには「Valid,selO」、 2行目の PEと 4 行目の PEには「Valid,sell」トークンで生成された命令を実行する。
[0129] 次に、図 30は、実施形態 4のプログラムの例を示す図である。
プログラム命令リスト 8600には、プログラム命令 8601ごとの動作 8602について記 載している。また、制御情報(トークン)の値に応じての動作を示している。
例えば、トークン「Invalid」8603の場合は、 ^ 6(;_& &」は^0 」、すなわち実行は 行なわず、 ^(1^10」8604の場合は「€^&_3610を使用して実行」することを示し、「V alid,sell」 8605の場合は「data_sellを使用して実行」することを示して!/、る。
[0130] 「ld[addr],rO,rl」8700は、レジスタ 0とレジスタ 1に、次の参照画像のアドレスをロー ドする指示である。具体的には、レジスタ 0に [addr]が示すアドレスをロードし、レジス タ 1には [addr] +offset が示すアドレスを同時にロードする。例えば、図 24の参照デ ータ 8100と参照データ 8101が連続してメモリに存在する場合に、 [addr]は参照デー タ 8100のアドレスであり、 offsetは、参照データ 8100の長さとなる。
[0131] また、「exec_array rO rl」 8701は、レジスタ 0又はレジスタ 1の指す先の参照データ を用いて演算を行なう指示である。
「exec_array rO rl」8701と「exec_array rO rl」8702は、命令は同じであるが、どちら のレジスタを使用するかは、トークンによる。
<補足 >
以上、本発明に係るアレイ型演算装置にっ 、て実施形態に基づ 、て説明したが、 この実行装置を部分的に変形することもでき、本発明は上述の実施形態に限られな いことは勿論である。即ち、
(1)実施形態では、 PEアレイの各 PEは、行方向に隣接され、行単位に命令生成部 を設けて動作させることとしているが、行方向だけでなぐ列方向、斜めを含め隣接す る各 PEを接続して命令生成部を設けてもょ ヽ。
[0132] この構成においては、トークンを元に生成される命令は、 PEアレイの任意の PEに 送ることができる。その場合、レジスタ設定やトークンにより各 PEが使用するデータの 入力先を動的に変更したり、また、命令を実行する PEを定める、すなわち、命令の適 用範囲を定めることにより、より柔軟な実行が可能となる。
(2)実施形態では、 PEアレイはハードウェアで実現しているが、動的に再構成可能 なハードウェアを用いて実現してもよい。ここで動的に再構成可能なハードウェアとは 、ハードウェアの各ロジックを接続するプログラム可能な配線に、 構成情報を与える ことで,ハードウェアの論理構造を動的に変更可能なものとする。
(3)実施形態 4では、参照データの変換は、トークンを反転させることで行っているが 、固定的に、変換回路が偶数位置か奇数位置かを示す情報を持ってもよい。すなわ ち、 PEアレイの行ごとに読込むレジスタを固定しておく。
産業上の利用可能性
本発明に力かるアレイ型演算装置は、簡易な装置で柔軟かつ高性能な処理を実 現することが可能であるため、画像処理 LSIの演算器等として特に有用である。

Claims

請求の範囲
[1] 順序付けられた複数のプロセッサエレメントで構成されたプロセッサアレイと、
1サイクル毎に、 1個の命令を取得する命令取得手段と、
1サイクル毎に、第 1順位のプロセッサエレメントの動作を制御する為の動作制御情 報を作成し、作成した動作制御情報と前記命令取得手段で取得した 1個の命令とに 基づき、第 1順位のプロセッサエレメントに対する命令を生成する手段と、
1サイクル毎に、次順位以降のプロセッサエレメントの動作を制御する為の動作制 御情報を、前順位のプロセッサエレメントの動作を制御する為に作成した動作制御情 報を基に作成し、作成した動作制御情報と前記命令取得手段で取得した 1個の命令 とに基づき、前記次順位以降のプロセッサエレメントに対する命令を生成する手段と を備えることを特徴とするアレイ型演算装置。
[2] 前記プロセッサアレイは、信号線で連結された複数のプロセッサエレメントで構成さ れ、
1サイクル毎に、各プロセッサエレメントの演算結果を、前記信号線を介して次順位 のプロセッサエレメントに伝達する
ことを特徴とする請求項 1記載のアレイ型演算装置。
[3] 前記アレイ型演算装置は、更に、 1サイクル毎に、基本制御情報を生成する基本制 御情報生成手段を備え、
第 1順位のプロセッサエレメントの動作を制御する為の動作制御情報は、前記基本 制御情報生成手段で生成された基本制御情報を基に作成される
ことを特徴とする請求項 1記載のアレイ型演算装置。
[4] 前記プロセッサエレメントは、それぞれ、複数種類のデータを取得するデータ取得 手段を備え、
前記動作制御情報は、各プロセッサエレメントが命令を実行する際に使用するデー タの種類を指定する指定情報を含み、
前記各プロセッサエレメントは、実行に際して、前記指定情報に応じて取得したデ ータを使用する
ことを特徴とする請求項 1記載のアレイ型演算装置。
[5] 前記動作制御情報は、前記命令取得手段で取得した 1個の命令を実行するか否 かを指定する情報であって、
前記動作制御情報が実行する旨の指示である場合には、前記プロセッサエレメント は前記命令を実行し、前記動作制御情報が実行しな!、旨の指示である場合には、 該当するプロセッサエレメントへの電力供給を抑止する
ことを特徴とする請求項 1記載のアレイ型演算装置。
[6] 信号線で連結された N個のプロセッサエレメントを M行有した、 M行 X N列の 2次元 アレイ構造のプロセッサアレイであって、各プロセッサエレメントの演算結果を、次行 のプロセッサエレメントに伝達可能に接続されたプロセッサアレイと、
1サイクル毎に、基本制御情報を生成する基本制御情報生成手段と、
1サイクル毎に、 1個の命令を取得する命令取得手段と、
1サイクル毎に、最初の行のプロセッサエレメントの動作を制御する為の動作制御 情報を前記基本制御情報生成手段で生成された基本制御情報を基に作成し、作成 した動作制御情報と前記命令取得手段で取得した 1個の命令とに基づき、最初の行 に対する命令を生成する手段と、
1サイクル毎に、 2〜M行のプロセッサエレメントの動作を制御する為の動作制御情 報を前行のプロセッサエレメントの動作を制御する為に作成した動作制御情報を基 に作成し、作成した動作制御情報と前記命令取得手段で取得した 1個の命令とに基 づき、前記 2〜M行のプロセッサエレメントに対する命令を生成する手段とを備え、 前記プロセッサアレイのそれぞれの行に配列されている N個の前記プロセッサエレ メントは、当該行に対する命令を実行する
ことを特徴とするアレイ型演算装置。
PCT/JP2005/014077 2004-08-04 2005-08-02 アレイ型演算装置 WO2006013839A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US11/572,701 US7606996B2 (en) 2004-08-04 2005-08-02 Array type operation device
JP2006531472A JP4213750B2 (ja) 2004-08-04 2005-08-02 アレイ型演算装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004-227927 2004-08-04
JP2004227927 2004-08-04

Publications (1)

Publication Number Publication Date
WO2006013839A1 true WO2006013839A1 (ja) 2006-02-09

Family

ID=35787124

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/014077 WO2006013839A1 (ja) 2004-08-04 2005-08-02 アレイ型演算装置

Country Status (4)

Country Link
US (1) US7606996B2 (ja)
JP (1) JP4213750B2 (ja)
CN (1) CN100458762C (ja)
WO (1) WO2006013839A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9965824B2 (en) * 2015-04-23 2018-05-08 Google Llc Architecture for high performance, power efficient, programmable image processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01295335A (ja) * 1988-05-23 1989-11-29 Fujitsu Ltd 負荷分散方式
JPH0218687A (ja) * 1988-07-06 1990-01-22 Nec Software Ltd パイプラインプロセッサ制御方式
JPH03268054A (ja) * 1990-03-19 1991-11-28 Fujitsu Ltd 高速並列処理システム
JPH04120652A (ja) * 1990-09-11 1992-04-21 Matsushita Graphic Commun Syst Inc 並列処理装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5768561A (en) * 1992-06-30 1998-06-16 Discovision Associates Tokens-based adaptive video processing arrangement
US5659785A (en) 1995-02-10 1997-08-19 International Business Machines Corporation Array processor communication architecture with broadcast processor instructions
JPH08297650A (ja) * 1995-04-25 1996-11-12 Nippon Steel Corp アレイプロセッサ
US7082516B1 (en) * 2000-09-28 2006-07-25 Intel Corporation Aligning instructions using a variable width alignment engine having an intelligent buffer refill mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01295335A (ja) * 1988-05-23 1989-11-29 Fujitsu Ltd 負荷分散方式
JPH0218687A (ja) * 1988-07-06 1990-01-22 Nec Software Ltd パイプラインプロセッサ制御方式
JPH03268054A (ja) * 1990-03-19 1991-11-28 Fujitsu Ltd 高速並列処理システム
JPH04120652A (ja) * 1990-09-11 1992-04-21 Matsushita Graphic Commun Syst Inc 並列処理装置

Also Published As

Publication number Publication date
US20080282061A1 (en) 2008-11-13
JPWO2006013839A1 (ja) 2008-05-01
CN101010671A (zh) 2007-08-01
JP4213750B2 (ja) 2009-01-21
CN100458762C (zh) 2009-02-04
US7606996B2 (en) 2009-10-20

Similar Documents

Publication Publication Date Title
CN108073549B (zh) 卷积运算装置及方法
JP2008310649A (ja) パイプライン演算装置
TWI441091B (zh) 借助圖形處理單元執行影像信號處理的方法以及用於執行影像信號處理的裝置
JP2011035655A (ja) フレームレート変換装置、およびそれを搭載した表示装置
KR20180045029A (ko) 배선 복잡성이 감소된 시프트 레지스터
WO2006013839A1 (ja) アレイ型演算装置
JP4625903B2 (ja) 画像処理プロセッサ
JPH11196425A (ja) 動きベクトル検出装置
CN102348090B (zh) 帧插补装置
JP3821198B2 (ja) 信号処理装置
JP4408113B2 (ja) 信号処理方法
JP2004356673A (ja) 動きベクトル検出方法及び同方法を用いた画像処理装置
US9277168B2 (en) Subframe level latency de-interlacing method and apparatus
JPH0851627A (ja) シストリックアーキテクチャ内に配置される「n+1」の演算子にオペランドを供給するための装置
JP2012059131A (ja) Simd型マイクロプロセッサ及びその処理方法
TWI616840B (zh) 卷積運算裝置及方法
JP2007329858A (ja) 動画像表示装置、動画像表示方法及びプログラム
JP3642010B2 (ja) フレームシンクロナイザ
JP3704519B2 (ja) 命令解読のための複数のソース
JP3352558B2 (ja) 信号処理装置
JP2004080295A (ja) 動きベクトル検出装置および動きベクトル検出方法
JP2925842B2 (ja) パイプライン処理装置
JP2003259220A (ja) イメージデータ処理装置、撮像システム、イメージデータ処理方法、コンピュータプログラム、及びコンピュータ読み取り可能な記憶媒体
JP5511400B2 (ja) 並列信号処理プロセッサ
JPH10312454A (ja) Simd制御並列プロセッサおよび演算方法

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006531472

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 200580026332.6

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase
WWE Wipo information: entry into national phase

Ref document number: 11572701

Country of ref document: US