csse232 computer architecture i
play

CSSE232 Computer Architecture I Mul5cycle Control Groups - PowerPoint PPT Presentation

CSSE232 Computer Architecture I Mul5cycle Control Groups GroupA: Megan, Chris, Zach, Michael, Chase GroupB: Gary, Heather, Brodie, Philip, Joe GroupC:


  1. CSSE232 ¡ Computer ¡Architecture ¡I ¡ Mul5cycle ¡Control ¡

  2. Groups ¡ • GroupA: ¡Megan, ¡Chris, ¡Zach, ¡Michael, ¡Chase ¡ • GroupB: ¡Gary, ¡Heather, ¡Brodie, ¡Philip, ¡Joe ¡ • GroupC: ¡Brian, ¡Abby, ¡Aus5n, ¡Gordon ¡ • GroupD: ¡Francis, ¡Aler, ¡L.E., ¡Alvin, ¡MaJhew ¡

  3. Outline ¡ • Control ¡lines ¡ • Finite ¡state ¡machine ¡ • Project ¡review ¡

  4. Mul5cycle ¡Datapath ¡with ¡Control ¡ New gates New multiplexor For the jump address PCWriteCond PCSource PCWrite ALUOp Outputs IorD ALUSrcB MemRead ALUSrcA Control MemWrite RegWrite MemtoReg Op RegDst IRWrite [5– 0] 0 M 1 Jump u 26 28 x Instruction [25– 0] address [31-0] Shift 2 left 2 Instruction [31-26] PC [31-28] PC 0 0 Instruction Read M M [25– 21] register 1 u Address u x Read x A Instruction Read Zero Memory 1 data 1 1 [20– 16] register 2 ALU ALU ALUOut MemData 0 Registers result Instruction Write M Read B [15– 0] register u 0 Instruction data 2 Write x [15– 11] 1 M Instruction 4 Write data 1 u register data 2 x 0 Instruction 3 [15– 0] M u x Memory 1 data 16 32 ALU Shift Sign register control left 2 extend Instruction [5– 0] Complete multicycle MIPS datapath (with branch and jump capability) and showing the main control block and all control lines

  5. Mul5cycle ¡Control ¡Step ¡(1): ¡ Fetch ¡ � � � � � � � � � IR = Memory[PC]; � � PC = PC + 4; ¡ � � � � � � � � 1 � IRWrite I 1 � 28 32 Instruction I jmpaddr R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd 0 � 0 � 0 � 2 0 1 RegDst 32 M 5 5 MUX X � 010 � IorD 1 U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 M 0 M M ADDR PCSource U Registers U 0 � 1 Zero X D A 1 1 RD1 X Memory M ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg X � U 2 X 3 1 � RegWrite 0 � E ALUSrcB X 1 � 16 32 immediate <<2 T N D

  6. Mul5cycle ¡Control ¡Step ¡(2): ¡ Instruc5on ¡Decode ¡& ¡Register ¡Fetch ¡ A = Reg[IR[25-21]]; � � (A = Reg[rs]) � B = Reg[IR[20-15]]; � � (B = Reg[rt]) � ALUOut = (PC + sign-extend(IR[15-0]) << 2); ¡ 0 � IRWrite I 28 32 Instruction I 0 � jmpaddr R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd X � 2 0 � 0 1 RegDst 0 � 32 M 5 5 MUX IorD X � 010 � 1 U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 0 M M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 X � Memory X M ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U X � 2 X 3 RegWrite 0 � 0 � E ALUSrcB X 16 32 immediate 3 � <<2 T N D

  7. Mul5cycle ¡Control ¡Step ¡(3): ¡ ALU ¡Instruc5on ¡(R-­‑Type) ¡ � ALUOut = A op B; ¡ �� � � � � 0 � IRWrite I 28 32 Instruction I jmpaddr 0 � R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd X � 2 0 1 RegDst 1 � 32 0 � M 5 5 MUX IorD X � ??? � 1 U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 0 M M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 Memory X X � M ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U X � 2 X 3 RegWrite 0 � 0 � E ALUSrcB X 16 32 immediate 0 � <<2 T N D

  8. Mul5cycle ¡Control ¡Step ¡(4): ¡ ALU ¡Instruc5on ¡(R-­‑Type) ¡ � � � � � Reg[IR[15:11]] = ALUOut; � � � � � � � � � � (Reg[Rd] = ALUOut) � 0 � IRWrite ¡ I ¡ 28 ¡ 32 ¡ Instruction ¡ I ¡ jmpaddr ¡ R ¡ CONCAT ¡ I[25:0] ¡ <<2 ¡ 5 ¡ 0 � PCWr* ¡ rs ¡ rt ¡ rd ¡ 2 ¡ 0 ¡ 1 ¡ RegDst ¡ 32 ¡ M ¡ MUX ¡ 5 ¡ 5 ¡ X � IorD ¡ 1 ¡ U ¡ X � ALUSrcA ¡ 5 ¡ 0 � X ¡ 1 � XXX � Operation ¡ 0 ¡ PC ¡ RN1 ¡ RN2 ¡ WN ¡ 3 ¡ MemWrite ¡ 0 ¡ M ¡ 0 ¡ M ¡ U ¡ ADDR ¡ M ¡ PCSource ¡ U ¡ Registers ¡ 1 ¡ X ¡ Zero ¡ 1 ¡ X ¡ M ¡ RD1 ¡ D ¡ A ¡ Memory ¡ U ¡ 0 WD ¡ ALU ¡ RD ¡ R ¡ X � 1 ¡ X ¡ ALU ¡ OUT ¡ WD ¡ RD2 ¡ B ¡ 0 ¡ M ¡ 4 ¡ 1 ¡ MemRead ¡ MemtoReg ¡ U ¡ 2 ¡ X ¡ 3 ¡ 1 � RegWrite ¡ 0 � E ¡ ALUSrcB ¡ 1 � X ¡ 16 ¡ 32 ¡ immediate ¡ T ¡ <<2 ¡ N ¡ X � D ¡

  9. Mul5cycle ¡Control ¡Step ¡(3): ¡ Memory ¡Reference ¡Instruc5ons ¡ � ALUOut = A + sign-extend(IR[15-0]); ¡ �� � � 0 � IRWrite I 28 32 Instruction I jmpaddr R 0 � <<2 CONCAT I[25:0] 5 PCWr* rs rt rd X � 2 0 1 RegDst 1 � 32 5 5 M MUX 0 � IorD 1 X � 010 � U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 M 0 M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 X Memory M X � ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U 2 X � X 3 RegWrite 0 � 0 � E ALUSrcB X immediate 16 32 <<2 T 2 � N D

  10. Mul5cycle ¡Execu5on ¡Steps ¡(4) ¡ Memory ¡Access ¡-­‑ ¡Write ¡(sw) ¡ � Memory[ALUOut] = B; ¡ �� � � � � 0 � IRWrite I 28 32 Instruction I jmpaddr 0 � R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd 1 � 2 0 1 RegDst X � 32 M 5 5 1 � MUX IorD 1 X � XXX � U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 0 M M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 Memory X M X � ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U 2 X � X 3 RegWrite 0 � 0 � E ALUSrcB X 16 32 immediate <<2 X � T N D

  11. Mul5cycle ¡Control ¡Step ¡(4): ¡ Memory ¡Access ¡-­‑ ¡Read ¡( lw ) ¡ � MDR = Memory[ALUOut]; ¡ � � � � � � 0 � IRWrite I 28 32 Instruction I jmpaddr 0 � R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd 1 � 2 0 1 RegDst X � 32 0 � M 5 5 MUX IorD 1 X � XXX � U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 M 0 M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 X Memory M X � ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U 2 X � X 3 RegWrite 1 � 0 � E ALUSrcB X 16 32 immediate X � <<2 T N D

  12. Mul5cycle ¡Execu5on ¡Steps ¡(5) ¡ Memory ¡Read ¡Comple5on ¡(lw) ¡ � Reg[IR[20-16]] = MDR; ¡ �� � � � � IRWrite ¡ 0 � I ¡ 28 ¡ 32 ¡ Instruction ¡ I ¡ jmpaddr ¡ R ¡ CONCAT ¡ I[25:0] ¡ <<2 ¡ 0 � 5 ¡ PCWr* ¡ rs ¡ rt ¡ rd ¡ 2 ¡ 0 ¡ 1 ¡ RegDst ¡ X � 32 ¡ M ¡ MUX ¡ 5 ¡ 5 ¡ X � IorD ¡ 1 ¡ U ¡ 0 � ALUSrcA ¡ 5 ¡ X ¡ 0 � XXX � Operation ¡ 0 ¡ PC ¡ RN1 ¡ RN2 ¡ WN ¡ 3 ¡ MemWrite ¡ 0 ¡ M ¡ 0 ¡ M ¡ U ¡ ADDR ¡ M ¡ PCSource ¡ U ¡ X ¡ Registers ¡ 1 ¡ Zero ¡ 1 ¡ X ¡ 0 ¡ M ¡ RD1 ¡ D ¡ A ¡ Memory ¡ U ¡ WD ¡ ALU ¡ X � RD ¡ R ¡ 1 ¡ X ¡ ALU ¡ OUT ¡ WD ¡ RD2 ¡ B ¡ 0 ¡ M ¡ 4 ¡ 1 ¡ MemRead ¡ MemtoReg ¡ U ¡ 2 ¡ X ¡ 3 ¡ 0 � RegWrite ¡ 0 � E ¡ ALUSrcB ¡ 1 � 16 ¡ X ¡ 32 ¡ immediate ¡ T ¡ <<2 ¡ X � N ¡ D ¡

  13. Mul5cycle ¡Control ¡Step ¡(3): ¡ Branch ¡Instruc5ons ¡ � if (A == B) PC = ALUOut; ¡ �� � � � � 0 � IRWrite 1 if � I 28 32 Instruction I jmpaddr Zero=1 � R <<2 CONCAT I[25:0] 5 PCWr* rs rt rd X � 2 0 1 RegDst 1 � 32 0 � M 5 5 MUX IorD X � 011 � 1 U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 0 M M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 Memory X 1 � M ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U X � 2 X 3 RegWrite 0 � 0 � E ALUSrcB X 16 32 immediate 0 � <<2 T N D

  14. Mul5cycle ¡Execu5on ¡Step ¡(3): ¡ Jump ¡Instruc5on ¡ �� � � � PC = PC[21-28] concat (IR[25-0] << 2); � 0 � IRWrite I 28 32 Instruction I jmpaddr R 1 � <<2 CONCAT I[25:0] 5 PCWr* rs rt rd X � 2 0 1 RegDst X � 32 5 5 M MUX 0 � IorD 1 X � XXX � U ALUSrcA 5 X PC Operation 0 RN1 RN2 WN MemWrite 3 0 M 0 M M ADDR PCSource U Registers U 1 Zero X D A 1 1 RD1 X Memory M 2 � ALU WD R U RD 0 X ALU OUT B WD RD2 0 4 1 M MemRead MemtoReg U 2 X � X 3 RegWrite 0 � 0 � E ALUSrcB X immediate 16 32 <<2 T X � N D

  15. Implemen5ng ¡Control ¡ Value ¡of ¡control ¡signals ¡is ¡dependent ¡upon: ¡ • – what ¡instruc5on ¡is ¡being ¡executed ¡ – which ¡step ¡is ¡being ¡performed ¡ ¡ Use ¡the ¡informa5on ¡we ¡have ¡accumulated ¡to ¡specify ¡a ¡finite ¡state ¡ • machine ¡ – specify ¡the ¡finite ¡state ¡machine ¡graphically, ¡or ¡ – use ¡microprogramming ¡ ¡ Implementa5on ¡is ¡then ¡derived ¡from ¡the ¡specifica5on ¡ • ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend