1 / 17

La Tecnica PIPELINE

La Tecnica PIPELINE. Il DLX - Pipeline. OVERVIEW. Significato Presupposti Operativi Sincronismo Presupposti per una Pipeline efficiente Bilanciamento delle fasi Under e Super Pipeline Vantaggi Svantaggi Pipeline nel processore Deluxe. Unità Operative. Speed – Up: N.

jesse
Télécharger la présentation

La Tecnica PIPELINE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. La Tecnica PIPELINE Il DLX - Pipeline

  2. OVERVIEW • Significato • Presupposti Operativi • Sincronismo • Presupposti per una Pipeline efficiente • Bilanciamento delle fasi • Under e Super Pipeline • Vantaggi • Svantaggi • Pipeline nel processore Deluxe

  3. Unità Operative Speed – Up: N meno complesse meno costose facilmente riproducibili dopo una latenza NxT completo ogni processo in un tempo T Unità di Controllo Architettura centralizzato non troppo complesso complessità proporzionale a N Significato Pipelinecome unaCatena di Montaggio N: num Unità Operative T: tempo massimo per operazione Invece di utilizzare piu unità operative specializzate su tutte le fasi dell’intero processo impiega più unità operative indipendenti, non interscambiaili e specializzate su diverse fasi dell’intero processo

  4. Significato Pipelinecome unaCatena di Montaggio Il processore è costruito da più Unità Differenti e Indipendenti che lavorano: • in Parallelo su fasi differenti di istruzioni differenti • in Serie su diverse fasi dell’esecuzione della medesima istruzione Ogni unità preleva dall’unità precedente l’istruzione trasformata e la trasforma ulteriormente passandola all’unità successiva Programma Risultato dell’esecuzione 4Istr. 3 3Istr. Fasi Non Bilanciate e Atomiche 2Istr. 1 4 2 1 Istr. 5 1 1 2 3 4 5 2 3 4 5 Processore Pipeline con 5 unità operative parallele Le diverse Fasi dell’Esecuzione le possiamo identificare in corrispondenza delle differenti unità o macro unità hardware (Memoria, ALU, Registri ...) interessate dall’esecuzione dell’istruzione

  5. 3 Fasi Non Bilanciate e Atomiche 1 4 2 5 3 3 3 NO 1 1 1 4 4 4 3 3 3 3 3 3 3 2 2 2 5 5 5 1 1 1 1 1 1 1 4 4 4 4 4 4 4 2 2 2 2 2 2 2 5 5 5 5 5 5 5 T T T Gestione della Pipeline Presupposti Operativi: Sincronismo Contesto Sincrono La Fase 3 più Lenta fissa la latenza T anche per le altre Fasi 1 2 3 4 5

  6. Bilanciamento delle Fasi 3 Fasi Non Bilanciate e Atomiche 4 1 2 5 1’ 3’ Fase unione di più fasi atomiche 2’ Fasi Bilanciate e Non Atomiche Hardware più semplice (costruisco 3 fasi indipendenti) Basso Speed-Up (sovrappongo fino a 3 istruzioni) UNDER – Pipeline (DSP)

  7. Bilanciamento delle Fasi 3 Fasi Non Bilanciate e Atomiche 4 1 2 5 2 1a 1b 4a 3a 3b 3c 4b 5 SottoFasi come scomposizione di Fasi Fasi Bilanciate e Atomiche Hardware più complesso (costruisco 9 fasi indipendenti) Alto Speed-Up (sovrappongo fino a 9 istruzioni) SUPER – Pipeline

  8. Bilanciamento delle Fasi 3 Fasi Non Bilanciate e Atomiche 4 1 2 5 3 3 4 1 2 5 Ridondanza Hardware Duplico le risorse ma ne Dimezzo la latenza Aumenta lo Speed-Up Complico poco l’architettura

  9. Vantaggi La tecnica pipeline (con K fasi) al crescere del numero di istruzioni (N>>K) impiega un tempo complessivo di esecuzione N x T (dove T è il tempo di fase) Ridurre il tempo di fase T (aumentando la lunghezza della pipeline k oppure utilizzando la ridondanza hardware) fa aumentare lo Speed-Up del processore T minimo è intimamente legato alla tecnologia utilizzata

  10. Svantaggi Aumentare la lunghezza della pipeline k fa sì aumentare lo Speed-Up del processore ma: Aumenta il numero di Conflitti (rallentandone l’esecuzione)e aumenta la Gestione del processore (che volutamente non risolve ogni tipo di conflitto)

  11. Il processore Deluxe - DLX Architettura Pipeline a 5 fasi

  12. Il processore Deluxe - DLX Fasi dell’Esecuzione dell’Istruzione • Instruction Fetch cycle: • IR       <- MEM [PC] NPC  <- PC + 4 • Operation: • Send out the PC and fetch the instruction from memory into the instruction register (IR) • Increment the PC by 4 to address the next sequential instruction • The IR is used to hold the instruction that will be needed on subsequent clock cycles • The NPC is used to hold the next sequential PC (program counter) [IF]

  13. Il processore Deluxe - DLX Fasi dell’Esecuzione dell’Istruzione Instruction Decode/register fetch cycle: A <- Regs [IR6..10] B <- Regs [IR11..15] Imm <- ( (IR16)16 ## IR16..31 ) Operation: - Decode the instruction and access the register file to read the registers. - the output of the general-purpose registers are read into two temporary registers (A and B) for use in later clock cycles. - the lower 16 bits of the IR are also sign-extended and stored into the temporary register IMM, for use in the next cycle. - decoding is done in parallel with reading registers, which is possible because these fields are at a fixed location in the DLX Instruction Format. This technique is known as fixed-field decoding. [ID]

  14. Il processore Deluxe - DLX Fasi dell’Esecuzione dell’Istruzione Execution/effective address cycle: Memory reference: ALUOutput <- A + Imm Register - Register (ALU): ALUOutput <- A op B Register - Immediate (ALU): ALUOutput <- A op Imm Branch: ALUOutput <- NPC + Imm Cond <- ( A op 0 ) [EX] The ALU performs the operation specified by the opcode on the value in register A and on the value in register Imm. The result is placed in  the register ALUOutput. The ALU adds the NPC to the sign-extended immediate value in Imm to compute the address of the branch target. Register A, which has been read in the prior cycle, is checked to determine whether the branch is taken. The comparison operation op is the relational operator determined by the branch opcode (e.g. op is "==" for the instruction BEQZ) The ALU performs the operation specified by the opcode on the value in register A and on the value in register B. The result is placed in the register ALUOutput. The ALU adds the operands to form the effective address and places the result into the register ALUOutput

  15. Il processore Deluxe - DLX Fasi dell’Esecuzione dell’Istruzione Memory access/branch completion cycle: [MEM] Memory reference: LMD <- Mem [ALUOutput] or  Mem [ALUOutput] <- B Operation:- Access memory if needed - If the instruction is load , data returns from memory and is placed in the LMD (load memory data) register - If the instruction is store, data from the B register is written into memory. - In either case the address used is the one computed during the prior cycle and stored in the register ALUOutput Branch: if (cond) PC <- ALUOutput else PC <- NPC Operation:- If the instruction branches, the PC is replaced with branch destination address in the register ALUOutput - Otherwise, PC is replaced with the incremented PC in the register NPC

  16. Il processore Deluxe - DLX Fasi dell’Esecuzione dell’Istruzione Write-back cycle: Register-Register (ALU): Regs [IR16..20] <- ALUOutput Register-Immediate(ALU): Regs [IR11..15] <- ALUOutput Load instruction: Regs [IR11..15] <- LMD Operation:- Write the result into the register file, whether it comes from the memory(LMD) or from ALU (ALUOutput) - the register destination field is in one of two positions depending on the opcode [WB]

  17. Architettura PipelineVector Processor Calcolo Vettoriale su CPU DLX - Pipeline: Calcolo eseguito su CPU parallela Calcolo eseguito su CPU pipeline

More Related