Chapter 8: Atmel s AVR 8-bit Microcontroller Part 3 Microarchitecture. Oregon State University School of Electrical Engineering and Computer Science

Size: px
Start display at page:

Download "Chapter 8: Atmel s AVR 8-bit Microcontroller Part 3 Microarchitecture. Oregon State University School of Electrical Engineering and Computer Science"

Transcription

1 Chapter : tmel s VR -bit Microcontroller Part 3 Microarchitecture Prof. en Lee Oregon State University School of Electrical Engineering and Computer Science Chapter Goals Understand what basic components needed and how they are interconnected to implement a datapath to perform data transfer and processing. Design a control unit to provide appropriate signals to the various components to control the operations within the datapath. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2

2 Contents. Microarchitectrure.2 Instruction Format.3 Components in the asic path.4 Multi-cycle Implementation.5 Eecution of More Comple Instructions. Control Unit Design. Finite State Implementation of the Control Unit. Pipeline Implementation Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3. Microarchitecture Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4 2

3 VR path - get the net instruction from memory. Eecute - figure out what to do with it and do it. This is how all CPUs wor! Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5 VR Control Unit Maes the /Eecute happen Controls the fetch (of instruction) Decodes instructions Controls eecution of instructions Two basic types Hardwired (fast) Microprogrammed (fleible) Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3

4 .2 Instruction Format Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture VR Instruction Format Two-operand format r d d d d d r r r r (e.g., DD, CP, MOV, etc.) I/O format d d d d d (e.g., IN, OUT) Immediate format K K K K d d d d K K K K (e.g., LDI, NDI, ORI, etc.) One-operand format d d d d d (e.g., INC, DEC, COMP, etc.) Displacement format - - q - q q - d d d d d - q q q (e.g., LDD, STD) Direct format (e.g., JMP, CLL) -relative format (e.g., RJMP, RCLL, Rcc, etc.) 2 Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4

5 .3 Components in the asic path Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 9 asic VR path ++,, or Z + Two stages: and Eecute ddr + Inst/ R, R+, -R, or R+q + DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 + or R ddr. w w r r in in out out MUX In ddr MUXF R MUXG MUX LU LU ddress dder R, R+,-R, or R+q ++,, or Z Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5

6 s Counter Instruction DMR ddress Net Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture Memories In ddr In ddr PM_write PM_read DM_write DM_read Inst/ or Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2

7 Sign-Etension & Zero-Fill n-bit to m-bit mapping ++,, or Z + ddr Inst/ R, R+, -R, or R+q + + DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 + or R ddr. w w r r in in out out MUX In ddr MUXF R MUXG MUX LU LU ddress dder R, R+,-R, or R+q ++,, or Z Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3 Sign-Etension & Zero-Fill n n m m MS LS M L S S q q q q q q Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4

8 LU LU_f 4 LU Performs -bit operations. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5 lignment Unit Maps bits in the Instruction Format to fields needed by the datapath r d d d d d r r r r K K K K d d d d K K K K d d d d d d d d d d q - q q - d d d d d - q q q Two-operand Immediate I/O Single-operand Displacement 2-bit -relative -bit -relative lignment Rd Rr K q 5 5 or 2 Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture

9 ddress Rd Rr 5 5 ddr. w w r r Maps opcode,, Rd, and Rr to r, r, w, and w. RL automatically generates X, Y, and Z bad on opcode. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2-read-port, 2 write-port in in CLK... r r w w w in w in out r r out RF_w RF_w ddress read in one cycle (e.g., X-, Y-, or Z). D R Q D R 2 Q... 2 MUX D R E Q... E E... 2 MUX... Decoder 2... Decoder 2... RF_w RF_w out out Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 9

10 ddress dder dder_f 2 ddress dder Generates target address for branches and jumps. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 9 MUXs Routes information from one part of the datapath to another ++,, or Z + ddr Inst/ R, R+, -R, or R+q + + DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 + or R ddr. w w r r in in out out MUX In ddr MUXF R MUXG MUX LU LU ddress dder R, R+,-R, or R+q ++,, or Z Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2

11 .4 Multi-cycle Implementation Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2 and Eecute Stages Spends one cycle in the stage to fetch an instruction. Spends one or more cycles in the Eecute and stages to eecute an instruction. Eecute Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 22

12 Multi-cycle Implementation t IF EX IF EX EX2 IF EX IF EX EX2 EX3 Instruction i Instruction i+ Instruction i+2 Instruction i+3 Instruction cycles ( and Eecute) eecuted quentially. Will e pipeline implementation later. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 23 Cycle + ddr Inst/ Instruction + + DMR Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 24 2

13 Eecute Cycle Depends on the instruction rithmetic and transfer ranch and jump Different parts of the datapath are activated. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 25 rithmetic and Instructions Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out Rd op Rr, Rd op K, or op Rd Rd Rr MUX Rr or K K In ddr MUXF MUXG MUX LU ddress dder Op Rd, Rr Op Rd, K Op Rd Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2 3

14 Transfer: MOV (-bit) Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out r = Rr w = Rd Rr Rr MUX In ddr MUXF MUXG MUX LU ddress dder Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2 Transfer: MOVW (-bit) Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 Rr+ Rr ddr. w in in out w r r out MUX In Rr+:Rr ddr MUXF MUXG r = Rr+ r = Rr w = Rd + w = Rd MUX LU ddress dder Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2 4

15 Transfer: IN Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out r = + 32 w = Rd MUX In ddr MUXF MUXG MUX LU ddress dder Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 29 Transfer: OUT Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out w = + 32 r = Rd (Rr) Rd (Rr) Rd (Rr) MUX In ddr MUXF MUXG MUX LU ddress dder Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3 5

16 Load and Store Us ddress (R): X-, Y-, and Z- register. Displacement Pre-decrement Post-increment Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3 Indirect Load and Store EX R Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 R ddr. w in in out w r r out MUX In R ddr MUXF MUXG r = Rh r = Rl MUX LU ddress dder 32

17 Indirect \w Disp. EX Y+q or Z+q Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out r = Rh r = Rl MUX In ddr MUXF q MUXG Y or Z MUX LU ddress dder 33 Indirect \w Pred. EX R- Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 R- R-(h) R-(l) ddr. w in in out w r r out MUX In ddr MUXF MUXG R r = Rh r = Rl w = Rh w = Rl MUX LU ddress dder 34

18 Indirect \w Post. - EX R Eecute R+ R R+(h) R+(l) w in in out w r Rd Rr 5 5 ddr. r out lignment Unit MUX K q In or 2 DMR ddr MUXF MUXG R r = Rh r = Rl w = Rh w = Rl MUX LU ddress dder Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 35 Load EX2 Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out w = Rd M[R] MUX In R ddr MUXF MUXG MUX LU ddess dder 3

19 Store EX2 Eecute DMR lignment Unit Rd Rr K q 5 5 or 2 ddr. w in in out w r r out r = Rd (Rr) MUX Rd/Rr In R ddr MUXF MUXG MUX LU ddress dder 3 -relative ranch EX ++ ddr + Inst/ DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 ddr. w w r r in in out out MUX In ddr 2 + MUXF MUXG MUX LU ddress dder

20 Jump Direct EX + ddr + Inst/ DMR Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 39 Jump Direct EX2 ddr + Inst/ DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 ddr. w w r r in in out out MUX In ddr MUXF MUXG MUX LU ddress dder 4 2

21 Jump Indirect EX Z ddr + Inst/ DMR Eecute lignment Unit Rd Rr K q 5 5 or 2 ddr. w w r r in in out out MUX In ddr MUXF Z MUXG MUX LU ddress dder 4.5 Eecution of More Comple Instructions Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 42 2

22 Enhanced VR path dditional s: RR Return ddress MDR PMR ddress Concatenation = h l RR = RRh RRl dditional MUXs: MUXD MUXE MUXI DEMUX SP Manipulation: Increment/Decrement Unit Eecute R MDR MUX 2 LU PMR Rd Rr 5 5 ddr. w w r r in in out out Z q MUXL ddr Inst/ lignment Unit LU MUX K DEMUX R, R+, R-, or R+q MUXD In or 2 R DMR MUXE ddr ++ or RRh + + RR MUXI RRl ddress dder MUXF + MUXG + SP+ or SP- + or SP ± SP R, R+,R-, or R+q ++, or Z 43 Control Signals DEMUX DEMUX MJ 3 ways to latch : _en h: h_en l: l_en Only one can be enabled at a time. Eecute CU => Control Unit + lignment Unit MDR MH MC 2 2 PMR Rd Rr 5 5 ddr. _en w w r r in in out out q MUXL ddr Inst/ h_en Control & lignment Unit K RF_w RF_w ML or 2 l_en DMR _en MI RR MUXI MK + _en SP_en SP _en enables latching of both and RR M MUX 4 LU_f MD MUXD ME MUXE MUXF MUXG MF MG M MUX In ddr 2 ddress LU DM_w DM_r dder Inc_Dec dder_f ± 44 22

23 . Control Unit Design Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 45 Instructions Considered # of Eecute cycles 2 2 2/ 4 Defined in tmel -bit VR Instruction Set Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4 23

24 Encoding Group Defines different arithmetic & logic operations add Group Defines different immediate operations ori Group C Group D etension a a a a aa defines X, Y, or Z register + defines post-increment - defines pre-decrement ld call Defines different conditions st breq Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4 Encoding Group nop movw muls mulu fmul fmuls fmulsu cpc sbc add or lsl cp cp sub adc or rol and or tst eor or clr cpi Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4 or mov 24

25 Encoding Group sbci subi ori or sbr andi or cbr Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 49 Encoding Group C X ld X st X ldd X std X X lpm elpm pop push com neg swap inc asr lsr ror X X dec jmp call Group C encodes the largest number of instructions c z n v s h t i clc clz cln clv cls clh clt cli Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5 25

26 Encoding Group C lds ret reti sleep brea wdr lpm elpm spm ijmp icall eijmp sts eicall adiw cbi in sbiw sbic sbi sbis out Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5 Encoding Group D rjmp rcall ldi r brcs or brlo breq brmi brvs brlt brts brie brcc or brsh brne brpl brvc brge brhc brtc brid bld bst sbrc sbrs Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 52 2

27 Stage DEMUX + PMR MUXL ddr Inst/ + + Eecute MDR M[] DMR + RR SP lso latches + onto RR 2 Rd Rr 5 5 ddr. w w r r in in out out Control & lignment Unit K RF_w RF_w q or 2 MUXI MUX MUXD MUXE In ddr MUXF MUXG MUX LU DM_w ddress DM_r dder ± 53 DD EX PMR DEMUX MUXL ddr _en must be so that it points to the net instruction be fetched. + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w DD Rd, Rr Control & lignment Unit q or 2 DMR RR MUXI SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. must not be modified. Rd+Rr MUXD MUXE MUXF MUXG MUX In ddr Rd Rr MUX LU DM_w ddress DM_r dder ± SP must not be modified. 54 2

28 ORI EX PMR DEMUX MUXL ddr _en must be so that it points to the net instruction be fetched. + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w ORI Rd, K Control & lignment Unit q or 2 DMR RR MUXI SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. must not be modified. Rd K MUXD MUXE MUXF MUXG MUX In ddr Rd K MUX LU DM_w ddress DM_r dder ± SP must not be modified. 55 REQ EX ++ DEMUX PMR MUXL ddr (taen) or (not taen) + _en needs to be or depending Z-flag. Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w REQ Control & lignment Unit q or 2 DMR RR MUXI SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. must not be modified. MUXD MUXE MUXF MUXG MUX + In ddr MUX LU DM_w ddress DM_r dder ± SP must not be modified. 5 2

29 LD and ST EX PMR DEMUX MUXL ddr _en must be so that it points to the net instruction be fetched. + Inst/ Eecute MDR 2 LD Rd, Y or ST Y, Rr Rd Rr 5 5 ddr. w w r r in in out out Yh Yl Control & lignment Unit K RF_w RF_w q or 2 DMR RR MUXI SP _en must be to provide instruction to the subquent cycle. must not be modified. Yh:Yl MUXD MUXE MUXF MUXG MUX In ddr Yh:Yl MUX LU DM_w ddress DM_r dder ± SP must not be modified. 5 LD EX2 PMR DEMUX MUXL ddr _en must be so that it points to the net instruction be fetched. + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w LD Rd, Y Control & lignment Unit q or 2 DMR RR MUXI SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. SP must not be modified. M[Y] MUX MUXD In MUXE Y ddr MUXF MUXG MUX LU DM_w DM_r ddress dder ± 5 29

30 ST EX2 PMR DEMUX MUXL ddr _en must be so that it points to the net instruction be fetched. + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w ST Y, Rr Control & lignment Unit q or 2 DMR RR MUXI SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. SP must not be modified. MUX MUXD Rr In MUXE Y ddr MUXF MUXG MUX LU DM_w DM_r ddress dder ± 59 Direct Subroutine Call EX Return ddress (R) CLL K Net Instruction EX2 Low => K RR R SP Rl High SP EX3 Low Rh Rl High K => K Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3

31 CLL EX PMR DEMUX MUXL + _en can be don t care since it will be overwritten in EX3. ddr + Inst/ Eecute MDR 2 w w r r in in out out Rd Rr 5 5 ddr. MUX Control & lignment Unit K RF_w RF_w CLL q MUXD In or 2 DMR MUXE ddr +2 RR MUXI MUXF MUXG SP _en must be to provide instruction to the subquent cycle. SP must not be modified. Subroutine return address is latched onto RR. MUX LU DM_w DM_r ddress dder ± CLL EX2 PMR DEMUX MUXL _en can be don t care since it will be overwritten in EX3. ddr + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w CLL Control & lignment Unit q or 2 DMR RR MUXI SP- SP _en must be to provide instruction to the subquent cycle. RR must not be modified. MUX MUXD MUXE RRl SP In ddr MUXF MUXG MUX LU DM_w ddress DM_r dder ± 2 3

32 CLL EX3 PMR DEMUX MUXL updated. ddr + Inst/ Eecute MDR 2 Rd Rr 5 5 ddr. w w r r in in out out K RF_w RF_w CLL Control & lignment Unit q or 2 DMR RR MUXI SP-2 SP _en in the last EX cycle can be don t care, since stage will fetch a new instruction. MUX MUXD MUXE RRh SP- In ddr MUXF MUXG MUX LU DM_w ddress DM_r dder ± 3 Summary of Control Signals Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 4 32

33 . Finite State Implementation of the Control Unit Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 5 Sequence Control M[], +, + IF DD ORI REQ REQ LD or ST CLL Z= Z= Rd Rd+Rr Rd Rd-K -- DMR X ++ M[] + EX LD ST CLL Rd M[DMR] M[DMR] Rd M[SP] l SP SP- EX2 CLL M[SP] h SP SP- EX3 Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 33

34 Finite State Table IF is independent of inputs State transition from (IF) depends on opcode State transition from (IF) to (REQ, Z =) or (REQ, Z=) depends on opcode and Z. State transition from (LD/ST, EX) to (LD, EX2) or (ST, EX2) depends only on bit 9 of opcode. State transition from to and from to depends only on the current state. Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture FSM Current State () Z CLK D D D 2 D 3 Control... Net State pth Control Outputs Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 34

35 RL Mapping X = not relevant op DD (EX) X Rd Rr Rd Rr 5 5 ddr. w w r r X Rd Rd Rr op ORI (EX) X Rd X Rd Rr 5 5 ddr. w w r r X Rd Rd X op LD and ST (EX) X X X Rd Rr 5 5 ddr. w w r r X X Yh Yl Y-register op LD (EX2) X Rd X Rd Rr 5 5 ddr. w w r r X Rd X X Destination op ST (EX2) X Rd X Rd Rr 5 5 ddr. w w r r X X X Rd Source Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 9 RL Mapping (cont.) X = not relevant X REQ (EX) X X X Rd Rr 5 5 ddr. w w r r X X X X RF is not accesd! X CLL (EX) X X X Rd Rr 5 5 ddr. w w r r X X X X X CLL (EX2) X X X Rd Rr 5 5 ddr. w w r r X X X X X RF is not accesd! Separate Inc/Dec Unit and path for manipulating SP CLL (EX3) X X X Rd Rr 5 5 ddr. w w r r X X X X Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 35

36 ddress Rd Rr 5 5 State Decoder Yh Yl 2 GPR w MUX w MUX r 2 3 MUX r Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture. Pipeline Implementation Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 2 3

37 Pipeline Implementation t IF EX IF EX EX2 IF EX IF EX EX2 EX3 Instruction i Instruction i+ Instruction i+2 Instruction i+3 Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3 Eecution of DD and PMR DEMUX MUXL + +2 Eecution of ORI and is similar. ddr + Inst/ +2 Net Instruction Eecute MDR DD Rd, Rr DMR RR SP 2 Rd Rr 5 5 ddr. w w r r in in out out Control & lignment Unit K RF_w RF_w q or 2 MUXI Rd+Rr MUXD MUXE MUXF MUXG MUX In ddr Rd Rr MUX LU DM_w ddress DM_r dder ± 4 3

38 Eecution of REQ and ++ PMR DEMUX MUXL + ddr (taen) Eecution of any conditional branch instruction and is similar. + Inst/ +2 $ (taen) MUX Eecute MDR REQ DMR RR SP 2 Rd Rr 5 5 ddr. w w r r in in out out Control & lignment Unit K RF_w RF_w q or 2 MUXI MUX MUXD MUXE In ddr MUXF MUXG + MUX LU DM_w ddress DM_r dder ± 5 Eecution of REQ and t t IF EX IF EX ranch Penalty IF EX IF IF EX i i+ i i+ REQ not taen REQ taen Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 3

39 Eecution of CLL-EX3 & IF EX EX2 EX3 t IF Target address of CLL latched onto Instruction at target address of CLL fetched IF EX Instruction i Instruction i+ ed instruction invalid Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture Eecution of CLL-EX3 & PMR DEMUX MUXL Creates a bubble by eecuting a NOP instruction - $. ddr + Inst/ $ MUX SP-2 Eecute MDR CLL DMR RR SP 2 Rd Rr 5 5 ddr. w w r r in in out out Control & lignment Unit K RF_w RF_w q or 2 MUXI MUX MUXD MUXE RRh SP- In ddr MUXF MUXG MUX LU DM_w ddress DM_r dder ± 39

40 Questions? Ch. : tmel's VR -bit Microcontroller, Part 3 - Microarchitecture 9 4

Chapter 7: Digital Components. Oregon State University School of Electrical Engineering and Computer Science. Review basic digital design concepts:

Chapter 7: Digital Components. Oregon State University School of Electrical Engineering and Computer Science. Review basic digital design concepts: hapter 7: igital omponents Prof. en Lee Oregon tate University chool of Electrical Engineering and omputer cience hapter Goals Review basic digital design concepts: esigning basic digital components using

More information

Microcontroller VU

Microcontroller VU 182.694 Microcontroller VU Martin Perner SS 2017 Featuring Today: Assembler Programming Weekly Training Objective Already done 1.2 Board test 2.1.1 Assembler demo program 2.1.2 Makefile 2.2.1 Logical operations

