WO2009118776A1 - マルチプロセッサ - Google Patents

マルチプロセッサ Download PDF

Info

Publication number
WO2009118776A1
WO2009118776A1 PCT/JP2008/000715 JP2008000715W WO2009118776A1 WO 2009118776 A1 WO2009118776 A1 WO 2009118776A1 JP 2008000715 W JP2008000715 W JP 2008000715W WO 2009118776 A1 WO2009118776 A1 WO 2009118776A1
Authority
WO
WIPO (PCT)
Prior art keywords
stage
multiprocessor
clock
data
control unit
Prior art date
Application number
PCT/JP2008/000715
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 JP2010505022A priority Critical patent/JP5170234B2/ja
Priority to PCT/JP2008/000715 priority patent/WO2009118776A1/ja
Priority to EP08720594A priority patent/EP2270653A4/en
Publication of WO2009118776A1 publication Critical patent/WO2009118776A1/ja
Priority to US12/889,690 priority patent/US20110066827A1/en

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 or look ahead
    • G06F9/3867Concurrent instruction execution, e.g. pipeline or look ahead using instruction pipelines
    • G06F9/3875Pipelining a single stage, e.g. superpipelining
    • 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/30181Instruction operation extension or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • G06F9/3851Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming

Definitions

  • the present invention relates to a multiprocessor.
  • FIG. 25 is a diagram showing a configuration example of a conventional multiprocessor (for example, Non-Patent Document 1 below).
  • This multiprocessor includes four processors up # 1 to up # 4 on one chip.
  • UMA Uniform Models such as Memory Architecture (NUMA) and Non-Uniform Memory Architecture (NUMA) are known.
  • a memory control system in which a plurality of processors are operated by a clock whose phase is sequentially shifted by a quarter period to use a memory in a time-sharing manner (for example, the following Patent Document 1). “Symmetric multiprocessing technology”, Toshio Uno, AI Publishing, August 13, 2001 JP 56-099559 A
  • FIG. 27 is a diagram showing the relationship between time and the processing capability of the entire multiprocessor.
  • the dotted line is the load curve of a system. As shown in the figure, when a load requiring four processors occurs in a certain time period, the number of necessary processors is four.
  • the conventional multiprocessor supplies power to all the processors even in a time zone where the load is small, there is a problem that the overall power is increased. In particular, information devices such as mobile phones are required to save power.
  • the present invention has been made in view of the above problems, and an object thereof is to provide a multiprocessor that realizes space saving.
  • Another object of the present invention is to provide a multiprocessor that realizes power saving.
  • a multiprocessor comprising one processor
  • instruction sequences to be processed independently for each multiprocessor are shifted in phase within one cycle.
  • a pipeline processing unit for sequentially fetching is provided.
  • a multiprocessor that realizes space saving can be provided. Further, according to the present invention, it is possible to provide a multiprocessor that realizes power saving.
  • FIG. 1 is a diagram showing a configuration example of a multiprocessor system.
  • FIG. 2 is a diagram illustrating a configuration example of the clock control unit.
  • FIG. 3 is a diagram showing a configuration example of the fetch stage.
  • FIG. 4 is a diagram showing a configuration example of the decode stage.
  • FIG. 5 is a diagram illustrating a configuration example of the data read stage.
  • FIG. 6 is a diagram illustrating a configuration example of the calculation stage.
  • FIG. 7 is a diagram illustrating a configuration example of the data write stage.
  • FIG. 8 is a diagram showing a timing chart of the multiprocessor.
  • FIG. 9 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 10 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 11 is a timing chart of the multiprocessor.
  • FIG. 12 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 13 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 14 is a diagram showing a timing chart of the multiprocessor.
  • FIG. 15 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 16 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 17 is a diagram illustrating a configuration example of a clock inverter.
  • FIG. 18 is a diagram showing an example of state transition and processing of the clock inverter.
  • FIG. 19 is a diagram illustrating an example of a timing chart of the clock inverter.
  • FIG. 12 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 13 is a diagram illustrating an example of a timing chart of the multiprocessor.
  • FIG. 20 is a diagram illustrating a configuration example of the pipeline control unit.
  • FIG. 21 is a diagram illustrating an example of state transition of the pipeline control unit.
  • FIG. 22 is a diagram illustrating a definition example of clocks and enables output from the control signal output unit.
  • FIG. 23 is a diagram illustrating an example of a timing chart of the pipeline control unit.
  • FIG. 24 is a diagram illustrating a configuration example of a latch circuit.
  • FIG. 25 is a diagram showing a configuration example of a conventional multiprocessor.
  • FIG. 26 is a diagram illustrating an example of the relationship between the number of processors and the overall performance.
  • FIG. 27 is a diagram illustrating an example of a load curve.
  • multiprocessor system 10 multiprocessor 100: fetch stage 110: first pipeline control unit 111: next state determination unit 112: state storage unit 113: control signal output unit 120 (120-1 to 120-11) to 122 (122-1 to 122-9): first to third latch circuits 126: D-type flip-flop 127: Multiplexer 130 to 133: Adder (Add) 140: Register 150: First latch circuit 200: Decode stage 210: Second pipeline control unit 220 (220-1 to 220-19) to 222 (222-1 to 222-15): first to third stage latch circuit groups 230 to 233: Adder (Add) 240 to 243: Adder (Add) 250: second latch circuit 300: data read stage 310: third pipeline control unit 320 (320-1 to 320-3) to 322 (322-1 to 322-3): first to third stage latch circuit groups 330 to 331: multiplexer 350: third latch circuit 400: calculation Stage 410: Fourth pipeline control unit 420 (420-1 to 421-10) to 422 (422-1 to 422-8): first to to third
  • FIG. 1 is a diagram showing a configuration example of the multiprocessor system 1.
  • the multiprocessor system 1 includes a multiprocessor 10, an instruction RAM 700, a data memory 800, and a clock control unit 900.
  • the components indicated by solid lines indicate the configuration inside the multiprocessor 10
  • the portions indicated by dotted lines indicate the configuration outside the multiprocessor 10.
  • the multiprocessor 10 includes a fetch stage 100, a decode stage 200, a data read stage 300, an arithmetic stage 400, a data write stage 500, first to fifth latch circuits 150,... 550, and a register 600. Prepare.
  • the multiprocessor 10 is composed of one processor.
  • the fetch stage 100 mainly reads an instruction from the instruction RAM 700 based on the calculated instruction address and calculates the next instruction address. Further, the fetch stage 100 includes a program counter for calculating a jump destination address when the instruction includes a “jump” instruction.
  • the decode stage 200 mainly calculates and outputs an address (MemAd) for reading data from the data memory 800 and a data register number (Rs0 #, Rs1 #) for reading data from the register 600.
  • the data read stage 300 reads data (Data, Rs1) from the data memory 800 and the register 600 mainly based on the address and data register number from the decode stage 200.
  • the operation stage 400 mainly calculates an instruction based on the data (Rb) from the data read stage 300 or the data (Ra) from the register 600.
  • the data write stage 500 mainly writes the result (S) calculated in the operation stage 400 to the data memory 800 or the register 600.
  • the fetch stage 100 to the data write stage 500 are cascade-connected, and instructions are sequentially executed by pipeline processing (processing to perform a plurality of instructions at the same time in parallel). Details of each stage 100,..., 500 will be described later.
  • Each of the first to fifth latch circuits 150,..., 550 is provided in front of each stage 100,..., 500, and is output from the instruction RAM 700 and each stage 100,. Latch instructions, addresses, etc.
  • the first to fifth latch circuits 150,..., 550 are for outputting instructions and the like to the respective stages 100,.
  • the register 600 is a memory that stores data corresponding to variables included in the instruction.
  • the instruction RAM 700 is a memory for storing instructions.
  • the data memory 800 is a memory that stores data to be processed.
  • the clock controller 900 supplies clocks CK0 to CK9 to the stages 100,..., 500 and the first to fifth latch circuits 150,.
  • the clocks CK0 to CK4 are supplied to the first to fifth latch circuits 150,..., 550, respectively, and the clocks CK5 to CK9 are supplied to the stages 100,.
  • the first to fifth latch circuits 150,..., 550 operate in synchronization with the clocks CK0 to CK4, and the stages 100,..., 500 operate in synchronization with the clocks CK5 to CK9, respectively.
  • clocks LK5 to LK9 are input to the clock control unit 900 from the stages 100,.
  • the clocks LK5 to LK9 indicate clocks used in the respective stages 100,..., 500, and the clock control unit 900 confirms what clock each stage 100,. Used to do.
  • FIG. 2 is a diagram illustrating a configuration example of the clock control unit 900.
  • the clock control unit 900 includes a PLL circuit 901 and first to fifth clock inverters 920 to 960.
  • the PLL circuit 901 generates a clock ( ⁇ 8_CLK) having a 1/8 cycle (8 times speed) with respect to the reference clock (Ref_CLK), outputs the generated clock to the first to fifth clock inverters 920 to 960, and via an amplifier.
  • a clock ⁇ 8_CLK
  • Ref_CLK reference clock
  • To each stage 100 ..., 500 (CK5 to CK9).
  • Each stage 100,..., 500 is supplied with an 8 ⁇ clock ( ⁇ 8_CLK) as clocks CK5 to CK9.
  • the first to fifth clock inverters 920 to 960 each receive an 8 ⁇ speed clock ( ⁇ 8_CLK) and a mode Md, and generate and output clocks CK0 to CK4 according to the internal state. Details of the clock inverters 920 to 960 will be described later.
  • each of the clock inverters 920 to 960 is configured by a flip-flop or the like, and operates as a state machine in which the internal state sequentially changes. This is to output a clean rectangular wave clock.
  • each stage 100,..., 500 of the multiprocessor 10 operates in a 4-processor mode, a 2-processor mode, or a 1-processor mode.
  • Each stage 100,..., 500 has a four-stage pipeline, and by operating a certain stage according to the mode Md, the multiprocessor 10 operates as a 4-processor mode, a 2-processor mode, or a 1-processor mode.
  • the mode Md indicates whether the multiprocessor 10 is operated in the 4-processor mode, the 2-processor mode, or the 1-processor mode.
  • the mode Md is input to the first latch circuit 150 and the first clock inverter 920 of the clock control unit 900.
  • the mode Md input to the first latch circuit 150 is output to the fetch stage 100 and sequentially output to the second latch circuit 250, the decode stage 200, and the like. Further, the mode Md input to the first clock inverter 920 is also sequentially output to the clock inverters 930 to 960.
  • FIG. 3 shows a fetch stage 100
  • FIG. 4 shows a decode stage 200
  • FIG. 5 shows a data read stage 300
  • FIG. 6 shows an operation stage 400
  • FIG. 3 shows a fetch stage 100
  • FIG. 4 shows a decode stage 200
  • FIG. 5 shows a data read stage 300
  • FIG. 6 shows an operation stage 400
  • FIG. 3 shows a fetch stage 100
  • FIG. 4 shows a decode stage 200
  • FIG. 5 shows a data read stage 300
  • FIG. 6 shows an operation stage 400
  • the fetch stage 100 includes a first pipeline control unit ( ⁇ pipeline control means_F) 110 and first-stage latch circuit groups 120-1 to 120-11 (hereinafter 120- 1 to 120-11 will be indicated as 120 unless otherwise specified), the second stage latch circuit group 121-1 to 121-10 (hereinafter also referred to as 121), and the third stage latch circuit group 122-1. 122-9 (also 122), four adders Add 130 to 133, and a register 140.
  • ⁇ pipeline control means_F first pipeline control unit
  • first-stage latch circuit groups 120-1 to 120-11 hereinafter 120- 1 to 120-11 will be indicated as 120 unless otherwise specified
  • the second stage latch circuit group 121-1 to 121-10 hereinafter also referred to as 121
  • the third stage latch circuit group 122-1 122-9 (also 122), four adders Add 130 to 133, and a register 140.
  • the fetch stage 100 realizes four-stage pipeline processing by the three-stage latch circuit groups 120 to 122.
  • the latch circuit groups 120 to 122 in each stage operate based on the clocks CKa to Ckc and the enable ENa to ENc from the first pipeline control unit 110.
  • the latch circuit group 121 at the second stage latches an instruction from the upstream
  • the latch circuit groups 120 and 122 at the other stages output the instruction from the upstream as it is.
  • the fetch stage 100 operates in one processor mode, and the first to third stage latch circuit groups 120 to 122 have instructions from the upstream, etc. Is output without being latched.
  • the first pipeline control unit 110 receives the mode Md from the first latch circuit 150 and the clock CK5 from the clock control unit 900, and determines which clock CKa to CKc and enable ENa to Whether ENc is set to “High” or “Low” is determined, and the determined clocks CKa to CKc and enables ENa to ENc are output.
  • the first pipeline control unit 110 operates as a state machine including a flip-flop inside. This is because the clocks CKa to CKc and the enable signals ENa to ENc are output as clean rectangular waves. Details will be described later.
  • the fetch stage 100 also includes a portion (right side in FIG. 3) that functions as a program counter that calculates a Jump address for a “jump” instruction.
  • each adder Add 130 to 133 adds, for example, 8 bits of a 32-bit address.
  • each of the latch circuit groups 120 to 122 sequentially latches 8 bits of 32 bits, and each adder 130 to 133 sequentially latches 8 bits. to add.
  • the latch circuit group 121 in the second stage sequentially latches 16 bits out of the 32-bit address, and each adder 130 to 133 has a 16-bit address latched or the like. Are added sequentially.
  • Register 140 stores the instruction address.
  • the fetch stage 100 reads an instruction from the instruction RAM 700 based on the instruction address stored in the register 140.
  • the register 140 has four internal registers that hold the outputs of the adder 133 and the latch circuit groups 122-6 to 122-8. From the internal register selected based on the output from the latch circuit 122-9, Output instruction address.
  • the fetch stage 100 converts the instruction read from the instruction RAM 700 into an instruction code Code and outputs it. Further, when a variable is included in the instruction, the fetch stage 100 generates and outputs a register number (Ridx #) (generally called an index register number) for storing the variable in the register 600.
  • a register number (Ridx #) (generally called an index register number) for storing the variable in the register 600.
  • the decode stage 200 includes a second pipeline control unit ( ⁇ pipeline control means_D) 210 and first-stage latch circuit groups 220-1 to 220-19 (hereinafter referred to as 220-). 1 to 220-19 unless otherwise specified), the second-stage latch circuit groups 221-1 to 221-17 (also 221), and the third-stage latch circuit group 222- 1 to 222-15 (also 222 hereinafter) and adders 230 to 233 and 240 to 243.
  • ⁇ pipeline control means_D first-stage latch circuit groups 220-1 to 220-19
  • 220- first-stage latch circuit groups 220-1 to 220-19
  • 221 first-stage latch circuit groups 221-1 to 221-17
  • the third-stage latch circuit group 222- 1 to 222-15 also 222 hereinafter
  • the decode stage 200 also realizes four-stage pipeline processing by the first to third stage latch circuit groups 220 to 222.
  • the first to third stage latch circuit groups 220 to 222 are based on the clocks CKa to CKc and the enable signals ENa to ENc output from the second pipeline control unit 210, and the second stage latch circuit group 221. Only operate (two-processor mode), all stages of latch circuit groups 220-222 operate (four-processor mode), or all stages of latch circuit groups 220-222 pass instruction codes, etc. (one processor) Mode).
  • the second pipeline control unit 210 receives the mode Md and the clock CK6 from the clock control unit 900, and sets which clock CKa to CKc and enable ENa to ENc to “High” or “Low” depending on the internal state. Decide whether to output a clock or the like. Similarly to the first pipeline control unit 110, the second pipeline control unit 210 also operates as a state machine. Details will be described later.
  • the numerical value Ridx_i stored in the index register number Ridx # is read from the register 600, the memory address MemAd and the immediate value Imm are calculated from the numerical value Ridx_i, and the read numerical value Ridx_i is also calculated (updated). Output.
  • the decode stage 200 obtains an immediate value Imm or a memory address MemAd by adding each 8 bits to a 32-bit numerical value (Ridx_i) or the like by adders 230 to 233, and each 8 bits is added to each adder 240.
  • the update value Ridx_o is obtained by adding up to ⁇ 243.
  • the decode stage 200 outputs the input instruction code Code and mode Md, and generates and outputs data register numbers Rs0 # and Rs1 #.
  • the data read stage 300 includes a third pipeline control unit ( ⁇ pipeline control means_R) 310 and first-stage latch circuit groups 320-1 to 320-3 (hereinafter 320). -1 to 320-3 unless otherwise specified) 320, second-stage latch circuit groups 321-1 to 321-3 (hereinafter also referred to as 321), and third-stage latch circuit group 322 -1 to 322-3 (also 322 hereinafter) and two multiplexers 330 and 331.
  • ⁇ pipeline control means_R first-stage latch circuit groups 320-1 to 320-3
  • 320 first-stage latch circuit groups 320-1 to 320-3
  • second-stage latch circuit groups 321-1 to 321-3 hereinafter also referred to as 321
  • third-stage latch circuit group 322 -1 to 322-3 also 322 hereinafter
  • the data read stage 300 also realizes four-stage pipeline processing by the first to third stage latch circuit groups 320 to 322.
  • the latch circuit groups 320 to 322 in each stage operate based on the clocks CKa to CKc and the enable ENa to ENc output from the third pipeline control unit 310, and the data read stage 300 operates in the 4-processor mode or 2-processor mode. Or, it operates as one processor mode.
  • the third pipeline control unit 310 receives the mode Md and the clock CK7 from the clock control unit 900, and sets which clock CKa to CKc and enable ENa to ENc to “High” or “Low” depending on the internal state. Decide whether to output a clock or the like.
  • the third pipeline control unit 310 also operates as a state machine. Details will be described later.
  • the data read stage 300 reads the data Data by outputting the memory address MemAd from the decode stage 200 to the data memory 800 as the read address Addr. In addition, the data read stage 300 outputs the data register numbers Rs0 # and Rs1 # input from the decode stage 200 to the register 600, and the data stored in the numbers (precisely, the data Rs1 corresponding to the register number Rs1 #). ) Is read from the register 600.
  • the multiplexers 330 and 331 multiplex the data (Data) from the data memory 800 and the data (Rs1) from the register 600 and output the multiplexed data.
  • the output value (Rb) is one value of the binomial operation.
  • the data read stage 300 is described above while the first to third latch circuit groups 320 to 322 latch the memory address MemAd and the like with the latch circuit groups 320 to 322 according to the clocks CKa to CKc and the enable ENa to ENc. Perform calculations and so on.
  • the data read stage 300 outputs an output enable (OE) to the data memory 800.
  • OE output enable
  • the arithmetic stage 400 includes a fourth pipeline control unit ( ⁇ pipeline control means_E) 410 and first-stage latch circuit groups 420-1 to 420-10 (420-1 to 420-1). 420-10 unless otherwise specified), the second-stage latch circuit groups 421-1 to 421-9 (also the following, 421), and the third-stage latch circuit group 422- 1 to 422-8 (also 422 below) and four arithmetic logic units (ALU (Arithmetic and Logic Unit))) 430-433.
  • ALU Arimetic and Logic Unit
  • the arithmetic stage 400 four stages of pipeline processing are realized by the three stages of latch circuit groups 420 to 422, and the clock (CKa to Ckc) and enable (ENa to ENc) from the fourth pipeline control unit 410 are realized. Based on the above, it operates as a 4-processor mode, 2-processor mode, or 1-processor mode.
  • the fourth pipeline control unit 410 receives the mode Md and the clock CK8 and determines whether to set the clocks CKa to CKc and the enable ENa to ENc to “High” or “Low” according to the internal state. Then output.
  • the fourth pipeline control unit 410 also operates as a state machine. Details thereof will be described later.
  • the operation stage 400 uses one data (Rb) of the binary operation from the data read stage 300 and the other data (Ra: data corresponding to the data register number Rs0 #) read from the register 600 as an arithmetic logic unit 430. ⁇ 433. For example, when each data is 32 bits, the operation stage 400 performs operations by 8 bits in arithmetic logic units 430 to 433, respectively.
  • the calculation stage 400 outputs the calculation result (S) to the data write stage 500.
  • the operation stage 400 outputs the operation result (S) while latching each 8 bits calculated by the latch circuit groups 420 to 422 in each stage according to the clocks CKa to CKc and the enable ENa to ENc.
  • the operation stage 400 also outputs a flag (Flags) indicating whether the operation result (S) is written in the data memory 800 or the register 600.
  • the data write stage 500 includes a fifth pipeline control unit ( ⁇ pipeline control means_W) 510 and first-stage latch circuit groups 520-1 to 520-3 (hereinafter, particularly, 520-1 to 520-3 are denoted as 520 unless otherwise noted), second-stage latch circuit groups 521-1 to 521-3 (hereinafter, similarly 521), and third-stage latch circuit group 522 -1 to 522-3 (hereinafter, similarly, 522).
  • ⁇ pipeline control means_W first-stage latch circuit groups 520-1 to 520-3
  • second-stage latch circuit groups 521-1 to 521-3 hereinafter, similarly 521
  • third-stage latch circuit group 522 -1 to 522-3 hereinafter, similarly, 522).
  • the data write stage 500 also realizes four-stage pipeline processing by the first to third stage latch circuit groups 520 to 522, and the clocks CKa to CKc and the enable ENa to the fifth pipeline control unit 510 are realized. Based on ENc, the latch circuit groups 520 to 522 in each stage operate to operate in the 4-processor mode, 2-processor mode, or 1-processor mode.
  • the fifth pipeline control unit 510 receives the mode Md and the clock CK9, and outputs clocks CKa to CKc and enables ENa to Enc according to the internal state.
  • the fifth pipeline control unit 510 also operates as a state machine. Details thereof will be described later.
  • the data write stage 500 When the operation result (S) is written to the data memory 800, the data write stage 500 outputs the operation result (S) as data (Data) to the data memory 800, and also outputs an address (Addr) and a write enable (WE). To do.
  • the data write stage 500 When the operation result (S) is written to the register 600, the data write stage 500 outputs the operation result (S) as data (Rd) to the register 600 and also has a register number (Rd #) and a write enable (RdWE). Output.
  • the data write stage 500 obtains a “jump mode” indicating the instruction and an address (jump address) that is the operation result (S). Output to the fetch stage 100.
  • the program counter (the component on the right side of FIG. 3) of the fetch stage 100 calculates this jump address.
  • the vertical direction indicates the operation of each stage 100,..., 500, and the horizontal direction indicates time.
  • the fetch stage (F) 100 executes an instruction with a half cycle as compared with the one-processor mode.
  • the fetch stage 100 processes the (# n + 1) -th instruction in the first stage of the second latch circuit group 121 in the first cycle, and the (# n + 1) -th instruction in the second cycle in the second latch circuit. Reading is performed while latching in the group 121, and the (#m) -th instruction is processed in the preceding stage of the second latch circuit group 121.
  • the decode stage (D) 200 shifts to the 2-processor mode at the third cycle, performs processing for the (# n + 1) th instruction, and performs the (# n + 1) th instruction (#m) at the fourth cycle. ) Process for the second instruction. Thereafter, the same processing is performed in the other stages 300 to 500. As shown in FIG. 8, each instruction is sequentially processed in a pipeline at each stage 100-500.
  • FIG. 9 is substantially the same as FIG. 8, but shows an example of a timing chart including clocks (CKa to CKc) and enables (ENa to ENc) output from the pipeline control units 110,.
  • FIG. 9 shows an example of a timing chart including clocks (CKa to CKc) and enables (ENa to ENc) output from the pipeline control units 110,.
  • Each stage 100,..., 500 operates as a two-processor mode by operating the second stage latch circuit group 121,..., 521 based on the clock CKb and the enable ENb.
  • the second latch circuit group 121 latches the instruction code and the address included in the (# n + 1) th instruction, and latches while the clock CKb is “High”. Outputs instruction code etc.
  • the second latch circuit group 121 does not particularly operate, and processing is performed by the adders 130 to 133 and the like.
  • the fetch stage 100 repeats the same processing after shifting to the two-processor mode.
  • the decode stage (D) 200 performs the same processing as the processing performed in the first cycle of the fetch stage (F) 100 in the third cycle, and this is sequentially repeated. From the decode stage (D) 200 to the data write stage (W) 500, each instruction is sequentially processed in the pipeline.
  • Clocks CKa to CKc and enables ENa to ENb in the respective stages 100,..., 500 are supplied from the first to fifth pipeline control units 110,. Is output.
  • the first to fifth pipeline control units 110,..., 510 determine which clocks CKa to CKc and enable ENa to ENc are set to “High” based on the mode Md and the current internal state. To make a transition to the next state.
  • FIG. 10 is a diagram illustrating an example of a timing chart including the state ST of each pipeline control unit 110,...
  • the first pipeline control unit ( ⁇ pipeline control means_F) 110 receives all clocks CKa to CKc and enables ENa to ENc when the current state ST is “0” and the mode Md is “2”. Set to “Low”. Then, the first pipeline control unit 110 sets the next state to “1”. When the state ST transitions to “1” in the next cycle (cycle of the 8 ⁇ speed clock CK5), the first pipeline control unit 110 changes the enable ENb from the current state ST “1” and the mode Md “2”. Only a clock with only “High” is output. Then, the first pipeline control unit 110 sets the next state to “1” again.
  • the first pipeline control unit 110 repeats the same processing and outputs clocks CKa to CKc and enables ENa to ENc.
  • the second to fifth pipeline control units 210,..., 510 perform similar processing. The configurations and operations of the first to fifth pipeline control units 110,..., 510 will be described later.
  • 11 to 13 are examples of timing charts when the processor mode is changed in the order of 1 ⁇ 4 ⁇ 1. As shown in FIG. 11, in the case of the 4-processor mode, each stage 100,... Each instruction is sequentially processed in the pipeline at a quarter cycle.
  • FIG. 12 is an example of a timing chart including clocks CKa to CKc and enables ENa to ENc.
  • the fetch stage (F) 100 operates the first-stage latch circuit group 120 by setting the clock CKa and the enable ENa to “High”, and sets the clock CKb and the enable ENb to “High”.
  • the second latch circuit group 121 is operated, and the third latch circuit group 122 is operated by setting the clock CKc and the enable ENc to “High”.
  • each instruction is sequentially processed in the pipeline, and each instruction is processed in the pipeline from the fetch stage 100 to the data write stage (W) 500.
  • FIG. 13 is an example of a timing chart including the state ST.
  • the first pipeline control unit ( ⁇ pipeline control unit_F) 110 sets the next state to “8” and the clocks ENa to ENc.
  • a signal for setting all the ENA to ENc to “Low” is output.
  • the first pipeline control unit 110 sets the next state to “9” and outputs a signal “High” only for the enable ENa. The same applies to the other pipeline control units 210,.
  • each stage 100,..., 500 performs processing for each instruction at a cycle (double speed) that is 1 ⁇ 2 of the cycle of the two-processor mode. Further, each stage 100,..., 500 is set to the 4-processor mode by sequentially setting the clocks CKa to CKc and the enable ENa to ENc to “High” and operating the latch circuit groups 120,. Transition.
  • FIG. 16 is an example of a timing chart including the state ST of each pipeline control unit 110,.
  • the state ST sequentially transitions to “2”, “L”, “M”,. This is different from the state ST transition (“0”, “8”, “9”, etc Immediately after the transition. This is because the state ST before the transition is different between the two. However, after that, the state ST repeats “D” and “C”, and the fetch stage 100 transits the same state ST as in the case of shifting from the 1 processor mode to the 4 processor mode.
  • FIG. 17 to 19 are diagrams showing examples of the configuration and operation of the first clock inverter 920.
  • the clock inverter 920 includes a next state determination unit 921, a state storage unit 922, and a control signal output unit 923.
  • the next state determination unit 921 is a combinational logic circuit, and the state storage unit 922 and the control signal output unit 923 are flip-flops.
  • the next state determination unit 921 receives the mode Md, the clock LK, and the state ST, and outputs the next state S, the logic signal D, and the mode SMdr.
  • the state storage unit 922 stores the next state S, and outputs the next state S stored after one cycle of the supplied clock CK (8 ⁇ speed clock ( ⁇ 8_CLK)) as the current state ST to the next state determination unit 921 To do.
  • the control signal output unit 923 receives the mode SMdr and the logic signal D, and outputs the clock Q and the mode Mdr after one cycle of the clock CK.
  • the clock Q is the clock CK0, and when the clock inverter 920 is the second to fifth clock inverters 930 to 960, the clock Q is the clocks CK1 to CK4, respectively.
  • the mode Mdr is input to the second clock inverter 930 at the next stage as the mode Md. Also for the other clock inverters 940 to 960, the mode Mdr is input from the clock inverters 930 to 950 in the previous stage.
  • the clock inverter 920 receives a clock CK (8 ⁇ speed clock ( ⁇ 8_CLK)), and the units 921 to 923 operate in synchronization with the clock CK.
  • the clock LK is a clock from the first pipeline control unit 110 as described above, and indicates which mode the first pipeline control unit 110 is currently operating on.
  • the next state determination unit 921 uses the clock LK for confirmation.
  • the other clock inverters 930 to 960 also receive the clock LK from the pipeline control units 210,.
  • FIG. 18 is a diagram showing an example of state transition of the clock inverter 920. As shown in the figure, the clock inverter 920 transits eight states ST from “0” to “7”. The squares shown in the figure indicate the contents of processing performed by the clock inverter 920 in each state.
  • the clock inverter 920 outputs the logic signal D and the mode SMdr from the next state determination unit 921 based on the input mode Md (or Mdr) and the current state ST (number in the circle).
  • the clock inverter 920 when the clock inverter 920 is reset, “0” is output as the output clock Q, and “1” is output as the mode SMdr to the clock inverter 930 in the next stage, and the state transitions to the next state “0”. To do.
  • the next state determination unit 921 When the clock inverter 920 transitions to the state “0”, the next state determination unit 921 outputs “1” as the logic signal D and “0” as the mode SMdr.
  • the next state determination unit 921 When the clock inverter 920 transitions to the state “1”, the next state determination unit 921 outputs the input mode Md as the mode SMdr, and outputs a logic signal D according to the mode Mdr, and the next state “2”. Transition to. The clock inverter 920 repeats this thereafter.
  • Such state transition is predetermined, and is stored in the memory of the next state determination unit 921, for example.
  • FIG. 19 is a diagram showing an example of a timing chart of the clock inverter 920.
  • the next state determination unit 921 outputs “2” as the mode SMdr and “0” as the logic signal D (state transition in FIG. 18). (See also figure).
  • the next-stage clock inverter 930 performs the above-described processing based on the mode Mdr from the first clock inverter 920 and the current state ST. The same applies to the other clock inverters 940-960.
  • the clock inverters 920 to 960 supply the clocks CK0 to CK4 to the first to fifth latch circuits 150,... 550 (see FIG. 1). Since the first to fifth latch circuits 150,..., 550 latch and output instructions from the upstream by clocks CK0 to CK4 corresponding to each processor mode, each stage 100,. Instructions and the like from the upstream can be processed at a cycle according to each processor mode (see FIGS. 10, 13, and 16).
  • FIG. 20 is a diagram illustrating a configuration example of the first pipeline control unit 110.
  • the pipeline control unit 110 includes a next state determination unit 111, a state storage unit 112, and a control signal output unit 113.
  • the next state determination unit 111 is a combinational logic circuit, and the state storage unit 112 and the control signal output unit 113 are flip-flops.
  • the pipeline control unit 110 operates as a state machine.
  • the next state determination unit 111 receives the input mode Md and the current state ST stored in the state storage unit 112, and outputs the next state S and the signal D.
  • the state storage unit 112 stores the next state S, and outputs the stored state ST to the next state determination unit 111 after one clock CK (8 ⁇ clock ( ⁇ 8_CLK)) cycle.
  • the control signal output unit 113 receives the signal D from the next state determination unit 11 and outputs clocks CKa to CKc and enables ENa to ENc according to the signal D after one cycle of the clock CK.
  • FIG. 21 is a diagram illustrating an example of state transition in the first pipeline control unit 110. The number in the figure shows the state.
  • the pipeline control unit 110 transitions 29 states from “0” to “6” and “8” to “P” in total.
  • the pipeline control unit 110 transitions to the next state “1” after one clock CK period, The state “1” is repeated continuously.
  • the pipeline control unit 110 then repeats the state “3” twice in succession, and then transitions to the state “2” when the mode Md is “2”, and the state “3” when the mode Md is other than “2”. Transition to “4”.
  • the state of the pipeline control unit 110 transitions from “0” ⁇ “1” ⁇ “1” ⁇ “1” ⁇ “2” ⁇ “2” ⁇ “3”.
  • Such state transition is predetermined and stored in the memory of the pipeline control unit 110, for example.
  • next state determination unit 11 outputs a signal D corresponding to the determined next state S to the control signal output unit 113.
  • the control signal output unit 113 generates and outputs clocks CKa to CKc and enables ENa to ENc based on the state signal D.
  • FIG. 22 is a diagram illustrating a correspondence relationship between the state ST, the clocks CKa to CKc, and the enables ENa to ENc.
  • FIG. 23 is a diagram illustrating an example of a timing chart in the first pipeline control unit 110.
  • the next state determination unit 111 sets the next state S to “1” and outputs it to the state storage unit 112 (see also FIG. 21). )
  • the signal D indicating the next state S is set to “1” and output to the control signal output unit 113.
  • the control signal output unit 113 latches “1” and outputs the clocks CKa to CKc and enables ENa to ENc in which only the enable ENb is set to “1” with reference to the table shown in FIG.
  • the first pipeline control unit 110 sequentially repeats this, and outputs clocks CKa to CKc and enables ENa to ENc.
  • the other pipeline control units 210,..., 510 perform similar processing.
  • the next state determination unit 111 includes the table shown in FIG. 22 and outputs a 6-bit signal D according to the next state S (or state ST). Good.
  • Each bit of the signal D corresponds to each of the clocks CKa to CKc and the enables ENa to ENc, and the control signal output unit 113 outputs the clocks CKa to CKc and the enables ENa to ENc according to the signal D.
  • each pipeline control unit 110,..., 510 outputs clocks CKa to CKc and enables ENa to ENc, and each stage 100,.
  • the latch circuit groups 120,... At any stage are operated. Accordingly, the multiprocessor 10 operates in the 4-processor mode, the 2-processor mode, or the 1-processor mode, and operates so that instructions are processed by four processors, two processors, or the like.
  • FIG. 24 is a diagram showing a configuration example of the latch circuit 120-1 in the first-stage latch circuit group 120 (hereinafter simply described as “latch circuit 120” unless otherwise specified) for ease of explanation.
  • the other latch circuits 120-2 to 120-11 in the first stage latch circuit group 120 have the same configuration as the latch circuit 120, and the latch circuit groups 121,.
  • the latch circuit 120 includes an AND gate 125, a D-type flip-flop 126, and a multiplexer 127.
  • the AND gate 125 outputs a logical sum “1” to the clock terminal CK of the D-type flip-flop 126.
  • the D flip-flop 126 updates the internal state at the rising edge of the logical sum “1” input to the clock terminal CK, latches the instruction code input to the terminal D, and the instruction latched for “1” A code or the like is output from terminal Q.
  • the multiplexer 127 selects and outputs an instruction code or the like output from the output terminal Q of the D-type flip-flop 126 when the enable EN is “1”, and the input instruction code or the like when the enable EN is “0”. Output directly.
  • the latch circuit 120 uses the enable EN as a selection signal for selecting which input in the multiplexer 127, even when the enable EN is “0”, the input instruction code is bypassed and output. Can be made.
  • the latch circuit 120 can operate as described above, for example, as shown in FIG. 10, when the clock CKb and the enable ENb are “High”, the second stage latches of the stages 100,.
  • the circuit groups 121,..., 521 latch the instruction code from the upstream and operate as a two-processor mode.
  • each stage 100,..., 500 realizes four-stage pipeline processing by the first to third stage latch circuit groups 120,.
  • the stage latch circuit group 120 By operating the stage latch circuit group 120,..., It can be operated by four processors, two processors, or one processor. Therefore, since the multiprocessor 10 can be configured by one processor, for example, space can be saved as compared with a case where the multiprocessor is configured by four processors.
  • the multiprocessor 10 since the multiprocessor 10 only needs to operate one processor, power saving can be realized as compared with a multiprocessor composed of four processors.
  • each stage 100,..., 500 has only the second latch circuit group 121,..., 521, thereby realizing two-stage pipeline processing and operating as two processors or one processor. You can also. Also, each stage 100,..., 500 can be realized as eight stages of pipeline processing by the first to seventh latch circuit groups and operated as eight processors, four processors, two processors, and one processor. Further, 32-stage pipeline processing can be realized by the first to 31st latch circuit groups, and can be operated as 32 processors, 16 processors, 8 processors, or the like.
  • the number of stages that can be realized is based on the number of bits such as instructions that can be processed by the multiprocessor. That is, in the example described above, the number of bits that can be processed by the multiprocessor 10 has been described as 32 bits, and can be processed 8 bits at a time by realizing four-stage pipeline processing. Therefore, it is possible to process 4 bits by an 8-stage pipeline, process 2 bits by a 16-stage pipeline, or process 1 bit by a 32-stage pipeline.
  • each stage 100, ..., 500 first to (2 k -1) stage (k Can realize 2 k pipeline processing by a latch circuit group of 1 ⁇ k ⁇ n).
  • each stage 100 sequentially shifts to each processor mode, each stage 100,.
  • each stage 100 for example, after all the stages 100,..., 500 have shifted to the two-processor mode, only one stage 100,..., 500 (for example, the decode stage 200) does not shift to another processor mode.
  • the above-described example has been described with the example of the multiprocessor 10 having each stage 100,..., 500 in one processor.
  • the present invention can also be implemented by the multiprocessor 10 provided with a plurality of such processors.
  • the data memory 800, the instruction RAM 700, and the clock control unit 900 have been described as being arranged outside the multiprocessor 10.
  • any or all of the data memory, the instruction RAM 700, and the clock control unit 900 may be provided in the multiprocessor 10.
  • the multiprocessor 10 has been described as having five stages. For example, three stages (for example, the decode stage 200 and the data read stage 300, and the calculation stage 400 and the data write stage 500 are one.
  • the multiprocessor 10 may be configured by four stages (for example, the calculation stage 400 and the data write stage 500 are one stage).
  • the multiprocessor 10 may be configured as two to four stages by any combination of the stages 100 to 500.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Advance Control (AREA)

Abstract

 一つのプロセッサによりなるマルチプロセッサにおいて、マルチプロセッサごとに独立して処理されるべき命令列を、一サイクル内で位相をずらして順次フェッチするパイプライン処理部を備える。

Description

マルチプロセッサ
 本発明は、マルチプロセッサに関する。
 従来から、複数のプロセッサを1チップに集積したマルチプロセッサがある。図25は従来のマルチプロセッサの構成例を示す図である(例えば、以下の非特許文献1)。このマルチプロセッサは、1チップ上に4つのプロセッサup#1~up#4を備える。
 1チップに複数のプロセッサup#1~up#4を集積するためにマルチプロセッサは、プロセッサup#1~up#4の個数分の論理回路をチップ上に搭載する必要がある。このため、メモリを共有化する等により、各プロセッサup#1~up#4間での情報の共有化や回路規模増大を防止している。例えば、共有メモリで構成されるマルチプロセッサは、UMA(Uniform
Memory Architecture)やNUMA(Non-Uniform Memory Architecture)などのモデルが知られている。
 尚、従来のマルチプロセッサとして、1/4周期づつ順次位相をずらしたクロックにより複数のプロセッサを動作させることでメモリを時分割に使用するようにしたメモリ制御方式が開示される(例えば、以下の特許文献1)。 
「対称型マルチプロセッシング技術」、宇野俊夫、エーアイ出版、2001年8月13日 特開昭56-099559号公報
 しかし、メモリが共有化されても、マルチプロセッサはメモリへのアクセス制約などにより必ずしも理想性能を得ることはできない(図26参照)。一方で、プロセッサ数を増加させることは回路規模の増大を招く。とくに、携帯電話などの情報機器では省スペース化が要求される。
 また、マルチプロセッサは、設計段階において求められる最大性能を満たすように搭載プロセッサ数を決定している。図27は時間とマルチプロセッサ全体の処理能力との関係を示す図である。点線はあるシステムの負荷曲線である。同図に示すように、ある時間帯において4つのプロセッサを必要とする負荷が発生する場合、必要なプロセッサ数は4個となる。しかし、従来のマルチプロセッサは、負荷が小さい時間帯であっても、全プロセッサに電力を供給しているため、全体の電力を増大させている問題がある。とくに、携帯電話などの情報機器は省電力化が要求される。
 そこで、本発明は上記問題点に鑑みてなされたもので、その目的は省スペース化を実現したマルチプロセッサを提供することにある。
 また、本発明の他の目的は省電力化を実現したマルチプロセッサを提供することにある。
 上記目的を達成するために、本発明の一実施態様によれば、一つのプロセッサによりなるマルチプロセッサにおいて、マルチプロセッサごとに独立して処理されるべき命令列を、一サイクル内で位相をずらして順次フェッチするパイプライン処理部を備える。
 本発明によれば、省スペース化を実現したマルチプロセッサを提供できる。また、本発明によれば、省電力化を実現したマルチプロセッサを提供できる。
図1はマルチプロセッサシステムの構成例を示す図である。 図2はクロック制御部の構成例を示す図である。 図3はフェッチステージの構成例を示す図である。 図4はデコードステージの構成例を示す図である。 図5はデータリードステージの構成例を示す図である。 図6は演算ステージの構成例を示す図である。 図7はデータライトステージの構成例を示す図である。 図8はマルチプロセッサのタイミングチャートを示す図である。 図9はマルチプロセッサのタイミングチャートの例を示す図である。 図10はマルチプロセッサのタイミングチャートの例を示す図である。 図11はマルチプロセッサのタイミングチャートを示す図である。 図12はマルチプロセッサのタイミングチャートの例を示す図である。 図13はマルチプロセッサのタイミングチャートの例を示す図である。 図14はマルチプロセッサのタイミングチャートを示す図である。 図15はマルチプロセッサのタイミングチャートの例を示す図である。 図16はマルチプロセッサのタイミングチャートの例を示す図である。 図17はクロックインバータの構成例を示す図である。 図18はクロックインバータの状態遷移と処理の例を示す図である。 図19はクロックインバータのタイミングチャートの例を示す図である。 図20はパイプライン制御部の構成例を示す図である。 図21はパイプライン制御部の状態遷移の例を示す図である。 図22は制御信号出力部からの出力されるクロック及びイネーブルの定義例を示す図である。 図23はパイプライン制御部のタイミングチャートの例を示す図である。 図24はラッチ回路の構成例を示す図である。 図25は従来のマルチプロセッサの構成例を示す図である。 図26はプロセッサ数と全体性能との関係例を示す図である。 図27は負荷曲線の例を示す図である。
符号の説明
1:マルチプロセッサシステム     10:マルチプロセッサ
100:フェッチステージ       110:第1のパイプライン制御部
111:次状態決定部         112:状態記憶部
113:制御信号出力部
120(120‐1~120‐11)~122(122‐1~122‐9):第1段目~第3段目のラッチ回路群          
126:D型フリップフロップ          127:マルチプレクサ  
130~133:加算器(Add)      140:レジスタ
150:第1のラッチ回路       200:デコードステージ
210:第2のパイプライン制御部   
220(220‐1~220‐19)~222(222‐1~222‐15):第1段目~第3段目のラッチ回路群         
230~233:加算器(Add)      240~243:加算器(Add)
250:第2のラッチ回路       300:データリードステージ
310:第3のパイプライン制御部 
320(320‐1~320‐3)~322(322‐1~322‐3):第1段目~第3段目のラッチ回路群
330~331:マルチプレクサ        350:第3のラッチ回路
400:演算ステージ         410:第4のパイプライン制御部
420(420‐1~421‐10)~422(422‐1~422‐8):第1段目~第3段目のラッチ回路群          
430~433:算術論理部(ALU)  500:データライトステージ
510:第5のパイプライン制御部   
520(520‐1~520‐3)~522(522‐1~522‐3):第1段目~第3段目のラッチ回路群           
600:レジスタ           700:命令RAM
800:データメモリ         900:クロック制御部
920~960:第1~第5のクロックインバータ
921:次状態決定部         922:状態記憶部
923:制御信号出力部        ST:状態
Md:モード             CKa~CKc:クロック
ENa~ENc:イネーブル
 本発明を実施するための最良の形態について以下説明する。 
 図1はマルチプロセッサシステム1の構成例を示す図である。マルチプロセッサシステム1は、マルチプロセッサ10と、命令RAM700と、データメモリ800、及びクロック制御部900とを備える。図1において実線で示す構成部分はマルチプロセッサ10内の構成を示し、点線で示す部分はマルチプロセッサ10の外側の構成を示す。
 マルチプロセッサ10は、フェッチステージ100と、デコードステージ200と、データリードステージ300と、演算ステージ400と、データライトステージ500と、第1~第5のラッチ回路150,…,550、及びレジスタ600を備える。本マルチプロセッサ10は1プロセッサで構成される。
 フェッチステージ100は、主に、計算した命令アドレスに基づいて命令RAM700から命令を読み出すとともに、次の命令アドレスを演算する。また、フェッチステージ100は、命令に「jump」命令が含まれる場合、jump先のアドレスを計算するためのプログラムカウンタを含む。
 デコードステージ200は、主に、データをデータメモリ800から読み出すためのアドレス(MemAd)や、レジスタ600からデータを読み出すためのデータレジスタ番号(Rs0#,Rs1#)を計算等し出力する。
 データリードステージ300は、主に、デコードステージ200からのアドレスやデータレジスタ番号に基づいて、データメモリ800やレジスタ600からデータ(Data,Rs1)を読み出す。
 演算ステージ400は、主に、データリードステージ300からのデータ(Rb)やレジスタ600からのデータ(Ra)に基づいて、命令を演算する。
 データライトステージ500は、主に、演算ステージ400で演算した結果(S)をデータメモリ800やレジスタ600に書き込む。
 フェッチステージ100からデータライトステージ500は、カスケード接続され、命令を順次パイプライン処理(複数の命令に対してタイミングをずらして同時並行的に行う処理)により実行する。各ステージ100,・・・,500の詳細は後述する。
 第1~第5のラッチ回路150,・・・,550の各々は、各ステージ100,・・・,500の前段に設けられ、命令RAM700や各ステージ100,・・・,400から出力される命令やアドレス等をラッチする。第1~第5のラッチ回路150,・・・,550は、各ステージ100,・・・,500に対して同期して命令等を出力するためにある。
 レジスタ600は、命令に含まれる変数に対応するデータを記憶するメモリである。また、命令RAM700は命令を記憶するメモリである。データメモリ800は処理対象のデータを記憶するメモリである。
 クロック制御部900は、各ステージ100,・・・,500や第1~第5のラッチ回路150,・・・,550に対して、クロックCK0~CK9を供給する。クロックCK0~CK4は第1~第5のラッチ回路150,・・・,550に夫々供給され、クロックCK5~CK9は各ステージ100,・・・,500に夫々供給される。第1~第5のラッチ回路150,・・・,550はクロックCK0~CK4に夫々同期して動作し、各ステージ100,・・・,500はクロックCK5~CK9に夫々同期して動作する。
 尚、クロック制御部900には各ステージ100,・・・,500からクロックLK5~LK9が入力される。このクロックLK5~LK9は各ステージ100,・・・,500内で使用されるクロックを示し、クロック制御部900は各ステージ100,・・・,500がどのようなクロックで動作しているかを確認するために用いる。
 次に、本マルチプロセッサシステム1の各構成の詳細を説明する。まず、クロック制御部900の構成(図2)について説明し、次に各ステージ100,・・・,500の構成(図3~図7)について説明する。
 図2はクロック制御部900の構成例を示す図である。クロック制御部900は、PLL回路901と、第1~第5のクロックインバータ920~960を備える。
 PLL回路901は、参照クロック(Ref_CLK)に対して1/8周期(8倍速)のクロック(×8_CLK)を生成し、第1~第5のクロックインバータ920~960に出力するとともに、アンプを介して各ステージ100,・・・,500に出力する(CK5~CK9)。各ステージ100,・・・,500にはクロックCK5~CK9として8倍速のクロック(×8_CLK)が供給される。
 第1~第5のクロックインバータ920~960は、夫々、8倍速のクロック(×8_CLK)とモードMdとが入力され、内部状態に応じてクロックCK0~CK4を生成して出力する。クロックインバータ920~960の詳細は後述する。
 尚、各クロックインバータ920~960は、フリップフロップ等により構成されて、内部状態が順次遷移するステートマシンとして動作する。きれいな矩形波のクロックを出力させるためである。
 ここでモードMdについて説明する。本実施例において、マルチプロセッサ10の各ステージ100,・・・,500は、4プロセッサモード、又は2プロセッサモード、若しくは1プロセッサモードとして動作する。各ステージ100,・・・,500は4段のパイプラインを有し、モードMdに応じてある段を動作させることで、マルチプロセッサ10は4プロセッサモードや2プロセッサーモード、或いは1プロセッサモードとして動作する。モードMdは、マルチプロセッサ10を4プロセッサモードで動作させるか、2プロセッサモードで動作させるか、あるいは1プロセッサモードで動作させるかを示す。
 尚、このモードMdは、第1のラッチ回路150とクロック制御部900の第1のクロックインバータ920に入力される。第1のラッチ回路150に入力されたモードMdは、フェッチステージ100に出力され、順次、第2のラッチ回路250、デコードステージ200等に出力される。また、第1のクロックインバータ920に入力されたモードMdも、順次各クロックインバータ930~960に出力される。
 次に、フェッチステージ100からデータライトステージ500までの各構成について説明する。図3はフェッチステージ100、図4はデコードステージ200、図5はデータリードステージ300、図6は演算ステージ400、図7はデータライトステージ500の各構成例を示す図である。
 フェッチステージ100は、図3に示すように、第1のパイプライン制御部(μパイプライン制御手段_F)110と、第1段目のラッチ回路群120‐1~120‐11(以下、120‐1~120‐11をとくに断らない限り120と記す)、第2段目のラッチ回路群121‐1~121‐10(同様に以下、121)と、第3段目のラッチ回路群122‐1~122‐9(同様に以下、122)と、4つの加算器Add130~133、及びレジスタ140とを備える。
 フェッチステージ100は、3段のラッチ回路群120~122により4段のパイプライン処理を実現している。そして、各段のラッチ回路群120~122は、第1のパイプライン制御部110からのクロックCKa~Ckc及びイネーブルENa~ENcに基づいて動作する。
 例えば、クロックCKa~CKcとイネーブルENa~ENcとが全て「High」のとき、第1~第3段目のラッチ回路群120~122の全てが動作する。このとき、フェッチステージ100は4プロセッサモードとして動作し、各段のラッチ回路群120~122は上流からの命令やアドレス等をラッチして出力する。
 また、クロックCKbとイネーブルENbが「High」でそれ以外が「Low」のとき、第2段目のラッチ回路群121のみが動作し、フェッチステージ100は2プロセッサモードとして動作する。この場合、第2段目のラッチ回路群121は上流からの命令等をラッチし、他の段のラッチ回路群120,122は上流からの命令等をそのまま下流に出力する。
 さらに、クロックCKa~CKcとイネーブルENa~ENcが全て「Low」のとき、フェッチステージ100は1プロセッサモードとして動作し、第1~第3段目のラッチ回路群120~122は上流からの命令等をラッチせずそのまま出力する。
 第1のパイプライン制御部110は、第1のラッチ回路150からのモードMdと、クロック制御部900からのクロックCK5とが入力され、内部状態に応じて、どのクロックCKa~CKc及びイネーブルENa~ENcを「High」や「Low」にするかを決定し、決定したクロックCKa~CKc及びイネーブルENa~ENcを出力する。第1のパイプライン制御部110は、内部にフリップフロップ等を備えたステートマシンとして動作する。クロックCKa~CKc及びイネーブルENa~ENcがきれいな矩形波として出力するようにするためである。詳細は後述する。
 フェッチステージ100は、「jump」命令に対してJumpアドレスを演算するプログラムカウンタとして機能する部分(図3の右側)も含まれる。
 プログラムカウンタとして機能する部分では、各加算器Add130~133は、例えば32ビットアドレスのうち8ビットを各々加算する。フェッチステージ100が4プロセッサモードとして動作する場合、各段のラッチ回路群120~122は32ビットのうち各8ビットを順次ラッチしつつ、各加算器130~133はラッチ等した各8ビットを順次加算する。また、フェッチステージ100が2プロセッサモードとして動作する場合、第2段目のラッチ回路群121は32ビットアドレスのうち16ビットを順次ラッチしつつ、各加算器130~133はラッチ等した16ビットアドレスを順次加算する。
 レジスタ140は命令アドレスを記憶する。フェッチステージ100は、レジスタ140に記憶された命令アドレスに基づいて命令RAM700から命令を読み出す。尚、レジスタ140は、加算器133やラッチ回路群122‐6~122‐8の出力を保持する4つの内部レジスタを有し、ラッチ回路122‐9からの出力に基づいて選択された内部レジスタから命令アドレスを出力する。
 また、フェッチステージ100は、命令RAM700から読み出した命令を命令コードCodeに変換して出力する。さらに、フェッチステージ100は命令中に変数が含まれる場合、この変数をレジスタ600に記憶するためのレジスタ番号(Ridx#)(一般にインデックスレジスタ番号と呼ばれる)を生成し、出力する。
 次にデコードステージ200について説明する。デコードステージ200は、図4に示すように、第2のパイプライン制御部(μパイプライン制御手段_D)210と、第1段目のラッチ回路群220‐1~220‐19(以下、220‐1~220‐19をとくに断らない限り220と記す)と、第2段目のラッチ回路群221‐1~221‐17(同様に以下、221)と、第3段目のラッチ回路群222‐1~222‐15(同様に以下、222)と、各加算器230~233,240~243とを備える。
 デコードステージ200も、第1~第3段目のラッチ回路群220~222により4段のパイプライン処理を実現する。第1~第3段目のラッチ回路群220~222は、第2のパイプライン制御部210から出力されるクロックCKa~CKc及びイネーブルENa~ENcに基づいて、第2段目のラッチ回路群221のみが動作したり(2プロセッサモード)、全ての段のラッチ回路群220~222が動作(4プロセッサモード)したり、全ての段のラッチ回路群220~222が命令コード等をスルー(1プロセッサモード)する。
 第2のパイプライン制御部210は、モードMdとクロック制御部900からのクロックCK6とが入力され、内部状態に応じて、どのクロックCKa~CKc及びイネーブルENa~ENcを「High」または「Low」にするかを決定してクロック等を出力する。第2のパイプライン制御部210も第1のパイプライン制御部110と同様にステートマシンとして動作する。詳細は後述する。
 デコードステージ200では、インデックスレジスタ番号Ridx#に記憶された数値Ridx_iをレジスタ600から読み出し、この数値Ridx_i等からメモリアドレスMemAdや即値Immを演算し、読み出した数値Ridx_iも演算(更新)し、これらを出力する。
 例えば、デコードステージ200は、32ビットの数値(Ridx_i)等に対して各8ビットを各々加算器230~233で加算することで即値ImmまたはメモリアドレスMemAdを得、各8ビットを各々加算器240~243で加算することで更新値Ridx_oを得る。
 また、デコードステージ200は、入力された命令コードCodeやモードMdを出力するとともに、データレジスタ番号Rs0#,Rs1#を生成して出力する。
 次にデータリードステージ300について説明する。データリードステージ300は、図5に示すように、第3のパイプライン制御部(μパイプライン制御手段_R)310と、第1段目のラッチ回路群320‐1~320‐3(以下、320‐1~320‐3をとくに断らない限り320を記す)と、第2段目のラッチ回路群321‐1~321‐3(同様に以下、321)と、第3段目のラッチ回路群322‐1~322‐3(同様に以下322)と、2つのマルチプレクサ330、331を備える。
 データリードステージ300も第1~第3段目のラッチ回路群320~322により4段のパイプライン処理を実現している。各段のラッチ回路群320~322は、第3のパイプライン制御部310から出力されるクロックCKa~CKc及びイネーブルENa~ENcに基づいて動作し、データリードステージ300は4プロセッサモードや2プロセッサモード、あるいは1プロセッサモードとして動作する。
 第3のパイプライン制御部310は、モードMdとクロック制御部900からのクロックCK7とが入力され、内部状態に応じて、どのクロックCKa~CKc及びイネーブルENa~ENcを「High」または「Low」にするかを決定してクロック等を出力する。第3のパイプライン制御部310もステートマシンとして動作する。詳細は後述する。
 データリードステージ300は、デコードステージ200からのメモリアドレスMemAdを、読み出しアドレスAddrとしてデータメモリ800に出力してデータDataを読み出す。また、データリードステージ300は、デコードステージ200から入力されたデータレジスタ番号Rs0#,Rs1#をレジスタ600に出力し、当該番号に記憶されたデータ(正確にはレジスタ番号Rs1#に対応するデータRs1)をレジスタ600から読み出す。
 そして、マルチプレクサ330,331はデータメモリ800からのデータ(Data)とレジスタ600からのデータ(Rs1)等を多重化して出力する。出力される値(Rb)は二項演算の一方の値となる。データリードステージ300は、第1~第3のラッチ回路群320~322は、メモリアドレスMemAd等をクロックCKa~CKc及びイネーブルENa~ENcに応じてラッチ回路群320~322でラッチ等しながら上述した演算等を行う。
 さらに、データリードステージ300は、データメモリ800に対するアウトプットイネーブル(OE)を出力する。OEが有効な区間のみデータメモリ800からデータ(Data)を出力させることで、データメモリ800が非同期型SRAMの場合に安定してデータを読み出すことができる。
 次に、演算ステージ400について説明する。演算ステージ400は、図6に示すように、第4のパイプライン制御部(μパイプライン制御手段_E)410と、第1段目のラッチ回路群420‐1~420‐10(420‐1~420‐10をとくに断らない限り、以下420と記す)と、第2段目のラッチ回路群421‐1~421‐9(同様に以下、421)と、第3段目のラッチ回路群422‐1~422‐8(同様に以下、422)と、4つの算術論理部(ALU(Arithmetic
and Logic Unit))430~433とを備える。
 演算ステージ400においても、3段のラッチ回路群420~422により4段のパイプライン処理を実現し、第4のパイプライン制御部410からのクロック(CKa~Ckc)とイネーブル(ENa~ENc)とに基づいて、4プロセッサモード、2プロセッサモード、あるいは1プロセッサモードとして動作する。
 第4のパイプライン制御部410は、モードMdとクロックCK8とが入力され内部状態に応じて、クロックCKa~CKcや及びイネーブルENa~ENcを「High」にするか「Low」にするかを決定し出力する。第4のパイプライン制御部410もステートマシンとして動作する。その詳細は後述する。
 演算ステージ400は、データリードステージ300からの2項演算の一方のデータ(Rb)と、レジスタ600から読み出した他方のデータ(Ra:データレジスタ番号Rs0#に対応したデータ)とを算術論理部430~433で演算する。例えば、各データが32ビットのとき、演算ステージ400は8ビットずつ夫々算術論理部430~433で演算する。演算ステージ400は演算した結果(S)はデータライトステージ500に出力する。演算ステージ400は、クロックCKa~CKc及びイネーブルENa~ENcに応じて各段のラッチ回路群420~422で、演算等された各8ビットをラッチ等しながら、演算結果(S)を出力する。
 また、演算ステージ400は演算結果(S)をデータメモリ800に書き込むか、レジスタ600に書き込むかを示すフラグ(Flags)も出力する。
 次にデータライトステージ500について説明する。データライトステージ500は、図7に示すように、第5のパイプライン制御部(μパイプライン制御手段_W)510と、第1段目のラッチ回路群520‐1~520‐3(以下、とくに断らない限り520‐1~520‐3を520と記す)と、第2段目のラッチ回路群521‐1~521‐3(以下同様に、521)と、第3段目のラッチ回路群522‐1~522‐3(以下同様に、522)とを備える。
 データライトステージ500も、第1~第3段目のラッチ回路群520~522により、4段のパイプライン処理を実現し、第5のパイプライン制御部510からのクロックCKa~CKc及びイネーブルENa~ENcに基づいて各段のラッチ回路群520~522が動作して、4プロセッサモード、2プロセッサモード、あるいは1プロセッサモードとして動作する。
 第5のパイプライン制御部510は、モードMdとクロックCK9とが入力され、内部状態に応じて、クロックCKa~CKc及びイネーブルENa~Encを出力する。第5のパイプライン制御部510もステートマシンとして動作する。その詳細は後述する。
 データライトステージ500は、演算結果(S)をデータメモリ800に書き込む場合、演算結果(S)をデータ(Data)としてデータメモリ800に出力するとともに、アドレス(Addr)とライトイネーブル(WE)も出力する。また、データライトステージ500は、演算結果(S)をレジスタ600に書き込む場合、演算結果(S)をデータ(Rd)としてレジスタ600に出力するとともにレジスタ番号(Rd#)とライトイネーブル(RdWE)も出力する。
 また、データライトステージ500は、命令コード(Code)に「jump」命令が含まれる場合、当該命令であることを示す「jumpモード」と、演算結果(S)であるアドレス(jumpアドレス)とをフェッチステージ100に出力する。フェッチステージ100のプログラムカウンタ(図3の右側の構成部分)はこのjumpアドレスを演算する。
 次に、本マルチプロセッサシステム1の動作について説明する。理解を容易にするため、最初に全体動作について説明し(図8~図16)、次に各部の動作等について説明する(図17~図24)。
 全体動作について説明する。図8~図10は1プロセッサモード(Md=1)から2プロセッサモード(Md=2)、そして1プロセッサモードに変更した場合のタイミングチャートの例を示し、図11~図13は1→4(Md=4)→1の順、図14~図16は2→4→2の順でプロセッサモードを夫々変更した場合のタイミングチャートの例を示す図である。プロセッサ数の変更例は他にもあるが、各パイプライン制御部110,・・・,510の動作は略同様のため説明を省略する。
 まず、1→2→1の順でプロセッサモードを変更した場合の動作を説明する。尚、図8~図16において縦方向が各ステージ100,・・・,500の動作、横方向が時間を示す。
 図8に示すように、2プロセッサモードに移行すると、フェッチステージ(F)100は1プロセッサモードと比較して半分の周期で命令を実行する。
 すなわち、フェッチステージ100は、最初の周期で(#n+1)番目の命令を第2のラッチ回路群121の前段において処理し、2番目の周期で(#n+1)番目の命令を第2のラッチ回路群121でラッチしつつ読み出し、さらに(#m)番目の命令を第2のラッチ回路群121の前段において処理する。
 そして、デコードステージ(D)200は、3番目の周期で2プロセッサモードに移行し、(#n+1)番目の命令に対する処理を行い、4番目の周期で(#n+1)番目の命令と(#m)番目の命令とに対する処理を行う。その後、他のステージ300~500においても、同様に処理を行う。図8に示すように、各命令は各ステージ100~500で順次パイプラインで処理される。
 図9は、図8と略同様であるが、各パイプライン制御部110,・・・,510から出力されるクロック(CKa~CKc)とイネーブル(ENa~ENc)を含むタイミングチャートの例を示す図である。
 各ステージ100,・・・,500は、クロックCKbとイネーブルENbとに基づいて第2段目のラッチ回路群121,・・・,521を動作させて、2プロセッサモードとして動作する。
 例えば、フェッチステージ(F)100は、2プロセッサモード(Md=2)に移行後最初の周期でイネーブルENbが「High」となり、2番目の周期でクロックCKbも「High」となる。クロックCKbが「High」となる立ち上がりエッジで第2のラッチ回路群121は(#n+1)番目の命令に含まれる命令コードやアドレスをラッチし、クロックCKbが「High」となっている間ラッチした命令コード等を出力する。クロックCKbが「Low」になると、第2のラッチ回路群121はとくに動作せず、加算器130~133等で処理が行われる。フェッチステージ100は、2プロセッサモードに移行後、同様の処理を繰り返す。
 また、デコードステージ(D)200も、3番目の周期でフェッチステージ(F)100の最初の周期で行った処理と同様の処理を行い、順次これを繰り返す。デコードステージ(D)200からデータライトステージ(W)500まで、順次各命令をパイプラインで処理する。
 各ステージ100,・・・,500におけるクロックCKa~CKc及びイネーブルENa~ENbは、各ステージ100,・・・,500内の第1~第5のパイプライン制御部110,・・・,510から出力される。そして、第1~第5のパイプライン制御部110,・・・,510は、モードMdと現在の内部状態に基づいてどのクロックCKa~CKc及びイネーブルENa~ENcを「High」にするか「Low」にするかを決定し、次の状態に遷移する。
 図10は、各パイプライン制御部110,・・・,510の状態STを含むタイミングチャートの例を示す図である。
 例えば、第1のパイプライン制御部(μパイプライン制御手段_F)110は、現在の状態STが「0」、モードMdが「2」のとき、全てのクロックCKa~CKc及びイネーブルENa~ENcを「Low」にする。そして、第1のパイプライン制御部110は、次状態を「1」にする。第1のパイプライン制御部110は、次の周期(8倍速クロックCK5の周期)で状態STが「1」に遷移すると、現在の状態ST「1」とモードMd「2」とから、イネーブルENbのみを「High」にしたクロック等を出力する。そして、第1のパイプライン制御部110は次状態を再度「1」にする。以後、第1のパイプライン制御部110は同様の処理を繰り返して、クロックCKa~CKc及びイネーブルENa~ENcを出力する。第2~第5のパイプライン制御部210,・・・,510も同様の処理を行う。第1~第5のパイプライン制御部110,・・・,510の構成と動作については後述する。
 図11~図13は、1→4→1の順でプロセッサモードを変更した場合のタイミングチャートの例である。図11に示すように、各ステージ100,・・・,500は、4プロセッサモードの場合、1プロセッサモードの1/4の周期(4倍速)で各命令に対する処理を行う。そして、1つ1つの命令に対し1/4の周期で順次パイプラインで処理する。
 図12はクロックCKa~CKc及びイネーブルENa~ENcとを含むタイミングチャートの例である。例えばフェッチステージ(F)100は、クロックCKa及びイネーブルENaとを「High」にすることで第1段目のラッチ回路群120を動作させ、クロックCKb及びイネーブルENbとを「High」にすることで第2のラッチ回路群121を動作させ、クロックCKc及びイネーブルENcとを「High」にすることで第3のラッチ回路群122を動作させる。フェッチステージ100でも各命令が順次パイプラインで処理され、フェッチステージ100からデータライトステージ(W)500にかけて各命令がパイプラインで処理される。
 図13は状態STを含むタイミングチャートの例である。第1のパイプライン制御部(μパイプライン制御手段_F)110は、例えば、現在の状態STが「0」でモードMdが「4」のとき、次状態を「8」とし、クロックENa~ENc及びイネーブルENa~ENcをすべて「Low」とする信号を出力する。また、第1のパイプライン制御部110は、現在の状態STが「8」でモードMdが「4」のとき、次状態を「9」にし、イネーブルENaのみ「High」の信号を出力する。他のパイプライン制御部210,・・・,510も同様である。
 図14~図16は、2→4→2の順でプロセッサモードを変更した場合のタイミングチャートの例である。各ステージ100,・・・,500は、図14及び図15に示すように、2プロセッサモードの周期と比較して1/2の周期(2倍速)で各命令に対する処理を行う。また、各ステージ100,・・・,500は、クロックCKa~CKc及びイネーブルENa~ENcを順次「High」にして各段のラッチ回路群120,・・・を動作させることで、4プロセッサモードに移行する。
 図16は各パイプライン制御部110,・・・,510の状態STを含むタイミングチャートの例である。例えば、フェッチステージ100において2プロセッサモードから4プロセッサモードに移行後は、状態STは「2」,「L」,「M」,・・・と順次遷移し、1プロセッサモードから4プロセッサモードへの移行直後の状態ST遷移(「0」,「8」,「9」,・・・)と異なる。遷移前の状態STが両者で異なるからである。しかし、その後状態STは「D」,「C」を繰り返し、フェッチステージ100は1プロセッサモードから4プロセッサモードに移行した場合と同様の状態STを遷移する。
 次に、クロック制御部900における第1~第5のクロックインバータ920~960の構成と動作(図17~図19)について説明し、次いで第1~第5のパイプライン制御部110,・・・,510の構成と動作(図20~図23)、最後に各ステージ100,・・・,500の第1~第3段目のラッチ回路群120,・・・の構成と動作(図24)について説明する。
 図17~図19は、第1のクロックインバータ920の構成と動作の例を示す図である。各クロックインバータ920~960は同一構成のため、第1のクロックインバータ920の構成について説明する。
 クロックインバータ920は、次状態決定部921と、状態記憶部922、及び制御信号出力部923を備える。次状態決定部921は組み合わせ論理回路であり、状態記憶部922と制御信号出力部923はフリップフロップである。
 次状態決定部921は、モードMdとクロックLK、及び状態STが入力され、次状態Sと論理信号D、及びモードSMdrを出力する。状態記憶部922は、次状態Sを記憶し、供給されるクロックCK(8倍速のクロック(×8_CLK))の1周期後に記憶した次状態Sを現在の状態STとして次状態決定部921に出力する。制御信号出力部923はモードSMdrと論理信号Dとが入力され、クロックCKの1周期後、クロックQとモードMdrを出力する。
 尚、クロックQはクロックCK0であり、クロックインバータ920が第2~第5のクロックインバータ930~960のときは、クロックQは夫々クロックCK1~CK4である。
 また、モードMdrは次段の第2のクロックインバータ930にモードMdとして入力される。他のクロックインバータ940~960についても、前段のクロックインバータ930~950からモードMdrが入力される。
 更に、クロックインバータ920は、クロックCK(8倍速のクロック(×8_CLK))が入力され、このクロックCKに同期して各部921~923が動作する。
 尚、クロックLKは上述したように第1のパイプライン制御部110からのクロックであり、第1のパイプライン制御部110が現在どのモードによるクロックにより動作しているかを示す。次状態決定部921はクロックLKを確認のために用いる。他のクロックインバータ930~960でも各々パイプライン制御部210,・・・,510からクロックLKが入力される。
 図18はクロックインバータ920の状態遷移の例を示す図である。同図に示すように、クロックインバータ920は「0」から「7」までの8つの状態STを遷移する。同図に示す四角内は各状態においてクロックインバータ920が行う処理の内容を示す。
 クロックインバータ920は、入力されるモードMd(またはMdr)と現在の状態ST(円内の数字)に基づき、次状態決定部921から論理信号DとモードSMdrとを出力する。
 例えば、クロックインバータ920はリセット(Reset)されると、出力クロックQとして「0」を出力するとともに、次段のクロックインバータ930にモードSMdrとして「1」を出力し、次状態「0」に遷移する。クロックインバータ920が状態「0」に遷移すると、次状態決定部921は論理信号Dとして「1」を出力するとともにモードSMdrとして「0」を出力する。そして、クロックインバータ920が状態「1」に遷移すると、次状態決定部921は入力されたモードMdをモードSMdrとして出力するとともに、モードMdrに応じて論理信号Dを出力し、次状態「2」に遷移する。クロックインバータ920は以降これを繰り返す。このような状態遷移は予め決められたもので、例えば、次状態決定部921のメモリに記憶される。
 図19はクロックインバータ920のタイミングチャートの例を示す図である。例えば、次状態決定部921は、現在の状態STが「7」でモードMdが「2」のとき、モードSMdrとして「2」、論理信号Dとして「0」を出力する(図18の状態遷移図も参照)。そして、制御信号出力部923は、論理信号D=「1」を1クロック周期後にクロックQ(=クロックCK0)として出力する。これを順次繰り返して、クロックインバータ920はクロックQ(=クロックCK0)を出力する。
 尚、次段のクロックインバータ930は第1のクロックインバータ920からのモードMdrと、現在の状態STに基づいて上述の処理を行う。他のクロックインバータ940~960についても同様である。
 このように各クロックインバータ920~960は、第1~第5のラッチ回路150,・・・,550にクロックCK0~CK4を供給する(図1参照)。第1~第5のラッチ回路150,・・・,550は各プロセッサモードに応じたクロックCK0~CK4により、上流からの命令等をラッチし出力するため、各ステージ100,・・・,500は各プロセッサモードに応じた周期で上流からの命令等を処理できる(図10,図13,図16参照)。
 次にパイプライン制御部110,・・・,510の構成と動作について図20~図23を用いて説明する。他のパイプライン制御部210,・・・,510の構成は同一のため、第1のパイプライン制御部110を例にして説明する。
 図20は第1のパイプライン制御部110の構成例を示す図である。パイプライン制御部110は、次状態決定部111と、状態記憶部112、及び制御信号出力部113を備える。次状態決定部111は組み合わせ論理回路であり、状態記憶部112と制御信号出力部113はフリップフロップである。パイプライン制御部110はステートマシンとして動作する。
 次状態決定部111は、入力されるモードMdと、状態記憶部112に記憶された現在の状態STとが入力され、次状態Sと信号Dとを出力する。状態記憶部112は、次状態Sを記憶し、1クロックCK(8倍速のクロック(×8_CLK))周期後、記憶した状態STを次状態決定部111に出力する。また、制御信号出力部113は、次状態決定部11から信号Dが入力され、クロックCKの1周期後、信号Dに応じてクロックCKa~CKc及びイネーブルENa~ENcを出力する。
 図21は第1のパイプライン制御部110における状態遷移の例を示す図である。同図の丸数字内は状態を示す。パイプライン制御部110は全部で「0」から「6」、及び「8」から「P」までの29状態を遷移する。
 例えば、同図に示すようにパイプライン制御部110は状態が「0」でモードMdが「2」(2プロセッサモード)のとき、1クロックCK周期後に次状態「1」に遷移し、3クロック周期連続して状態「1」を繰り返す。そして、パイプライン制御部110は、状態「3」を連続して2回繰り返した後、モードMdが「2」のとき状態「2」に遷移し、モードMdが「2」以外のとき状態「4」に遷移する。パイプライン制御部110の状態は、「0」→「1」→「1」→「1」→「2」→「2」→「3」・・・と遷移する。このような状態遷移は予め決められたもので、例えばパイプライン制御部110のメモリ内に記憶される。
 また、次状態決定部11は、決定した次状態Sに対応する信号Dを制御信号出力部113に出力する。そして、制御信号出力部113は、状態信号Dに基づいてクロックCKa~CKc及びイネーブルENa~ENcを生成して出力する。
 図22は、状態STとクロックCKa~CKc及びイネーブルENa~ENcとの対応関係を示す図である。制御信号出力部113は内部に図22に示すテーブルを備え、状態信号DをラッチしクロックCKの1周期後に現在の状態STに遷移した後、状態STに対応するクロックCKa~CKc及びイネーブルENa~ENcを出力する。例えば、状態STが「0」のとき、クロックCKa~CKc及びイネーブルENa~ENcがすべて「0(=Low)」となる信号を出力し、状態STが「1」のときイネーブルENbのみ「1(=High)」でそれ以外が「0」の信号を出力する。
 図23は、第1のパイプライン制御部110におけるタイミングチャートの例を示す図である。次状態決定部111は、状態記憶部112からの状態STが「0」でモードMdが「2」のとき、次状態Sを「1」にして状態記憶部112に出力し(図21も参照)、次状態Sを示す信号Dを「1」にして制御信号出力部113に出力する。制御信号出力部113は「1」をラッチし、図22に示すテーブルを参照して、イネーブルENbのみ「1」にしたクロックCKa~CKc及びイネーブルENa~ENcを出力する。第1のパイプライン制御部110は順次これを繰り返し、クロックCKa~CKc及びイネーブルENa~ENcを出力する。他のパイプライン制御部210,・・・,510も同様の処理を行う。
 上述した例は一例であって、例えば、次状態決定部111が図22に示すテーブルを内部に備え、次状態S(または状態ST)に応じて6ビットの信号Dを出力するようにしてもよい。信号Dの各ビットがクロックCKa~CKc及びイネーブルENa~ENcの各々に対応し、制御信号出力部113は信号Dに応じてクロックCKa~CKc及びイネーブルENa~ENcを出力する。
 以上のようにして、各パイプライン制御部110,・・・,510はクロックCKa~CKc及びイネーブルENa~ENcを出力し、各ステージ100,・・・,500は第1~第3段目の任意の段におけるラッチ回路群120,・・・を動作させる。これにより、マルチプロセッサ10は4プロセッサモードや2プロセッサモード、或いは1プロセッサモードとして動作し、4つのプロセッサや2つのプロセッサなどで命令に対する処理が行われるように動作する。
 最後に、各ステージ100,・・・,500内の第1~第3段目のラッチ回路群120,・・・の構成と動作について説明する。
 図24は第1段目のラッチ回路群120におけるラッチ回路120‐1(以下では説明の容易のため、とくに断らない限り単に「ラッチ回路120」と記す)の構成例を示す図である。第1段目のラッチ回路群120における他のラッチ回路120‐2~120‐11もラッチ回路120と同一構成であり、各ステージ100,・・・,500のラッチ回路群121,・・・を構成する各ラッチ回路121‐1,・・・も同一構成である。
 ラッチ回路120は、ANDゲート125と、D型フリップフロップ126、及びマルチプレクサ127を備える。
 クロックCK(第1段目のラッチ回路群120,・・・,520の場合はクロックCKa)とイネーブルEN(第1段目のラッチ回路群120,・・・,520の場合はイネーブルENa)とがともに「1」のとき、ANDゲート125は論理和「1」をD型フリップフロップ126のクロック端子CKに出力する。D型フリップフロップ126は、クロック端子CKに入力される論理和「1」の立ち上がりエッジで内部状態を更新し、端子Dに入力される命令コード等をラッチし、「1」の間ラッチした命令コード等を端子Qから出力する。マルチプレクサ127は、イネーブルENが「1」のときD型フリップフロップ126の出力端子Qから出力される命令コード等を選択して出力し、イネーブルENが「0」のとき入力された命令コード等を直接出力する。
 このように、ラッチ回路120は、イネーブルENをマルチプレクサ127においてどの入力を選択するかの選択信号として用いているため、イネーブルENが「0」のときでも入力された命令コード等をバイパスして出力させることができる。
 ラッチ回路120が以上のように動作することができるため、例えば図10に示すようにクロックCKbとイネーブルENbが「High」のとき、各ステージ100,・・・,500の第2段目のラッチ回路群121,・・・,521は上流からの命令コード等をラッチして、2プロセッサモードとして動作する。
 以上説明したように、本マルチプロセッサ10は、第1~第3段目のラッチ回路群120,・・・により各ステージ100,・・・,500が4段のパイプライン処理を実現し、各段のラッチ回路群120,・・・を動作させることで、4プロセッサや2プロセッサ、あるいは1プロセッサにより動作させることができる。よって、本マルチプロセッサ10は1つのプロセッサにより構成できるため、例えば4つのプロセッサによりマルチプロセッサを構成する場合と比較して、省スペース化を図ることができる。また、本マルチプロセッサ10は、1つのプロセッサを動作させればよいため、4つのプロセッサからなるマルチプロセッサの場合と比較して省電力化を実現できる。
 上述した例は、1つのプロセッサを4プロセッサや2プロセッサ、あるいは1プロセッサとして動作させるようにした例を説明した。他にも、各ステージ100,・・・,500は第2のラッチ回路群121,・・・,521のみ有することで、2段のパイプライン処理を実現し、2プロセッサまたは1プロセッサとして動作させることもできる。また、各ステージ100,・・・,500を第1~第7のラッチ回路群により8段のパイプライン処理を実現し、8プロセッサ、4プロセッサ、2プロセッサ、1プロセッサとして動作させることもできる。さらに、第1~第31のラッチ回路群により32段のパイプライン処理を実現し、32プロセッサ、16プロセッサ、8プロセッサ等として動作させることもできる。
 どのような段数まで実現可能かは、マルチプロセッサが処理できる命令等のビット数に基づく。つまり、上述した例では、マルチプロセッサ10が処理できるビット数は32ビットで説明しており、4段のパイプライン処理を実現することにより8ビットずつ処理できる。よって、8段のパイプラインにより4ビットずつ処理することも、16段のパイプラインにより2ビットずつ処理することも、さらに32段のパイプラインにより1ビットずつ処理することも可能である。
 まとめると、本マルチプロセッサ10において処理可能なビット数が2(nは1以上の自然数)のとき、各ステージ100,・・・,500を第1~第(2-1)段(kは1≦k≦n)のラッチ回路群により第2段のパイプライン処理を実現でき、1(=2)プロセッサ、2(=2)プロセッサ、・・・、2プロセッサの各プロセッサ数を有するように動作させることができる。上述した例では、n=4(32ビット)で、k=2(4段のパイプライン)の場合である。
 ただし、図8等に示すように、各ステージ100,・・・,500が順次各プロセッサモードに移行した後は、各ステージ100,・・・,500は全て同じプロセッサモードで動作する。例えば、全てのステージ100,・・・,500が2プロセッサモードに移行した後、あるステージ100,・・・,500(例えば、デコードステージ200)のみが他のプロセッサモードに移行することはない。 
 また、上述した例は、1つのプロセッサ内に各ステージ100,・・・,500を有するマルチプロセッサ10の例で説明した。かかるプロセッサが複数個設けられたマルチプロセッサ10でも実施可能である。
 さらに、上述した例では、データメモリ800や命令RAM700、クロック制御部900はマルチプロセッサ10の外側に配置されているものとして説明した。例えば、データメモリや命令RAM700、クロック制御部900のいずれかまたはすべてがマルチプロセッサ10内に設けられもよい。
 さらに、上述した例は、マルチプロセッサ10を5ステージからなるものとして説明したが、例えば、3ステージ(例えば、デコードステージ200とデータリードステージ300、及び演算ステージ400とデータライトステージ500とが一つのステージ)や4ステージ(例えば、演算ステージ400とデータライトステージ500とが一つのステージ)からなるマルチプロセッサ10が構成されてもよい。各ステージ100~500の任意の組み合わせで2~4ステージとしてマルチプロセッサ10が構成されればよい。

Claims (6)

  1.  一つのプロセッサによりなるマルチプロセッサにおいて、
     マルチプロセッサごとに独立して処理されるべき命令列を、一サイクル内で位相をずらして順次フェッチするパイプライン処理部
     を備えることを特徴とするマルチプロセッサ。
  2.  さらに、モード信号が入力され、前記モード信号に基づいて前記パイプライン処理部を一または複数段のパイプラインとして動作させるよう前記パイプライン処理部を制御するパイプライン制御部を備えることを特徴とする請求項1記載のマルチプロセッサ。
  3.  さらに、前記命令列を処理する複数のステージと、
     前記各ステージから出力される前記モード信号をラッチする複数のラッチ回路と、
     クロック制御部とを備え、
     前記クロック制御部は、前記モード信号が入力され、前記モード信号に基づいて、前記各ステージから出力される前記モード信号を前記パイプライン処理部の動作に応じて前記各ラッチ回路でラッチし前記各ステージに順次出力するよう、前記各ラッチ回路を制御することを特徴とする請求項2記載のマルチプロセッサ。
  4.  前記各ステージは前記パイプライン処理部と前記パイプライン制御部とを備え、
     前記各ステージの前記パイプライン制御部は前記各ラッチ回路からの前記モード信号に基づいて前記パイプライン処理部を制御することで、前記各ステージは前記パイプラインとして順次動作することを特徴とする請求項3記載マルチプロセッサ。
  5.  前記パイプライン処理部は複数段のラッチ回路群を備え、
     前記パイプライン制御部は前記モード信号に基づいて前記複数段のうち所定段の前記ラッチ回路群を動作させることで、前記パイプライン処理部を一または複数段のパイプラインとして動作させることを特徴とする請求項2記載のマルチプロセッサ。
  6.  前記複数のステージの各ステージは、
     演算した命令アドレスに基づいて命令メモリから前記命令列を読み出し、読み出した前記命令列の命令コードを出力するフェッチステージと、
     前記命令コードが入力され、データメモリに記憶された第1のデータを読み出すためのメモリアドレスを出力するとともに、レジスタに記憶された第2のデータを読み出すためのレジスタ番号を出力するデコードステージと、
     前記メモリアドレスと前記レジスタ番号とが入力され、前記メモリアドレスに記憶された第1のデータを前記データメモリから読み出して出力するとともに、前記レジスタ番号に記憶された第2のデータを前記レジスタから読み出して出力するデータリードステージと、
     前記第1のデータと前記第2のデータとが入力され、前記命令コードに基づいて前記第1と前記第2のデータを演算して演算結果を出力する演算ステージと、
     前記演算結果が入力され、前記演算結果を前記データメモリまたは前記レジスタに書き込むデータライトステージであることを特徴とする請求項3記載のマルチプロセッサ。
PCT/JP2008/000715 2008-03-25 2008-03-25 マルチプロセッサ WO2009118776A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2010505022A JP5170234B2 (ja) 2008-03-25 2008-03-25 マルチプロセッサ
PCT/JP2008/000715 WO2009118776A1 (ja) 2008-03-25 2008-03-25 マルチプロセッサ
EP08720594A EP2270653A4 (en) 2008-03-25 2008-03-25 MULTI
US12/889,690 US20110066827A1 (en) 2008-03-25 2010-09-24 Multiprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/000715 WO2009118776A1 (ja) 2008-03-25 2008-03-25 マルチプロセッサ

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/889,690 Continuation US20110066827A1 (en) 2008-03-25 2010-09-24 Multiprocessor

Publications (1)

Publication Number Publication Date
WO2009118776A1 true WO2009118776A1 (ja) 2009-10-01

Family

ID=41113021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/000715 WO2009118776A1 (ja) 2008-03-25 2008-03-25 マルチプロセッサ

Country Status (4)

Country Link
US (1) US20110066827A1 (ja)
EP (1) EP2270653A4 (ja)
JP (1) JP5170234B2 (ja)
WO (1) WO2009118776A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5630798B1 (ja) * 2014-04-11 2014-11-26 株式会社Murakumo プロセッサーおよび方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5699559A (en) 1980-01-10 1981-08-10 Oki Electric Ind Co Ltd Memory control system
JPH09114663A (ja) * 1995-10-17 1997-05-02 Hitachi Ltd パイプライン演算器
JP2636695B2 (ja) * 1993-08-03 1997-07-30 日本電気株式会社 パイプライン処理回路
JP3183844B2 (ja) * 1996-03-29 2001-07-09 松下電器産業株式会社 可変パイプライン段数のデータ処理装置
JP2003316566A (ja) * 2002-04-24 2003-11-07 Matsushita Electric Ind Co Ltd パイプラインプロセッサ
JP2004062281A (ja) * 2002-07-25 2004-02-26 Nec Micro Systems Ltd パイプライン演算処理装置及びパイプライン演算制御方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69733444D1 (de) * 1996-03-29 2005-07-14 Matsushita Electric Ind Co Ltd Datenprozessor mit variabler Anzahl von Pipelinestufen
WO2001033351A1 (fr) * 1999-10-29 2001-05-10 Fujitsu Limited Architecture de processeur
US20030046517A1 (en) * 2001-09-04 2003-03-06 Lauterbach Gary R. Apparatus to facilitate multithreading in a computer processor pipeline
US20030135716A1 (en) * 2002-01-14 2003-07-17 Gil Vinitzky Method of creating a high performance virtual multiprocessor by adding a new dimension to a processor's pipeline
KR20070004705A (ko) * 2004-03-10 2007-01-09 코닌클리즈케 필립스 일렉트로닉스 엔.브이. 전자 회로와 그 동작 방법

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5699559A (en) 1980-01-10 1981-08-10 Oki Electric Ind Co Ltd Memory control system
JP2636695B2 (ja) * 1993-08-03 1997-07-30 日本電気株式会社 パイプライン処理回路
JPH09114663A (ja) * 1995-10-17 1997-05-02 Hitachi Ltd パイプライン演算器
JP3183844B2 (ja) * 1996-03-29 2001-07-09 松下電器産業株式会社 可変パイプライン段数のデータ処理装置
JP2003316566A (ja) * 2002-04-24 2003-11-07 Matsushita Electric Ind Co Ltd パイプラインプロセッサ
JP2004062281A (ja) * 2002-07-25 2004-02-26 Nec Micro Systems Ltd パイプライン演算処理装置及びパイプライン演算制御方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Asymmetric multiprocessing technique", 13 August 2001, TOSHIO UNO, AI PUBLISHING INC.
See also references of EP2270653A4

Also Published As

Publication number Publication date
JPWO2009118776A1 (ja) 2011-07-21
JP5170234B2 (ja) 2013-03-27
EP2270653A1 (en) 2011-01-05
US20110066827A1 (en) 2011-03-17
EP2270653A4 (en) 2011-05-25

Similar Documents

Publication Publication Date Title
JP5126226B2 (ja) 演算ユニット、プロセッサ及びプロセッサアーキテクチャ
US20080270750A1 (en) Instruction-parallel processor with zero-performance-overhead operand copy
KR20040016829A (ko) 파이프라인식 프로세서에서의 예외 취급 방법, 장치 및시스템
JP2011090592A (ja) 情報処理装置とその命令デコーダ
JP4747026B2 (ja) マイクロプロセッサ
JP5821332B2 (ja) リコンフィグ可能な集積回路装置
US20240004663A1 (en) Processing device with vector transformation execution
JP5170234B2 (ja) マルチプロセッサ
JP2010117806A (ja) 半導体装置、および、半導体装置によるデータ処理方法
JPH09198231A (ja) 演算処理装置
KR100636596B1 (ko) 고에너지 효율 병렬 처리 데이터 패스 구조
GB2380283A (en) A processing arrangement comprising a special purpose and a general purpose processing unit and means for supplying an instruction to cooperate to these units
US6266764B1 (en) Program controller for switching between first program and second program
JP5277533B2 (ja) デジタル信号処理装置
JP2014164659A (ja) プロセッサ
JP3867804B2 (ja) 集積回路装置
JP2012128790A (ja) 演算処理装置
WO2011086808A1 (ja) 情報処理装置
JP2004252556A (ja) 情報処理装置
JP4851964B2 (ja) デュアルポートメモリを用いた同期化回路
JP2008108049A (ja) プロセッサ回路およびその制御方法、ならびにプロセッサ回路の設計方法
KR20090101939A (ko) 컴퓨터의 교번하는 명령 및/또는 데이터 비트의 반전
JP2007094669A (ja) パイプライン演算処理装置
JPH08320787A (ja) パイプライン計算機
JP2003122561A (ja) 情報処理装置

Legal Events

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

Ref document number: 08720594

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010505022

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2008720594

Country of ref document: EP