CSCE 350 Computer Architecture. Designing a Single Cycle Datapath. Adapted from the lecture notes of John Kubiatowicz(UCB) and Praveen

Size: px
Start display at page:

Download "CSCE 350 Computer Architecture. Designing a Single Cycle Datapath. Adapted from the lecture notes of John Kubiatowicz(UCB) and Praveen"

Transcription

1 CSCE 35 Computer Architecture Designing a Single Cycle Datapath Adapted from the lecture notes of John Kubiatowicz(UCB) and Praveen

2 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory Datapath Input Output Today s Topic: Design a Single Cycle Processor

3 The Big Picture: The Performance Perspective Performance of a machine is determined by: Instruction count Clock cycle time Clock cycles per instruction Inst. Count CPI Cycle Time Processor design (datapath and control) will determine: Clock cycle time Clock cycles per instruction Today: Single cycle processor: - Advantage: One clock cycle per instruction - Disadvantage: long cycle time

4 How to Design a Processor: step-by-step. Analyze instruction set => datapath requirements the meaning of each instruction is given by the register transfers datapath must include storage element for ISA registers - possibly more datapath must support each register transfer 2. Select set of datapath components and establish clocking methodology 3. Assemble datapath meeting the requirements 4. Analyze implementation of each instruction to determine setting of control points that effects the register transfer. 5. Assemble the control logic

5 The MIPS Instruction Formats All MIPS instructions are bits long. The three instruction formats: R-type I-type J-type op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits op rs rt immediate 6 bits 5 bits 5 bits 6 bits 3 26 op target address 6 bits 26 bits The different fields are: op: operation of the instruction rs, rt, rd: the source and destination register specifiers shamt: shift amount funct: selects the variant of the operation in the op field address / immediate: address offset or immediate value target address: target address of the jump instruction

6 Step a: The MIPS-lite Subset for today ADD and SUB addu rd, rs, rt subu rd, rs, rt op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 6 OR Immediate: ori rt, rs, imm6 LOAD and STORE Word lw rt, rs, imm6 sw rt, rs, imm6 BRANCH: beq rs, rt, imm op rs rt immediate 6 bits 5 bits 5 bits 6 bits op rs rt immediate 6 bits 5 bits 5 bits 6 bits 26 2 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 6 6

7 Logical Register Transfers RTL gives the meaning of the instructions All start by fetching the instruction op rs rt rd shamt funct = MEM[ PC ] op rs rt Imm6 = MEM[ PC ] inst Register Transfers ADDU R[rd] < R[rs] + R[rt]; PC < PC + 4 SUBU R[rd] < R[rs] R[rt]; PC < PC + 4 ORi R[rt] < R[rs] zero_et(imm6); PC < PC + 4 LOAD R[rt] < MEM[ R[rs] + sign_et(imm6)]; PC < PC + 4 STORE MEM[ R[rs] + sign_et(imm6) ] < R[rt]; PC < PC + 4 BEQ if ( R[rs] == R[rt] ) then PC < PC sign_et(imm6)] else PC < PC + 4

8 Step : Requirements of the Instruction Set Memory instruction & data Registers ( ) read RS read RT Write RT or RD PC Etender Add and Sub register or etended immediate Add 4 or etended immediate to PC

9 Step 2: Components of the Datapath Combinational Elements Storage Elements Clocking methodology

10 Combinational Logic Elements (Basic Building Blocks) Adder A B Adder CarryIn Sum Carry MUX A B Select MUX Y OP ALU A B ALU Result

11 Storage Element: Register (Basic Building Block) Register Similar to the D Flip Flop ecept - N-bit input and output - Write Enable input Write Enable: - negated (): Data Out will not change - asserted (): Data Out will become Data In Write Enable Data In N Data Out N

12 Storage Element: Register File Register File consists of registers: Two -bit output busses: busa and busb One -bit input bus: busw Register is selected by: RA (number) selects the register to put on busa (data) RB (number) selects the register to put on busb (data) RW (number) selects the register to be written via busw (data) when Write Enable is Clock input (CLK) RW RA RB Write Enable busw -bit Registers The CLK input is a factor ONLY during write operation busa busb During read operation, behaves as a combinational logic block: - RA or RB valid => busa or busb valid after access time.

13 Storage Element: Idealized Memory Memory (idealized) One input bus: Data In One output bus: Data Out Memory word is selected by: Address selects the word to put on Data Out Write Enable = : address selects the memory word to be written via the Data In bus Clock input (CLK) Write Enable Address Data In DataOut The CLK input is a factor ONLY during write operation During read operation, behaves as a combinational logic block: - Address valid => Data Out valid after access time.

14 Clocking Methodology Setup Hold Don t Care Setup Hold All storage elements are clocked by the same clock edge Cycle Time = CLK-to-Q + Longest Delay Path + Setup + Clock Skew (CLK-to-Q + Shortest Delay Path - Clock Skew) > Hold Time

15 Step 3: Assemble Datapath meeting our requirements Register Transfer Requirements Datapath Assembly Instruction Fetch Read Operands and Eecute Operation

16 3a: Overview of the Instruction Fetch Unit The common RTL operations Fetch the Instruction: mem[pc] Update the program counter: - Sequential Code: PC <- PC Branch and Jump: PC <- something else PC Net Address Logic Address Instruction Memory Instruction Word

17 3b: Add & Subtract R[rd] <- R[rs] op R[rt] Eample: addu rd, rs, rt Ra, Rb, and Rw come from instruction s rs, rt, and rd fields ALUctr and RegWr: control logic after decoding the instruction op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits busw Rd Rs RegWr Rw Ra Rb -bit Registers busa busb ALUctr ALU Result

18 Register-Register Timing: One complete cycle PC Rs,, Rd, Op, Func ALUctr Old Value -to-q New Value Old Value Old Value Instruction Memory Access Time New Value Delay through Control Logic New Value RegWr Old Value New Value Register File Access Time busa, B Old Value New Value ALU Delay busw Old Value New Value RegWr busw Rd Rs Rw Ra Rb -bit Registers busa busb ALUctr ALU Result Register Write Occurs Here

19 3c: Logical Operations with Immediate R[rt] <- R[rs] op ZeroEt[imm6] ] RegDst busw RegWr Rd imm6 3 Rs? Rw Ra Rb -bit Registers 6 26 busb ZeroEt busa 2 op rs rt immediate 6 bits 5 bits 5 bits rd? 6 bits bits 6 ALUSrc ALUctr ALU Result immediate 6 bits

20 3d: Load Operations R[rt] <- Mem[R[rs] + SignEt[imm6]] Eample: lw rt, rs, imm op rs rt immediate 6 bits 5 bits 5 bits rd 6 bits RegDst busw Rd RegWr imm6 Rs Rw Ra Rb -bit Registers 6? busb Etender busa ALUctr ALU Data In?? ALUSrc MemWr WrEn Adr Data Memory W_Src Mu EtOp

21 3e: Store Operations Mem[ R[rs] + SignEt[imm6] <- R[rt] ] Eample: sw rt, rs, imm6 RegDst busw 3 RegWr op rs rt immediate 6 bits 5 bits 5 bits 6 bits Rd ALUctr MemWr imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busb Etender busa Data In ALU WrEn Adr Data Memory W_Src Mu EtOp ALUSrc

22 3f: The Branch Instruction op rs rt immediate 6 bits 5 bits 5 bits 6 bits 6 beq rs, rt, imm6 mem[pc] Fetch the instruction from memory Equal <- R[rs] == R[rt] Calculate the branch condition if (Equal) Calculate the net instruction s address - PC <- PC ( SignEt(imm6) 4 ) else - PC <- PC + 4

23 Equal? Datapath for Branch Operations beq rs, rt, imm6 Datapath generates condition (equal) op rs rt immediate 6 bits 5 bits 5 bits 6 bits Inst Address Cond 4 imm6 PC Et npc_sel Adder Adder PC busw RegWr Rs Rw Ra Rb -bit Registers busa busb

24 imm6 Putting it All Together: A Single Cycle Datapath Inst Memory Adr Rs <2:25> <:5> <:5> <6:2> Rd Imm6 Instruction<3:> npc_sel RegDst Rd Equal ALUctr MemWr MemtoReg 4 PC Et Adder Adder PC RegWr busw imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busa busb Etender = ALU WrEn Adr Data In Data Memory EtOp ALUSrc

25 Net Address PC An Abstract View of the Critical Path Register file and ideal memory: The CLK input is a factor ONLY during write operation During read operation, behave as combinational logic: - Address valid => Output valid after access time. Ideal Instruction Memory Instruction Address Rd 5 Instruction Rs 5 5 Rw Ra Rb -bit Registers Imm 6 A B Critical Path (Load Operation) = PC s -to-q + Instruction Memory s Access Time + Register File s Access Time + ALU to Perform a -bit Add + Data Memory Access Time + Setup Time for Register File Write + Clock Skew ALU Data Address Data In Ideal Data Memory

26 Net Address PC An Abstract View of the Implementation Ideal Instruction Memory Instruction Address Rd 5 Instruction Rs 5 5 Rw Ra Rb -bit Registers A B Control Control Signals ALU Conditions Data Address Data In Ideal Data Memory Data Out Datapath

27 Recap: A Single Cycle Datapath Rs,, Rd and Imed6 hardwired into datapath from Fetch Unit We have everything ecept control signals (underline) Today s lecture will show you how to generate the control signals RegDst busw RegWr Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 npc_sel busb Etender busa EtOp ALUSrc Instruction Fetch Unit ALUctr Data In ALU Instruction<3:> Zero <2:25> WrEn Rs <6:2> MemWr Adr Data Memory Rd <:5> <:5> Imm6 MemtoReg

28 imm6 Recap: Meaning of the Control Signals npc_mux_sel: PC < PC + 4 PC < PC SignEt(Im6) Later in lecture: higher-level connection between mu and branch cond npc_mux_sel 4 Adr Inst Memory PC Et Adder Adder PC

29 Recap: Meaning of the Control Signals EtOp: zero, sign ALUsrc: regb; immed ALUctr: add, sub, or RegDst RegWr busw imm6 Rd 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busa busb Etender Equal MemWr: write memory MemtoReg: ALU; Mem RegDst: rt ; rd RegWr: write register ALUctr = ALU MemWr WrEn Adr Data In Data Memory MemtoReg EtOp ALUSrc

30 RTL: The Add Instruction op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits add rd, rs, rt mem[pc] Fetch the instruction from memory R[rd] <- R[rs] + R[rt] The actual operation PC <- PC + 4 Calculate the net instruction s address

31 imm6 Instruction Fetch Unit at the Beginning of Add Fetch the instruction from Instruction memory: Instruction <- mem[pc] This is the same for all instructions Inst Memory Adr Instruction<3:> npc_mux_sel 4 PC Et Adder Adder PC

32 The Single Cycle Datapath during Add op rs rt rd shamt funct R[rd] <- R[rs] + R[rt] RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busb Etender EtOp = npc_sel= +4 busa ALUctr = Add Data In ALUSrc = Instruction Fetch Unit ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemtoReg = MemWr = Adr Data Memory Rd <:5> <:5> Imm6

33 imm6 Instruction Fetch Unit at the End of Add PC <- PC + 4 This is the same for all instructions ecept: Branch and Jump Inst Memory Adr Instruction<3:> npc_mux_sel 4 Adder Adder PC

34 The Single Cycle Datapath during Or Immediate op rs rt immediate R[rt] <- R[rs] or ZeroEt[Imm6] RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 npc_sel = busb Etender busa EtOp = 6 ALUctr = ALUSrc = Instruction Fetch Unit Data In ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemWr = Adr Data Memory Rd <:5> <:5> Imm6 MemtoReg =

35 The Single Cycle Datapath during Load op rs rt immediate R[rt] <- Data Memory {R[rs] + SignEt[imm6]} RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busb Etender EtOp = npc_sel= +4 busa ALUctr = Add ALUSrc = Instruction Fetch Unit Data In ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemWr = Adr Data Memory Rd <:5> Imm6 MemtoReg = <:5>