More information

Implementing the Controller. Harvard-Style Datapath for DLX

Implementing the Controller. Harvard-Style Datapath for DLX 6.823, L6--1 Implementing the Controller Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 6.823, L6--2 Harvard-Style Datapath for DLX Src1 ( j / ~j ) Src2 ( R / RInd) RegWrite MemWrite

More information

EC 413 Computer Organization

EC 413 Computer Organization EC 413 Computer Organization rithmetic Logic Unit (LU) and Register File Prof. Michel. Kinsy Computing: Computer Organization The DN of Modern Computing Computer CPU Memory System LU Register File Disks

More information

System Data Bus (8-bit) Data Buffer. Internal Data Bus (8-bit) 8-bit register (R) 3-bit address 16-bit register pair (P) 2-bit address

System Data Bus (8-bit) Data Buffer. Internal Data Bus (8-bit) 8-bit register (R) 3-bit address 16-bit register pair (P) 2-bit address Intel 8080 CPU block diagram 8 System Data Bus (8-bit) Data Buffer Registry Array B 8 C Internal Data Bus (8-bit) F D E H L ALU SP A PC Address Buffer 16 System Address Bus (16-bit) Internal register addressing:

More information

EEE Lecture 1 -1-

EEE Lecture 1 -1- EEE3410 - Lecture 1-1- 1. PC -> Address Move content of the Program Counter to Address Bus 2. Mem(Add) -> ID Move the Data at Location Add from main memory to Instruction Decoder (ID) 3. Acc s -> ALU Move

More information

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle

Computer Engineering Department. CC 311- Computer Architecture. Chapter 4. The Processor: Datapath and Control. Single Cycle Computer Engineering Department CC 311- Computer Architecture Chapter 4 The Processor: Datapath and Control Single Cycle Introduction The 5 classic components of a computer Processor Input Control Memory

More information

A Second Datapath Example YH16

A Second Datapath Example YH16 A Second Datapath Example YH16 Lecture 09 Prof. Yih Huang S365 1 A 16-Bit Architecture: YH16 A word is 16 bit wide 32 general purpose registers, 16 bits each Like MIPS, 0 is hardwired zero. 16 bit P 16

More information

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Simple Instruction-Pipelining. Pipelined Harvard Datapath 6.823, L8--1 Simple ruction-pipelining Updated March 6, 2000 Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 Pipelined Harvard path 6.823, L8--2. fetch decode & eg-fetch execute

More information

Processor Design & ALU Design

Processor Design & ALU Design 3/8/2 Processor Design A. Sahu CSE, IIT Guwahati Please be updated with http://jatinga.iitg.ernet.in/~asahu/c22/ Outline Components of CPU Register, Multiplexor, Decoder, / Adder, substractor, Varity of

More information

Simple Instruction-Pipelining (cont.) Pipelining Jumps

Simple Instruction-Pipelining (cont.) Pipelining Jumps 6.823, L9--1 Simple ruction-pipelining (cont.) + Interrupts Updated March 6, 2000 Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 Src1 ( j / ~j ) Src2 ( / Ind) Pipelining Jumps

More information

Simple Instruction-Pipelining. Pipelined Harvard Datapath

Simple Instruction-Pipelining. Pipelined Harvard Datapath 6.823, L8--1 Simple ruction-pipelining Laboratory for Computer Science M.I.T. http://www.csg.lcs.mit.edu/6.823 Pipelined Harvard path 6.823, L8--2. I fetch decode & eg-fetch execute memory Clock period

More information

CHAPTER log 2 64 = 6 lines/mux or decoder 9-2.* C = C 8 V = C 8 C * 9-4.* (Errata: Delete 1 after problem number) 9-5.

CHAPTER log 2 64 = 6 lines/mux or decoder 9-2.* C = C 8 V = C 8 C * 9-4.* (Errata: Delete 1 after problem number) 9-5. CHPTER 9 2008 Pearson Education, Inc. 9-. log 2 64 = 6 lines/mux or decoder 9-2.* C = C 8 V = C 8 C 7 Z = F 7 + F 6 + F 5 + F 4 + F 3 + F 2 + F + F 0 N = F 7 9-3.* = S + S = S + S S S S0 C in C 0 dder

More information

Verilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples. Additional Figures

Verilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples. Additional Figures Chapter Additional Design Examples Verilog HDL:Digital Design and Modeling Chapter Additional Design Examples Additional Figures Chapter Additional Design Examples 2 Page 62 a b y y 2 y 3 c d e f Figure

More information

ADD B,W,L s = Dn d = x x x x x x x x (Add) d = Dn s = x x x x x x x x x x x x

ADD B,W,L s = Dn d = x x x x x x x x (Add) d = Dn s = x x x x x x x x x x x x T ABLE C.4 68000 instruction set Addressing mode Mnemonic (Name) Size Addressing mo de Dn An ABCD B s = Dn d = x (Add BCD) s = d = x + d d(an,xi) Abs.W Abs.L d(pc) ADD B,W,L s = Dn d = x x x x x x x x

More information

ECE 2300 Digital Logic & Computer Organization

ECE 2300 Digital Logic & Computer Organization ECE 2300 Digital Logic & Computer Organization pring 201 More inary rithmetic LU 1 nnouncements Lab 4 prelab () due tomorrow Lab 5 to be released tonight 2 Example: Fixed ize 2 C ddition White stone =

More information

ECE 3401 Lecture 23. Pipeline Design. State Table for 2-Cycle Instructions. Control Unit. ISA: Instruction Specifications (for reference)

ECE 3401 Lecture 23. Pipeline Design. State Table for 2-Cycle Instructions. Control Unit. ISA: Instruction Specifications (for reference) ECE 3401 Lecture 23 Pipeline Design Control State Register Combinational Control Logic New/ Modified Control Word ISA: Instruction Specifications (for reference) P C P C + 1 I N F I R M [ P C ] E X 0 PC

More information

UNIVERSITY OF WISCONSIN MADISON

UNIVERSITY OF WISCONSIN MADISON CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Minsub Shin, Lisa Ossian, Sujith Surendran Midterm Examination 2 In Class (50 minutes) Friday,

More information

[2] Predicting the direction of a branch is not enough. What else is necessary?

[2] Predicting the direction of a branch is not enough. What else is necessary? [2] What are the two main ways to define performance? [2] Predicting the direction of a branch is not enough. What else is necessary? [2] The power consumed by a chip has increased over time, but the clock

