WO2010134329A1 - プロセッサ - Google Patents

プロセッサ Download PDF

Info

Publication number
WO2010134329A1
WO2010134329A1 PCT/JP2010/003354 JP2010003354W WO2010134329A1 WO 2010134329 A1 WO2010134329 A1 WO 2010134329A1 JP 2010003354 W JP2010003354 W JP 2010003354W WO 2010134329 A1 WO2010134329 A1 WO 2010134329A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
instructions
stream
processor
unit
Prior art date
Application number
PCT/JP2010/003354
Other languages
English (en)
French (fr)
Inventor
森下広之
Original Assignee
パナソニック株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Priority to US13/320,668 priority Critical patent/US8788793B2/en
Priority to CN201080021569.6A priority patent/CN102428441B/zh
Priority to JP2011514332A priority patent/JP5330507B2/ja
Priority to EP10777567.8A priority patent/EP2434392B1/en
Publication of WO2010134329A1 publication Critical patent/WO2010134329A1/ja

Links

Images

Classifications

    • 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, look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
    • 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, look ahead
    • G06F9/3885Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units
    • G06F9/3889Concurrent instruction execution, e.g. pipeline, look ahead using a plurality of independent parallel functional units controlled by multiple instructions, e.g. MIMD, decoupled access or execute

Definitions

  • the present invention relates to a technology that achieves both performance guarantee for one instruction stream and high responsiveness to another instruction stream in a processor that executes a plurality of instruction streams in parallel.
  • Non-Patent Document 1 In recent years, in order to improve the processing efficiency of media processing that compresses and decompresses digitized video data, audio data, etc., in Non-Patent Document 1, by executing a plurality of programs simultaneously, the computation efficiency is improved. An improved multithreaded processor is disclosed.
  • Patent Document 1 As a technique using a multi-thread processor.
  • Japanese Patent Application Laid-Open No. 2004-151561 discloses a technique for setting a processing priority for each of a plurality of instruction streams (threads) and preferentially processing an instruction stream having a high priority. With this technique, it is possible to dynamically realize the processing performance required for each instruction stream and improve the overall processing efficiency.
  • the instruction stream to be processed requires processing to be completed by a predetermined time, such as image processing, that is, performance assurance is required, or processing in response to an instruction from the user.
  • a predetermined time such as image processing, that is, performance assurance is required, or processing in response to an instruction from the user.
  • There are things to do things that do not need to be completed by a predetermined time).
  • the instruction stream that requires performance guarantee is preferentially executed, and the instruction stream that does not require performance guarantee is not executed.
  • the instruction stream that requires performance guarantee ends even if there is an instruction from the user. Until then, the processing related to the instruction is not performed. For this reason, the user feels that the response to the instruction given by the user is slow and feels uncomfortable.
  • the priority of the instruction stream to which the instruction belongs may be set higher than other instruction streams (instruction streams requiring performance guarantee). However, if it does so, it cannot be guaranteed that the processing will be completed at a predetermined time for an instruction stream for which performance guarantee is required.
  • an object of the present invention is to provide a processor, an information processing system, and a method that can achieve both performance guarantee for one instruction stream and high responsiveness to another instruction stream.
  • the present invention provides a processor having L (L is an integer of 2 or more) arithmetic units, each of M (M is an integer of 2 or more) instruction streams.
  • M ⁇ Z instruction storage areas for storing Z instructions (Z satisfies an integer of 2 or more and M ⁇ Z is L or more) that are input separately and constitute each instruction stream Including an instruction buffer, order information holding means for holding order information, which is information obtained by ordering the M ⁇ Z instruction storage areas in the instruction buffer, and the M ⁇ Z instructions in the instruction buffer
  • Extraction means for extracting instructions stored in the storage area, and an order according to the order information from all instructions stored in the M ⁇ Z instruction storage areas in an executable state And let the extraction means extract the L instructions and extract the extracted life And a control means for inputting to another arithmetic unit for each instruction.
  • the processor is in an executable state based on the order information in which the M ⁇ Z instruction storage areas are ordered, and all the instructions stored in the M ⁇ Z instruction storage areas Since L instructions are extracted from among them, one instruction stream instruction and another instruction stream instruction can be extracted simultaneously. Therefore, for example, if one instruction stream is an instruction stream for which performance guarantee is required, and the other instruction stream is an instruction stream for which performance guarantee is not required, the instructions of other instruction streams are Since there is no need to wait until the instruction stream is completed, it is possible to achieve both performance guarantee for one instruction stream and high responsiveness to another instruction stream.
  • FIG. 2 is a diagram illustrating a configuration of a processor 10.
  • FIG. FIG. 3 is a diagram illustrating the configuration of each of instruction buffers 103 to 105 and an issued instruction determination unit 106. It is a figure which shows the change of the content held in the instruction buffer before and after issuing an instruction.
  • 4 is a diagram illustrating an example of a data structure of a priority information table 300.
  • FIG. 4 is a flowchart illustrating an operation of a process for determining an instruction to be issued in the first embodiment. It is a figure which shows the operation
  • FIG. 3 is a diagram illustrating a configuration of each instruction buffer 603 to 605 and an issued instruction determination unit 606.
  • (A) shows an example of the data structure of the priority information table 800 before update
  • (b) shows an example of the data structure of the priority information table 800a after update.
  • 12 is a flowchart illustrating an operation of a process for determining an instruction to be issued in the second embodiment.
  • 12 is a flowchart illustrating an operation of updating a priority information table 800 in the second embodiment. It is a figure which shows the operation
  • FIG. 3 is a diagram showing the configuration of each of instruction buffers 1103 to 1105 and an issued instruction determination unit 1106.
  • (A) shows an example of the data structure of the priority information table 1300 before update
  • (b) shows an example of the data structure of the priority information table 1300a after update.
  • 14 is a flowchart illustrating an operation of a process for determining an instruction to be issued in the third embodiment.
  • 12 is a flowchart showing an operation of a first update process for updating the priority information table 1300.
  • 12 is a flowchart showing an operation of a second update process for updating the priority information table 1300.
  • FIG. 16 is a diagram illustrating an operation image of assignment (issue) of each instruction when parallel processing using a first instruction stream and a second instruction stream is performed in the third embodiment.
  • 1 is a diagram illustrating an example of a configuration of a video processing system 1600.
  • FIG. 1 is a block diagram showing a configuration of the processor 10 according to the first embodiment of the present invention.
  • the processor 10 is a processor that executes N (N is an integer of 2 or more) instruction streams (N threads) simultaneously and independently, and includes an instruction memory 101, an instruction group determination unit 102, and N instructions.
  • Buffer (first instruction buffer 103, second instruction buffer 104,..., Nth instruction buffer 105), issued instruction determining unit 106, priority determining unit 107, and N register files (first register file) 108, the second register file 109,..., The Nth register file 110), an arithmetic unit group 111, and a write back bus 112.
  • each instruction buffer and register file are in one-to-one correspondence and constitute N logical processors.
  • processor 10 can execute four instructions simultaneously.
  • Instruction memory 101 is a memory that holds instructions executed in the processor 10, and holds N independently executed instruction streams (threads).
  • Instruction group determination unit 102 reads instructions belonging to each instruction stream from the instruction memory 101, decodes them, and writes them in the instruction buffer to which the instructions are assigned.
  • the first instruction buffer 103 to the Nth instruction buffer 105 receives and holds instructions belonging to the i-th instruction stream (hereinafter referred to as i-th instruction stream).
  • the first instruction buffer 103 includes a first instruction holding unit 201 and a first instruction flow scheduler 202 as shown in FIG.
  • the first instruction holding unit 201 has first to fourth storage areas 201a to 201d which are areas for holding four instructions. Each instruction is sequentially stored in the first to fourth storage areas 201a, 201b, 201c, and 201d based on the execution order. For example, as shown in FIG. 3, when the instruction a1 held in the first storage area 201a is executed (issued), it was held in the second to fourth storage areas 201b, 201c, and 201d. The instructions a2 to a4 are shifted one by one, and the new instruction a5 is stored in the free fourth storage area 201d.
  • the first instruction flow scheduler 202 has a flag associated with each of the four first to fourth storage areas 201a to 201d included in the first instruction holding unit 201.
  • the flag indicates whether or not an instruction stored in the associated storage area can be issued.
  • an external for example, the instruction group determination unit 102 detects an instruction that can be issued in a machine cycle based on the flow dependency of each instruction, and sets a value indicating that the instruction can be issued to the issueable instruction. Set to flag.
  • the second instruction buffer 104 also includes a second instruction holding unit 203 and a second instruction flow scheduler 204, and the Nth instruction buffer 105 also includes an Nth instruction holding unit 205 and an Nth instruction flow scheduler. 206. Since these components are the same as those in the first instruction buffer 103, description thereof is omitted here.
  • Priority determination unit 107 holds a priority information table 300 that is used when the issued instruction determination unit 106 determines an instruction to be issued.
  • the priority information table 300 includes a priority 301, an instruction stream 302, and an instruction number 303.
  • the total of 4 ⁇ N table elements included in each of the N instruction buffers are included. Have.
  • the priority 301 is a value indicating the reading order for a total of 4 ⁇ N storage areas of each of the N instruction buffers.
  • the instruction stream 302 is a value for identifying the instruction stream.
  • the value i (i is an integer of 1 to N) indicates the i-th instruction stream.
  • the instruction number 303 is a value for identifying a storage area in the i-th instruction holding unit in which the i-th instruction stream instruction indicated by the instruction stream 302 is held.
  • the value n (n is an integer of 1 to 4) indicates the nth storage area.
  • the instruction having the first priority is indicated in the table element 304, and here is the instruction stored in the first storage area 201a of the first instruction stream.
  • the instruction having the second priority is indicated in the table element 305, and here is an instruction stored in the first storage area 203a of the second instruction stream.
  • the instruction having the third priority is indicated in the table element 306, and here is an instruction stored in the second storage area 201b of the second instruction stream.
  • the instruction having the fourth priority is indicated in the table element 307, and here is an instruction stored in the third storage area 201c of the second instruction stream.
  • the instruction having the fifth priority is shown in the table element 308, and here is an instruction stored in the second storage area 201b of the first instruction stream.
  • the setting method is, for example, when the first instruction stream is an instruction stream for which a certain performance guarantee is required, and the processing should be completed within a predetermined time (for example, within time t),
  • a priority is assigned so that a minimum number of instructions for completion of processing at time t can be issued at each instruction issuance timing (machine cycle).
  • machine cycle the first instruction stream issues one instruction for each machine cycle, and the processing is completed within a predetermined time.
  • the highest priority among the top four priorities is set to 1 so that instructions in the first instruction stream can always be preferentially issued.
  • one instruction of the first instruction stream is always issued every machine cycle.
  • Issuing instruction determination unit 106 determines an instruction to be issued from the first instruction buffer 103 to the Nth instruction buffer 105 every machine cycle.
  • the issued instruction determination unit 106 is in an executable state based on the first instruction stream scheduler 202 to the Nth instruction stream scheduler 206 and the priority information table 300, and all the instructions stored in each storage area are stored. Of these, four instructions are selected according to the order shown in the priority information table 300, and each of the selected instructions is output to an individual computing unit.
  • FIG. 2 the hardware configuration of the issued instruction determination unit 106 is shown.
  • the issued instruction determination unit 106 includes a first instruction determination unit 211 to a fourth instruction determination unit 214, an instruction selection unit 215, and a first instruction extraction unit 221 to a fourth instruction extraction unit 224.
  • Instruction selection unit 215 Based on the first instruction stream scheduler 202 to the Nth instruction stream scheduler 206 and the priority information table 300, the instruction selection unit 215 is in an executable state and out of all the instructions stored in each storage area. In accordance with the order shown in the priority information table 300, four instructions to be selected are specified. Specifically, signals indicating the number of instructions that can be issued in each instruction buffer from each of the first instruction buffer 103 to the Nth instruction buffer 105, that is, signals 241 to 243 indicating the number of instructions in an executable state are received. In accordance with the order shown in the priority information table 300, four instructions to be selected are specified.
  • the instruction selection unit 215 outputs issued instruction selection signals 251 to 254 indicating instructions to be acquired by the instruction determination unit to the fourth instruction determination unit 214 from the first instruction determination unit 211.
  • the issued instruction selection signal includes information indicating an instruction to be extracted, for example, an instruction buffer holding the instruction to be extracted and information indicating its storage area.
  • the first instruction extraction unit 221 to the fourth instruction extraction unit 224 The nth instruction extraction unit (n is an integer of 1 to 4) is for extracting instructions held in the nth storage area of each of the Nth instruction buffer 105 from the first instruction buffer 103.
  • instruction extraction from the first instruction buffer 103 will be described as a specific example.
  • the first instruction extraction unit 221 is connected to the connection line 231
  • the second instruction extraction unit 222 is connected to the connection line 232
  • the third instruction extraction unit 223 is connected to the connection line 233
  • the fourth instruction extraction unit 224 is connected to the connection line 234.
  • the connection line 231 is the first storage area 201a
  • the connection line 232 is the second storage area 201b
  • the connection line 233 is the third storage area 201c
  • the connection line 234 is the fourth storage area 201d.
  • the first instruction extraction unit 221 reads out the instruction held in the first storage area via the connection line 231 and outputs the instruction to the instruction determination unit instructed to extract.
  • each of the second instruction extraction unit 222 to the fourth instruction extraction unit 224 reads an instruction held in the corresponding storage area via a connection line connected to the storage area where the instruction is held. , And output to the instruction determination unit instructed to extract.
  • the first instruction determination unit 211 to the fourth instruction determination unit 214 Each of the first instruction determination unit 211 to the fourth instruction determination unit 214 is associated with the arithmetic units included in the arithmetic unit group 111 on a one-to-one basis.
  • the n-th instruction determining unit (n is an integer of 1 to 4) specifies which instruction buffer the instruction is acquired from, based on the issued instruction selection signal received from the instruction selecting unit 215, and
  • the m-th instruction extraction unit (m is an integer of 1 to 4) controls to extract the instruction to be extracted.
  • the nth instruction determination unit acquires the instruction extracted by the mth instruction extraction unit
  • the nth instruction determination unit outputs the acquired instruction to the associated computing unit.
  • the first register file 108 to the Nth register file 110 The i-th register file (i is an integer of 1 to N) is a register group that holds data to be read and written by executing the instruction stream held in the i-th instruction buffer.
  • the computing unit group 111 includes a plurality of computing units including adders and multipliers.
  • the computing unit group 111 includes four computing units (calculators 111a to 111d).
  • the computing unit 111a is a first instruction determining unit 211
  • the computing unit 111b is a second instruction determining unit 212
  • the computing unit 111c is a third instruction determining unit 213
  • the computing unit 111d is a fourth instruction determining unit 214. Assume that they are associated with each other.
  • the instruction processed by the arithmetic unit includes information for identifying the instruction flow to which the instruction belongs, and outputs the operation result to the corresponding register file based on the information.
  • the write back bus 112 is a bus for writing back the output from the arithmetic unit group 111 to the first register file 108 to the Nth register file 110.
  • the variable i is a counter that counts the number of instructions issued in the machine cycle.
  • the variable j indicates a pointer for reading information from the priority information table 300 of FIG.
  • the variable k indicates the maximum number of instructions that can be issued in a machine cycle, and is 4 in this embodiment.
  • the instruction selection unit 215 determines whether or not the value of the variable i is equal to or less than the variable k, that is, whether or not the number of instructions to be issued is equal to or less than the maximum value (step S10).
  • the instruction selecting unit 215 When determining that the value of the variable i is equal to or less than the variable k (“Yes” in step S10), the instruction selecting unit 215 reads the jth entry of the priority information table 300 and determines whether or not the reading is successful. Is determined (step S15).
  • step S15 If it is determined that the reading of the j-th entry has succeeded (“Yes” in step S15), the instruction selection unit 215 determines whether or not the instruction in the instruction stream indicated by the acquired j-th entry can be issued. (Step S20).
  • step S20 If it is determined that it cannot be issued (“No” in step S20), a value 1 is added to the variable j (step S25), and the process returns to step S15.
  • the instruction selection unit 215 When it is determined that it can be issued (“Yes” in step S20), the instruction selection unit 215 outputs an issue instruction selection signal to the i-th instruction determination unit.
  • the i-th instruction determination unit that has received the issued instruction selection signal causes the instruction extraction unit corresponding to the storage area in which the instruction to be issued is held to extract the instruction, and corresponds to the instruction extracted by the instruction extraction unit. The result is output to the calculator (step S30).
  • step S35 the process returns to step S10.
  • step S10 when it is determined that the value of the variable i is not less than or equal to the variable k (“No” in step S10), and when reading of the jth entry has failed, that is, it is determined that there is no entry at the position indicated by the pointer (step The process ends ("No" in S15).
  • FIG. 6 is an operation image of assignment (issuance) of each instruction when parallel processing using the first instruction stream and the second instruction stream is performed in the first embodiment.
  • the vertical axis indicates time
  • the horizontal axis indicates the degree of parallelism of instructions.
  • Block 501 shows the state of instruction execution of the first instruction stream and shows that one instruction is always issued with the highest priority.
  • Block 502 shows the state of instruction execution in the second instruction stream and indicates that three instructions are being executed using a parallelism not used in the first instruction stream.
  • the first instruction stream is an instruction stream for which a certain performance guarantee is required, and the performance can be satisfied by always issuing one instruction within a predetermined time (for example, within time t).
  • the responsiveness of other instruction streams can be kept high while satisfying the performance guarantee condition.
  • FIG. 7 is a block diagram showing a configuration of the processor 10a according to the second embodiment.
  • the processor 10a is a processor that executes N (N is an integer of 2 or more) instruction streams (N threads) simultaneously and independently, and includes an instruction memory 601, an instruction group determination unit 602, and N instructions.
  • a buffer (first instruction buffer 603, second instruction buffer 604,..., Nth instruction buffer 605), an issue instruction determination unit 606, a priority determination unit 607, and N register files (first register file 608, 2nd register file 609,..., Nth register file 610), an arithmetic unit group 611, a write-back bus 612, and a priority update unit 613.
  • each instruction buffer and register file are in one-to-one correspondence and constitute N logical processors.
  • processor 10a can execute four instructions at the same time as the processor 10 shown in the first embodiment.
  • Instruction memory 601 Similar to the instruction memory 101 shown in the first embodiment, the instruction memory 601 is a memory that holds instructions executed in the processor 10a, and holds N instruction streams (threads) that are executed independently. ing.
  • Instruction group determination unit 602 Since the instruction group determination unit 602 is the same as the instruction group determination unit 102 shown in the first embodiment, the description thereof is omitted here.
  • the first instruction buffer 603 to the Nth instruction buffer 605 receives and holds instructions belonging to the i-th instruction stream (hereinafter referred to as i-th instruction stream).
  • the first instruction buffer 603 includes a first instruction holding unit 701 and a first instruction flow scheduler 702 as shown in FIG. Note that each of the first instruction holding unit 701 and the first instruction flow scheduler 702 is the same as each of the first instruction holding unit 201 and the first instruction flow scheduler 202 shown in the first embodiment. Description of is omitted.
  • the second instruction buffer 604 also includes a second instruction holding unit 703 and a second instruction flow scheduler 704, and the Nth instruction buffer 605 also includes an Nth instruction holding unit 705 and an Nth instruction flow scheduler. 706. Since these components are also the same as those in the first embodiment, description thereof is omitted here.
  • Priority determination unit 607 holds a priority information table 800 that is used when the issued instruction determination unit 606 determines an instruction to be issued.
  • the priority information table 800 includes a priority 801, an instruction stream 802, and an instruction number 803. Have. Since each of the priority 801, the instruction stream 802, and the instruction number 803 is the same as the priority 301, the instruction stream 302, and the instruction number 303, description thereof is omitted here.
  • the priority information table 800 it is assumed that the priority (issue priority order) of each command is set by the setting method shown in the first embodiment as an initial state.
  • Priority update unit 613 updates the priority information table 800 held by the priority determination unit 607 under certain conditions.
  • the priority update unit 613 updates the priority information table 800 that stores the priority information held by the priority determination unit 607 in accordance with an instruction from the software.
  • each entry (priority information) in the priority information table 800 held in the priority determination unit 607 is mapped to a memory address or a control register, so that the priority update unit 613 receives an instruction from the software.
  • the priority information table 800 is updated based on the received instruction.
  • the priority update unit 613 receives a write address and write data of a memory access instruction or a control register access instruction of a multithread processor, and if the write address indicates one of the entries of the priority information table 800, Write data to the entry.
  • the write data is updated priority information to be written to the entry.
  • the software instruction is executed by a program written in advance so as to be executed after a predetermined instruction is issued (executed on the program), for example.
  • the update result when the priority information table 800 is updated is shown in FIG. 9B as the priority information table 800a.
  • the priority update unit 613 is updated by setting the priority of the priority information 808, which is the priority 5 in the priority information table 800 before the update, to 2 according to the instruction of the software.
  • the priority information 808 before the update is updated to the priority information 810 having the priority 2 after the update, and each of the priority information 805 to 807 before the update has one priority rank. It corresponds to the updated priority information 811 to 813, respectively.
  • Issued instruction determination unit 606 The issued instruction determination unit 606 determines an instruction to be issued from the first instruction buffer 103 to the Nth instruction buffer 105 every machine cycle.
  • the issued instruction determination unit 606 is in an executable state based on the first instruction stream scheduler 202 to the Nth instruction stream scheduler 206 and the priority information table 800 and stores all instructions stored in each storage area. Of these, four instructions are selected according to the order shown in the priority information table 800, and each of the selected instructions is output to an individual computing unit.
  • the issued instruction determination unit 606 includes a first instruction determination unit 711 to a fourth instruction determination unit 714, an instruction selection unit 715, and a first instruction extraction unit 721 to a fourth instruction extraction unit 724.
  • the instruction selection unit 715 is the same as the instruction selection unit 215 shown in the first embodiment. Specifically, a signal indicating the number of instructions that can be issued in each instruction buffer from each of the first instruction buffer 603 to the Nth instruction buffer 605, that is, signals 741 to 743 indicating the number of instructions in an executable state is received. In accordance with the order shown in the priority information table 800, four instructions to be selected are specified.
  • the instruction selection unit 715 outputs issued instruction selection signals 751 to 754 indicating instructions to be acquired by the instruction determination unit to each of the first instruction determination unit 711 and the fourth instruction determination unit 714.
  • the issued instruction selection signal includes information indicating an instruction to be extracted, for example, an instruction buffer holding the instruction to be extracted and information indicating its storage area.
  • the first instruction determination unit 711 to the fourth instruction determination unit 714 Each of the first instruction determination unit 211 to the fourth instruction determination unit 214 has a one-to-one correspondence with the arithmetic units included in the arithmetic unit group 611, and the function thereof is the first instruction shown in the first embodiment. Since it is the same as each of the determination part 211 to the 4th instruction determination part 214, description here is abbreviate
  • the computing unit group 611 includes a plurality of computing units including adders and multipliers.
  • the computing unit group 611 includes four computing units (calculators 611a to 611d).
  • the computing unit 611a is a first instruction determining unit 711
  • the computing unit 611b is a second instruction determining unit 712
  • the computing unit 611c is a third instruction determining unit 713
  • the computing unit 611d is a fourth instruction determining unit 714, Assume that they are associated with each other.
  • the instruction processed by the arithmetic unit includes information for identifying the instruction flow to which the instruction belongs, and outputs the operation result to the corresponding register file based on the information.
  • the write back bus 612 is a bus for writing back the output from the computing unit group 611 to the first register file 608 to the Nth register file 610.
  • the variable i is a counter that counts the number of instructions issued in the machine cycle.
  • a variable j indicates a pointer for reading information from the priority information table 800.
  • the variable k indicates the maximum number of instructions that can be issued in a machine cycle, and is 4 in this embodiment.
  • the instruction selection unit 715 determines whether or not the value of the variable i is equal to or less than the variable k, that is, whether or not the number of instructions to be issued is equal to or less than the maximum value (step S105).
  • the instruction selecting unit 715 When determining that the value of the variable i is equal to or less than the variable k (“Yes” in step S105), the instruction selecting unit 715 reads the jth entry in the priority information table 800 and determines whether or not the reading is successful. Is determined (step S110).
  • step S110 If it is determined that the reading of the j-th entry has succeeded (“Yes” in step S110), the instruction selection unit 715 determines whether or not the instruction in the instruction stream indicated by the acquired j-th entry can be issued. (Step S115).
  • step S115 If it is determined that it cannot be issued (“No” in step S115), a value 1 is added to the variable j (step S120), and the process returns to step S110.
  • the instruction selection unit 715 If it is determined that it can be issued (“Yes” in step S115), the instruction selection unit 715 outputs an issue instruction selection signal to the i-th instruction determination unit.
  • the i-th instruction determination unit that has received the issued instruction selection signal causes the instruction extraction unit corresponding to the storage area in which the instruction to be issued is held to extract the instruction, and corresponds to the instruction extracted by the instruction extraction unit. The result is output to the calculator (step S125).
  • step S130 the value 1 is added to the variable i and the value 1 is added to the variable j (step S130), and the process returns to step S105.
  • step S105 when it is determined that the value of the variable i is not less than or equal to the variable k (“No” in step S105), and when reading of the jth entry has failed, that is, it is determined that there is no entry at the position indicated by the pointer (step The process ends ("No" in S110).
  • the priority update unit 613 determines whether or not an instruction for updating (a memory access instruction or a control register access instruction indicating one of the entries in the priority information table 800) has been received from the software (step S200).
  • the priority update unit 613 updates the priority information table 800 based on the received instruction (step S205).
  • step S200 After updating the priority information table 800 and when determining that an instruction relating to the update has not been received (“No” in step S200), the process returns to step S200 and enters a state of waiting for an instruction relating to the update. .
  • the instruction related to the update is issued after a predetermined command is issued (executed on the program).
  • FIG. 12 is an operation image of assignment (issuance) of each instruction when parallel processing using the first instruction stream and the second instruction stream is performed in the second embodiment. .
  • the vertical axis indicates time
  • the horizontal axis indicates the degree of parallelism of instructions.
  • Block 1001 shows the state of instruction execution of the first instruction stream. Until t / 2, one instruction is always issued with the highest priority according to the priority order of the priority information table 800 shown in FIG. 9A. ing.
  • the block 1002 shows a state of instruction execution of the second instruction stream, and indicates that the instruction is executed using a parallelism that is not used in the first instruction stream until t / 2.
  • the first instruction stream is an instruction stream for which a certain performance guarantee is required
  • the performance can be satisfied by giving the parallelism of one instruction
  • the responsiveness of other command streams can be kept high while satisfying the guarantee conditions.
  • FIG. 13 is a block diagram illustrating a configuration of the processor 10b according to the third embodiment.
  • the processor 10b is a processor that executes N (N is an integer of 2 or more) instruction streams (N threads) simultaneously and independently, and includes an instruction memory 1101, an instruction group determination unit 1102, and N instructions.
  • Buffer first instruction buffer 1103, second instruction buffer 1104,..., Nth instruction buffer 1105), issued instruction determination unit 1106, priority determination unit 1107, and N register files (first register file 1108, 2nd register file 1109,..., Nth register file 1110), computing unit group 1111, write back bus 1112, priority update unit 1113, and performance monitoring unit 1114.
  • each instruction buffer and register file are in one-to-one correspondence and constitute N logical processors.
  • processor 10b can execute four instructions at the same time as the processors 10 and 10a shown in the first and second embodiments.
  • Instruction memory 1101 Similar to the instruction memory 101 shown in the first embodiment, the instruction memory 1101 is a memory that holds instructions executed in the processor 10b, and holds N independently executed instruction streams (threads). ing.
  • Instruction group determination unit 1102 is the same as the instruction group determination unit 102 described in the first embodiment, and thus description thereof is omitted here.
  • the first instruction buffer 1103 to the Nth instruction buffer 1105 receives and holds instructions belonging to the i-th instruction stream (hereinafter referred to as i-th instruction stream).
  • the first instruction buffer 1103 includes a first instruction holding unit 1201 and a first instruction flow scheduler 1202, as shown in FIG. Note that each of the first instruction holding unit 1201 and the first instruction flow scheduler 1202 is the same as each of the first instruction holding unit 201 and the first instruction flow scheduler 202 shown in the first embodiment. Description of is omitted.
  • the second instruction buffer 1104 also includes a second instruction holding unit 1203 and a second instruction flow scheduler 1204.
  • the Nth instruction buffer 1205 also includes the Nth instruction holding unit 1205 and the Nth instruction flow scheduler. 1206. Since these components are also the same as those in the first embodiment, description thereof is omitted here.
  • the priority determination unit 1107 holds a priority information table 1300 that is used when the issued instruction determination unit 1106 determines an instruction to be issued.
  • the priority information table 1300 includes, for example, a priority 1301, an instruction stream 1302, and an instruction number 1303 as shown in FIG. 15A, and a total of 4 ⁇ N pieces of N instruction buffers respectively. Has a table element. Since each of the priority 1301, the instruction stream 1302, and the instruction number 1303 is the same as the priority 301, the instruction stream 302, and the instruction number 303, description thereof is omitted here.
  • the priority (issue priority order) of each instruction is set by the setting method described in the first embodiment as an initial state.
  • Performance monitoring unit 1114 The performance monitoring unit 1114 can down-count the N execution instruction number counter corresponding to the instruction stream that can count down the number of execution instructions of each of the N instruction streams and the machine cycle of the processor 10b. One cycle counter is provided.
  • the N execution instruction counters are down-counted by the number of executed instructions when the corresponding instruction stream instruction is executed on the processor 10b. Note that at the start of operation, an initial value is set for each of the N execution instruction counters.
  • the performance monitoring unit 1114 When any counter value of the N execution instruction counters becomes zero, the performance monitoring unit 1114 notifies the priority update unit 1113 that the counter value has become zero. At this time, information (hereinafter referred to as first notification information) notified to the priority update unit 1113 includes an identifier (instruction stream ID) indicating an instruction stream whose counter value is 0.
  • One cycle counter is counted down every time one machine cycle of the processor 10b elapses.
  • the performance monitoring unit 1114 initializes the cycle counter with the value of one initial value register storing the initial value. Further, the performance monitoring unit 1114 initializes the N number of executed instruction counters storing the initial value with the value of the initial value register.
  • the values of the initial value registers are used.
  • the values of these initial value registers are system configurations such as how many kinds of software need to be executed on the processor. Determined by the system designer and written by the system control software.
  • the performance monitoring unit 1114 When the counter value of the cycle counter reaches 0, the performance monitoring unit 1114 notifies the priority update unit 1113.
  • notification that the counter value of the cycle counter has become 0 is referred to as second notification information.
  • the performance monitoring unit 1114 when the performance monitoring unit 1114 notifies the priority update unit 1113 of the second notification information, the performance monitoring unit 1114 initializes the execution instruction number counter to an initial value.
  • Priority update unit 1113 updates the priority information table 800 held in the priority determination unit 607 under certain conditions.
  • the priority update unit 1113 When the priority update unit 1113 receives the first notification information, the priority update unit 1113 updates the priority of the entry in the priority information table. For example, when the counter value of any of the N execution instruction counters reaches 0, the priority update unit 1113 indicates that the counter value has reached 0 from the performance monitoring unit 1114 and includes a first instruction stream ID including the instruction stream ID. The notification information is received, and the priority information table 1300 is updated so that the priority of the instruction stream corresponding to the received instruction stream ID becomes the lowest.
  • the priority update unit 1113 updates the priority of the entry in the priority information table to the content of the initial state. For example, when the count value of the cycle counter reaches 0, the priority update unit 1113 receives the second notification information from the performance monitoring unit 1114, and the priority of entries in the table in which the priority information of all instruction streams is stored To the initial state.
  • the update result when the priority information table 1300 is updated is shown as a priority information table 1300a in FIG.
  • the priority update unit 1113 receives the first notification information from the performance monitoring unit 1114.
  • the instruction stream in which the value of the execution instruction counter is 0 is included. Is the first instruction stream.
  • the priority information table 1300 is updated by the priority update unit 1113 so that the priority of the first instruction stream becomes the lowest, that is, here, each instruction of the second instruction stream is preferentially issued. Is done.
  • the priority order of the priority information 1305 to 1307 of the second instruction stream shown in the priority information table 1300 is increased by one after the update, and the priority order as shown in the priority information table 1300a after the update, as shown in FIG. Is changed from priority information 1309 to 1311 with 1 to 3. Further, the priority order of each priority information 1304 of the first instruction stream becomes priority information 1312 that has been changed from 1 to 4 by the update.
  • Issue command determination unit 1106 The issued instruction determination unit 1106 determines an instruction to be issued from the first instruction buffer 1103 to the Nth instruction buffer 1105 for each machine cycle.
  • the issuance instruction determination unit 1106 is in an executable state based on the first instruction stream scheduler 1202 to the Nth instruction stream scheduler 1206 and the priority information table 1300 and stores all instructions stored in each storage area. Among these, four instructions are selected according to the order shown in the priority information table 1300, and each of the selected instructions is output to an individual computing unit.
  • FIG. 14 the hardware configuration of the issued instruction determination unit 1106 is shown.
  • the issued instruction determination unit 1106 includes a first instruction determination unit 1211 to a fourth instruction determination unit 1214, an instruction selection unit 1215, and a first instruction extraction unit 1221 to a fourth instruction extraction unit 1224.
  • the instruction selection unit 1215 is the same as the instruction selection unit 215 shown in the first embodiment. Specifically, a signal indicating the number of instructions that can be issued in each instruction buffer from each of the first instruction buffer 1103 to the Nth instruction buffer 1105, that is, signals 1241 to 1243 indicating the number of instructions in an executable state are received. In accordance with the order shown in the priority information table 1300, four instructions to be selected are specified.
  • the instruction selection unit 1215 outputs issued instruction selection signals 1251 to 1254 indicating instructions to be acquired by the instruction determination unit to the fourth instruction determination unit 1214 from the first instruction determination unit 1211.
  • the issued instruction selection signal includes information indicating an instruction to be extracted, for example, an instruction buffer holding the instruction to be extracted and information indicating its storage area.
  • the first instruction determination unit 1211 to the fourth instruction determination unit 1214 Each of the first instruction determination unit 1211 to the fourth instruction determination unit 1214 has a one-to-one correspondence with the arithmetic unit included in the arithmetic unit group 1111, and the function thereof is the first instruction shown in the first embodiment. Since it is the same as each of the determination part 211 to the 4th instruction determination part 214, description here is abbreviate
  • the computing unit group 1111 includes a plurality of computing units including adders and multipliers.
  • the arithmetic unit group 1111 includes four arithmetic units (calculators 1111a to 1111d).
  • the computing unit 1111a is a first instruction determining unit 1211
  • the computing unit 1111b is a second instruction determining unit 1212
  • the computing unit 1111c is a third instruction determining unit 1213
  • the computing unit 1111d is a fourth instruction determining unit 1214. Assume that they are associated with each other.
  • the instruction processed by the arithmetic unit includes information for identifying the instruction flow to which the instruction belongs, and outputs the operation result to the corresponding register file based on the information.
  • the write back bus 1112 is a bus for writing back the output from the arithmetic unit group 1111 to the first register file 1108 to the Nth register file 1110.
  • the variable i is a counter that counts the number of instructions issued in the machine cycle.
  • a variable j indicates a pointer for reading information from the priority information table 1300.
  • the variable k indicates the maximum number of instructions that can be issued in a machine cycle, and is 4 in this embodiment.
  • the instruction selection unit 1215 determines whether or not the value of the variable i is equal to or less than the variable k, that is, whether or not the number of instructions to be issued is equal to or less than the maximum value (step S305).
  • the instruction selecting unit 1215 When determining that the value of the variable i is equal to or less than the variable k (“Yes” in step S305), the instruction selecting unit 1215 reads the jth entry in the priority information table 1300 and determines whether or not the reading is successful. Is determined (step S310).
  • the instruction selection unit 1215 determines whether or not the instruction in the instruction stream indicated by the acquired j-th entry can be issued. (Step S315).
  • step S315 If it is determined that it cannot be issued (“No” in step S315), a value 1 is added to the variable j (step S320), and the process returns to step S310.
  • the instruction selection unit 1215 When it is determined that it can be issued (“Yes” in step S315), the instruction selection unit 1215 outputs an issue instruction selection signal to the i-th instruction determination unit.
  • the i-th instruction determination unit that has received the issued instruction selection signal causes the instruction extraction unit corresponding to the storage area in which the instruction to be issued is held to extract the instruction, and corresponds to the instruction extracted by the instruction extraction unit. The result is output to the computing unit (step S325).
  • step S330 the value 1 is added to the variable i and the value 1 is added to the variable j (step S330), and the process returns to step S305.
  • step S305 when it is determined that the value of the variable i is not less than or equal to the variable k (“No” in step S305), and when the reading of the jth entry has failed, that is, it is determined that there is no entry at the position indicated by the pointer (step The process ends (“No” in S310).
  • the performance monitoring unit 1114 initializes all N execution instruction counters at the start of processing (step S400).
  • the performance monitoring unit 1114 When the performance monitoring unit 1114 detects the execution of the instruction (step S405), the performance monitoring unit 1114 subtracts 1 from the value of the execution instruction counter corresponding to the instruction stream including the executed instruction (step S410).
  • step S415) It is determined whether or not the value of the subtracted execution instruction counter is 0 (step S415).
  • the performance monitoring unit 1114 If it is determined that it is 0 (“Yes” in step S415), the performance monitoring unit 1114 generates first notification information and notifies the priority update unit 1113 (step S420). At this time, the generated first notification information includes an instruction stream ID for identifying an instruction stream whose execution instruction counter value is 0.
  • the priority update unit 1113 Upon receiving the first notification information from the performance monitoring unit 1114, the priority update unit 1113 receives the priority information so that the priority of the instruction stream identified by the instruction stream ID included in the received first notification information is the lowest.
  • the table 1300 is updated (step S425).
  • step S4105 After updating the priority information table 1300 and when determining that the value of the subtracted execution instruction counter is not 0 (“No” in step S415), the process returns to step S405.
  • the performance monitoring unit 1114 initializes the cycle counter at the start of processing (step S500).
  • the performance monitoring unit 1114 determines whether or not the processing time has elapsed for one cycle (step S505).
  • step S505 If it is determined that one cycle has elapsed (“Yes” in step S505), the performance monitoring unit 1114 subtracts 1 from the value of the cycle counter (step S510).
  • step S525 It is determined whether or not the value of the subtracted execution instruction counter is 0 (step S515).
  • step S515 If it is determined that it is 0 (“Yes” in step S515), the performance monitoring unit 1114 generates second notification information and notifies the priority update unit 1113 (step S520).
  • the performance monitoring unit 1114 initializes the cycle counter (step S525) and initializes all the N executed instruction counters (step S530).
  • the priority update unit 1113 Upon receiving the second notification information from the performance monitoring unit 1114, the priority update unit 1113 updates the content of the priority information table to the content of the initial state (Step S535).
  • FIG. 19 is an operation image of assignment (issue) of each instruction when parallel processing using the first instruction stream and the second instruction stream is performed in the third embodiment. .
  • the vertical axis indicates time
  • the horizontal axis indicates the degree of parallelism of instructions.
  • the first instruction stream is issued at least one instruction at a time, so that the processing is completed within time t.
  • a block 1501 shows the state of instruction execution of the first instruction stream. Two instructions are always issued until t / 4, and then one instruction is issued until 3t / 4. It is shown that.
  • Block 1502 shows the state of instruction execution of the second instruction stream, and shows that two instructions are being executed until t / 4.
  • up to three instructions in the second instruction stream are preferentially allowed to be executed according to the priority order up to the top four. However, if preparation for issuance is not completed, execution is permitted to the next priority. For this reason, as shown in FIG. 19, when only two instructions in the second instruction stream are permitted to be executed, two instructions in the first instruction stream are executed.
  • the value of the execution instruction counter corresponding to the first instruction stream becomes zero. Because two instructions are issued from time 0 to t / 4, the execution instruction counter corresponding to the first instruction stream is subtracted from a total of two values, one by one. This is because the processing is completed by t / 4 minutes earlier than when the instruction is issued, that is, the value of the execution instruction counter becomes zero.
  • the priority information table 1300 is updated to, for example, the priority information table 1300a shown in FIG. 15B, and in the subsequent processing, instructions in the second instruction stream are always 4 It will be issued one by one.
  • the value of the cycle counter becomes 0, the values of the various counters are initialized, and the contents of the priority information table are updated to the contents of the initial state, that is, the priority information table 1300.
  • an instruction stream that has completed a certain process within a certain cycle can be set so as not to consume execution resources on the processor thereafter, and other instruction streams can obtain more opportunities for execution.
  • the video processing system 1600 is, for example, a video processing device that decodes a video signal and outputs it to a display device (television or the like).
  • the video processing system 1600 includes the processor 10 described in the first embodiment, and is based on processing for decoding a video signal received from the outside and an instruction from a user input device (remote controller) 1605. Process.
  • FIGS. 1 and 2 Since the configuration of the processor 10 is shown in FIGS. 1 and 2, a detailed configuration is omitted here. In the following description, it demonstrates using the component demonstrated in 1st Embodiment as needed.
  • Processor 10 is H.264.
  • bit stream analysis variable length encoded signal decoding processing, inverse quantization, inverse frequency conversion, motion compensation, deblock filter processing I do. These have to guarantee certain performance so as not to disturb the video. However, there is no need to allocate more performance.
  • processing corresponding to input from a user such as a remote controller is required to be responsive to perform processing as quickly as possible.
  • the first instruction stream shown in the first embodiment is a process for decoding a video signal (video decoding process), and the second instruction stream is a process instructed by the user input device 1605 (user input process).
  • the priority information table is composed of the priority, the instruction stream, and the instruction number, but is not limited thereto.
  • the command number in the priority information table may be omitted.
  • the corresponding instruction number can be specified by using the cumulative value of the number of occurrences of the value identifying the instruction stream appearing in the instruction stream item.
  • the number of instructions that can be issued to the computing unit group in a single machine cycle is four instructions, but the present invention is not limited to this.
  • the number of instructions that can be issued in a single machine cycle may be two or more, and is not limited to four.
  • the priority information table is updated by a software instruction, but the present invention is not limited to this.
  • the priority update unit 1113 updates the priority information table 1300 that stores the priority information held by the priority determination unit 1107 in accordance with an instruction from the hardware.
  • the priority update unit 1113 holds update priority information corresponding to entries in the priority information table 1300 held by the priority determination unit 1107.
  • the priority update unit 1113 receives an update signal from the hardware, and updates the corresponding entry in the priority information table 1300 based on the update priority information.
  • the hardware instruction is set in advance so that, for example, an instruction is issued when it is detected that a predetermined instruction has been issued (executed on a program).
  • the video processing system 1600 decodes the video signal.
  • the present invention is not limited to this.
  • the video processing system 1600 may encode a video signal.
  • the first instruction buffer holds an instruction related to the process of encoding the video signal
  • the second instruction buffer holds an instruction related to the user input process
  • the instruction held in each instruction buffer is stored. This can be realized by executing according to the priority shown in the priority information table.
  • the video processing system 1600 may be a device that performs video and audio media processing.
  • the processor 10 shown in the first embodiment is applied to the video processing system 1600.
  • the present invention is not limited to this.
  • Any one of the processor 10a shown in the second embodiment and the processor 10b shown in the third embodiment may be applied to the video processing system 1600.
  • the processors 10a and 10b shown in the second and third embodiments may be FPGA (Field Programmable Gate Array), and the priority information table may be updated by the function of the FPGA.
  • FPGA Field Programmable Gate Array
  • the number of storage areas in the instruction holding unit of each instruction buffer is the same as the number of arithmetic units, but is not limited thereto.
  • the number of storage areas in the instruction holding unit of each instruction buffer may be smaller than the number of arithmetic units. Alternatively, the number of storage areas may be larger than the number of computing units.
  • the issued instruction determination unit 106 acquires instructions for the number of arithmetic units according to the priority order from the number of all storage areas (M ⁇ Z).
  • the processing may be completed within a predetermined time by assuring the opportunity to issue one instruction per machine cycle for the first instruction stream.
  • the process may be completed within a predetermined time by guaranteeing the opportunity to issue one instruction for each machine cycle for the first instruction stream.
  • the process may be completed within a predetermined time by guaranteeing an opportunity to issue one instruction for each machine cycle for the first instruction stream.
  • the N execution instruction counters included in the performance monitoring unit 1114 are down-counted by the number of executed instructions. Even if no instruction is issued, the cycle in which the highest priority is assigned to the instruction in the corresponding instruction stream is down-counted. Note that at the start of the operation, it is assumed that an initial value is set for each of the N execution instruction counters, as in the third embodiment.
  • a program describing the procedure of the method described in each of the above embodiments and modifications is stored in a memory, and a CPU (Central Processing Unit) or the like reads the program from the memory, and the read program is
  • the above method may be realized by executing.
  • a program describing the procedure of the method described in each of the above embodiments and modifications may be stored in a recording medium and distributed.
  • each of M (M is an integer of 2 or more) instruction streams is input separately.
  • An instruction buffer including M ⁇ Z instruction storage areas for storing Z instructions (where Z is an integer of 2 or more and M ⁇ Z is L or more) constituting each instruction stream
  • order information holding means for holding order information, which is information obtained by ordering the M ⁇ Z instruction storage areas in the instruction buffer, and stored in the M ⁇ Z instruction storage areas of the instruction buffer
  • Extraction means for extracting the executed instructions and L instructions in an order according to the order information out of all the instructions in the executable state and stored in the M ⁇ Z instruction storage areas Is extracted by the extraction means, and another operation is performed for each extracted instruction.
  • a controlling means for inputting a.
  • the processor is in an executable state based on the order information obtained by ordering the M ⁇ Z instruction storage areas, and from among all the instructions stored in the M ⁇ Z instruction storage areas. Since L instructions are extracted, it is possible to simultaneously extract one instruction stream instruction and another instruction stream instruction. Therefore, for example, if one instruction stream is an instruction stream for which performance guarantee is required, and the other instruction stream is an instruction stream for which performance guarantee is not required, the instructions of other instruction streams are Since there is no need to wait until the instruction stream is completed, it is possible to achieve both performance guarantee for one instruction stream and high responsiveness to another instruction stream.
  • the instruction buffer has, for each of the M ⁇ Z instruction storage areas, a flag indicating whether or not an instruction stored in the instruction storage area can be executed,
  • the control means may specify all instructions in an executable state from the contents of each of the M ⁇ Z flags.
  • the processor manages, for each of the M ⁇ Z instruction storage areas, whether or not the instruction stored in the storage area is in an executable state. All instructions can be easily identified.
  • one of the M instruction streams is a performance guarantee instruction stream that should guarantee the completion of the processing within a predetermined time
  • the order information includes the process of the performance guarantee instruction stream. May be information in which an order of L or less is given to the minimum number of instructions for guaranteeing that the process is completed within the predetermined time.
  • the processor orders L or less for the minimum number of instructions for guaranteeing the completion of processing within the predetermined time. Therefore, the minimum number of instructions are always executed, and the processing failure that the processing is not completed within a predetermined time does not occur.
  • the performance guarantee instruction stream is for performing image decoding processing
  • the processor may be provided in an image processing system for performing image decoding processing.
  • the processor can achieve both image decoding processing that requires performance guarantee and high responsiveness to other instruction streams.
  • the performance guarantee instruction flow is for performing image encoding processing
  • the processor may be provided in an image processing system for performing image encoding processing.
  • the processor can achieve both image encoding processing that requires performance guarantee and high responsiveness to other instruction streams.
  • the processor further monitors the number of instructions output to one arithmetic unit in the instruction stream, and the number of instructions output in one instruction stream is When a predetermined value is exceeded, order information updating means for updating the order information may be provided so as to lower the order of the Z instruction storage areas storing the Z instructions constituting the instruction stream.
  • the processor when the number of instructions issued for one instruction stream reaches a predetermined number, changes the order of the Z instruction storage areas in which Z instructions constituting the one instruction stream are stored. Therefore, the issue of instructions is preferentially assigned to other instruction streams. Therefore, for example, when an instruction in one instruction stream is completed, it is not necessary to preferentially assign an instruction issue to the one instruction stream. The processing efficiency for other instruction streams can be increased.
  • the processor further monitors an instruction output to one arithmetic unit in the instruction stream, and a specific instruction is output in one instruction stream.
  • order information updating means for updating the order information so as to lower the order of the Z instruction storage areas storing the Z instructions constituting the instruction stream.
  • the processor when a specific instruction is issued for one instruction stream, the processor immediately follows the order of Z instruction storage areas in which Z instructions constituting the one instruction stream are stored. Therefore, issuance of instructions is preferentially assigned to other instruction streams. Thus, for example, when a specific instruction is executed for one instruction stream and it is not necessary to execute the instruction preferentially after that, the instruction issuance is preferentially assigned to the one instruction stream. By assigning instruction issuance to an instruction stream, the processing efficiency for other instruction streams can be increased.
  • the processor according to the present invention can be applied to an apparatus that requires performance guarantee for one instruction stream and high responsiveness to another instruction stream.

Abstract

 一の命令流に対する性能保証と、他の命令流に対する高い応答性とを両立することのできるプロセッサを提供することを目的とする。 L個(Lは2以上の整数)の演算器を有するプロセッサは、M個(Mは2以上の整数)の命令流各々が区別して入力され、各命令流を構成するZ個(Zは2以上の整数であり、M×ZはL以上であることを満たす)の命令を格納するためのM×Z個の命令記憶領域を含む命令バッファと、前記命令バッファ内の前記M×Z個の命令記憶領域に順序を付けた情報である順序情報を保持する順序情報保持手段と、前記命令バッファの前記M×Z個の命令記憶領域に格納された命令を抽出するための抽出手段と、実行可能状態となっており前記M×Z個の命令記憶領域に格納されている命令全てのうちから、前記順序情報に従った順序で、L個の命令を前記抽出手段に抽出させて、抽出された命令毎に別の演算器に入力する制御手段とを備える。

Description

プロセッサ
 本発明は、複数の命令流を並列に実行するプロセッサにおいて、一の命令流に対する性能保証と、他の命令流に対する高い応答性とを両立する技術に関する。
 近年、デジタル化された映像データや、音声データなどの圧縮、伸張等を行うメディア処理の処理効率を向上するために、非特許文献1において、複数のプログラムを同時に実行することにより、演算効率を向上させたマルチスレッドプロセッサが開示されている。
 また、マルチスレッドプロセッサを用いた技術として、特許文献1がある。特許文献1では、複数の命令流(スレッド)それぞれについて、処理の優先順位を設定し、優先順位の高い命令流を優先的に処理する技術が開示されている。この技術により、命令流単位に必要とされる処理性能を動的に実現し、かつ全体の処理効率を向上させることができる。
特開平10-124316号公報
"A Multithreaded Processor Architecture with Simultaneous Instruction Issuing", In Proc. of ISS'91:International Symposium on Supercomputing, Fukuoka, Japan, pp.87-96, November 1991
 ところで、処理すべき命令流には、画像処理などのように所定の時間までに処理が終了していることが要求される、つまり性能保証が要求されるものや、ユーザーからの指示に対する処理を行うもの(所定の時間までに処理が終了する必要のないもの)がある。
 これらの命令流に対して、特許文献1に開示された技術を用いて、並列に処理を行おうとすると、性能保証が要求される命令流について、所定の時間までに処理の終了を保証するためには、他の命令流(性能保証が要求されない命令流)と比べて高い優先順位を設定する必要がある。
 そうすると、性能保証が要求される命令流が優先的に実行され、性能保証が要求されない命令流は実行されないので、例えば、ユーザーからの指示があっても性能保証が要求される命令流が終了するまでは、その指示に係る処理が行われない。そのため、ユーザーは、自身がした指示に対する応答が遅いと感じ、不快な思いをする。
 また、逆に、ユーザーの指示に対する応答を早くしようとするためには、当該命令が属する命令流の優先順位を他の命令流(性能保証が要求される命令流)よりも高くすることが考えられるが、そうすると、性能保証が要求される命令流について所定の時間に処理が終了することが保証できない。
 そこで、本発明は、上記の問題に鑑みて、一の命令流に対する性能保証と、他の命令流に対する高い応答性とを両立することのできるプロセッサ、情報処理システム及び方法を提供することを目的とする。
 上記にて示す目的を達成するために、本発明は、L個(Lは2以上の整数)の演算器を有するプロセッサであって、M個(Mは2以上の整数)の命令流各々が区別して入力され、各命令流を構成するZ個(Zは2以上の整数であり、M×ZはL以上であることを満たす)の命令を格納するためのM×Z個の命令記憶領域を含む命令バッファと、前記命令バッファ内の前記M×Z個の命令記憶領域に順序を付けた情報である順序情報を保持する順序情報保持手段と、前記命令バッファの前記M×Z個の命令記憶領域に格納された命令を抽出するための抽出手段と、実行可能状態となっており前記M×Z個の命令記憶領域に格納されている命令全てのうちから、前記順序情報に従った順序で、L個の命令を前記抽出手段に抽出させて、抽出された命令毎に別の演算器に入力する制御手段とを備えることを特徴とする。
 上記にて示す構成によると、プロセッサは、M×Z個の命令記憶領域に順序を付けた順序情報に基づいて、実行可能状態でありM×Z個の命令記憶領域に格納されている命令全てのうちからL個の命令を抽出するので、一の命令流の命令と、他の命令流の命令とを同時に抽出することができる。そのため、プロセッサは、例えば、一の命令流が性能保証が要求される命令流であり、他の命令流が性能保証が要求されない命令流であるとすると、他の命令流の命令は、一の命令流が終了するまで待つ必要はないので、一の命令流に対する性能保証と、他の命令流に対する高い応答性とを両立することができる。
プロセッサ10の構成を示す図である。 各命令バッファ103~105、及び発行命令決定部106の構成を示す図である。 命令発行前と発行後における命令バッファの保持内容の変化を示す図である。 優先度情報テーブル300のデータ構造の一例を示す図である。 第1の実施の形態において、発行すべき命令を決定する処理の動作を示す流れ図である。 第1の実施の形態において、第1命令流及び第2命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージを示す図である。 プロセッサ10aの構成を示す図である。 各命令バッファ603~605、及び発行命令決定部606の構成を示す図である。 (a)は更新前の優先度情報テーブル800のデータ構造の一例を示し、(b)は更新後の優先度情報テーブル800aのデータ構造の一例を示す図である。 第2の実施の形態において、発行すべき命令を決定する処理の動作を示す流れ図である。 第2の実施の形態において、優先度情報テーブル800を更新する処理の動作を示す流れ図である。 第2の実施の形態において、第1命令流及び第2命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージを示す図である。 プロセッサ10bの構成を示す図である。 各命令バッファ1103~1105、及び発行命令決定部1106の構成を示す図である。 (a)は更新前の優先度情報テーブル1300のデータ構造の一例を示し、(b)は更新後の優先度情報テーブル1300aのデータ構造の一例を示す図である。 第3の実施の形態において、発行すべき命令を決定する処理の動作を示す流れ図である。 優先度情報テーブル1300を更新する第1更新処理の動作を示す流れ図である。 優先度情報テーブル1300を更新する第2更新処理の動作を示す流れ図である。 第3の実施の形態において、第1命令流及び第2命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージを示す図である。 映像処理システム1600の構成の一例を示す図である。
 1.第1の実施の形態
 以下本発明の実施の形態について、図面を参照しながら説明する。
 1.1 構成
 図1は、本発明の実施の形態1におけるプロセッサ10の構成を示すブロック図である。
 プロセッサ10は、N(Nは2以上の整数)個の命令流(N個のスレッド)を同時に独立して実行するプロセッサであり、命令メモリ101と、命令群決定部102と、N個の命令バッファ(第1命令バッファ103、第2命令バッファ104、・・・、第N命令バッファ105)と、発行命令決定部106と、優先度決定部107と、N個のレジスタファイル(第1レジスタファイル108、第2レジスタファイル109、・・・、第Nレジスタファイル110)と、演算器群111と、ライトバックバス112を備えている。
 ここで、各命令バッファとレジスタファイルは1対1に対応付けられ、N個の論理プロセッサを構成する。
 また、本実施の形態では、プロセッサ10は、同時に4つの命令の実行が可能であるとする。
 (1)命令メモリ101
 命令メモリ101は、プロセッサ10において実行される命令を保持するメモリであり、N本の独立に実行される命令流(スレッド)を保持している。
 (2)命令群決定部102
 命令群決定部102は、命令メモリ101から、各命令流に属する命令を読み出し、デコードを行い、当該命令が割り当てられている命令バッファに書き込む。
 (3)第1命令バッファ103から第N命令バッファ105
 第i命令バッファ(iは1以上N以下の整数)は、i番目の命令流(以下、第i命令流という。)に属する命令を受け取り、保持するものである。
 具体的には、第1命令バッファ103は、図2に示すように、第1命令保持部201と第1命令流スケジューラ202とを有している。
 第1命令保持部201は、4つの命令を保持するための領域である第1~第4の記憶領域201a~201dを有している。各命令は、実行順序に基づいて、第1~第4の記憶領域201a、201b、201c、201dへと順次格納される。例えば、図3に示すように、第1の記憶領域201aで保持されている命令a1が実行(発行)されると、第2~第4の記憶領域201b、201c、201dそれぞれで保持されていた命令a2からa4は、1つずつシフトし、空いた第4の記憶領域201dに新たな命令a5が格納される。
 第1命令流スケジューラ202は、第1命令保持部201が有する4つの第1~第4の記憶領域201a~201d毎に対応付けられたフラグを有している。ここで、フラグは、対応付けられた記憶領域で記憶されている命令が発行可能な状態であるか否かを示すものである。例えば、外部(例えば、命令群決定部102)が、各命令のフロー依存に基づいてマシンサイクルに発行可能な命令を検出し、発行可能な命令に対して、発行可能であることを示す値をフラグに設定する。
 また、第2命令バッファ104についても、第2命令保持部203と第2命令流スケジューラ204とを有しており、第N命令バッファ105についても、第N命令保持部205と第N命令流スケジューラ206とを有している。これらの構成要素は、第1命令バッファ103における構成要素と同様のものであるので、ここでの説明は省略する。
 (4)優先度決定部107
 優先度決定部107は、発行命令決定部106において発行する命令を決定する際に用いる優先度情報テーブル300を保持している。
 優先度情報テーブル300は、例えば、図4に示すように、優先度301、命令流302及び命令番号303とから構成され、N個の命令バッファそれぞれが有する合計4×N個分のテーブル要素を有している。
 優先度301は、N個の命令バッファそれぞれが有する合計4×N個の記憶領域について、読み出す順序を示す値である。
 命令流302は、命令流を識別する値である。ここでは、値i(iは1以上N以下の整数)は、第i命令流を示すものとする。
 命令番号303は、命令流302で示される第i命令流の命令が保持されている第i命令保持部における記憶領域を識別する値である。ここでは、値n(nは1以上4以下の整数)は、第nの記憶領域を示すものとする。
 例えば、第1優先度となる命令は、テーブル要素304に示され、ここでは、第1命令流の第1の記憶領域201aに格納された命令となる。
 また、第2優先度となる命令は、テーブル要素305に示され、ここでは、第2命令流の第1の記憶領域203aに格納された命令となる。
 第3優先度となる命令は、テーブル要素306に示され、ここでは、第2命令流の第2の記憶領域201bに格納された命令となる。
 第4優先度となる命令は、テーブル要素307に示され、ここでは、第2命令流の第3の記憶領域201cに格納された命令となる。
 第5優先度となる命令は、テーブル要素308に示され、ここでは、第1命令流の第2の記憶領域201bに格納された命令となる。
 ここで、優先度情報テーブル300における各命令の優先度は、予め定められているものとする。また、その設定方法は、例えば、第1命令流が、一定の性能保証が求められる命令流であって、かつ、所定時間内(例えば、時間t内)で処理を完了すべきものである場合、第1命令流については、命令の発行のタイミング(マシンサイクル)毎に、時間tで処理が完了するための最小数の命令が発行できるように、優先度を割り付ける。ここで、第1命令流はマシンサイクル毎に1命令を発行することで、所定の時間内に処理が完了する場合を考える。本実施の形態では4つの命令を同時に実行するので、図4に示すように、第1命令流の命令が優先的に常に発行できるように、上位4つの優先度のうち最も高い優先度を1つ割り付けることで、マシンサイクル毎に必ず第1命令流の1命令が発行されることとなる。
 (5)発行命令決定部106
 発行命令決定部106は、第1命令バッファ103から第N命令バッファ105からマシンサイクル毎に発行する命令を決定するものである。
 発行命令決定部106は、第1命令流スケジューラ202から第N命令流スケジューラ206と、優先度情報テーブル300とに基づいて、実行可能状態となっており各記憶領域に格納されている命令全てのうち、優先度情報テーブル300で示される順序に従って、4個の命令を選択し、選択した命令それぞれを個別の演算器へ出力する。
 ここで、図2において、発行命令決定部106のハードウェア構成を示す。
 発行命令決定部106は、第1命令決定部211から第4命令決定部214と、命令選択部215と、第1命令抽出部221から第4命令抽出部224とを有している。
 (5-1)命令選択部215
 命令選択部215は、第1命令流スケジューラ202から第N命令流スケジューラ206と、優先度情報テーブル300とに基づいて、実行可能状態となっており各記憶領域に格納されている命令全てのうち、優先度情報テーブル300で示される順序に従って、選択すべき4個の命令を特定する。具体的には、第1命令バッファ103から第N命令バッファ105それぞれから各命令バッファ内の発行可能な命令数を示す信号、つまり実行可能状態となっている命令数を示す信号241~243を受け取り、優先度情報テーブル300で示される順序に従って、選択すべき4個の命令を特定する。
 そして、命令選択部215は、第1命令決定部211から第4命令決定部214それぞれに対して、当該命令決定部で取得すべき命令を示す発行命令選択信号251~254を出力する。発行命令選択信号には、抽出すべき命令を示す情報、例えば、抽出すべき命令が保持されている命令バッファ及びその記憶領域を示す情報が含まれている。
 (5-2)第1命令抽出部221から第4命令抽出部224
 第n命令抽出部(nは1以上4以下の整数)は、第1命令バッファ103から第N命令バッファ105それぞれの第nの記憶領域で保持されている命令を抽出するためのものである。
 以下、具体例として、第1命令バッファ103からの命令抽出について説明する。
 第1命令抽出部221は接続線231と、第2命令抽出部222は接続線232と、第3命令抽出部223は接続線233と、第4命令抽出部224は接続線234と、それぞれ接続されている。ここで、接続線231は第1の記憶領域201aと、接続線232は第2の記憶領域201bと、接続線233は第3の記憶領域201cと、接続線234は第4の記憶領域201dと、それぞれ接続されているものとする。
 第1命令抽出部221は、第1の記憶領域で保持されている命令を、接続線231を介して読み出し、抽出の指示のあった命令決定部へ出力する。
 第2命令抽出部222から第4命令抽出部224それぞれについても同様に、対応する記憶領域で保持されている命令を、当該命令が保持されている記憶領域と接続された接続線を介して読み出し、抽出の指示のあった命令決定部へ出力する。
 (5-3)第1命令決定部211から第4命令決定部214
 第1命令決定部211から第4命令決定部214それぞれは、演算器群111が有する演算器と1対1に対応付けられている。
 以下、第1命令決定部211から第4命令決定部214それぞれの機能について説明する。
 第n命令決定部(nは1以上4以下の整数)は、命令選択部215から受け取った発行命令選択信号に基づいて、どの命令バッファのどの記憶領域から命令を取得するかを特定し、該当する第m命令抽出部(mは1以上4以下の整数)に対して、抽出すべき命令を抽出するよう制御する。
 そして、第n命令決定部は、第m命令抽出部が抽出した命令を取得すると、取得した命令を対応付けられた演算器へ出力する。
 (6)第1レジスタファイル108から第Nレジスタファイル110
 第iレジスタファイル(iは1以上N以下の整数)は、第i命令バッファに保持された命令流を実行することによって、読み出し及び書き込みの対象とされるデータを保持するレジスタ群である。
 (7)演算器群111
 演算器群111は、加算器や乗算器などからなる複数の演算器を含むものである。なお、ここでは、演算器群111は、4つの演算器(演算器111a~111d)を有しているものとする。また、演算器111aは第1命令決定部211と、演算器111bは第2命令決定部212と、演算器111cは第3命令決定部213と、演算器111dは第4命令決定部214と、それぞれ対応付けられているものとする。
 演算器が処理する命令には、当該命令が属する命令流を識別する情報が含まれており、当該情報に基づいて対応するレジスタファイルへ演算結果を出力する。
 (8)ライトバックバス112
 ライトバックバス112は、演算器群111からの出力を第1レジスタファイル108~第Nレジスタファイル110に書き戻すためのバスである。
 1.2 動作
 ここでは、発行すべき命令を決定する動作について図5に示す流れ図を用いて説明する。
 命令選択部215は、一のマシンサイクルにおいて発行する命令を決定する際に、変数の初期化(i=1;j=1;k=4)を行う(ステップS5)。ここで、変数iは、マシンサイクルにおいて発行する命令数をカウントするカウンタである。変数jは、図4の優先度情報テーブル300から情報を読み出すためのポインタを示す。変数kは、マシンサイクルにおいて発行可能な命令の最大数を示し、本実施例においては4である。
 命令選択部215は、変数iの値が変数k以下であるか否か、つまり発行する命令数が最大値以下であるか否かを判断する(ステップS10)。
 変数iの値が変数k以下であると判断する場合(ステップS10における「Yes」)、命令選択部215は、優先度情報テーブル300のj番目のエントリを読み出し、その読み出しに成功したか否かを判断する(ステップS15)。
 j番目のエントリの読み出しに成功したと判断した場合(ステップS15における「Yes」)、命令選択部215は、取得したj番目のエントリが示す命令流の命令が発行可能であるか否を判断する(ステップS20)。
 発行可能でないと判断する場合には(ステップS20における「No」)、変数jに値1が加算され(ステップS25)、処理はステップS15へ戻る。
 発行可能であると判断する場合には(ステップS20における「Yes」)、命令選択部215は、第i命令決定部に対して発行命令選択信号を出力する。発行命令選択信号を受信した第i命令決定部は、発行すべき命令が保持されている記憶領域に応じた命令抽出部に当該命令を抽出させて、命令抽出部で抽出された命令を対応する演算器へ出力する(ステップS30)。
 その後、変数iに値1が、変数jに値1が、それぞれ加算され(ステップS35)、処理はステップS10へ戻る。
 また、変数iの値が変数k以下でないと判断する場合(ステップS10における「No」)、及び j番目のエントリの読み出しに失敗した、つまりポインタが示す位置にエントリが無いと判断した場合(ステップS15における「No」)、処理は終了する。
 1.3 動作イメージ
 図6は、第1の実施の形態において、第1命令流及び第2命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージである。
 ここで、図6に示す動作イメージでは、縦軸に時間、横軸に命令の並列度を示している。
 ブロック501は、第1命令流の命令実行の様子を示し、常に最優先で1命令の発行が行われていることを示している。
 ブロック502は、第2命令流の命令実行の様子を示し、第1命令流で使用されない並列度を用いて3命令が実行されていることを示す。
 例えば、第1命令流が一定の性能保証が求められる命令流であって、かつ、所定時間内(例えば、時間t内)において常に1命令が発行されることで、その性能を満たすことができる場合、本実施例により、性能保証の条件を満たしつつ、他の命令流の応答性を高く保つことができる。
 2.第2の実施の形態
 ここでは、第2の実施の形態に係るプロセッサ10aについて、第1の実施の形態に係るプロセッサ10と異なる点を中心に説明する。
 図7は、第2の実施の形態におけるプロセッサ10aの構成を示すブロック図である。
 プロセッサ10aは、N(Nは2以上の整数)個の命令流(N個のスレッド)を同時に独立して実行するプロセッサであり、命令メモリ601と、命令群決定部602と、N個の命令バッファ(第1命令バッファ603、第2命令バッファ604、…、第N命令バッファ605)と、発行命令決定部606と、優先度決定部607と、N個のレジスタファイル(第1レジスタファイル608、第2レジスタファイル609、…、第Nレジスタファイル610)と、演算器群611と、ライトバックバス612と、優先度更新部613とを備えている。
 ここで、各命令バッファとレジスタファイルは1対1に対応付けられ、N個の論理プロセッサを構成する。
 また、本実施の形態では、プロセッサ10aは、第1の実施の形態で示すプロセッサ10と同様に、同時に4つの命令の実行が可能であるとする。
 (1)命令メモリ601
 命令メモリ601は、第1の実施の形態で示す命令メモリ101と同様に、プロセッサ10aにおいて実行される命令を保持するメモリであり、N本の独立に実行される命令流(スレッド)を保持している。
 (2)命令群決定部602
 命令群決定部602は、第1の実施の形態で示す命令群決定部102と同様であるので、ここでの説明は省略する。
 (3)第1命令バッファ603から第N命令バッファ605
 第i命令バッファ(iは1以上N以下の整数)は、i番目の命令流(以下、第i命令流という。)に属する命令を受け取り、保持するものである。
 具体的には、第1命令バッファ603は、図8に示すように、第1命令保持部701と第1命令流スケジューラ702とを有している。なお、第1命令保持部701及び第1命令流スケジューラ702のそれぞれは、第1の実施の形態で示す第1命令保持部201と第1命令流スケジューラ202のそれぞれと同様であるので、ここでの説明は省略する。
 また、第2命令バッファ604についても、第2命令保持部703と第2命令流スケジューラ704とを有しており、第N命令バッファ605についても、第N命令保持部705と第N命令流スケジューラ706とを有している。これら構成要素についても、第1の実施の形態と同様であるので、ここでの説明は省略する。
 (4)優先度決定部607
 優先度決定部607は、発行命令決定部606において発行する命令を決定する際に用いる優先度情報テーブル800を保持している。
 優先度情報テーブル800は、例えば、図9に示すように、優先度801、命令流802及び命令番号803とから構成され、N個の命令バッファそれぞれが有する合計4×N個分のテーブル要素を有している。優先度801、命令流802及び命令番号803のそれぞれは、優先度301、命令流302及び命令番号303と同様であるので、ここでの説明は省略する。
 ここで、優先度情報テーブル800は、初期状態として、第1の実施の形態で示した設定方法により各命令の優先度(発行する優先順序)が設定されているものとする。
 (5)優先度更新部613
 優先度更新部613は、優先度決定部607で保持している優先度情報テーブル800を一定の条件下で更新するものである。
 具体的には、優先度更新部613は、ソフトウェアからの指示によって、優先度決定部607で保持している優先度情報を記憶している優先度情報テーブル800を更新する。
 通常、優先度決定部607で保持している優先度情報テーブル800の各エントリ(優先度情報)は、メモリアドレスまたは制御レジスタにマップされているので、優先度更新部613は、ソフトウェアからの指示としてマルチスレッドプロセッサからのメモリアクセス命令、または、制御レジスタアクセス命令を受け取ると、受け取った命令に基づいて優先度情報テーブル800を更新する。例えば、優先度更新部613は、マルチスレッドプロセッサのメモリアクセス命令または制御レジスタアクセス命令の書き込みアドレスと書き込みデータを受け取り、書き込みアドレスが優先度情報テーブル800のエントリのいずれかを示すものであれば、当該エントリに書き込みデータを書き込む。ここで、書き込みデータは、当該エントリに書き込むべき更新後の優先度情報である。また、ソフトウェアの指示は、例えば、所定の命令が発行された(プログラム上実行された)後に、実行されるよう予め書き込まれたプログラムにより実行される。
 なお、ソフトウェアの指示により、1度に複数のエントリを更新してもよい。
 ここで、優先度情報テーブル800を更新した場合の更新結果を、優先度情報テーブル800aとして図9(b)に示す。この例は、優先度更新部613は、ソフトウェアの指示により、更新前の優先度情報テーブル800における優先度5である優先度情報808の優先度を2として、更新したものである。その結果、更新前の優先度情報808は、更新後には、優先度2である優先度情報810へと更新され、更新前の優先度情報805から807それぞれは、優先度の順位が1つずつ下がったものとなり、更新後の優先度情報811から813それぞれに対応する。
 なお、以下において、優先度情報テーブル1300を用いて各構成要素について説明する。
 (6)発行命令決定部606
 発行命令決定部606は、第1命令バッファ103から第N命令バッファ105からマシンサイクル毎に発行する命令を決定するものである。
 発行命令決定部606は、第1命令流スケジューラ202から第N命令流スケジューラ206と、優先度情報テーブル800とに基づいて、実行可能状態となっており各記憶領域に格納されている命令全てのうち、優先度情報テーブル800で示される順序に従って、4個の命令を選択し、選択した命令それぞれを個別の演算器へ出力する。
 ここで、図8において、発行命令決定部606のハードウェア構成を示す。
 発行命令決定部606は、第1命令決定部711から第4命令決定部714と、命令選択部715と、第1命令抽出部721から第4命令抽出部724とを有している。
 (6-1)命令選択部715
 命令選択部715は、第1の実施の形態で示す命令選択部215と同様のものである。具体的には、第1命令バッファ603から第N命令バッファ605それぞれから各命令バッファ内の発行可能な命令数を示す信号、つまり実行可能状態となっている命令数を示す信号741~743を受け取り、優先度情報テーブル800で示される順序に従って、選択すべき4個の命令を特定する。
 そして、命令選択部715は、第1命令決定部711から第4命令決定部714それぞれに対して、当該命令決定部で取得すべき命令を示す発行命令選択信号751~754を出力する。発行命令選択信号には、抽出すべき命令を示す情報、例えば、抽出すべき命令が保持されている命令バッファ及びその記憶領域を示す情報が含まれている。
 (6-2)第1命令抽出部721から第4命令抽出部724
 第1命令抽出部721から第4命令抽出部724のそれぞれは、第1の実施の形態で示す第1命令抽出部221から第4命令抽出部224のそれぞれと同様であるので、ここでの説明は省略する。
 (6-3)第1命令決定部711から第4命令決定部714
 第1命令決定部211から第4命令決定部214それぞれは、演算器群611が有する演算器と1対1に対応付けられており、その機能は、第1の実施の形態で示す第1命令決定部211から第4命令決定部214それぞれと同様であるので、ここでの説明は省略する。
 (7)第1レジスタファイル608から第Nレジスタファイル610
 第1レジスタファイル608から第Nレジスタファイル610のそれぞれは、第1の実施の形態で示す第1レジスタファイル108から第Nレジスタファイル110と同様であるので、ここでの説明は省略する。
 (8)演算器群611
 演算器群611は、加算器や乗算器などからなる複数の演算器を含むものである。なお、ここでは、演算器群611は、4つの演算器(演算器611a~611d)を有しているものとする。また、演算器611aは第1命令決定部711と、演算器611bは第2命令決定部712と、演算器611cは第3命令決定部713と、演算器611dは第4命令決定部714と、それぞれ対応付けられているものとする。
 演算器が処理する命令には、当該命令が属する命令流を識別する情報が含まれており、当該情報に基づいて対応するレジスタファイルへ演算結果を出力する。
 (9)ライトバックバス612
 ライトバックバス612は、演算器群611からの出力を第1レジスタファイル608~第Nレジスタファイル610に書き戻すためのバスである。
 2.2 動作
 (1)発行命令の決定の動作
 ここでは、発行すべき命令を決定する動作について図10に示す流れ図を用いて説明する。ここでは、説明の便宜上、利用する優先度情報テーブルは、優先度情報テーブル800とする。なお、更新された優先度情報テーブル800aを用いた場合でも、処理動作は同じである。
 命令選択部715は、一のマシンサイクルにおいて発行する命令を決定する際に、変数の初期化(i=1;j=1;k=4)を行う(ステップS100)。ここで、変数iは、マシンサイクルにおいて発行する命令数をカウントするカウンタである。変数jは、優先度情報テーブル800から情報を読み出すためのポインタを示す。変数kは、マシンサイクルにおいて発行可能な命令の最大数を示し、本実施例においては4である。
 命令選択部715は、変数iの値が変数k以下であるか否か、つまり発行する命令数が最大値以下であるか否かを判断する(ステップS105)。
 変数iの値が変数k以下であると判断する場合(ステップS105における「Yes」)、命令選択部715は、優先度情報テーブル800のj番目のエントリを読み出し、その読み出しに成功したか否かを判断する(ステップS110)。
 j番目のエントリの読み出しに成功したと判断した場合(ステップS110における「Yes」)、命令選択部715は、取得したj番目のエントリが示す命令流の命令が発行可能であるか否を判断する(ステップS115)。
 発行可能でないと判断する場合には(ステップS115における「No」)、変数jに値1が加算され(ステップS120)、処理はステップS110へ戻る。
 発行可能であると判断する場合には(ステップS115における「Yes」)、命令選択部715は、第i命令決定部に対して発行命令選択信号を出力する。発行命令選択信号を受信した第i命令決定部は、発行すべき命令が保持されている記憶領域に応じた命令抽出部に当該命令を抽出させて、命令抽出部で抽出された命令を対応する演算器へ出力する(ステップS125)。
 その後、変数iに値1が、変数jに値1が、それぞれ加算され(ステップS130)、処理はステップS105へ戻る。
 また、変数iの値が変数k以下でないと判断する場合(ステップS105における「No」)、及び j番目のエントリの読み出しに失敗した、つまりポインタが示す位置にエントリが無いと判断した場合(ステップS110における「No」)、処理は終了する。
 (2)優先度情報テーブルの更新の動作
 ここでは、優先度情報テーブルの更新について、図11に示す流れ図を用いて説明する。
 優先度更新部613は、ソフトウェアから更新に係る指示(優先度情報テーブル800のエントリのいずれかを示すメモリアクセス命令または制御レジスタアクセス命令)を受け取ったか否かを判断する(ステップS200)。
 受け取ったと判断する場合には(ステップS200における「Yes」)。優先度更新部613は、受け取った指示に基づいて、優先度情報テーブル800を更新する(ステップS205)。
 優先度情報テーブル800の更新後、及び更新に係る指示を受け取っていないと判断する場合(ステップS200における「No」)、処理は、ステップS200へと戻り、更新に係る指示の受け付け待ち状態となる。
 なお、更新に係る指示は、上述したように、所定の命令が発行された(プログラム上実行された)後に発行される。
 2.3 動作イメージ
 図12は、第2の実施の形態における第1の命令流及び第2の命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージである。
 ここで、図12に示す動作イメージでは、縦軸に時間、横軸に命令の並列度を示している。
 ブロック1001は、第1命令流の命令実行の様子を示し、t/2までは、図9(a)で示す優先度情報テーブル800の優先順位に従って、常に最優先で1命令の発行が行われている。
 また、ブロック1002は、第2命令流の命令実行の様子を示し、t/2までは、第1命令流で使用されない並列度を用いて命令が実行されていることを示す。
 t/2の時点で、ソフトウェアの指示により、図9(a)で示す優先度情報テーブル800が図9(b)で示す優先度情報テーブル800aに更新されると、第1命令流の命令では、図9(b)で示す優先度情報テーブル800aの優先順位に従って、常に最優先で2つの命令の発行が行われ、第2命令流では2つの命令の発行が行われることとなる。
 これにより、例えば、第1命令流が一定の性能保証が求められる命令流であって、かつ、1命令の並列度を与えることで、その性能を満たすことができる場合、本実施例により、性能保証の条件を満たしつつ、他の命令流の応答性を高く保つことができる。
 3.第3の実施の形態
 ここでは、第3の実施の形態に係るプロセッサ10bについて、第1及び第2の実施の形態に係るプロセッサ10及び10aと異なる点を中心に説明する。
 図13は、第3の実施の形態におけるプロセッサ10bの構成を示すブロック図である。
 プロセッサ10bは、N(Nは2以上の整数)個の命令流(N個のスレッド)を同時に独立して実行するプロセッサであり、命令メモリ1101と、命令群決定部1102と、N個の命令バッファ(第1命令バッファ1103、第2命令バッファ1104、…、第N命令バッファ1105)と、発行命令決定部1106と、優先度決定部1107と、N個のレジスタファイル(第1レジスタファイル1108、第2レジスタファイル1109、…、第Nレジスタファイル1110)と、演算器群1111と、ライトバックバス1112と、優先度更新部1113と、性能監視部1114とを備えている。
 ここで、各命令バッファとレジスタファイルは1対1に対応付けられ、N個の論理プロセッサを構成する。
 また、本実施の形態では、プロセッサ10bは、第1及び第2の実施の形態で示すプロセッサ10、10aと同様に、同時に4つの命令の実行が可能であるとする。
 (1)命令メモリ1101
 命令メモリ1101は、第1の実施の形態で示す命令メモリ101と同様に、プロセッサ10bにおいて実行される命令を保持するメモリであり、N本の独立に実行される命令流(スレッド)を保持している。
 (2)命令群決定部1102
 命令群決定部1102は、第1の実施の形態で示す命令群決定部102と同様であるので、ここでの説明は省略する。
 (3)第1命令バッファ1103から第N命令バッファ1105
 第i命令バッファ(iは1以上N以下の整数)は、i番目の命令流(以下、第i命令流という。)に属する命令を受け取り、保持するものである。
 具体的には、第1命令バッファ1103は、図14に示すように、第1命令保持部1201と第1命令流スケジューラ1202とを有している。なお、第1命令保持部1201及び第1命令流スケジューラ1202のそれぞれは、第1の実施の形態で示す第1命令保持部201と第1命令流スケジューラ202のそれぞれと同様であるので、ここでの説明は省略する。
 また、第2命令バッファ1104についても、第2命令保持部1203と第2命令流スケジューラ1204とを有しており、第N命令バッファ1205についても、第N命令保持部1205と第N命令流スケジューラ1206とを有している。これら構成要素についても、第1の実施の形態と同様であるので、ここでの説明は省略する。
 (4)優先度決定部1107
 優先度決定部1107は、発行命令決定部1106において発行する命令を決定する際に用いる優先度情報テーブル1300を保持している。
 優先度情報テーブル1300は、例えば、図15(a)に示すように、優先度1301、命令流1302及び命令番号1303とから構成され、N個の命令バッファそれぞれが有する合計4×N個分のテーブル要素を有している。優先度1301、命令流1302及び命令番号1303のそれぞれは、優先度301、命令流302及び命令番号303と同様であるので、ここでの説明は省略する。
 ここで、優先度情報テーブル1300は、初期状態として、第1の実施の形態で示した設定方法により各命令の優先度(発行する優先順序)が設定されているものとする。
(5)性能監視部1114
 性能監視部1114は、N個の命令流のそれぞれの実行命令数をダウンカウントすることができる命令流に対応したN個の実行命令数カウンタと、プロセッサ10bのマシンサイクルをダウンカウントすることができる1個のサイクルカウンタを備える。
 N個の実行命令数カウンタは、対応する命令流の命令がプロセッサ10b上で実行されると、命令が実行された数だけダウンカウントされる。なお、動作開始時には、N個の実行命令数カウンタそれぞれには、初期値が設定されるものとする。
 N個の実行命令数カウンタのいずれかのカウンタ値が0になると、性能監視部1114は優先度更新部1113にカウンタ値が0になったことを通知する。このとき、優先度更新部1113に通知される情報(以下、第1通知情報という)には、カウンタ値が0となった命令流を示す識別子(命令流ID)を含むものとする。
 1個のサイクルカウンタは、プロセッサ10bのマシンサイクルが1経過するごとにダウンカウントされる。カウント値が0になると、性能監視部1114は、サイクルカウンタを、初期値を記憶している1個の初期値レジスタの値によって初期化する。また、性能監視部1114は、初期値を記憶しているN個の実行命令数カウンタを、初期値レジスタの値によって初期化する。
 なお、各種カウンタの値を初期化するにあたって、初期値レジスタの値を用いるが、これらの初期値レジスタの値は、プロセッサ上でどの様なソフトウェアをいくつ実行させるか必要があるか等のシステム構成によって定まり、システム設計者によって定められ、システム制御ソフトウェアによって書き込まれる。
 サイクルカウンタのカウンタ値が0になると、性能監視部1114は優先度更新部1113に通知する。以下、サイクルカウンタのカウンタ値が0になった旨の通知を第2通知情報という。また、性能監視部1114は、第2通知情報を優先度更新部1113へ通知すると、実行命令数カウンタを初期値に初期化する。
 (6)優先度更新部1113
 優先度更新部1113は、優先度決定部607で保持している優先度情報テーブル800を一定の条件下で更新するものである。
 優先度更新部1113は、第1通知情報を受け付けると、優先度情報テーブルのエントリの優先度を更新する。例えば、優先度更新部1113は、N個の実行命令数カウンタのいずれかのカウンタ値が0になると、性能監視部1114からカウンタ値が0になった旨、及びその命令流IDを含む第1通知情報を受け取り、受け取った命令流IDに対応する命令流の優先度を最低となるように優先度情報テーブル1300を更新する。
 また、優先度更新部1113は、第2通知情報を受け付けると、優先度情報テーブルのエントリの優先度を初期状態の内容へと更新する。例えば、優先度更新部1113は、サイクルカウンタのカウンタ値が0になると、性能監視部1114から第2通知情報を受け取り、全ての命令流の優先度情報が記憶されているテーブルのエントリの優先度を初期状態に戻す。
 ここで、優先度情報テーブル1300を更新した場合の更新結果を、優先度情報テーブル1300aとして図15(b)に示す。ここでは、第1命令流と第2命令流の2つの命令流のみは実行されるものとする。この例は、優先度更新部1113が、性能監視部1114から、第1通知情報を受け取った場合のものであり、第1通知情報には、実行命令数カウンタの値が0となった命令流は第1命令流であるとする。
 優先度情報テーブル1300は、優先度更新部1113により、第1命令流の優先度を最低となるよう、つまり、ここでは、第2命令流の各命令が優先的に発行されるように、更新される。
 この更新により、優先度情報テーブル1300で示す第2命令流の各優先度情報1305から1307の優先順位が、更新後では1つずつ上がり更新後の優先度情報テーブル1300aで示すように、優先順位が1から3である各優先度情報1309から1311へと変更される。また、第1命令流の各優先度情報1304の優先順位は当該更新により1から4へと変更された優先度情報1312となる。
 なお、以下において、優先度情報テーブル1300を用いて各構成要素について説明する。
 (7)発行命令決定部1106
 発行命令決定部1106は、第1命令バッファ1103から第N命令バッファ1105からマシンサイクル毎に発行する命令を決定するものである。
 発行命令決定部1106は、第1命令流スケジューラ1202から第N命令流スケジューラ1206と、優先度情報テーブル1300とに基づいて、実行可能状態となっており各記憶領域に格納されている命令全てのうち、優先度情報テーブル1300で示される順序に従って、4個の命令を選択し、選択した命令それぞれを個別の演算器へ出力する。
 ここで、図14において、発行命令決定部1106のハードウェア構成を示す。
 発行命令決定部1106は、第1命令決定部1211から第4命令決定部1214と、命令選択部1215と、第1命令抽出部1221から第4命令抽出部1224とを有している。
 (7-1)命令選択部1215
 命令選択部1215は、第1の実施の形態で示す命令選択部215と同様のものである。具体的には、第1命令バッファ1103から第N命令バッファ1105それぞれから各命令バッファ内の発行可能な命令数を示す信号、つまり実行可能状態となっている命令数を示す信号1241~1243を受け取り、優先度情報テーブル1300で示される順序に従って、選択すべき4個の命令を特定する。
 そして、命令選択部1215は、第1命令決定部1211から第4命令決定部1214それぞれに対して、当該命令決定部で取得すべき命令を示す発行命令選択信号1251~1254を出力する。発行命令選択信号には、抽出すべき命令を示す情報、例えば、抽出すべき命令が保持されている命令バッファ及びその記憶領域を示す情報が含まれている。
 (7-2)第1命令抽出部1221から第4命令抽出部1224
 第1命令抽出部1221から第4命令抽出部1224のそれぞれは、第1の実施の形態で示す第1命令抽出部221から第4命令抽出部224のそれぞれと同様であるので、ここでの説明は省略する。
 (7-3)第1命令決定部1211から第4命令決定部1214
 第1命令決定部1211から第4命令決定部1214それぞれは、演算器群1111が有する演算器と1対1に対応付けられており、その機能は、第1の実施の形態で示す第1命令決定部211から第4命令決定部214それぞれと同様であるので、ここでの説明は省略する。
 (8)第1レジスタファイル1108から第Nレジスタファイル1110
 第1レジスタファイル1108から第Nレジスタファイル1110のそれぞれは、第1の実施の形態で示す第1レジスタファイル108から第Nレジスタファイル110と同様であるので、ここでの説明は省略する。
 (9)演算器群1111
 演算器群1111は、加算器や乗算器などからなる複数の演算器を含むものである。なお、ここでは、演算器群1111は、4つの演算器(演算器1111a~1111d)を有しているものとする。また、演算器1111aは第1命令決定部1211と、演算器1111bは第2命令決定部1212と、演算器1111cは第3命令決定部1213と、演算器1111dは第4命令決定部1214と、それぞれ対応付けられているものとする。
 演算器が処理する命令には、当該命令が属する命令流を識別する情報が含まれており、当該情報に基づいて対応するレジスタファイルへ演算結果を出力する。
 (10)ライトバックバス1112
 ライトバックバス1112は、演算器群1111からの出力を第1レジスタファイル1108~第Nレジスタファイル1110に書き戻すためのバスである。
 3.2 動作
 (1)発行命令の決定の動作
 ここでは、発行すべき命令を決定する動作について図16に示す流れ図を用いて説明する。ここでは、説明の便宜上、利用する優先度情報テーブルは、優先度情報テーブル1300とする。なお、更新された優先度情報テーブル1300aを用いた場合でも、処理動作は同じである。
 命令選択部1215は、一のマシンサイクルにおいて発行する命令を決定する際に、変数の初期化(i=1;j=1;k=4)を行う(ステップS300)。ここで、変数iは、マシンサイクルにおいて発行する命令数をカウントするカウンタである。変数jは、優先度情報テーブル1300から情報を読み出すためのポインタを示す。変数kは、マシンサイクルにおいて発行可能な命令の最大数を示し、本実施例においては4である。
 命令選択部1215は、変数iの値が変数k以下であるか否か、つまり発行する命令数が最大値以下であるか否かを判断する(ステップS305)。
 変数iの値が変数k以下であると判断する場合(ステップS305における「Yes」)、命令選択部1215は、優先度情報テーブル1300のj番目のエントリを読み出し、その読み出しに成功したか否かを判断する(ステップS310)。
 j番目のエントリの読み出しに成功したと判断した場合(ステップS310における「Yes」)、命令選択部1215は、取得したj番目のエントリが示す命令流の命令が発行可能であるか否を判断する(ステップS315)。
 発行可能でないと判断する場合には(ステップS315における「No」)、変数jに値1が加算され(ステップS320)、処理はステップS310へ戻る。
 発行可能であると判断する場合には(ステップS315における「Yes」)、命令選択部1215は、第i命令決定部に対して発行命令選択信号を出力する。発行命令選択信号を受信した第i命令決定部は、発行すべき命令が保持されている記憶領域に応じた命令抽出部に当該命令を抽出させて、命令抽出部で抽出された命令を対応する演算器へ出力する(ステップS325)。
 その後、変数iに値1が、変数jに値1が、それぞれ加算され(ステップS330)、処理はステップS305へ戻る。
 また、変数iの値が変数k以下でないと判断する場合(ステップS305における「No」)、及び j番目のエントリの読み出しに失敗した、つまりポインタが示す位置にエントリが無いと判断した場合(ステップS310における「No」)、処理は終了する。
 (2)優先度情報テーブルの更新の動作
 ここでは、実行命令数カウンタを用いた更新処理(以下、第1更新処理)と、サイクルカウンタを用いた更新処理(第2更新処理)とについて説明する。
 (2-1)第1更新処理
 まず、第1更新処理について、図17に示す流れ図を用いて説明する。
 性能監視部1114は、処理開始時において、N個の実行命令数カウンタ全てを初期化する(ステップS400)。
 性能監視部1114は、命令の実行を検出すると(ステップS405)、実行された命令を含む命令流に対応する実行命令数カウンタの値を1減算する(ステップS410)。
 減算された実行命令数カウンタの値が0であるか否かを判断する(ステップS415)。
 0であると判断する場合(ステップS415における「Yes」)、性能監視部1114は、第1通知情報を生成し、優先度更新部1113へ通知する(ステップS420)。このとき、生成された第1通知情報には、実行命令数カウンタの値が0である命令流を識別する命令流IDが含まれる。
 優先度更新部1113は、性能監視部1114から第1通知情報を受け取ると、受け取った第1通知情報に含まれる命令流IDで識別される命令流の優先度が最低となるように優先度情報テーブル1300を更新する(ステップS425)。
 優先度情報テーブル1300の更新後、及び減算された実行命令数カウンタの値が0でないと判断する場合(ステップS415における「No」)、処理は、ステップS405へ戻る。
 (2-2)第2更新処理
 次に、第2更新処理について、図18に示す流れ図を用いて説明する。
 性能監視部1114は、処理開始時において、サイクルカウンタを初期化する(ステップS500)。
 性能監視部1114は、処理時間が1サイクル分経過したか否かを判断する(ステップS505)。
 1サイクル経過したと判断する場合(ステップS505における「Yes」)、性能監視部1114は、サイクルカウンタの値を1減算する(ステップS510)。
 減算された実行命令数カウンタの値が0であるか否かを判断する(ステップS515)。
 0であると判断する場合(ステップS515における「Yes」)、性能監視部1114は、第2通知情報を生成し、優先度更新部1113へ通知する(ステップS520)。
 性能監視部1114は、サイクルカウンタを初期化(ステップS525)、及びN個実行命令数カウンタ全てを初期化する(ステップS530)。
 優先度更新部1113は、性能監視部1114から第2通知情報を受け取ると、優先度情報テーブルの内容を初期状態の内容となるよう更新する(ステップS535)。
 優先度情報テーブルの更新後、1サイクル経過していないと判断する場合(ステップS505における「No」)及び減算されたサイクルカウンタの値が0でないと判断する場合(ステップS515における「No」)、処理は、ステップS505へ戻る。
 3.3 動作イメージ
 図19は、第3の実施の形態における第1の命令流及び第2の命令流を用いた並列処理を行った場合での各命令の割り当て(発行)の動作イメージである。
 ここで、図19に示す動作イメージでは、縦軸に時間、横軸に命令の並列度を示している。
 また、第1の命令流は、最低1命令ずつ発行されることで、時間t内で処理が完了するものとする。
 図19において、ブロック1501は第1命令流の命令実行の様子を示し、t/4まで常に2つの命令の発行が行われ、その後3t/4までは、1つの命令の発行が行われていることを示している。
 ブロック1502は、第2命令流の命令実行の様子を示し、t/4までは2つの命令が実行されていることを示す。図15(a)に示す優先度情報テーブル1300では、上位4番目までの優先順位によると、第2命令流の命令の実行が3つまでが優先的に実行が許可されるようになっているが、発行の準備が完了していない場合には、次の優先順位に実行の許可がなされる。そのため、図19に示すように、第2の命令流の命令が2つしか実行許可されない場合には、第1命令流の命令が2つ実行されることとなる。
 その後、第2の命令流においては、時間t/4から3t/4までの間は、3つの命令流が実行される。
 時間3t/4の時点で、第1命令流に対応する実行命令カウンタの値は0となる。なぜなら、時間0からt/4までの間は2つの命令が発行されているので、第1命令流に対応する実行命令カウンタは、合計2の値が減算されていることとなり、1つずつの命令を発行した場合よりも、t/4分だけ早く処理が終了する、つまり実行命令カウンタの値が0となるからである。
 そうすると、時間3t/4の時点で、優先度情報テーブル1300は、例えば図15(b)に示す優先度情報テーブル1300aへと更新され、以降の処理においては、第2命令流の命令が常に4つずつ発行されることとなる。
 そして、時間tに達すると、サイクルカウンタの値が0となり、各種カウンタの値は初期化され、且つ優先度情報テーブルの内容は初期状態の内容、つまり優先度情報テーブル1300へと更新される。
 以上により、一定のサイクル内に一定の処理を完了した命令流は、それ以降プロセッサ上の実行リソースを消費しない状態とし、他命令流がより多く実行機会を得るようにすることが可能となる。
 4.第4の実施の形態
 ここでは、第1の実施の形態で示したプロセッサ10を適用した映像処理システム1600について説明する。
 映像処理システム1600は、例えば、映像信号をデコード処理して、表示装置(テレビ等)へ出力する映像処理装置である。
 ここでは、映像処理システム1600は、第1の実施の形態で示したプロセッサ10を有しており、外部から受信した映像信号をデコードする処理、及びユーザー入力装置(リモコン)1605からの指示に基づく処理とを行う。
 なお、プロセッサ10の構成は、図1、2にて示しているので、ここでは詳細な構成は省略する。以下の説明においては、必要に応じて第1の実施の形態で説明した構成要素を用いて説明する。
 プロセッサ10は、H.264等の規格を用いて圧縮された映像信号をデコードするためには、ビットストリームの解析、可変長符号化された信号のデコード処理、逆量子化、逆周波数変換、動き補償、デブロックフィルタ処理を行う。これらは、映像に乱れを生じさせないよう、一定の性能を必ず保証する必要がある。ただし、それ以上の性能を割り当てる必要は無い。
 また、リモコン等のユーザーからの入力に対応する処理は、可能な限り迅速に処理を行う即応性が求められる。
 そこで、第1の実施の形態で示す第1命令流を映像信号をデコードする処理(映像デコード処理)と、第2命令流をユーザー入力装置1605から指示された処理(ユーザー入力処理)とすることで、単一のマルチスレッドプロセッサ上で、性能保証と高い応答性を両立したリアルタイム映像処理システムを構築することができる。
 なぜなら、優先度情報テーブル300の優先度に従って、常に映像デコード処理に係る1つの命令が発行され、使用されない並列度、つまり映像デコード処理では使用されていない残り3つの演算器には、ユーザー入力処理に係る命令を割り当てることができるので、映像デコード処理に対する性能保証の条件を満たしつつ、ユーザー入力処理に係る命令を即座に実行できるからである。
 5.変形例
 以上、各実施の形態に基づいて説明したが、本発明は上記の各実施の形態に限られない。例えば、以下のような変形例が考えられる。
 (1)上記各実施の形態において、優先度情報テーブルは、優先度、命令流及び命令番号とから構成されるとしたが、これに限定されない。
 優先度情報テーブルの命令番号は無くてもよい。この場合、命令流の項目に出現する命令流を識別する値の出現数の累積値を用いることで、対応する命令番号を特定することができる。
 (2)上記各実施の形態において、単一マシンサイクルに演算器群に発行することができる命令は4命令としたが、これに限定されない。単一マシンサイクルに発行可能な命令数は2以上であればよく、4に限らない。
 (3)上記第2の実施の形態において、優先度情報テーブルの更新はソフトウェアの指示によるものとしたが、これに限定されない。
 ハードウェアの指示によるものであってもよい。
 この場合、優先度更新部1113は、ハードウェアからの指示によって、優先度決定部1107で保持している優先度情報を記憶している優先度情報テーブル1300を更新する。
 具体的には、優先度更新部1113は、優先度決定部1107で保持している優先度情報テーブル1300のエントリに対応した更新優先度情報を保持している。例えば、優先度更新部1113は、ハードウェアからの更新信号を受け取り、更新優先度情報に基づいて、対応する優先度情報テーブル1300のエントリを更新する。また、ハードウェアの指示は、例えば、所定の命令が発行された(プログラム上実行された)ことを検出すると、指示がされるよう予め設定されている。
 なお、ハードウェアの指示により、1度に複数のエントリを更新してもよい。
 (4)上記第4の実施の形態において、映像処理システム1600は、映像信号をデコードするものとしたが、これに限定されない。
 映像処理システム1600は、映像信号をエンコードするものであってもよい。
 この場合、例えば、第1命令バッファは、映像信号をエンコードする処理に係る命令を保持し、第2命令バッファは、ユーザー入力処理に係る命令を保持し、各命令バッファで保持されている命令を優先度情報テーブルで示す優先度に従って実行することで実現できる。
 また、映像信号をデコードやエンコードする装置としては、DVDレコーダ、デジタルテレビ等がある。つまり、映像処理システム1600は、映像や音声のメディア処理を行う装置であってもよい。
 (5)上記第4の実施の形態において、映像処理システム1600に第1の実施の形態で示すプロセッサ10を適用したが、これに限定されない。
 映像処理システム1600には、第2の実施の形態で示すプロセッサ10a及び第3の実施の形態で示すプロセッサ10bの何れかを適用してもよい。
 (6)上記第2、及び第3の実施の形態で示すプロセッサ10a及び10bは、FPGA(Field Programmable Gate Array)でとし、FPGAの機能により優先度情報テーブルを更新するとしてもよい。
 (7)上記各実施の形態において、各命令バッファの命令保持部における記憶領域の個数は演算器の個数と同一としたが、これに限定されない。
 各命令バッファの命令保持部における記憶領域の個数は、演算器の個数よりの少なくてもよい。または、記憶領域の個数は、演算器の個数より多くてもよい。
 または、命令流の個数、つまりは命令バッファの個数(例えば、M個)について、各命令バッファの記憶領域がZ個存在する場合に、全記憶領域の個数(M×Z)は、演算器の個数以上であってもよい。この場合、例えば、発行命令決定部106は、全記憶領域の個数(M×Z)から、優先度の順位に従って演算器の個数分の命令を取得することとなる。
 (8)上記第1の実施の形態において、第1命令流についてマシンサイクル毎に1命令を発行することで、所定の時間内に処理が完了する場合について説明したが、これに限定されない。
 第1命令流についてマシンサイクル毎に1命令を発行する機会が保証されることで、所定の時間内に処理が完了するようにしてもよい。
 また、第2の実施の形態においても同様に、第1命令流についてマシンサイクル毎に1命令を発行する機会が保証されることで、所定の時間内に処理が完了するようにしてもよい。
 さらに、第3の実施の形態においても同様に、第1命令流についてマシンサイクル毎に1命令を発行する機会が保証されることで、所定の時間内に処理が完了するようにしてもよい。この場合、性能監視部1114が有するN個の実行命令数カウンタは、対応する命令流の命令がプロセッサ10b上で実行されると、命令が実行された数だけダウンカウントされる。また、命令の発行が行われなかった場合においても、対応する命令流の命令に対して最優先の優先度が割り当てられたサイクルはダウンカウントされる。なお、動作開始時には、第3の実施の形態と同様に、N個の実行命令数カウンタそれぞれには、初期値が設定されるものとする。
 (9)上記各実施の形態、及び各変形例で説明した手法の手順を記述したプログラムをメモリに記憶しておき、CPU(Central Processing Unit)などがメモリからプログラムを読み出して、読み出したプログラムを実行することによって、上記の手法が実現されるようにしてもよい。
 (10)上記各実施の形態、及び各変形例で説明した手法の手順を記述したプログラムを記録媒体に格納して、頒布するようにしてもよい。
 (11)これらの実施の形態および変形例の組合せであってもよい。
 6.補足
 (1)本発明の一実施態様である、L個(Lは2以上の整数)の演算器を有するプロセッサは、M個(Mは2以上の整数)の命令流各々が区別して入力され、各命令流を構成するZ個(Zは2以上の整数であり、M×ZはL以上であることを満たす)の命令を格納するためのM×Z個の命令記憶領域を含む命令バッファと、前記命令バッファ内の前記M×Z個の命令記憶領域に順序を付けた情報である順序情報を保持する順序情報保持手段と、前記命令バッファの前記M×Z個の命令記憶領域に格納された命令を抽出するための抽出手段と、実行可能状態となっており前記M×Z個の命令記憶領域に格納されている命令全てのうちから、前記順序情報に従った順序で、L個の命令を前記抽出手段に抽出させて、抽出された命令毎に別の演算器に入力する制御手段とを備えることを特徴とする。
 この構成によると、プロセッサは、M×Z個の命令記憶領域に順序を付けた順序情報に基づいて、実行可能状態でありM×Z個の命令記憶領域に格納されている命令全てのうちからL個の命令を抽出するので、一の命令流の命令と、他の命令流の命令とを同時に抽出することができる。そのため、プロセッサは、例えば、一の命令流が性能保証が要求される命令流であり、他の命令流が性能保証が要求されない命令流であるとすると、他の命令流の命令は、一の命令流が終了するまで待つ必要はないので、一の命令流に対する性能保証と、他の命令流に対する高い応答性とを両立することができる。
 (2)ここで、前記命令バッファは、前記M×Z個の命令記憶領域それぞれについて、当該命令記憶領域に記憶されている命令が実行可能であるか否かを示すフラグを有しており、前記制御手段は、M×Z個のフラグそれぞれの内容から、実行可能状態である命令全てを特定するとしてもよい。
 この構成によると、プロセッサは、M×Z個の命令記憶領域それぞれについて、当該記憶領域に記憶されている命令が実行可能状態であるかをフラグを用いて管理しているので、実行可能状態の命令全てを容易に特定することができる。
 (3)ここで、前記M個の命令流のうち一の命令流は、所定時間内で処理の完了を保証すべき性能保証命令流であり、前記順序情報は、前記性能保証命令流の処理が前記所定時間内で終了することを保証するための最小個数の命令について、L以下の順序を付与した情報であるとしてもよい。
 この構成によると、プロセッサは、所定時間内で処理の完了を保証すべき性能保証命令流については、所定時間内で処理の完了を保証するための最小個数の命令に対してはL以下の順序が付されるので、常に最小個数の命令は実行されることとなり、所定時間内で処理が完了しないという処理破綻を生じることがない。
 (4)ここで、前記性能保証命令流は、画像のデコード処理を行うためのものであり、前記プロセッサは、画像のデコード処理を行う画像処理システムに備えられるとしてもよい。
 この構成によると、プロセッサは、性能保証が必要とされる画像のデコード処理と、他の命令流に対する高い応答性とを両立することができる。
 (5)ここで、前記性能保証命令流は、画像のエンコード処理を行うためのものであり、前記プロセッサは、画像のエンコード処理を行う画像処理システムに備えられるとしてもよい。
 この構成によると、プロセッサは、性能保証が必要とされる画像のエンコード処理と、他の命令流に対する高い応答性とを両立することができる。
 (6)ここで、前記プロセッサは、さらに、前記M個の命令流毎に、当該命令流において一の演算器へ出力された命令数を監視し、一の命令流において出力された命令数が所定値を超えると、当該命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるように、前記順序情報を更新する順序情報更新手段を備えるとしてもよい。
 この構成によると、プロセッサは、一の命令流について発行された命令数が所定数に達すると、当該一の命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるので、他の命令流に優先的に命令の発行が割り当てられる。従って、例えば、一の命令流の命令が終了した場合には、当該一の命令流に優先的に命令の発行が割り当てることは不要となるので、他の命令流に命令の発行を割り当てることで他の命令流に対する処理効率を上げることができる。
 (7)ここで、前記プロセッサは、さらに、前記M個の命令流毎に、当該命令流において一の演算器へ出力された命令を監視し、一の命令流において特定の命令が出力されると、当該命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるように、前記順序情報を更新する順序情報更新手段を備えるとしてもよい。
 この構成によると、プロセッサは、一の命令流について特定の命令が発行されると、その直後に、当該一の命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるので、他の命令流に優先的に命令の発行が割り当てられる。従って、例えば、一の命令流について特定の命令が実行され、その後優先的に命令を実行する必要がない場合には、当該一の命令流に優先的に命令の発行が割り当てるよりも、他の命令流に命令の発行を割り当てることで他の命令流に対する処理効率を上げることができる。
 本発明に係るプロセッサは、一の命令流に対する性能保証と、他の命令流に対する高い応答性とを必要とする装置に適用することができる。
   10  プロセッサ
  101  命令メモリ
  102  命令群決定部
  103~105  第1命令バッファ~第N命令バッファ
  106  発行命令決定部
  107  優先度決定部
  108~110  第1レジスタファイル~第Nレジスタファイル
  111  演算器群
  112  ライトバックバス
  201  第1命令保持部
  201a~201d 第1~第4の記憶領域
  202  第1命令流スケジューラ
  203  第2命令保持部
  204  第2命令流スケジューラ
  205  第N命令保持部
  206  第N命令流スケジューラ
  211~214  第1命令決定部~第4命令決定部
  215  命令選択部
  221~224  第1命令抽出部~第4命令抽出部
  751~754 発行命令選択信号

Claims (8)

  1.  L個(Lは2以上の整数)の演算器を有するプロセッサであって、
     M個(Mは2以上の整数)の命令流各々が区別して入力され、各命令流を構成するZ個(Zは2以上の整数であり、M×ZはL以上であることを満たす)の命令を格納するためのM×Z個の命令記憶領域を含む命令バッファと、
     前記命令バッファ内の前記M×Z個の命令記憶領域に順序を付けた情報である順序情報を保持する順序情報保持手段と、
     前記命令バッファの前記M×Z個の命令記憶領域に格納された命令を抽出するための抽出手段と、
     実行可能状態となっており前記M×Z個の命令記憶領域に格納されている命令全てのうちから、前記順序情報に従った順序で、L個の命令を前記抽出手段に抽出させて、抽出された命令毎に別の演算器に入力する制御手段とを備える
     ことを特徴とするプロセッサ。
  2.  前記命令バッファは、
     前記M×Z個の命令記憶領域それぞれについて、当該命令記憶領域に記憶されている命令が実行可能であるか否かを示すフラグを有しており、
     前記制御手段は、
     M×Z個のフラグそれぞれの内容から、実行可能状態である命令全てを特定する
     ことを特徴とする請求項1に記載のプロセッサ。
  3.  前記M個の命令流のうち一の命令流は、所定時間内で処理の完了を保証すべき性能保証命令流であり、
     前記順序情報は、
     前記性能保証命令流の処理が前記所定時間内で終了することを保証するための最小個数の命令について、L以下の順序を付与した情報である
     ことを特徴とする請求項1に記載のプロセッサ。
  4.  前記性能保証命令流は、画像のデコード処理を行うためのものであり、
     前記プロセッサは、
     画像のデコード処理を行う画像処理システムに備えられる
     ことを特徴とする請求項3に記載のプロセッサ。
  5.  前記性能保証命令流は、画像のエンコード処理を行うためのものであり、
     前記プロセッサは、
     画像のエンコード処理を行う画像処理システムに備えられる
     ことを特徴とする請求項3に記載のプロセッサ。
  6.  前記プロセッサは、さらに、
     前記M個の命令流毎に、当該命令流において一の演算器へ出力された命令数を監視し、一の命令流において出力された命令数が所定値を超えると、当該命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるように、前記順序情報を更新する順序情報更新手段を備える
     ことを特徴とする請求項1に記載のプロセッサ。
  7.  前記プロセッサは、さらに、
     前記M個の命令流毎に、当該命令流において一の演算器へ出力された命令を監視し、一の命令流において特定の命令が出力されると、当該命令流を構成するZ個の命令が格納されたZ個の命令記憶領域の順序を下げるように、前記順序情報を更新する順序情報更新手段を備える
     ことを特徴とする請求項1に記載のプロセッサ。
  8.  L個(Lは2以上の整数)の演算器を有するプロセッサで用いられる方法であって、
     前記プロセッサは、
     M個(Mは2以上の整数)の命令流各々が区別して入力され、各命令流を構成するZ個(Zは2以上の整数であり、M×ZはL以上であることを満たす)の命令を格納するためのM×Z個の命令記憶領域を含む命令バッファと、
     前記命令バッファ内の前記M×Z個の命令記憶領域に順序を付けた情報である順序情報を保持する順序情報保持手段とを備え、
     前記方法は、
     前記命令バッファの前記M×Z個の命令記憶領域に格納された命令を抽出するための抽出ステップと、
     実行可能状態となっており前記M×Z個の命令記憶領域に格納されている命令全てのうちから、前記順序情報に従った順序で、L個の命令を前記抽出ステップに抽出させて、抽出された命令毎に別の演算器に入力する制御ステップとを含む
     ことを特徴とする方法。
PCT/JP2010/003354 2009-05-18 2010-05-18 プロセッサ WO2010134329A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US13/320,668 US8788793B2 (en) 2009-05-18 2010-05-18 Instruction issue to plural computing units from plural stream buffers based on priority in instruction order table
CN201080021569.6A CN102428441B (zh) 2009-05-18 2010-05-18 处理器
JP2011514332A JP5330507B2 (ja) 2009-05-18 2010-05-18 プロセッサ
EP10777567.8A EP2434392B1 (en) 2009-05-18 2010-05-18 Processor

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009119508 2009-05-18
JP2009-119508 2009-05-18

Publications (1)

Publication Number Publication Date
WO2010134329A1 true WO2010134329A1 (ja) 2010-11-25

Family

ID=43126022

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/003354 WO2010134329A1 (ja) 2009-05-18 2010-05-18 プロセッサ

Country Status (5)

Country Link
US (1) US8788793B2 (ja)
EP (1) EP2434392B1 (ja)
JP (1) JP5330507B2 (ja)
CN (1) CN102428441B (ja)
WO (1) WO2010134329A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014211743A (ja) * 2013-04-18 2014-11-13 株式会社デンソー マルチコアプロセッサ

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10124316A (ja) 1996-08-27 1998-05-15 Matsushita Electric Ind Co Ltd 複数の命令流を独立に処理し、命令流単位に処理性能を柔軟に制御するマルチスレッドプロセッサ
JP2001306324A (ja) * 2000-03-30 2001-11-02 Agere Systems Guardian Corp マルチスレッドvliwプロセッサにおける分割可能なパケットを識別するための方法および装置
JP2006127302A (ja) * 2004-10-29 2006-05-18 Internatl Business Mach Corp <Ibm> 情報処理装置、コンパイラ、及びコンパイラプログラム
JP2009515264A (ja) * 2005-11-01 2009-04-09 インテンショナル ソフトウェア コーポレーション 文書およびソースコードの制御のための方法およびシステム

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2908598B2 (ja) * 1991-06-06 1999-06-21 松下電器産業株式会社 情報処理装置
KR100500002B1 (ko) 1996-08-27 2005-09-08 마츠시타 덴끼 산교 가부시키가이샤 복수의명령흐름을독립적으로처리하고,명령흐름단위로처리성능을유연하게제어하는멀티스레드프로세서
US6477562B2 (en) 1998-12-16 2002-11-05 Clearwater Networks, Inc. Prioritized instruction scheduling for multi-streaming processors
US7518993B1 (en) * 1999-11-19 2009-04-14 The United States Of America As Represented By The Secretary Of The Navy Prioritizing resource utilization in multi-thread computing system
JP3646137B2 (ja) 2003-03-25 2005-05-11 独立行政法人科学技術振興機構 命令発行方法及び装置、中央演算装置、命令発行プログラム及びそれを記憶したコンピュータ読み取り可能な記憶媒体
US7418576B1 (en) * 2004-11-17 2008-08-26 Nvidia Corporation Prioritized issuing of operation dedicated execution unit tagged instructions from multiple different type threads performing different set of operations
US7613904B2 (en) * 2005-02-04 2009-11-03 Mips Technologies, Inc. Interfacing external thread prioritizing policy enforcing logic with customer modifiable register to processor internal scheduler
JP2008123045A (ja) * 2006-11-08 2008-05-29 Matsushita Electric Ind Co Ltd プロセッサ

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10124316A (ja) 1996-08-27 1998-05-15 Matsushita Electric Ind Co Ltd 複数の命令流を独立に処理し、命令流単位に処理性能を柔軟に制御するマルチスレッドプロセッサ
JP2001306324A (ja) * 2000-03-30 2001-11-02 Agere Systems Guardian Corp マルチスレッドvliwプロセッサにおける分割可能なパケットを識別するための方法および装置
JP2006127302A (ja) * 2004-10-29 2006-05-18 Internatl Business Mach Corp <Ibm> 情報処理装置、コンパイラ、及びコンパイラプログラム
JP2009515264A (ja) * 2005-11-01 2009-04-09 インテンショナル ソフトウェア コーポレーション 文書およびソースコードの制御のための方法およびシステム

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"A Multithreaded Processor Architecture with Simultaneous Instruction Issuing", PROC. OF ISS'91:INTERNATIONAL SYMPOSIUM ON SUPERCOMPUTING, FUKUOKA, JAPAN, November 1991 (1991-11-01), pages 87 - 96
R. KALLA ET AL.: "Simlultaneous Multi-threading Implementation in POWER5 - IBM's Next Generation POWER Microprocessor", A SYMPOSIUM ON HIGH PERFORMANCE CHIPS HAPPYO SHIRYO, 19 August 2003 (2003-08-19), XP008164717, Retrieved from the Internet <URL:http://www.hotchips.org/archives/hc15/3_Tue/11.ibm.pdf> *
See also references of EP2434392A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014211743A (ja) * 2013-04-18 2014-11-13 株式会社デンソー マルチコアプロセッサ
US9747132B2 (en) 2013-04-18 2017-08-29 Denso Corporation Multi-core processor using former-stage pipeline portions and latter-stage pipeline portions assigned based on decode results in former-stage pipeline portions

Also Published As

Publication number Publication date
CN102428441B (zh) 2015-04-08
CN102428441A (zh) 2012-04-25
JP5330507B2 (ja) 2013-10-30
US20120060017A1 (en) 2012-03-08
EP2434392A1 (en) 2012-03-28
EP2434392A4 (en) 2012-10-03
JPWO2010134329A1 (ja) 2012-11-08
US8788793B2 (en) 2014-07-22
EP2434392B1 (en) 2014-08-13

Similar Documents

Publication Publication Date Title
US8195922B2 (en) System for dynamically allocating processing time to multiple threads
US8407454B2 (en) Processing long-latency instructions in a pipelined processor
US6662297B1 (en) Allocation of processor bandwidth by inserting interrupt servicing instructions to intervene main program in instruction queue mechanism
US7610473B2 (en) Apparatus, method, and instruction for initiation of concurrent instruction streams in a multithreading microprocessor
US7269712B2 (en) Thread selection for fetching instructions for pipeline multi-threaded processor
US8675006B2 (en) Apparatus and method for communicating between a central processing unit and a graphics processing unit
JP2008123045A (ja) プロセッサ
US20190163486A1 (en) Issue queue with dynamic shifting between ports
JPH04360234A (ja) 情報処理装置
CN103226463A (zh) 用于使用预解码数据调度指令的方法和装置
TW201203110A (en) Mapping between registers used by multiple instruction sets
WO2011155097A1 (ja) 命令発行制御装置及び方法
JP2003122565A (ja) 命令処理制御方法
CN103207810A (zh) 计算任务状态封装
JP5330507B2 (ja) プロセッサ
JP2020091751A (ja) 演算処理装置および演算処理装置の制御方法
CN111226196B (zh) 在乱序处理器中具有一个或多个摘要位的可扩展依赖矩阵
US11481250B2 (en) Cooperative workgroup scheduling and context prefetching based on predicted modification of signal values
US10176548B2 (en) Graphics context scheduling based on flip queue management
JP4631442B2 (ja) プロセッサ
US9323521B2 (en) Decimal floating-point processor
JP6167193B1 (ja) プロセッサ
US9141438B2 (en) Logic for synchronizing multiple tasks
WO2005013129A1 (ja) 情報処理装置並びに命令処理制御装置,命令処理制御方法,命令処理制御プログラム及び命令処理制御プログラムを記録したコンピュータ読取可能な記録媒体

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080021569.6

Country of ref document: CN

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

Ref document number: 10777567

Country of ref document: EP

Kind code of ref document: A1

DPE2 Request for preliminary examination filed before expiration of 19th month from priority date (pct application filed from 20040101)
DPE2 Request for preliminary examination filed before expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 2011514332

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13320668

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2010777567

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE