Presentation is loading. Please wait.

Presentation is loading. Please wait.

Processor Design Computer Architecture CS 215. CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data.

Similar presentations


Presentation on theme: "Processor Design Computer Architecture CS 215. CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data."— Presentation transcript:

1 Processor Design Computer Architecture CS 215

2 CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data path activity  Data Path Set of interconnections and auxiliary registers Needed to accomplish overall changes an instruction makes CPU Control Unit Data Path Control signals out Control unit inputs

3 1-Bus Microarchitecture

4 Abstract Vs. Concrete RTN How would accomplish the following instruction using this architecture? add(:=op=12)  R[ra]  R[rb]+R[rc]:

5 Abstract Vs. Concrete RTN add(:=op=12)  R[ra]  R[rb]+ R[rc]: StepRTN

6 Abstract Vs. Concrete RTN: addi StepRTN T0.MA  PC: C  PC + 4; T1.MD  M[MA]; PC  C; T2.IR  MD; T3.A  R[rb]; T4.C  A + c2 {sign ext.}; T5.R[ra]  C;

7 Abstract Vs. Concrete RTN: ld StepRTN T0-T2 Instruction fetch T3.A  (rb=0  0: rb  0  R[rb]); T4.C  A + (16@IR #IR ); T5.MA  C; T6.MD  M[MA]; T7.R[ra]  MD;

8 Abstract Vs. Concrete RTN: st StepRTN T0-T2 Instruction fetch T3.A  (rb=0  0: rb  0  R[rb]); T4.C  A + (16@IR #IR ); T5.MA  C; T6.MD  R[ra]; T7.M[MA]  MD;

9 Abstract Vs. Concrete RTN: br StepRTN T0-T2 Instruction fetch T3.CON  cond(R[rc]); T4.CON  PC  R[rb];

10 Abstract Vs. Concrete RTN: shr StepConcrete RTN T0-T2 Instruction fetch T3.n  IR ; T4.(n=0)  (n  R[rc] ; T5.C  R[rb]; T6.Shr (:= (n≠0)  (C  0#C : n  n-1; Shr) ); T7.R[ra]  C;

11 More Detail …

12 ra, rb, rc fields General purpose registers Control signals 5x32 decoder

13 Try this!  Problem Extend the SRC instruction set by adding the XOR command (op=19), similar to the AND command Note: The ALU cannot be altered by adding XOR Develop both an abstract and concrete RTN for the instruction

14 Instruction Register

15 Memory Interface

16 ALU

17

18 Control sequences: Instruction Fetch StepConcrete RTNControl Sequence T0.MA  PC: C  PC+4;PC out, MA in, Inc4, C in T1.MD  M[MA]: PC  C;Read, C out, PC in, Wait T2.IR  MD;MD out, IR in T3.Instruction_execution

19 Control sequences: add StepConcrete RTNControl Sequence T0.MA  PC: C  PC+4;PC out, MA in, Inc4, C in, Read T1.MD  M[MA]: PC  C;C out, PC in, Wait T2.IR  MD;MD out, IR in T3.A  R[rb];Grb, R out, A in T4.C  A + R[rc];Grc, R out, ADD, C in T5.R[ra]  C;C out, Gra, R in, End

20 Control sequences: addi StepConcrete RTNControl Sequence T0.MA  PC: C  PC + 4; PC out, MA in, Inc4, C in T1.MD  M[MA]; PC  C;C out, PC in, Wait, Read T2.IR  MD;MD out, IR in T3.A  R[rb];Grb, R out, A in T4.C  A + c2  16..0  {sign ext.};c2 out, ADD, C in T5.R[ra]  C;C out, Gra, R in, End

21 Control sequences: st StepConcrete RTNControl Sequence T0-T2Instruction fetch Instruction fetch T3.A  (rb=0)  0: rb  0  R[rb];Grb, BA out, A in T4.C  A + c2  16..0  {sign ext.};c2 out, ADD, C in T5.MA  C;C out, MA in T6.MD  R[ra];Gra, R out, MD in, Write T7.M[MA]  MD;Wait, End } address arithmetic

22 Control sequences: shr StepConcrete RTNControl Sequence T0-T2Instruction fetchInstruction fetch T3.n  IR  4..0  ;c1 out, Ld T4.(n=0)  (n  R[rc]  4..0  );n=0  (Grc, R out, Ld) T5.C  R[rb];Grb, R out, C=B, C in T6.Shr (:=(n≠0)  n  0  (C out, SHR, C in, (C  31..0   0#C  31..1  :Decr, Goto6) n  n-1; Shr) ); T7.R[ra]  C;C out, Gra, R in, End

23 Control sequences: br StepConcrete RTNControl Sequence T0-T2Instruction fetchInstruction fetch T3.CON  cond(R[rc]);Grc, R out, CON in T4.CON  PC  R[rb];Grb, R out, CON  PC in, End

24 Clocking & Timing

25 Control Unit

26 2-Bus SRC

27 3-Bus SRC

28 Machine Reset  From a need to initialize processor to a known, defined state Control Step Counter  0 PC  Known Value  RTN instruction_interpretation := (  Run  Strt  (Run  1: PC, R[0..31]  0); Run  Rst (IR  M[PC]: PC  PC + 4; instruction_execution): Run  Rst  ( Rst  0: PC  0); instruction_interpretation):

29 Types of Exceptions  System Reset  Machine Check Exceptions Memory error checking  Data Access Exceptions  Instruction Access Exceptions  Alignment Exceptions

30 Types of Exceptions  Program Exceptions Illegal instruction Unimplemented instruction Privileged instruction Arithmetic errors (sometimes)

31 Types of Exceptions  Miscellaneous Hardware Exceptions Countdown to zero  Trace & Debugging Exceptions  Nonmaskable Exceptions Cannot be ignored Power outage  Interrupts (External)

32 Exception Process  Interrupt signal asserted  Determine if interrupt should be serviced; Finish current instruction, if possible

33 Exception Process instruction_interpretation := (  Run  Strt  Run  1: Run  (ireq  IE)  (IR  M[PC]: PC  PC + 4; instruction_execution): Run  (ireq  IE)  (IPC  PC  31..0  : II  15..0   Isrc_info  15..0  : iack  1: IE  0: PC  Ivect  31..0  ; iack  0); instruction_interpretation);


Download ppt "Processor Design Computer Architecture CS 215. CPU Design  Control Unit Generates the control signals in the correct order to effect the correct data."

Similar presentations


Ads by Google