36 The Single Cycle Datapath during Store op rs rt immediate Data Memory {R[rs] + SignEt[imm6]} <- R[rt] RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 npc_sel = busb Etender busa EtOp = ALUctr = ALUSrc = Instruction Fetch Unit Data In ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemWr = Adr Data Memory Rd <:5> <:5> Imm6 MemtoReg =

37 The Single Cycle Datapath during Store op rs rt immediate Data Memory {R[rs] + SignEt[imm6]} <- R[rt] RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 busb Etender EtOp = npc_sel= +4 busa ALUctr = Add Data In ALUSrc = Instruction Fetch Unit ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemtoReg = MemWr = Adr Data Memory Rd <:5> <:5> Imm6

38 The Single Cycle Datapath during Branch op rs rt immediate if (R[rs] - R[rt] == ) then Zero <- ; else Zero <- RegDst = RegWr = busw Rd imm6 5 5 Rs 5 Rw Ra Rb -bit Registers 6 npc_sel= Br busb Etender EtOp = busa ALUctr =Sub ALUSrc = Instruction Fetch Unit Data In ALU Zero Instruction<3:> <2:25> WrEn Rs <6:2> MemWr = Adr Data Memory Rd <:5> <:5> Imm6 MemtoReg =

39 imm6 Instruction Fetch Unit at the End of Branch op rs rt immediate 6 if (Zero == ) then PC = PC SignEt[imm6]*4 ; else PC = PC + 4 npc_sel Inst Memory Adr Instruction<3:> Zero npc_mux_sel What is encoding of npc_sel? Direct MUX select? Branch / not branch 4 Adder Adder PC Let s choose second option npc_sel zero? MUX

40 Step 4: Given Datapath: RTL -> Control Instruction<3:> Inst Memory Adr Op <2:25> Fun <2:25> <:5> <:5> <6:2> Rs Rd Imm6 Control npc_sel RegWr RegDst EtOp ALUSrc ALUctr MemWr MemtoReg Zero DATA PATH

41 A Summary of Control Signals inst Register Transfer ADD R[rd] < R[rs] + R[rt]; PC < PC + 4 ALUsrc = RegB, ALUctr = add, RegDst = rd, RegWr, npc_sel = +4 SUB R[rd] < R[rs] R[rt]; PC < PC + 4 ALUsrc = RegB, ALUctr = sub, RegDst = rd, RegWr, npc_sel = +4 ORi R[rt] < R[rs] + zero_et(imm6); PC < PC + 4 ALUsrc = Im, Etop = Z, ALUctr = or, RegDst = rt, RegWr, npc_sel = +4 LOAD R[rt] < MEM[ R[rs] + sign_et(imm6)]; PC < PC + 4 ALUsrc = Im, Etop = Sn, ALUctr = add, MemtoReg, RegDst = rt, RegWr, npc_sel = +4 STORE MEM[ R[rs] + sign_et(imm6)] < R[rs]; PC < PC + 4 ALUsrc = Im, Etop = Sn, ALUctr = add, MemWr, npc_sel = +4 BEQ if ( R[rs] == R[rt] ) then PC < PC + sign_et(imm6)] else PC < PC + 4 npc_sel = Br, ALUctr = sub

42 A Summary of the Control Signals See func We Don t Care :-) Appendi A op add sub ori lw sw beq jump RegDst ALUSrc MemtoReg RegWrite MemWrite npcsel Jump EtOp ALUctr<2:> Add Subtract Or Add Add Subtract R-type op rs rt rd shamt funct add, sub I-type op rs rt immediate ori, lw, sw, beq J-type op target address jump

43 The Concept of Local Decoding op R-type ori lw sw beq jump RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump EtOp ALUop<N:> R-type Or Add Add Subtract op 6 Main Control func 6 ALUop N ALU Control (Local) ALUctr 3 ALU

44 The Encoding of ALUop op 6 Main Control func 6 ALUop N ALU Control (Local) ALUctr 3 In this eercise, ALUop has to be 2 bits wide to represent: () R-type instructions I-type instructions that require the ALU to perform: - (2) Or, (3) Add, and (4) Subtract To implement the full MIPS ISA, ALUop has to be 3 bits to represent: () R-type instructions I-type instructions that require the ALU to perform: - (2) Or, (3) Add, (4) Subtract, and (5) And (Eample: andi) R-type ori lw sw beq jump ALUop (Symbolic) R-type Or Add Add Subtract ALUop<2:>

45 The Decoding of the func Field op 6 Main Control func 6 ALUop N ALU Control (Local) ALUctr 3 R-type ori lw sw beq jump ALUop (Symbolic) R-type Or Add Add Subtract ALUop<2:> R-type op rs rt rd shamt funct P. 286 tet: funct<5:> Instruction Operation add subtract and or set-on-less-than ALUctr ALU ALUctr<2:> ALU Operation And Or Add Subtract Set-on-less-than

46 The Truth Table for ALUctr ALUop R-type ori lw sw beq (Symbolic) R-type Or Add Add Subtract ALUop<2:> funct<3:> Instruction Op. add subtract and or set-on-less-than ALUop bit<2> bit<> bit<> bit<3> func bit<2> bit<> bit<> ALU Operation ALUctr bit<2> bit<> bit<> Add Subtract Or Add Subtract And Or Set on <

47 The Logic Equation for ALUctr<2> ALUop func bit<2> bit<> bit<> bit<3> bit<2> bit<> bit<> ALUctr<2> ALUctr<2> =!ALUop<2> & ALUop<> + This makes func<3> a don t care ALUop<2> &!func<2> & func<> &!func<>

48 The Logic Equation for ALUctr<> ALUop func bit<2> bit<> bit<> bit<3> bit<2> bit<> bit<> ALUctr<> ALUctr<> =!ALUop<2> &!ALUop<> +! ALUop<2> ALUop<> ALUop<> + ALUop<2> &!func<2> &!func<>

49 The Logic Equation for ALUctr<> ALUop func bit<2> bit<> bit<> bit<3> bit<2> bit<> bit<> ALUctr<> ALUctr<> =!ALUop<2> & ALUop<> + ALUop<2> &!func<3> & func<2> &!func<> & func<> + ALUop<2> & func<3> &!func<2> & func<> &!func<>