More information

CPU DESIGN The Single-Cycle Implementation

CPU DESIGN The Single-Cycle Implementation CSE 202 Computer Organization CPU DESIGN The Single-Cycle Implementation Shakil M. Khan (adapted from Prof. H. Roumani) Dept of CS & Eng, York University Sequential vs. Combinational Circuits Digital circuits

More information

Building a Computer. Quiz #2 on 10/31, open book and notes. (This is the last lecture covered) I wonder where this goes? L16- Building a Computer 1

Building a Computer. Quiz #2 on 10/31, open book and notes. (This is the last lecture covered) I wonder where this goes? L16- Building a Computer 1 Building a Computer I wonder where this goes? B LU MIPS Kit Quiz # on /3, open book and notes (This is the last lecture covered) Comp 4 Fall 7 /4/7 L6- Building a Computer THIS IS IT! Motivating Force

More information

[2] Predicting the direction of a branch is not enough. What else is necessary?

[2] Predicting the direction of a branch is not enough. What else is necessary? [2] When we talk about the number of operands in an instruction (a 1-operand or a 2-operand instruction, for example), what do we mean? [2] What are the two main ways to define performance? [2] Predicting

More information

Enrico Nardelli Logic Circuits and Computer Architecture

Enrico Nardelli Logic Circuits and Computer Architecture Enrico Nardelli Logic Circuits and Computer Architecture Appendix B The design of VS0: a very simple CPU Rev. 1.4 (2009-10) by Enrico Nardelli B - 1 Instruction set Just 4 instructions LOAD M - Copy into

More information

Fall 2011 Prof. Hyesoon Kim

Fall 2011 Prof. Hyesoon Kim Fall 2011 Prof. Hyesoon Kim Add: 2 cycles FE_stage add r1, r2, r3 FE L ID L EX L MEM L WB L add add sub r4, r1, r3 sub sub add add mul r5, r2, r3 mul sub sub add add mul sub sub add add mul sub sub add

More information

CSE Computer Architecture I

CSE Computer Architecture I Execution Sequence Summary CSE 30321 Computer Architecture I Lecture 17 - Multi Cycle Control Michael Niemier Department of Computer Science and Engineering Step name Instruction fetch Instruction decode/register

More information

Project Two RISC Processor Implementation ECE 485

Project Two RISC Processor Implementation ECE 485 Project Two RISC Processor Implementation ECE 485 Chenqi Bao Peter Chinetti November 6, 2013 Instructor: Professor Borkar 1 Statement of Problem This project requires the design and test of a RISC processor

More information

4. (3) What do we mean when we say something is an N-operand machine?

4. (3) What do we mean when we say something is an N-operand machine? 1. (2) What are the two main ways to define performance? 2. (2) When dealing with control hazards, a prediction is not enough - what else is necessary in order to eliminate stalls? 3. (3) What is an "unbalanced"

More information

CPSC 3300 Spring 2017 Exam 2

CPSC 3300 Spring 2017 Exam 2 CPSC 3300 Spring 2017 Exam 2 Name: 1. Matching. Write the correct term from the list into each blank. (2 pts. each) structural hazard EPIC forwarding precise exception hardwired load-use data hazard VLIW

More information

3. (2) What is the difference between fixed and hybrid instructions?

3. (2) What is the difference between fixed and hybrid instructions? 1. (2 pts) What is a "balanced" pipeline? 2. (2 pts) What are the two main ways to define performance? 3. (2) What is the difference between fixed and hybrid instructions? 4. (2 pts) Clock rates have grown

More information

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control Logic and Computer Design Fundamentals Chapter 8 Sequencing and Control Datapath and Control Datapath - performs data transfer and processing operations Control Unit - Determines enabling and sequencing

More information

Computer Architecture ELEC2401 & ELEC3441

Computer Architecture ELEC2401 & ELEC3441 Last Time Pipeline Hazard Computer Architecture ELEC2401 & ELEC3441 Lecture 8 Pipelining (3) Dr. Hayden Kwok-Hay So Department of Electrical and Electronic Engineering Structural Hazard Hazard Control

More information

Generic datapath. Generic datapath architecture. Register file. Register file. Calcolatori Elettronici e Sistemi Operativi.

