La presentazione è in caricamento. Aspetta per favore

La presentazione è in caricamento. Aspetta per favore

La Tecnica PIPELINE Il DLX - Pipeline.

Presentazioni simili


Presentazione sul tema: "La Tecnica PIPELINE Il DLX - Pipeline."— Transcript della presentazione:

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 Architettura Pipeline nel processore Deluxe

3 Significato Pipeline come una Catena di Montaggio
N: num Unità Operative T: tempo massimo per operazione dopo una latenza NxT completo ogni processo in un tempo T Speed – Up: N meno complesse meno costose facilmente riproducibili Unità Operative Henry Ford, proprietario dell’omonima fabbrica automobilistica di Detroit, nel 1927 costruisce la prima catena di montaggio Unità operative complessità proporzionale a N Architettura centralizzato non troppo complesso Unità di Controllo 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 3 2 4 5 1 2 3 4 5 1 Pipeline come una Catena 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 4 Istr. 3 3 Istr. Fasi Non Bilanciate e Atomiche 2 Istr. 4 Istr. 1 Istr. 3 Istr. 5 Istr. 6 Istr. 2 Istr. 1 4 Istr. 3 Istr. 1 Istr. 2 Istr. 5 Istr. 2 Istr. 1 Istr. 4 Istr. 3 Istr. 1 Istr. 3 Istr. 2 Istr. 4 2 Istr. 1 Istr. 1 Istr. 2 5 3 2 4 5 1 2 3 4 5 1 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 Gestione della Pipeline
Presupposti Operativi: Sincronismo 5 4 3 2 1 Fasi Non Bilanciate e Atomiche Contesto Sincrono La Fase 3 più Lenta fissa la latenza T anche per le altre Fasi NO 5 4 3 2 1 4 1 2 3 5 4 1 2 3 5 4 1 2 3 5 4 1 2 3 5 4 1 2 3 5 T 4 1 2 3 5 4 1 2 3 5

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

7 SottoFasi come scomposizione di Fasi
Bilanciamento delle Fasi SottoFasi come scomposizione di Fasi 5 4 3 2 1 Fasi Non Bilanciate e non Atomiche 5 4b 4a 3c 3b 3a 2 1b 1a 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
Ridondanza Hardware 5 4 3 2 1 Fasi Non Bilanciate e Atomiche 5 4 3 2 1 Duplico le risorse ma ne Dimezzo la latenza Aumenta lo Speed-Up Complico poco l’architettura

9 T minimo è intimamente legato alla tecnologia utilizzata
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) T minimo è intimamente legato alla tecnologia utilizzata Ridurre il tempo di fase T (aumentando la lunghezza della pipeline k oppure utilizzando la ridondanza hardware) fa aumentare lo Speed-Up del processore

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

11 Architettura Pipeline VECTOR Processor
Calcolo Vettoriale su CPU Pipeline: DLX DSP-TI Calcolo eseguito su CPU parallela Calcolo eseguito su CPU pipeline

12 Il processore Deluxe - DLX
Architettura Pipeline a 5 fasi

13 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) [ I F ]

14 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 ## IR ) 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. [ I D ]

15 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 ) [ E X ]

16 Il processore Deluxe - DLX
Fasi dell’Esecuzione dell’Istruzione Memory access/branch completion cycle: [ M E M ] 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

17 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 [ W B ]


Scaricare ppt "La Tecnica PIPELINE Il DLX - Pipeline."

Presentazioni simili


Annunci Google