50 The ALU Control Block func 6 ALUop 3 ALU Control (Local) ALUctr 3 ALUctr<2> =!ALUop<2> & ALUop<> + ALUop<2> &!func<2> & func<> &!func<> ALUctr<> =!ALUop<2> &!ALUop<> + ALUop<2> &!func<2> &!func<> ALUctr<> =!ALUop<2> & ALUop<> + ALUop<2> &!func<3> & func<2> &!func<> & func<> + ALUop<2> & func<3> &!func<2> & func<> &!func<>

51 Step 5: Logic for each control signal npc_sel <= (OP == `BEQ)? `Br : `plus4; ALUsrc <= (OP == `ype)? `regb : `immed; ALUctr <= (OP == `ype`)? funct : (OP == `ORi)? `ORfunction : (OP == `BEQ)? `SUBfunction : `ADDfunction; EtOp <= MemWr <= MemtoReg <= RegWr: <= RegDst: <=

52 Step 5: Logic for each control signal npc_sel <= (OP == `BEQ)? `Br : `plus4; ALUsrc <= (OP == `ype)? `regb : `immed; ALUctr <= (OP == `ype`)? funct : (OP == `ORi)? `ORfunction : (OP == `BEQ)? `SUBfunction : `ADDfunction; EtOp <= (OP == `ORi) : `ZEROetend : `SIGNetend; MemWr <= (OP == `Store)? : ; MemtoReg <= (OP == `Load)? : ; RegWr: <= ((OP == `Store) (OP == `BEQ))? : ; RegDst: <= ((OP == `Load) (OP == `ORi))? : ;

53 The Truth Table for the Main Control op 6 Main Control RegDst ALUSrc : ALUop 3 func 6 ALU Control (Local) ALUctr 3 op R-type ori lw sw beq jump RegDst ALUSrc MemtoReg RegWrite MemWrite npc_sel Jump EtOp ALUop (Symbolic) R-type Or Add Add Subtract ALUop <2> ALUop <> ALUop <>

54 The Truth Table for RegWrite op R-type ori lw sw beq jump RegWrite RegWrite = R-type + ori + lw =!op<5> &!op<4> &!op<3> &!op<2> &!op<> &!op<> (R-type) +!op<5> &!op<4> & op<3> & op<2> &!op<> & op<> (ori) + op<5> &!op<4> &!op<3> &!op<2> & op<> & op<> (lw) op<5>. op<5> op<5>.. op<5>.. op<5>.. op<5>..... <> <> <> <> <> op<> R-type ori lw sw beq jump RegWrite

55 PLA Implementation of the Main Control op<5>. op<5> op<5>.. op<5>.. op<5>.. op<5>..... <> <> <> <> <> op<> R-type ori lw sw beq jump RegWrite ALUSrc RegDst MemtoReg MemWrite Branch Jump EtOp ALUop<2> ALUop<> ALUop<>

56 op 6 Instr<3:26> RegDst Putting it All Together: A Single Cycle Processor busw Main Control RegWr Rd imm6 Instr<5:> 5 5 Rs 5 Rw Ra Rb -bit Registers 6 ALUop RegDst ALUSrc : busb Etender busa EtOp 3 npc_sel ALUSrc Instruction Fetch Unit ALUctr func Instr<5:> 6 Data In ALU Zero Instruction<3:> ALU Control <2:25> WrEn Rs <6:2> MemWr Adr Data Memory ALUctr Rd <:5> 3 <:5> Imm6 MemtoReg

57 Net Address PC Recap: An Abstract View of the Critical Path (Load) Register file and ideal memory: The CLK input is a factor ONLY during write operation During read operation, behave as combinational logic: - Address valid => Output valid after access time. Ideal Instruction Memory Instruction Address Rd 5 Instruction Rs 5 5 Rw Ra Rb -bit Registers Imm 6 A B Critical Path (Load Operation) = PC s -to-q + Instruction Memory s Access Time + Register File s Access Time + ALU to Perform a -bit Add + Data Memory Access Time + Setup Time for Register File Write + Clock Skew ALU Data Address Data In Ideal Data Memory

58 Worst Case Timing (Load) PC Rs,, Rd, Op, Func ALUctr Old Value -to-q New Value Old Value Old Value Instruction Memory Access Time New Value Delay through Control Logic New Value EtOp Old Value New Value ALUSrc Old Value New Value MemtoReg Old Value New Value RegWr Old Value New Value busa busb Old Value Delay through Etender & Old Value Register Write Occurs Register File Access Time New Value New Value ALU Delay Address Old Value New Value Data Memory Access Time busw Old Value New

59 Drawback of this Single Cycle Processor Long cycle time: Cycle time must be long enough for the load instruction: PC s Clock -to-q + Instruction Memory Access Time + Register File Access Time + ALU Delay (address calculation) + Data Memory Access Time + Register File Setup Time + Clock Skew Cycle time for load is much longer than needed for all other instructions

60 Preview Net Time: MultiCycle Data Path CPI, CycleTime much shorter (~/5 of time)

61 Summary Single cycle datapath => CPI=, CCT => long 5 steps to design a processor. Analyze instruction set => datapath requirements 2. Select set of datapath components & establish clock methodology 3. Assemble datapath meeting the requirements 4. Analyze implementation of each instruction to determine setting of control points that effects the register transfer. 5. Assemble the control logic Control is the hard part MIPS makes control easier Instructions same size Source registers always in same place Immediates same size, location Operations always on registers/immediates Processor Control Datapath Memory Input Output

Review: MIPS Addressing Modes/Instruction Formats

Review: MIPS Addressing Modes/Instruction Formats Review: Addressing Modes Addressing mode Example Meaning Register Add R4,R3 R4 R4+R3 Immediate Add R4,#3 R4 R4+3 Displacement Add R4,1(R1) R4 R4+Mem[1+R1] Register indirect Add R4,(R1) R4 R4+Mem[R1] Indexed

More information

Computer organization

Computer organization Computer organization Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs

More information

Solutions. Solution 4.1. 4.1.1 The values of the signals are as follows:

Solutions. Solution 4.1. 4.1.1 The values of the signals are as follows: 4 Solutions Solution 4.1 4.1.1 The values of the signals are as follows: RegWrite MemRead ALUMux MemWrite ALUOp RegMux Branch a. 1 0 0 (Reg) 0 Add 1 (ALU) 0 b. 1 1 1 (Imm) 0 Add 1 (Mem) 0 ALUMux is the

More information

Computer Organization and Components

Computer Organization and Components Computer Organization and Components IS5, fall 25 Lecture : Pipelined Processors ssociate Professor, KTH Royal Institute of Technology ssistant Research ngineer, University of California, Berkeley Slides

More information

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic

Pipeline Hazards. Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by Arvind and Krste Asanovic 1 Pipeline Hazards Computer Science and Artificial Intelligence Laboratory M.I.T. Based on the material prepared by and Krste Asanovic 6.823 L6-2 Technology Assumptions A small amount of very fast memory

More information

Design of Digital Circuits (SS16)

Design of Digital Circuits (SS16) Design of Digital Circuits (SS16) 252-0014-00L (6 ECTS), BSc in CS, ETH Zurich Lecturers: Srdjan Capkun, D-INFK, ETH Zurich Frank K. Gürkaynak, D-ITET, ETH Zurich Labs: Der-Yeuan Yu dyu@inf.ethz.ch Website:

More information

Reduced Instruction Set Computer (RISC)

Reduced Instruction Set Computer (RISC) Reduced Instruction Set Computer (RISC) Focuses on reducing the number and complexity of instructions of the ISA. RISC Goals RISC: Simplify ISA Simplify CPU Design Better CPU Performance Motivated by simplifying

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek Instruction Set Architecture or How to talk to computers if you aren t in Star Trek The Instruction Set Architecture Application Compiler Instr. Set Proc. Operating System I/O system Instruction Set Architecture

More information

Chapter 9 Computer Design Basics!

Chapter 9 Computer Design Basics! Logic and Computer Design Fundamentals Chapter 9 Computer Design Basics! Part 2 A Simple Computer! Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode)

More information

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1

Pipeline Hazards. Structure hazard Data hazard. ComputerArchitecture_PipelineHazard1 Pipeline Hazards Structure hazard Data hazard Pipeline hazard: the major hurdle A hazard is a condition that prevents an instruction in the pipe from executing its next scheduled pipe stage Taxonomy of

More information

Design of Pipelined MIPS Processor. Sept. 24 & 26, 1997

Design of Pipelined MIPS Processor. Sept. 24 & 26, 1997 Design of Pipelined MIPS Processor Sept. 24 & 26, 1997 Topics Instruction processing Principles of pipelining Inserting pipe registers Data Hazards Control Hazards Exceptions MIPS architecture subset R-type

More information

Introducción. Diseño de sistemas digitales.1

Introducción. Diseño de sistemas digitales.1 Introducción Adapted from: Mary Jane Irwin ( www.cse.psu.edu/~mji ) www.cse.psu.edu/~cg431 [Original from Computer Organization and Design, Patterson & Hennessy, 2005, UCB] Diseño de sistemas digitales.1

More information

16-bit ALU, Register File and Memory Write Interface

16-bit ALU, Register File and Memory Write Interface CS M152B Fall 2002 Project 2 16-bit ALU, Register File and Memory Write Interface Suggested Due Date: Monday, October 21, 2002 Actual Due Date determined by your Lab TA This project will take much longer

More information

Instruction Set Design

Instruction Set Design Instruction Set Design Instruction Set Architecture: to what purpose? ISA provides the level of abstraction between the software and the hardware One of the most important abstraction in CS It s narrow,

More information

Instruction Set Architecture

Instruction Set Architecture Instruction Set Architecture Consider x := y+z. (x, y, z are memory variables) 1-address instructions 2-address instructions LOAD y (r :=y) ADD y,z (y := y+z) ADD z (r:=r+z) MOVE x,y (x := y) STORE x (x:=r)

More information

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59

COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59 COMP 303 MIPS Processor Design Project 4: MIPS Processor Due Date: 11 December 2009 23:59 Overview: In the first projects for COMP 303, you will design and implement a subset of the MIPS32 architecture

More information

The 104 Duke_ACC Machine

The 104 Duke_ACC Machine The 104 Duke_ACC Machine The goal of the next two lessons is to design and simulate a simple accumulator-based processor. The specifications for this processor and some of the QuartusII design components

More information

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language 198:211 Computer Architecture Topics: Processor Design Where are we now? C-Programming A real computer language Data Representation Everything goes down to bits and bytes Machine representation Language

More information

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on CS 61C: Great Ideas in Computer Architecture Finite State Machines Instructors: Krste Asanovic & Vladimir Stojanovic hbp://inst.eecs.berkeley.edu/~cs61c/sp15 1 Levels of RepresentaKon/ InterpretaKon High

More information

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100)

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100) EE282 Computer Architecture and Organization Midterm Exam February 13, 2001 (Total Time = 120 minutes, Total Points = 100) Name: (please print) Wolfe - Solution In recognition of and in the spirit of the

More information

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats

Execution Cycle. Pipelining. IF and ID Stages. Simple MIPS Instruction Formats Execution Cycle Pipelining CSE 410, Spring 2005 Computer Systems http://www.cs.washington.edu/410 1. Instruction Fetch 2. Instruction Decode 3. Execute 4. Memory 5. Write Back IF and ID Stages 1. Instruction

More information

CSE 141 Introduction to Computer Architecture Summer Session I, 2005. Lecture 1 Introduction. Pramod V. Argade June 27, 2005

CSE 141 Introduction to Computer Architecture Summer Session I, 2005. Lecture 1 Introduction. Pramod V. Argade June 27, 2005 CSE 141 Introduction to Computer Architecture Summer Session I, 2005 Lecture 1 Introduction Pramod V. Argade June 27, 2005 CSE141: Introduction to Computer Architecture Instructor: Pramod V. Argade (p2argade@cs.ucsd.edu)

More information

Generating MIF files

Generating MIF files Generating MIF files Introduction In order to load our handwritten (or compiler generated) MIPS assembly problems into our instruction ROM, we need a way to assemble them into machine language and then

More information

CS352H: Computer Systems Architecture

CS352H: Computer Systems Architecture CS352H: Computer Systems Architecture Topic 9: MIPS Pipeline - Hazards October 1, 2009 University of Texas at Austin CS352H - Computer Systems Architecture Fall 2009 Don Fussell Data Hazards in ALU Instructions

More information

Central Processing Unit (CPU)

Central Processing Unit (CPU) Central Processing Unit (CPU) CPU is the heart and brain It interprets and executes machine level instructions Controls data transfer from/to Main Memory (MM) and CPU Detects any errors In the following

More information

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010 Instruction Set Architecture Micro-architecture Datapath & Control CIT 595 Spring 2010 ISA =Programmer-visible components & operations Memory organization Address space -- how may locations can be addressed?

More information

Memory Elements. Combinational logic cannot remember

Memory Elements. Combinational logic cannot remember Memory Elements Combinational logic cannot remember Output logic values are function of inputs only Feedback is needed to be able to remember a logic value Memory elements are needed in most digital logic

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 9 - Register Transfer and Microoperations Microoperations Digital systems are modular in nature, with modules containing registers, decoders, arithmetic

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture : Microprogrammed Control Microprogramming The control unit is responsible for initiating the sequence of microoperations that comprise instructions.

More information

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

A s we saw in Chapter 4, a CPU contains three main sections: the register section, 6 CPU Design A s we saw in Chapter 4, a CPU contains three main sections: the register section, the arithmetic/logic unit (ALU), and the control unit. These sections work together to perform the sequences

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

WAR: Write After Read

WAR: Write After Read WAR: Write After Read write-after-read (WAR) = artificial (name) dependence add R1, R2, R3 sub R2, R4, R1 or R1, R6, R3 problem: add could use wrong value for R2 can t happen in vanilla pipeline (reads

More information

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s) Addressing The problem Objectives:- When & Where do we encounter Data? The concept of addressing data' in computations The implications for our machine design(s) Introducing the stack-machine concept Slide

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of CS:APP Chapter 4 Computer Architecture Wrap-Up William J. Taffe Plymouth State University using the slides of Randal E. Bryant Carnegie Mellon University Overview Wrap-Up of PIPE Design Performance analysis

More information

Chapter 2 Logic Gates and Introduction to Computer Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture Chapter 2 Logic Gates and Introduction to Computer Architecture 2.1 Introduction The basic components of an Integrated Circuit (IC) is logic gates which made of transistors, in digital system there are

More information

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC

Chapter 2 Topics. 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC Chapter 2 Topics 2.1 Classification of Computers & Instructions 2.2 Classes of Instruction Sets 2.3 Informal Description of Simple RISC Computer, SRC See Appendix C for Assembly language information. 2.4

More information

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions CS101 Lecture 26: Low Level Programming John Magee 30 July 2013 Some material copyright Jones and Bartlett 1 Overview/Questions What did we do last time? How can we control the computer s circuits? How

More information

A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education

A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education A FPGA Implementation of a MIPS RISC Processor for Computer Architecture Education By: Victor P. Rubio, B.S. vrubio@gauss.nmsu.edu Advisor: Dr. Jeanine Cook jecook@gauss.nmsu.edu New Mexico State University

More information

150127-Microprocessor & Assembly Language

150127-Microprocessor & Assembly Language Chapter 3 Z80 Microprocessor Architecture The Z 80 is one of the most talented 8 bit microprocessors, and many microprocessor-based systems are designed around the Z80. The Z80 microprocessor needs an

More information

CPU Organization and Assembly Language

CPU Organization and Assembly Language COS 140 Foundations of Computer Science School of Computing and Information Science University of Maine October 2, 2015 Outline 1 2 3 4 5 6 7 8 Homework and announcements Reading: Chapter 12 Homework:

More information

Assembly Language Programming

Assembly Language Programming Assembly Language Programming Assemblers were the first programs to assist in programming. The idea of the assembler is simple: represent each computer instruction with an acronym (group of letters). Eg:

More information

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995 UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering EEC180B Lab 7: MISP Processor Design Spring 1995 Objective: In this lab, you will complete the design of the MISP processor,

More information

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,

More information

Preface. Any questions from last time? A bit more motivation, information about me. A bit more about this class. Later: Will review 1st 22 slides

Preface. Any questions from last time? A bit more motivation, information about me. A bit more about this class. Later: Will review 1st 22 slides Preface Any questions from last time? Will review 1st 22 slides A bit more motivation, information about me Research ND A bit more about this class Microsoft Later: HW 1 Review session MD McNally about

More information

Giving credit where credit is due

Giving credit where credit is due CSCE 230J Computer Organization Processor Architecture VI: Wrap-Up Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due ost of slides for

More information

LSN 2 Computer Processors

LSN 2 Computer Processors LSN 2 Computer Processors Department of Engineering Technology LSN 2 Computer Processors Microprocessors Design Instruction set Processor organization Processor performance Bandwidth Clock speed LSN 2

More information

A SystemC Transaction Level Model for the MIPS R3000 Processor

A SystemC Transaction Level Model for the MIPS R3000 Processor SETIT 2007 4 th International Conference: Sciences of Electronic, Technologies of Information and Telecommunications March 25-29, 2007 TUNISIA A SystemC Transaction Level Model for the MIPS R3000 Processor

More information

Memory ICS 233. Computer Architecture and Assembly Language Prof. Muhamed Mudawar

Memory ICS 233. Computer Architecture and Assembly Language Prof. Muhamed Mudawar Memory ICS 233 Computer Architecture and Assembly Language Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals Presentation Outline Random

More information

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern: Pipelining HW Q. Can a MIPS SW instruction executing in a simple 5-stage pipelined implementation have a data dependency hazard of any type resulting in a nop bubble? If so, show an example; if not, prove

More information

EECS 427 RISC PROCESSOR

EECS 427 RISC PROCESSOR RISC PROCESSOR ISA FOR EECS 427 PROCESSOR ImmHi/ ImmLo/ OP Code Rdest OP Code Ext Rsrc Mnemonic Operands 15-12 11-8 7-4 3-0 Notes (* is Baseline) ADD Rsrc, Rdest 0000 Rdest 0101 Rsrc * ADDI Imm, Rdest

More information

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1

MICROPROCESSOR. Exclusive for IACE Students www.iace.co.in iacehyd.blogspot.in Ph: 9700077455/422 Page 1 MICROPROCESSOR A microprocessor incorporates the functions of a computer s central processing unit (CPU) on a single Integrated (IC), or at most a few integrated circuit. It is a multipurpose, programmable

More information

İSTANBUL AYDIN UNIVERSITY

İSTANBUL AYDIN UNIVERSITY İSTANBUL AYDIN UNIVERSITY FACULTY OF ENGİNEERİNG SOFTWARE ENGINEERING THE PROJECT OF THE INSTRUCTION SET COMPUTER ORGANIZATION GÖZDE ARAS B1205.090015 Instructor: Prof. Dr. HASAN HÜSEYİN BALIK DECEMBER

More information

MICROPROCESSOR AND MICROCOMPUTER BASICS

MICROPROCESSOR AND MICROCOMPUTER BASICS Introduction MICROPROCESSOR AND MICROCOMPUTER BASICS At present there are many types and sizes of computers available. These computers are designed and constructed based on digital and Integrated Circuit

More information

Lecture Outline. Stack machines The MIPS assembly language. Code Generation (I)

Lecture Outline. Stack machines The MIPS assembly language. Code Generation (I) Lecture Outline Code Generation (I) Stack machines The MIPS assembl language Adapted from Lectures b Profs. Ale Aiken and George Necula (UCB) A simple source language Stack- machine implementation of the

More information

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches: Multiple-Issue Processors Pipelining can achieve CPI close to 1 Mechanisms for handling hazards Static or dynamic scheduling Static or dynamic branch handling Increase in transistor counts (Moore s Law):

More information

PART B QUESTIONS AND ANSWERS UNIT I

PART B QUESTIONS AND ANSWERS UNIT I PART B QUESTIONS AND ANSWERS UNIT I 1. Explain the architecture of 8085 microprocessor? Logic pin out of 8085 microprocessor Address bus: unidirectional bus, used as high order bus Data bus: bi-directional

More information

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path Project Summary This project involves the schematic and layout design of an 8-bit microprocessor data

More information

In the Beginning... 1964 -- The first ISA appears on the IBM System 360 In the good old days

In the Beginning... 1964 -- The first ISA appears on the IBM System 360 In the good old days RISC vs CISC 66 In the Beginning... 1964 -- The first ISA appears on the IBM System 360 In the good old days Initially, the focus was on usability by humans. Lots of user-friendly instructions (remember

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

Where we are CS 4120 Introduction to Compilers Abstract Assembly Instruction selection mov e1 , e2 jmp e cmp e1 , e2 [jne je jgt ] l push e1 call e

Where we are CS 4120 Introduction to Compilers Abstract Assembly Instruction selection mov e1 , e2 jmp e cmp e1 , e2 [jne je jgt ] l push e1 call e 0/5/03 Where we are CS 0 Introduction to Compilers Ross Tate Cornell University Lecture 8: Instruction Selection Intermediate code synta-directed translation reordering with traces Canonical intermediate

More information

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2 CSE 141L Computer Architecture Lab Fall 2003 Lecture 2 Pramod V. Argade CSE141L: Computer Architecture Lab Instructor: TA: Readers: Pramod V. Argade (p2argade@cs.ucsd.edu) Office Hour: Tue./Thu. 9:30-10:30

More information

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.

Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9. Code Generation I Stack machines The MIPS assembly language A simple source language Stack-machine implementation of the simple language Readings: 9.1-9.7 Stack Machines A simple evaluation model No variables

More information

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill Objectives: Analyze the operation of sequential logic circuits. Understand the operation of digital counters.

More information

Lecture: Pipelining Extensions. Topics: control hazards, multi-cycle instructions, pipelining equations

Lecture: Pipelining Extensions. Topics: control hazards, multi-cycle instructions, pipelining equations Lecture: Pipelining Extensions Topics: control hazards, multi-cycle instructions, pipelining equations 1 Problem 6 Show the instruction occupying each stage in each cycle (with bypassing) if I1 is R1+R2

More information

Winter 2002 MID-SESSION TEST Friday, March 1 6:30 to 8:00pm

Winter 2002 MID-SESSION TEST Friday, March 1 6:30 to 8:00pm University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Instructors: Dr. S. A. Norman (L01) and Dr. S. Yanushkevich (L02) Winter 2002 MID-SESSION TEST Friday,

More information

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands Ben Bruidegom, benb@science.uva.nl AMSTEL Instituut Universiteit van Amsterdam Kruislaan 404 NL-1098 SM Amsterdam

More information

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization David Sullins, Dr. Hardy Pottinger, Dr. Daryl Beetner University of Missouri Rolla Session I.

More information

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present

More information

EE361: Digital Computer Organization Course Syllabus

EE361: Digital Computer Organization Course Syllabus EE361: Digital Computer Organization Course Syllabus Dr. Mohammad H. Awedh Spring 2014 Course Objectives Simply, a computer is a set of components (Processor, Memory and Storage, Input/Output Devices)

More information

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.1 Objectives To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC. 8.2 Introduction Circuits for counting events are frequently used in computers and other digital

More information

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 195 4.2 CPU Basics and Organization 195 4.2.1 The Registers 196 4.2.2 The ALU 197 4.2.3 The Control Unit 197 4.3 The Bus 197 4.4 Clocks

More information

PROBLEMS #20,R0,R1 #$3A,R2,R4

PROBLEMS #20,R0,R1 #$3A,R2,R4 506 CHAPTER 8 PIPELINING (Corrisponde al cap. 11 - Introduzione al pipelining) PROBLEMS 8.1 Consider the following sequence of instructions Mul And #20,R0,R1 #3,R2,R3 #$3A,R2,R4 R0,R2,R5 In all instructions,

More information

Translating C code to MIPS

Translating C code to MIPS Translating C code to MIPS why do it C is relatively simple, close to the machine C can act as pseudocode for assembler program gives some insight into what compiler needs to do what's under the hood do

More information

EC 362 Problem Set #2

EC 362 Problem Set #2 EC 362 Problem Set #2 1) Using Single Precision IEEE 754, what is FF28 0000? 2) Suppose the fraction enhanced of a processor is 40% and the speedup of the enhancement was tenfold. What is the overall speedup?

More information

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 2 Basic Structure of Computers Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Functional Units Basic Operational Concepts Bus Structures Software

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

PROBLEMS. which was discussed in Section 1.6.3.

PROBLEMS. which was discussed in Section 1.6.3. 22 CHAPTER 1 BASIC STRUCTURE OF COMPUTERS (Corrisponde al cap. 1 - Introduzione al calcolatore) PROBLEMS 1.1 List the steps needed to execute the machine instruction LOCA,R0 in terms of transfers between

More information

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

Intel 8086 architecture

Intel 8086 architecture Intel 8086 architecture Today we ll take a look at Intel s 8086, which is one of the oldest and yet most prevalent processor architectures around. We ll make many comparisons between the MIPS and 8086

More information

CPU Organisation and Operation

CPU Organisation and Operation CPU Organisation and Operation The Fetch-Execute Cycle The operation of the CPU 1 is usually described in terms of the Fetch-Execute cycle. 2 Fetch-Execute Cycle Fetch the Instruction Increment the Program

More information

TIMING DIAGRAM O 8085

TIMING DIAGRAM O 8085 5 TIMING DIAGRAM O 8085 5.1 INTRODUCTION Timing diagram is the display of initiation of read/write and transfer of data operations under the control of 3-status signals IO / M, S 1, and S 0. As the heartbeat

More information

Combinational Logic Design Process

Combinational Logic Design Process Combinational Logic Design Process Create truth table from specification Generate K-maps & obtain logic equations Draw logic diagram (sharing common gates) Simulate circuit for design verification Debug

More information

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

THUMB Instruction Set

THUMB Instruction Set 5 THUMB Instruction Set This chapter describes the THUMB instruction set. Format Summary 5-2 Opcode Summary 5-3 5. Format : move shifted register 5-5 5.2 Format 2: add/subtract 5-7 5.3 Format 3: move/compare/add/subtract

More information

MIPS Assembler and Simulator

MIPS Assembler and Simulator MIPS Assembler and Simulator Reference Manual Last Updated, December 1, 2005 Xavier Perséguers (ing. info. dipl. EPF) Swiss Federal Institude of Technology xavier.perseguers@a3.epfl.ch Preface MIPS Assembler

More information

Summary of the MARIE Assembly Language

Summary of the MARIE Assembly Language Supplement for Assignment # (sections.8 -. of the textbook) Summary of the MARIE Assembly Language Type of Instructions Arithmetic Data Transfer I/O Branch Subroutine call and return Mnemonic ADD X SUBT

More information

BASIC COMPUTER ORGANIZATION AND DESIGN

BASIC COMPUTER ORGANIZATION AND DESIGN 1 BASIC COMPUTER ORGANIZATION AND DESIGN Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions Input-Output and Interrupt Complete

More information

Lecture-3 MEMORY: Development of Memory:

Lecture-3 MEMORY: Development of Memory: Lecture-3 MEMORY: It is a storage device. It stores program data and the results. There are two kind of memories; semiconductor memories & magnetic memories. Semiconductor memories are faster, smaller,

More information

Understanding Verilog Blocking and Non-blocking Assignments

Understanding Verilog Blocking and Non-blocking Assignments Understanding Verilog Blocking and Non-blocking Assignments International Cadence User Group Conference September 11, 1996 presented by Stuart HDL Consulting About the Presenter Stuart has over 8 years

More information

CSE140: Components and Design Techniques for Digital Systems. Introduction. Prof. Tajana Simunic Rosing

CSE140: Components and Design Techniques for Digital Systems. Introduction. Prof. Tajana Simunic Rosing CSE4: Components and Design Techniques for Digital Systems Introduction Prof. Tajana Simunic Rosing Welcome to CSE 4! Instructor: Tajana Simunic Rosing Email: tajana@ucsd.edu; please put CSE4 in the subject

More information

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers Chapter 01: Introduction Lesson 02 Evolution of Computers Part 2 First generation Computers Objective Understand how electronic computers evolved during the first generation of computers First Generation

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: omputer Organization and Architecture Lecture 8: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store

More information

A Lab Course on Computer Architecture

A Lab Course on Computer Architecture A Lab Course on Computer Architecture Pedro López José Duato Depto. de Informática de Sistemas y Computadores Facultad de Informática Universidad Politécnica de Valencia Camino de Vera s/n, 46071 - Valencia,

More information

Central Processing Unit

Central Processing Unit Chapter 4 Central Processing Unit 1. CPU organization and operation flowchart 1.1. General concepts The primary function of the Central Processing Unit is to execute sequences of instructions representing

More information

ASYNCHRONOUS COUNTERS

ASYNCHRONOUS COUNTERS LB no.. SYNCHONOUS COUNTES. Introduction Counters are sequential logic circuits that counts the pulses applied at their clock input. They usually have 4 bits, delivering at the outputs the corresponding

More information

Typy danych. Data types: Literals:

Typy danych. Data types: Literals: Lab 10 MIPS32 Typy danych Data types: Instructions are all 32 bits byte(8 bits), halfword (2 bytes), word (4 bytes) a character requires 1 byte of storage an integer requires 1 word (4 bytes) of storage

More information

Reusable Application-Dependent Machine Descriptions

Reusable Application-Dependent Machine Descriptions Reprinted from Workshop on Compiler Support for System Software, February 1996. Reusable Application-Dependent Machine Descriptions Mark W. Bailey Jack W. Davidson Department of Computer Science University

More information