Generic datapath. Generic datapath architecture. Register file. Register file. Calcolatori Elettronici e Sistemi Operativi. alcolatori Elettroici e Sistei Operativi Geeric datapath architecture Set of registers Geeric datapath uber, size. addressig R[0], R[1],... Set of operatios arithetic, logic, shift Addressig (uber of operads,

More information

Unit 6: Branch Prediction

Unit 6: Branch Prediction CIS 501: Computer Architecture Unit 6: Branch Prediction Slides developed by Joe Devie/, Milo Mar4n & Amir Roth at Upenn with sources that included University of Wisconsin slides by Mark Hill, Guri Sohi,

More information

CS 52 Computer rchitecture and Engineering Lecture 4 - Pipelining Krste sanovic Electrical Engineering and Computer Sciences University of California at Berkeley http://www.eecs.berkeley.edu/~krste! http://inst.eecs.berkeley.edu/~cs52!

More information

Number Systems 1(Solutions for Vol 1_Classroom Practice Questions)

Number Systems 1(Solutions for Vol 1_Classroom Practice Questions) Chapter Number Systems (Solutions for Vol _Classroom Practice Questions). ns: (d) 5 x + 44 x = x ( x + x + 5 x )+( x +4 x + 4 x ) = x + x + x x +x+5+x +4x+4 = x + x + x 5x 6 = (x6) (x+ ) = (ase cannot

More information

Review: Single-Cycle Processor. Limits on cycle time

Review: Single-Cycle Processor. Limits on cycle time Review: Single-Cycle Processor Jump 3:26 5: MemtoReg Control Unit LUControl 2: Op Funct LUSrc RegDst PCJump PC 4 uction + PCPlus4 25:2 2:6 2:6 5: 5: 2 3 WriteReg 4: Src Src LU Zero LUResult Write + PC

More information

LABORATORY MANUAL MICROPROCESSOR AND MICROCONTROLLER

LABORATORY MANUAL MICROPROCESSOR AND MICROCONTROLLER LABORATORY MANUAL S u b j e c t : MICROPROCESSOR AND MICROCONTROLLER TE (E lectr onics) ( S e m V ) 1 I n d e x Serial No T i tl e P a g e N o M i c r o p r o c e s s o r 8 0 8 5 1 8 Bit Addition by Direct

More information

Pipelining. Traditional Execution. CS 365 Lecture 12 Prof. Yih Huang. add ld beq CS CS 365 2

Pipelining. Traditional Execution. CS 365 Lecture 12 Prof. Yih Huang. add ld beq CS CS 365 2 Pipelining CS 365 Lecture 12 Prof. Yih Huang CS 365 1 Traditional Execution 1 2 3 4 1 2 3 4 5 1 2 3 add ld beq CS 365 2 1 Pipelined Execution 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

More information

A crash course in Digital Logic

A crash course in Digital Logic crash course in Digital Logic Computer rchitecture 1DT016 distance Fall 2017 http://xyx.se/1dt016/index.php Per Foyer Mail: per.foyer@it.uu.se Per.Foyer@it.uu.se 2017 1 We start from here Gates Flip-flops

More information

1. (2 )Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished?

1. (2 )Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished? 1. (2 )Clock rates have grown by a factor of 1000 while power consumed has only grown by a factor of 30. How was this accomplished? 2. (2 )What are the two main ways to define performance? 3. (2 )What

More information

CSCI-564 Advanced Computer Architecture

CSCI-564 Advanced Computer Architecture CSCI-564 Advanced Computer Architecture Lecture 8: Handling Exceptions and Interrupts / Superscalar Bo Wu Colorado School of Mines Branch Delay Slots (expose control hazard to software) Change the ISA

More information

Basic Computer Organization and Design Part 3/3

Basic Computer Organization and Design Part 3/3 Basic Computer Organization and Design Part 3/3 Adapted by Dr. Adel Ammar Computer Organization Interrupt Initiated Input/Output Open communication only when some data has to be passed --> interrupt. The

More information

2

2 Computer System AA rc hh ii tec ture( 55 ) 2 INTRODUCTION ( d i f f e r e n t r e g i s t e r s, b u s e s, m i c r o o p e r a t i o n s, m a c h i n e i n s t r u c t i o n s, e t c P i p e l i n e E

More information

ECE290 Fall 2012 Lecture 22. Dr. Zbigniew Kalbarczyk

ECE290 Fall 2012 Lecture 22. Dr. Zbigniew Kalbarczyk ECE290 Fall 2012 Lecture 22 Dr. Zbigniew Kalbarczyk Today LC-3 Micro-sequencer (the control store) LC-3 Micro-programmed control memory LC-3 Micro-instruction format LC -3 Micro-sequencer (the circuitry)

More information

Department of Electrical and Computer Engineering The University of Texas at Austin

Department of Electrical and Computer Engineering The University of Texas at Austin Department of Electrical and Computer Engineering The University of Texas at Austin EE 360N, Fall 2004 Yale Patt, Instructor Aater Suleman, Huzefa Sanjeliwala, Dam Sunwoo, TAs Exam 1, October 6, 2004 Name:

More information

Figure 4.9 MARIE s Datapath

Figure 4.9 MARIE s Datapath Term Control Word Microoperation Hardwired Control Microprogrammed Control Discussion A set of signals that executes a microoperation. A register transfer or other operation that the CPU can execute in

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Final Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Tuesday Dec 12 th 13:00-15:00 (1-3pm) 2 hour

More information

From Sequential Circuits to Real Computers

From Sequential Circuits to Real Computers 1 / 36 From Sequential Circuits to Real Computers Lecturer: Guillaume Beslon Original Author: Lionel Morel Computer Science and Information Technologies - INSA Lyon Fall 2017 2 / 36 Introduction What we

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Simple Processor CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev Digital

More information

Logic Design. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Logic Design. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Logic Deign CS 270: Mathematical Foundation of Computer Science Jeremy Johnon Logic Deign Objective: To provide an important application of propoitional logic to the deign and implification of logic circuit.

More information

Portland State University ECE 587/687. Branch Prediction

Portland State University ECE 587/687. Branch Prediction Portland State University ECE 587/687 Branch Prediction Copyright by Alaa Alameldeen and Haitham Akkary 2015 Branch Penalty Example: Comparing perfect branch prediction to 90%, 95%, 99% prediction accuracy,

More information

CPU DESIGN The Single-Cycle Implementation

CPU DESIGN The Single-Cycle Implementation 22 ompter Organization Seqential vs. ombinational ircits Digital circits can be classified into two categories: DESIGN The Single-ycle Implementation. ombinational ircits: m, 2. Seqential ircits: flip-flops,

More information

Review. Combined Datapath

Review. Combined Datapath Review Topics:. A single cycle implementation 2. State Diagrams. A mltiple cycle implementation COSC 22: Compter Organization Instrctor: Dr. Amir Asif Department of Compter Science York University Handot

More information

Integer Multipliers 1

Integer Multipliers 1 Integer Multipliers Multipliers must have circuit in most DS applications variety of multipliers exists that can be chosen based on their performance Serial, Serial/arallel,Shift and dd, rray, ooth, Wallace

More information

Practice Homework Solution for Module 4

Practice Homework Solution for Module 4 Practice Homework Solution for Module 4 1. Tired of writing the names of those you want kicked off the island on cards, you wish to modernize the voting scheme used on Digital Survivor. Specifically, you

More information

L07-L09 recap: Fundamental lesson(s)!

L07-L09 recap: Fundamental lesson(s)! L7-L9 recap: Fundamental lesson(s)! Over the next 3 lectures (using the IPS ISA as context) I ll explain:! How functions are treated and processed in assembly! How system calls are enabled in assembly!

More information

Lecture 3, Performance

Lecture 3, Performance Lecture 3, Performance Repeating some definitions: CPI Clocks Per Instruction MHz megahertz, millions of cycles per second MIPS Millions of Instructions Per Second = MHz / CPI MOPS Millions of Operations

More information

LABORATORY MANUAL MICROPROCESSORS AND MICROCONTROLLERS. S.E (I.T) ( S e m. IV)

LABORATORY MANUAL MICROPROCESSORS AND MICROCONTROLLERS. S.E (I.T) ( S e m. IV) LABORATORY MANUAL MICROPROCESSORS AND MICROCONTROLLERS S.E (I.T) ( S e m. IV) 1 I n d e x Serial No. T i tl e P a g e N o. 1 8 bit addition with carry 3 2 16 bit addition with carry 5 3 8 bit multiplication

More information

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits Chris Calabro January 13, 2016 1 RAM model There are many possible, roughly equivalent RAM models. Below we will define one in the fashion

More information

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring - Principles of Computer rchitecture Miles Murdocca and Vincent Heuring 999 M. Murdocca and V. Heuring -2 Chapter Contents. Introduction.2 Combinational Logic.3 Truth Tables.4 Logic Gates.5 Properties

More information

Issue = Select + Wakeup. Out-of-order Pipeline. Issue. Issue = Select + Wakeup. OOO execution (2-wide) OOO execution (2-wide)

Issue = Select + Wakeup. Out-of-order Pipeline. Issue. Issue = Select + Wakeup. OOO execution (2-wide) OOO execution (2-wide) Out-of-order Pipeline Buffer of instructions Issue = Select + Wakeup Select N oldest, read instructions N=, xor N=, xor and sub Note: ma have execution resource constraints: i.e., load/store/fp Fetch Decode

More information

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples

Overview. Arithmetic circuits. Binary half adder. Binary full adder. Last lecture PLDs ROMs Tristates Design examples Overview rithmetic circuits Last lecture PLDs ROMs Tristates Design examples Today dders Ripple-carry Carry-lookahead Carry-select The conclusion of combinational logic!!! General-purpose building blocks

More information

EXAMPLES 4/12/2018. The MIPS Pipeline. Hazard Summary. Show the pipeline diagram. Show the pipeline diagram. Pipeline Datapath and Control

EXAMPLES 4/12/2018. The MIPS Pipeline. Hazard Summary. Show the pipeline diagram. Show the pipeline diagram. Pipeline Datapath and Control The MIPS Pipeline CSCI206 - Computer Organization & Programming Pipeline Datapath and Control zybook: 11.6 Developed and maintained by the Bucknell University Computer Science Department - 2017 Hazard

More information

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25 Chapter 11 Dedicated Microprocessors Page 1 of 25 Table of Content Table of Content... 1 11 Dedicated Microprocessors... 2 11.1 Manual Construction of a Dedicated Microprocessor... 3 11.2 FSM + D Model

More information

From Sequential Circuits to Real Computers

From Sequential Circuits to Real Computers From Sequential Circuits to Real Computers Lecturer: Guillaume Beslon Original Author: Lionel Morel Computer Science and Information Technologies - INSA Lyon Fall 2018 1 / 39 Introduction I What we have

More information

EE201l Homework #8. Datapath Design

EE201l Homework #8. Datapath Design EE20l Homework #8 Datapath Design Instructor: G. Puvvada. Datapath and control design: You are given two 4-bit unsigned numbers, P and Q. You need to compare them and deposit the smaller in SMALL_REG and

More information

UNIT III Design of Combinational Logic Circuits. Department of Computer Science SRM UNIVERSITY

UNIT III Design of Combinational Logic Circuits. Department of Computer Science SRM UNIVERSITY UNIT III Design of ombinational Logic ircuits Department of omputer Science SRM UNIVERSITY Introduction to ombinational ircuits Logic circuits for digital systems may be ombinational Sequential combinational

More information

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables

UNIT 8A Computer Circuitry: Layers of Abstraction. Boolean Logic & Truth Tables UNIT 8 Computer Circuitry: Layers of bstraction 1 oolean Logic & Truth Tables Computer circuitry works based on oolean logic: operations on true (1) and false (0) values. ( ND ) (Ruby: && ) 0 0 0 0 0 1

More information

Lecture 3, Performance

Lecture 3, Performance Repeating some definitions: Lecture 3, Performance CPI MHz MIPS MOPS Clocks Per Instruction megahertz, millions of cycles per second Millions of Instructions Per Second = MHz / CPI Millions of Operations

More information

Energy Delay Optimization

Energy Delay Optimization EE M216A.:. Fall 21 Lecture 8 Energy Delay Optimization Prof. Dejan Marković ee216a@gmail.com Some Common Questions Is sizing better than V DD for energy reduction? What are the optimal values of gate

More information

COVER SHEET: Problem#: Points

COVER SHEET: Problem#: Points EEL 4712 Midterm 3 Spring 2017 VERSION 1 Name: UFID: Sign here to give permission for your test to be returned in class, where others might see your score: IMPORTANT: Please be neat and write (or draw)

More information

Spiral 2-1. Datapath Components: Counters Adders Design Example: Crosswalk Controller

Spiral 2-1. Datapath Components: Counters Adders Design Example: Crosswalk Controller 2-. piral 2- Datapath Components: Counters s Design Example: Crosswalk Controller 2-.2 piral Content Mapping piral Theory Combinational Design equential Design ystem Level Design Implementation and Tools

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Midterm02 Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Thursday Nov. 16 th In normal lecture (13:00-14:15)

More information

Sequential Circuits. Circuits with state. Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1

Sequential Circuits. Circuits with state. Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1 Sequential Circuits Circuits with state Silvina Hanono Wachman Computer Science & Artificial Intelligence Lab M.I.T. L06-1 Combinational circuits A 0 A 1 A n-1. Sel lg(n) O Mux A B Comparator Result: LT,

More information

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays

CMSC 313 Lecture 18 Midterm Exam returned Assign Homework 3 Circuits for Addition Digital Logic Components Programmable Logic Arrays CMSC 33 Lecture 8 Midterm Exam returned ssign Homework 3 Circuits for ddition Digital Logic Components Programmable Logic rrays UMC, CMSC33, Richard Chang Half dder Inputs: and Outputs:

More information

Design of Sequential Circuits

Design of Sequential Circuits Design of Sequential Circuits Seven Steps: Construct a state diagram (showing contents of flip flop and inputs with next state) Assign letter variables to each flip flop and each input and output variable

More information

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR

Logic. Basic Logic Functions. Switches in series (AND) Truth Tables. Switches in Parallel (OR) Alternative view for OR TOPIS: Logic Logic Expressions Logic Gates Simplifying Logic Expressions Sequential Logic (Logic with a Memory) George oole (85-864), English mathematician, oolean logic used in digital computers since

More information

CMU Introduction to Computer Architecture, Spring 2015 HW 2: ISA Tradeoffs, Microprogramming and Pipelining

CMU Introduction to Computer Architecture, Spring 2015 HW 2: ISA Tradeoffs, Microprogramming and Pipelining CMU 18-447 Introduction to Computer Architecture, Spring 2015 HW 2: ISA Tradeoffs, Microprogramming and Pipelining Instructor: Prof Onur Mutlu TAs: Rachata Ausavarungnirun, Kevin Chang, Albert Cho, Jeremie

More information

ENEE350 Lecture Notes-Weeks 14 and 15

ENEE350 Lecture Notes-Weeks 14 and 15 Pipelining & Amdahl s Law ENEE350 Lecture Notes-Weeks 14 and 15 Pipelining is a method of processing in which a problem is divided into a number of sub problems and solved and the solu8ons of the sub problems

More information

CSE370 HW6 Solutions (Winter 2010)

CSE370 HW6 Solutions (Winter 2010) SE370 HW6 Solutions (Winter 2010) 1. L2e, 6.10 For this problem we are given a blank waveform with clock and input and asked to draw out the how different flip-flops and latches would behave. LK a) b)

More information

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline.

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec09 Counters Outline. Review: Designing with FSM EECS 150 - Components and Design Techniques for Digital Systems Lec09 Counters 9-28-04 David Culler Electrical Engineering and Computer Sciences University of California, Berkeley

More information

Arithmetic and Logic Unit First Part

Arithmetic and Logic Unit First Part Arithmetic and Logic Unit First Part Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras ALU1-1 Typical

More information

LRADNN: High-Throughput and Energy- Efficient Deep Neural Network Accelerator using Low Rank Approximation

LRADNN: High-Throughput and Energy- Efficient Deep Neural Network Accelerator using Low Rank Approximation LRADNN: High-Throughput and Energy- Efficient Deep Neural Network Accelerator using Low Rank Approximation Jingyang Zhu 1, Zhiliang Qian 2, and Chi-Ying Tsui 1 1 The Hong Kong University of Science and

More information

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution

Vidyalankar S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution . (a) (i) ( B C 5) H (A 2 B D) H S.E. Sem. III [CMPN] Digital Logic Design and Analysis Prelim Question Paper Solution ( B C 5) H (A 2 B D) H = (FFFF 698) H (ii) (2.3) 4 + (22.3) 4 2 2. 3 2. 3 2 3. 2 (2.3)

More information

CMP N 301 Computer Architecture. Appendix C

CMP N 301 Computer Architecture. Appendix C CMP N 301 Computer Architecture Appendix C Outline Introduction Pipelining Hazards Pipelining Implementation Exception Handling Advanced Issues (Dynamic Scheduling, Out of order Issue, Superscalar, etc)

More information

CSE140: Design of Sequential Logic

CSE140: Design of Sequential Logic CSE4: Design of Sequential Logic Instructor: Mohsen Imani Flip Flops 2 Counter 3 Up counter 4 Up counter 5 FSM with JK-Flip Flop 6 State Table 7 State Table 8 Circuit Minimization 9 Circuit Timing Constraints

More information

Design of Digital Circuits Lecture 14: Microprogramming. Prof. Onur Mutlu ETH Zurich Spring April 2017

Design of Digital Circuits Lecture 14: Microprogramming. Prof. Onur Mutlu ETH Zurich Spring April 2017 Design of Digital Circuits Lecture 4: Microprogramming Prof. Onur Mutlu ETH Zurich Spring 27 7 April 27 Agenda for Today & Next Few Lectures! Single-cycle Microarchitectures! Multi-cycle and Microprogrammed

More information

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin

More information

Implementing Absolute Addressing in a Motorola Processor (DRAFT)

Implementing Absolute Addressing in a Motorola Processor (DRAFT) Implementing Absolute Addressing in a Motorola 68000 Processor (DRAFT) Dylan Leigh (s3017239) 2009 This project involved the further development of a limited 68000 processor core, developed by Dylan Leigh

More information

Design for Testability

Design for Testability Design for Testability Outline Ad Hoc Design for Testability Techniques Method of test points Multiplexing and demultiplexing of test points Time sharing of I/O for normal working and testing modes Partitioning

More information

Computer Architecture

Computer Architecture Lecture 2: Iakovos Mavroidis Computer Science Department University of Crete 1 Previous Lecture CPU Evolution What is? 2 Outline Measurements and metrics : Performance, Cost, Dependability, Power Guidelines

More information

Microprocessor Power Analysis by Labeled Simulation

Microprocessor Power Analysis by Labeled Simulation Microprocessor Power Analysis by Labeled Simulation Cheng-Ta Hsieh, Kevin Chen and Massoud Pedram University of Southern California Dept. of EE-Systems Los Angeles CA 989 Outline! Introduction! Problem

More information

Counters. We ll look at different kinds of counters and discuss how to build them

Counters. We ll look at different kinds of counters and discuss how to build them Counters We ll look at different kinds of counters and discuss how to build them These are not only examples of sequential analysis and design, but also real devices used in larger circuits 1 Introducing

More information

Sequential Logic Worksheet

Sequential Logic Worksheet Sequential Logic Worksheet Concept Inventory: Notes: D-latch & the Dynamic Discipline D-register Timing constraints for sequential circuits Set-up and hold times for sequential circuits 6.004 Worksheet

More information

CMP 334: Seventh Class

CMP 334: Seventh Class CMP 334: Seventh Class Performance HW 5 solution Averages and weighted averages (review) Amdahl's law Ripple-carry adder circuits Binary addition Half-adder circuits Full-adder circuits Subtraction, negative

More information

Chapter 2. Review of Digital Systems Design

Chapter 2. Review of Digital Systems Design x 2-4 = 42.625. Chapter 2 Review of Digital Systems Design Numbering Systems Decimal number may be expressed as powers of 10. For example, consider a six digit decimal number 987654, which can be represented

More information

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid CSE140: Components and Design Techniques for Digital Systems Midterm Information Instructor: Mohsen Imani Midterm Topics In general: everything that was covered in homework 1 and 2 and related lectures,

More information

Design at the Register Transfer Level

Design at the Register Transfer Level Week-7 Design at the Register Transfer Level Algorithmic State Machines Algorithmic State Machine (ASM) q Our design methodologies do not scale well to real-world problems. q 232 - Logic Design / Algorithmic

More information

Arithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be...

Arithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be... rithmetic Circuits Didn t I learn how to do addition in the second grade? UNC courses aren t what they used to be... + Finally; time to build some serious functional blocks We ll need a lot of boxes The

More information

Name: ID# a) Complete the state transition table for the aforementioned circuit

Name:   ID# a) Complete the state transition table for the aforementioned circuit UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS150 Fall 2001 Prof. Subramanian Final Examination 1) You are to design a sequential circuit with two JK FFs A and

More information