Hardware Design Tips. Outline

Size: px
Start display at page:

Download "Hardware Design Tips. Outline"

Transcription

1 Hardware Design Tips EE 36 University of Hawaii EE 36 Fall 23 University of Hawaii Otline Verilog: some sbleties Simlators Test Benching Implementing the IPS Actally a simplified 6 bit version EE 36 Fall 23 University of Hawaii 2

2 onday Overview of verilog, again Implementing combinational circits sing verilog Rles to avoid problems EE 36 Fall 23 University of Hawaii 3 Verilog Basic modle Combinational sbcircits Seqential sbcircits (on wed) EE 36 Fall 23 University of Hawaii 4 2

3 Verilog: Basic odle modle circitname(y,y2,clock,reset,select,,2,3) otpt y,y2; inpt clock, reset; inpt select,, 2, 3; wire h,h2,h3; reg k,k2; otpts: only wire variables // Instantiations Circit circit(h,h2,clock,h3,5,k,k2); modle inpts: wire vars, reg variables, constants EE 36 Fall 23 University of Hawaii 5 Combinational Circits Continos assign Procedral always Rles Eamples of errors ore rles EE 36 Fall 23 University of Hawaii 6 3

4 Verilog: Combinational Sbcircits 2 3 Combinational sbcircit y Continos assign assign y = ; wire var Formla ( no begin- blocks, if-else, case statements, or anything else) EE 36 Fall 23 University of Hawaii 7 Verilog: Combinational Sbcircits Procedral always or 2 or or k) A description of how to compte otpts from the inpts Eample: or 2) y = ; Sensitivity List Rle of thmb: List of all inpts From this description yo shold be able to write a trth table for the circit Be sre the table is complete, i.e., it covers all possible inpts OR For all inpt vales, there shold be an otpt vale EE 36 Fall 23 University of Hawaii 8 4

5 Eample: missing an inpt in // 2: mltipleer the sensitivity list // 2: mltipleer modle m(y, sel, a, b) inpt a, b, sel; otpt y; always (a or b or sel) begin if (sel == ) y = a; else y = b; modle modle m(y, sel, a, b) inpt a, b, sel; otpt y; always (a or b) begin if (sel == ) y = a; else y = b; modle Case of missing an inpt ( sel ) in the sensitivity list. EE 36 Fall 23 University of Hawaii 9 Eample: otpts are not defined for all inpts // 2: mltipleer modle m(y, sel, a, b) inpt a, b, sel; otpt y; always (a or b or sel) begin if (sel == ) y = a; else y = b; modle // 2: mltipleer modle m(y, sel, a, b) inpt a, b, sel; otpt y; always (a or b or sel) begin if (sel == ) y = a; modle Case of not pdating y for all inpts Possible hardware implementation a It s a transparent D latch 2: m sel y EE 36 Fall 23 University of Hawaii 5

6 Comptation proceeds downwards (jst like C langage) Variables inpts:, 2, s otpt: y intermediate vale: h Net, we ll present some rles to se procedral always to model combinational circits Eample or 2 or s) begin if (s == ) h = ; else h = ; case(h) : y = 2; // AND the inpts : y = &2; // OR the inpts case Trth table for circit Inpt Otpt s 2 y EE 36 Fall 23 University of Hawaii Rles for procedral-always to model combinational circits Assignments y = ; reg variable Blocking assignment (we ll discss blocking and nonblocking assignments shortly) Note that the left hand side is always an otpt or intermediate variable EE 36 Fall 23 University of Hawaii 2 6

7 Rles for procedral-always to model combinational circits Update variables at most once or 2) begin y = + 2; if (y > 4) y = ; else y = 2; or 2) begin r = + 2; if (r > 4) y = ; else y = 2; y cold be pdated more than once BUT otpts sholdn t change twice when inpts change We introdced a new reg variable r. Now r and y are pdated at most once. EE 36 Fall 23 University of Hawaii 3 Rles for procedral-always to model combinational circits or 2) begin blocking assigments (e.g., y = +2;) if-else case statements modle... or 2) begin Circit circ(y,,2); This won t work. A modle is not modle a C fnction. modle Circit(h,g,g2) otpt h; inpt g, g2 assign h=g+g2; modle EE 36 Fall 23 University of Hawaii 4 7

8 Some rles to design combinational circits with always Sensitivity list shold have all inpts Otpts shold have vales for all possible inpts Variables that are pdated (left side of blocking assignments) shold be a register variable Update each variable at most once per change in inpt. odle instantiations are not C fnction calls Use blocking assignments, case, if-else, maybe others sch as for bt be carefl. EE 36 Fall 23 University of Hawaii 5 Wednesday Seqential circits with verilog Electronic Design Atomation (EDA) EE 36 Fall 23 University of Hawaii 6 8

9 Seqential Circits Procedral always Eamples Nonblocking and blocking assignments EE 36 Fall 23 University of Hawaii 7 Rles for procedral-always to model seqential circits 2 3 state clock y y2 clock) Update the state = state we ll assme this Eample: D flip flop clock) q <= d; Eample: T flip flop clock) if (t == ) q <= ~q; state vars are reg vars. nonblocking assignments EE 36 Fall 23 University of Hawaii 8 9

10 Nonblocking Assignments clock A B C D Q D Q D Q All flip flops get pdated together on a positive clock clock clock clock edge. clock) begin A <= ; B <= A; C <= B; All nonblocking assignments are pdated together on the positive edge of the clock. Eample A B C D Q D Q D Q A B C D Q D Q D Q clock clock clock clock clock clock clock clock After clock edge Before clock edge EE 36 Fall 23 University of Hawaii 9 Nonblocking Assignments A B C D Q D Q D Q clock clock clock clock Sppose initially (A,B,C) = (,,) begin A <= ; B <= A; C <= B; begin A = ; B = A; C = B; (A,B,C) = (,,) (A,B,C) = (,,) EE 36 Fall 23 University of Hawaii 2

11 Eample: 2-bit conter d[] d[] s[] s[] clock q[] q[] modle conter2(q,clock,s,d) ot [:] q; // 2-bit otpt in clock; s [:] s; // Select inpt in [:] d; // Parallel load inpt s = : reset q = s = : cont p s = 2: cont down s = 3: load reg [:] q; // This is or state variable clock) begin case (s) : q<=; : q<=q+; // Conting p. Note that the cont wraps arond // when it goes past the vale 3 2: q<=q-; // Conting down. Also has wrap arond 3: q<=d; // Parallel load case // Actally, the begin- is nnecessary modle EE 36 Fall 23 University of Hawaii 2 Eample: Lights s[] s[] clock y[3] y[2] y[] y[] modle Lights(y,clock,s,d) ot [3:] y; // 4-bit otpt in clock; s [:] s; // Select inpt in [:] d; // Parallel load inpt s = : reset y= s = : rotate right s = 2: rotate left s = 3: hold reg [:] q; // This is or state variable clock) begin case (s) : q<=; : q<=q+; // Conting p. Note that the cont wraps arond // when it goes past the vale 3 2: q<=q-; // Conting down. Also has wrap arond 3: q<=q; // Hold case // Actally, the begin- is nnecessary // Contined EE 36 Fall 23 University of Hawaii 22

12 Eample: Lights s[] s[] clock y[3] y[2] y[] y[] // Contined case (q) : y=4 b; : y=4 b; 2: y=4 b; 3: y=4 b; case modle s = : reset y= s = : rotate right s = 2: rotate left s = 3: hold EE 36 Fall 23 University of Hawaii 23 Electronic Design Atomation Simlator EDA process Test bench EE 36 Fall 23 University of Hawaii 24 2

13 Simlators, e.g., veriwell and odelsim Simlator will simlate what a circit will do over time. Time is divided into time nits (fictitios) bt yo can think of them as some small time dration, e.g.,.ns A variable keeps track of the crrent time (e.g., $time) Initially, crrent time = (or ) Update variable vales at time based pon vales at time Update variable vales at time 2 based pon vales at time and so on. EE 36 Fall 23 University of Hawaii 25 Eample $time = $time = new vale based on $time = 2 EE 36 Fall 23 University of Hawaii 26 3

14 Simlator verilog circit modle verilog testbench modle synthesizer project hardware simlator verify that yor circit works (debgging) EE 36 Fall 23 University of Hawaii 27 Test Bench Protoboard 5V Gnd IC Chip Clock Generator LEDs (probes) inpts to ecite the circit otpts to observe behavior EE 36 Fall 23 University of Hawaii 28 4

15 modle testbench; reg clock; reg [:] A; reg [2:] B; wire [2:] C; // Clock signal // Inpts A and B to ecite // Otpt C to observe icchip c(a,b,c,clock); // Instantiation of the circit to test init clock = ; // Clock generation, with clock period = 2 time nits always # clock = ~clock; init // Changing inpts to ecite icchip c begin: Inpt vales for testing A = ; B = ; #2 A = ; // After 2 time nits, A is changed to. # B = 3; // After another time nit, B changes to 3. #2 $stop; // After 2 more time nits, the simlation stops init // Display of otpts begin: Display $display("a B C clock time"); // Displayed once at $time = $monitor("%d %d %d %d %d",a,b,c,clock,$time); // Displayed whenever variable changes // Note that $monitor can occr at most once in verilog code // while $display can occr many times. modle EE 36 Fall 23 University of Hawaii 29 Friday Bilding single cycle IPS naive way IPS-L: 6 bit version of IPS Bild it in stages IPS-L: eectes only R-type instrctions Tips on testing and debgging IPS-L, L2, L3 EE 36 Fall 23 University of Hawaii 3 5

16 Bilding Single Cycle IPS How NOT to bild a single cycle IPS in verilog.. Bild all the components in verilog. 2. Test/debg each component 3. Pt everything together into the single cycle IPS 4. Simlate --> synta errors 5. Fi synta errors, and then simlate --> 6. Hmmm. aybe I m nlcky. Simlate again. 7. Hmmm. st be the simlator. Reset PC. Simlate again. 8. Problem too hard -- it s a complicated compter after all First three steps are okay. Bt need improvement after that. EE 36 Fall 23 University of Hawaii 3 IPS-L To eperience bilding a moderately large circit, yo will bild a IPS compter Homework A and B IPS-L: 6 bit version of IPS Description Simplified version IPS-L Only R-type arithmetic instrctions odified register file: RegFileL EE 36 Fall 23 University of Hawaii 32 6

17 IPS-L Description Instrctions (and integer ) are 6 bits long Word = 6 bits Addresses are 6 bits Eight general prpose registers $-$7 $ is always eqal to emory is byte-addressable and big Endian Addresses of words are divisible by 2 EE 36 Fall 23 University of Hawaii 33 IPS-L Register Convention Name $zero Register Nmber Usage the constant Preserved on call? n.a. $v-$v $t-$t vales for reslts and epression evalation temporaries No No $sp 6 stack pointer Yes $ra 7 retrn address No EE 36 Fall 23 University of Hawaii 34 7

18 IPS-L Instrction Formats Name Fields Comments Field Size 3 bits 3 bits 3 bits 3 bits 4 bits ALL IPS-L instrctions 6 bits R- format op rs rt rd fnct Arithmetic instrction format I- format op rs rt rd Address/ immediate Transfer, branch, immediate format J- format op target address Jmp instrction format EE 36 Fall 23 University of Hawaii 35 IPS-L achine Instrctions Name Format Eample Comments add R 3 bits 3 bits 2 3 bits 3 3 bits 4 bits add $,$2,$3 sb R 2 3 sb $,$2,$3 and R and $,$2,$3 or R or $,$2,$3 slt jr R R slt $,$2,$3 jr $7 lw I 4 2 lw $,($2) sw I 5 2 sw $,($2) beq I 6 2 (offset to )/2 beq $,$, addi j I J addi $,$2, j jal J 3 5 jal EE 36 Fall 23 University of Hawaii 36 8

19 Single Cycle IPS-L Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add RegDst Jmp Branch Shift left 2 Instrction [3 26] Control em emtoreg Op em Src Reg PC address Instrction [3 ] Instrction memory This thing s got a cycle in it. Not good. Bild it in stages Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] register register 2 Registers register Instrction [5 ] EE 36 Fall 23 University of Hawaii Sign et control Zero reslt Address Data memory The following is JUST A SUGGESTION IPS-L Something even simpler: IPS-L Only eectes R format arithmetic instrctions Register File RegFileL Register $5 = always Register $4 = 2 always Control: Same as IPS-L EE 36 Fall 23 University of Hawaii 38 9

20 IPS-L Instrction emory (RO) iaddr i IPS-L alot alina alinb reset clock Used to verify correctness Everything is 6 bits ecept reset and clock EE 36 Fall 23 University of Hawaii 39 IPS-L Describe IPS-L Eample Program emory Eample testbench General testbench of simple combination circits Bilding Single Cycle IPS-L Pre IPS-L, yet even simpler Debgging tips Bilding Single Cycle IPS-L EE 36 Fall 23 University of Hawaii 4 2

21 reset clock IPS-L iaddr i (instrction) PC + 4 Reg= r2 r3 r RegFileL alina alot alinb Op=2 Control EE 36 Fall 23 University of Hawaii 4 Eample Instrction emory // Instrction memory // Program has only 8 instrctions modle I(addr, dot) inpt [5:] addr; dot [5:] dot; reg [5:] dot; case (addr[3:]) : dot = {3 d,3 d4,3 d5,3 d3,4 d} // add $3,$4,$5 : dot = // sb $2,$4,$5 2: dot = // slt $,$4,$5 3: dot = // and $,$3,$5 4: dot = // slt $,$4,$3 5: dot = // sb $,$3,$5 6: dot = // add $3,$,$2 7: dot = // add $3,$5,$ case modle EE 36 Fall 23 University of Hawaii 42 2

22 Eample Testbench // Testbench for program memory modle testbench_memory reg [5:] addr; wire [5:] dot; I pmem(addr, dot); // Instantiation of memory initial begin // Drive the memory addr = ; #2 addr = 2; #2 addr = 4;... #2 addr = 4; #2 $stop; initial begin // Display the otpts $monitor( time = %d, addr=%d, instr=(%d,%d,%d,%d,%d),$time,addr,dot[5:3],... modle EE 36 Fall 23 University of Hawaii 43 Simple Testbenches Declare reg variables to drive inpts Declare wire variables to tap into otpts and connect circits Clock generator signal (if necessary) Set p circit with instantiations and possible connections Initial procedre to change inpt signals over time (se delays # and $stop) Initial procedre to otpt reslts EE 36 Fall 23 University of Hawaii 44 22

23 Bilding IPS-L Bild the components and test Instrction memory Control Register file RegFileL Bild and test a Pre-IPS-L (see net slide) Bild and test a IPS-L (finally!) EE 36 Fall 23 University of Hawaii 45 reset clock Pre IPS-L iaddr i (instrction) PC is an arbitrary nmber 9 Reg= r2 r3 r RegFileL Op=2 Control alina alot alinb We got rid of the cycle EE 36 Fall 23 University of Hawaii 46 23

24 Pre IPS-L What do we gain by removing the cycle? If there s a bg, we can find it by tracing backwards Testbench Has an instantiation of IPS-LO and program memory Try different programs for testing EE 36 Fall 23 University of Hawaii 47 Pre IPS-L Rles of thmb for debgging Determine a set of inpt signals to test whether the circit works or not Inpt signals will vary over time Determine where to probe signals At otpts At intermediate points Determine by hand what signals to epect EE 36 Fall 23 University of Hawaii 48 24

25 Pre IPS-L Rles of thmb for debgging Create test bench that generates the appropriate inpt signals over time otpts the signals yo want Rn the test bench and see if the circit works If not, pt probe signals pstream to determine where the problem is EE 36 Fall 23 University of Hawaii 49 Probing Upstream probe This is spposed to be. Check pstream ntil yo find a device that isn t working, e.g., otpts don t match inpts EE 36 Fall 23 University of Hawaii 5 25

26 Pre IPS-L Rles of thmb for debgging Change inpt signals to REALLY verify that the circit will work nder all conditions Eample: change program EE 36 Fall 23 University of Hawaii 5 IPS-L After verifying correctness of Pre IPS- LO, bild and test IPS-L This is Homework A EE 36 Fall 23 University of Hawaii 52 26

27 IPS-L Bild the IPS-L in stages Stage IPS-L Inclde addi and j Use ordinary register file Inclde Control circit Stage 2 IPS-L2: inclde beq odify for zero otpt EE 36 Fall 23 University of Hawaii 53 IPS-L Stage 3 IPS-L3 (final) Inclde lw and sw Have the RA store 28 words. RA is implemented like a register file Have the program read and write to RA and check if it does so properly Verification can be done by checking inpts and otpts This is Homework B EE 36 Fall 23 University of Hawaii 54 27

28 Testbenching Yor testbench shold inclde Yor IPS-L Program memory Don t be afraid to try different programs for testing Last slide nless there s more time EE 36 Fall 23 University of Hawaii 55 Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add Instrction [3 26] Control RegDst Jmp Branch em emtoreg Op em Src Reg Shift left 2 set these mltipleers so that PC=PC+4 PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] register Instrction [5 ] Bild this first. Yor program shold have R-type, lw, sw, and j instrctions only register 2 Registers register Instrction [5 ] EE 36 Fall 23 University of Hawaii Sign et control Zero reslt Address Data memory 28

29 Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add Instrction [3 26] Control RegDst Jmp Branch em emtoreg Op em Src Reg Shift left 2 set these mltipleers so that PC=PC+4 PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers register 2 Zero reslt Address Data memory Check controller otpts Instrction [5 ] 6 32 Sign et Instrction [5 ] control EE 36 Fall 23 University of Hawaii 57 Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add RegDst Jmp Branch Shift left 2 Instrction [3 26] Control em emtoreg Op em Src Reg Reg= while testing at this stage PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers register 2 Zero reslt Address Data memory Instrction [5 ] 6 32 Sign et Check register control Instrction [5 ] file otpts. Yo mst initialize register vales somehow EE 36 Fall 23 University of Hawaii 58 29

30 Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add RegDst Jmp Branch Shift left 2 PC address Instrction [3 ] Instrction memory Instrction [3 26] Instrction [25 2] Instrction [2 6] Instrction [5 ] Control em emtoreg Op em Src Reg register register 2 Registers register 2 Reg= and em = while testing at this stage Zero reslt Address Data memory Instrction [5 ] Complete path bt not writing to anything Instrction [5 ] 6 32 Sign et EE 36 Fall 23 University of Hawaii 59 control Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add RegDst Jmp Branch Shift left 2 Instrction [3 26] Control em emtoreg Op PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] em Src Reg register register 2 Registers register 2 em = while testing at this stage Zero reslt Address Data memory Program jst has R-type and j instrctions Instrction [5 ] Instrction [5 ] 6 32 Sign et EE 36 Fall 23 University of Hawaii 6 control 3

31 Single Cycle IPS Instrction [25 ] Shift Jmp address [3 ] left PC+4 [3 28] Add reslt 4 Add RegDst Jmp Branch Shift left 2 Instrction [3 26] Control em emtoreg Op em Src Reg PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers register 2 Zero reslt Address Data memory Instrction [5 ] 6 32 Sign et control Instrction [5 ] EE 36 Fall 23 University of Hawaii 6 3

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

The extra single-cycle adders

The extra single-cycle adders lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since

More information

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A- Introdction In this lectre, we will try to implement simplified IPS which contain emory

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Compter Organization Chapter 4.4 A Simple Implementation Scheme Chans Y The Big Pictre The Five Classic Components of a Compter Processor Control emory Inpt path Otpt path & Control 2 path and

More information

The single-cycle design from last time

The single-cycle design from last time lticycle path Last time we saw a single-cycle path and control nit for or simple IPS-based instrction set. A mlticycle processor fies some shortcomings in the single-cycle CPU. Faster instrctions are not

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

Lecture 7. Building A Simple Processor

Lecture 7. Building A Simple Processor Lectre 7 Bilding A Simple Processor Christos Kozyrakis Stanford University http://eeclass.stanford.ed/ee8b C. Kozyrakis EE8b Lectre 7 Annoncements Upcoming deadlines Lab is de today Demo by 5pm, report

More information

Review: Computer Organization

Review: Computer Organization Review: Compter Organization Pipelining Chans Y Landry Eample Landry Eample Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 3 mintes A B C D Dryer takes 3 mintes

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2019, Assignment % of course mark CS 25, Winter 29, Assignment.. 3% of corse mark De Wednesday, arch 3th, 5:3P Lates accepted ntil Thrsday arch th, pm with a 5% penalty. (7 points) In the diagram below, the mlticycle compter from the corse

More information

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION EXAINATIONS 2010 END OF YEAR COPUTER ORGANIZATION Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. ake sre yor answers are clear and to the point. Calclators and paper foreign langage

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 4.. 3% of corse mark De Wednesday, arch 7th, 4:3P Lates accepted ntil Thrsday arch 8th, am with a 5% penalty. (6 points) In the diagram below, the mlticycle compter from the

More information

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code: EE8 Winter 25 Homework #2 Soltions De Thrsday, Feb 2, 5 P. ( points) Consider the following fragment of Java code: for (i=; i

More information

PART I: Adding Instructions to the Datapath. (2 nd Edition):

PART I: Adding Instructions to the Datapath. (2 nd Edition): EE57 Instrctor: G. Pvvada ===================================================================== Homework #5b De: check on the blackboard =====================================================================

More information

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,

More information

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation EXAINATIONS 2003 COP203 END-YEAR Compter Organisation Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. There are 180 possible marks on the eam. Calclators and foreign langage dictionaries

More information

Lab 8 (All Sections) Prelab: ALU and ALU Control

Lab 8 (All Sections) Prelab: ALU and ALU Control Lab 8 (All Sections) Prelab: and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received nathorized aid on this academic work Objective In this lab yo will

More information

Quiz #1 EEC 483, Spring 2019

Quiz #1 EEC 483, Spring 2019 Qiz # EEC 483, Spring 29 Date: Jan 22 Name: Eercise #: Translate the following instrction in C into IPS code. Eercise #2: Translate the following instrction in C into IPS code. Hint: operand C is stored

More information

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13 Comp 33 Compter Architectre A Pipelined path Lectre 3 Pipelined path with Signals PCSrc IF/ ID ID/ EX EX / E E / Add PC 4 Address Instrction emory RegWr ra rb rw Registers bsw [5-] [2-6] [5-] bsa bsb Sign

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

Exceptions and interrupts

Exceptions and interrupts Eceptions and interrpts An eception or interrpt is an nepected event that reqires the CPU to pase or stop the crrent program. Eception handling is the hardware analog of error handling in software. Classes

More information

Chapter 6: Pipelining

Chapter 6: Pipelining CSE 322 COPUTER ARCHITECTURE II Chapter 6: Pipelining Chapter 6: Pipelining Febrary 10, 2000 1 Clothes Washing CSE 322 COPUTER ARCHITECTURE II The Assembly Line Accmlate dirty clothes in hamper Place in

More information

Review. How to represent real numbers

Review. How to represent real numbers PCWrite PC IorD Review ALUSrcA emread Address Write data emory emwrite em Data IRWrite [3-26] [25-2] [2-6] [5-] [5-] RegDst Read register Read register 2 Write register Write data RegWrite Read data Read

More information

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind Pipelining hink of sing machines in landry services Chapter 6 nhancing Performance with Pipelining 6 P 7 8 9 A ime ask A B C ot pipelined Assme 3 min. each task wash, dry, fold, store and that separate

More information

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture Another Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre Eample: sbset of IPS processor architectre Drawn from Patterson & Hennessy

More information

Enhanced Performance with Pipelining

Enhanced Performance with Pipelining Chapter 6 Enhanced Performance with Pipelining Note: The slides being presented represent a mi. Some are created by ark Franklin, Washington University in St. Lois, Dept. of CSE. any are taken from the

More information

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page. page of 7 University of Calgary Departent of Electrical and Copter Engineering ENCM 369: Copter Organization Lectre Instrctors: Steve Noran and Nor Bartley Winter 23 MIDTERM TEST #2 Wednesday, March 2

More information

PS Midterm 2. Pipelining

PS Midterm 2. Pipelining PS idterm 2 Pipelining Seqential Landry 6 P 7 8 9 idnight Time T a s k O r d e r A B C D 3 4 2 3 4 2 3 4 2 3 4 2 Seqential landry takes 6 hors for 4 loads If they learned pipelining, how long wold landry

More information

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts CS359: Compter Architectre Chapter 3 & Appendi C Pipelining Part A: Basic and Intermediate Concepts Yanyan Shen Department of Compter Science and Engineering Shanghai Jiao Tong University 1 Otline Introdction

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Harware Organization an Design ectre 11: Introction to IPs path apte from Compter Organization an Design, Patterson & Hennessy, CB IPS-lite processor Compter Want to bil a processor for a sbset

More information

Pipelining. Chapter 4

Pipelining. Chapter 4 Pipelining Chapter 4 ake processor rns faster Pipelining is an implementation techniqe in which mltiple instrctions are overlapped in eection Key of making processor fast Pipelining Single cycle path we

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5B - mlticycle implementation (cwli@twins.ee.nct.ed.tw) 5B- Recap: A Single-Cycle Processor PCSrc 4 Add Shift left 2 Add ALU reslt PC address

More information

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control CSE-45432 Introdction to Compter Architectre Chapter 5 The Processor: Datapath & Control Dr. Izadi Data Processor Register # PC Address Registers ALU memory Register # Register # Address Data memory Data

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics (Lectres

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Spring 25 Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics

More information

Overview of Pipelining

Overview of Pipelining EEC 58 Compter Architectre Pipelining Department of Electrical Engineering and Compter Science Cleveland State University Fndamental Principles Overview of Pipelining Pipelined Design otivation: Increase

More information

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University 8 447 Lectre 6: icroprogrammed lti Cycle Implementation James C. Hoe Department of ECE Carnegie ellon University 8 447 S8 L06 S, James C. Hoe, CU/ECE/CALC, 208 Yor goal today Hosekeeping nderstand why

More information

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline

More information

Basics of Digital Logic Design

Basics of Digital Logic Design ignals, Logic Operations and Gates E 675.2: Introdction to ompter rchitectre asics of igital Logic esign Rather than referring to voltage levels of signals, we shall consider signals that are logically

More information

Lecture 9: Microcontrolled Multi-Cycle Implementations

Lecture 9: Microcontrolled Multi-Cycle Implementations 8-447 Lectre 9: icroled lti-cycle Implementations James C. Hoe Dept of ECE, CU Febrary 8, 29 S 9 L9- Annoncements: P&H Appendi D Get started t on Lab Handots: Handot #8: Project (on Blackboard) Single-Cycle

More information

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion . (Chapter 5) Fill in the vales for SrcA, SrcB, IorD, Dst and emto to complete the Finite State achine for the mlti-cycle datapath shown below. emory address comptation 2 SrcA = SrcB = Op = fetch em SrcA

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 83 Compter Organization Chapter.6 A Pipelined path Chans Y Pipelined Approach 2 - Cycle time, No. stages - Resorce conflict E E A B C D 3 E E 5 E 2 3 5 2 6 7 8 9 c.y9@csohio.ed Resorces sed in 5 Stages

More information

EEC 483 Computer Organization. Branch (Control) Hazards

EEC 483 Computer Organization. Branch (Control) Hazards EEC 483 Compter Organization Section 4.8 Branch Hazards Section 4.9 Exceptions Chans Y Branch (Control) Hazards While execting a previos branch, next instrction address might not yet be known. s n i o

More information

Decoders. 3-Input Full Decoder

Decoders. 3-Input Full Decoder ecoders A fll decoder with n inpts has 2 n otpts. Let inpts be labeled In, In, In 2,..., In n, and let otpts be labeled Ot, Ot,..., Ot 2 n. A fll decoder fnctions as follows: Only one of otpts has vale

More information

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book An Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre w Eample: sbset of IPS processor architectre n Drawn from Patterson & Hennessy

More information

Solutions for Chapter 6 Exercises

Solutions for Chapter 6 Exercises Soltions for Chapter 6 Eercises Soltions for Chapter 6 Eercises 6. 6.2 a. Shortening the ALU operation will not affect the speedp obtained from pipelining. It wold not affect the clock cycle. b. If the

More information

1048: Computer Organization

1048: Computer Organization 8: Compter Organization Lectre 6 Pipelining Lectre6 - pipelining (cwli@twins.ee.nct.ed.tw) 6- Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards

More information

What do we have so far? Multi-Cycle Datapath

What do we have so far? Multi-Cycle Datapath What do we have so far? lti-cycle Datapath CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instrction being processed in datapath How to lower CPI frther? #1 Lec # 8 Spring2 4-11-2 Pipelining pipelining

More information

Lecture 13: Exceptions and Interrupts

Lecture 13: Exceptions and Interrupts 18 447 Lectre 13: Eceptions and Interrpts S 10 L13 1 James C. Hoe Dept of ECE, CU arch 1, 2010 Annoncements: Handots: Spring break is almost here Check grades on Blackboard idterm 1 graded Handot #9: Lab

More information

POWER-OF-2 BOUNDARIES

POWER-OF-2 BOUNDARIES Warren.3.fm Page 5 Monday, Jne 17, 5:6 PM CHAPTER 3 POWER-OF- BOUNDARIES 3 1 Ronding Up/Down to a Mltiple of a Known Power of Ronding an nsigned integer down to, for eample, the net smaller mltiple of

More information

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

ECE473 Computer Architecture and Organization. Processor: Combined Datapath Computer Architecture and Organization Processor: Combined path Lecturer: Prof. Yifeng Zhu Fall, 2014 Portions of these slides are derived from: Dave Patterson CB 1 Where are we? Want to build a processor

More information

10.2 Solving Quadratic Equations by Completing the Square

10.2 Solving Quadratic Equations by Completing the Square . Solving Qadratic Eqations b Completing the Sqare Consider the eqation We can see clearl that the soltions are However, What if the eqation was given to s in standard form, that is 6 How wold we go abot

More information

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm

Format. 10 multiple choice 8 points each. 1 short answer 20 points. Same basic principals as the midterm Final Review Format 10 multiple choice 8 points each Make sure to show your work Can write a description to the side as to why you think your answer is correct for possible partial credit 1 short answer

More information

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations .3 An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline and ore Pipelining Illstrations This online section covers hardware description langages and then gives

More information

CAPL Scripting Quickstart

CAPL Scripting Quickstart CAPL Scripting Qickstart CAPL (Commnication Access Programming Langage) For CANalyzer and CANoe V1.01 2015-12-03 Agenda Important information before getting started 3 Visal Seqencer (GUI based programming

More information

Chapter 6: Pipelining

Chapter 6: Pipelining Chapter 6: Pipelining Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards and stalls Branch hazards Eceptions Sperscalar and dynamic pipelining

More information

CS3350B Computer Architecture MIPS Introduction

CS3350B Computer Architecture MIPS Introduction CS3350B Computer Architecture MIPS Introduction Marc Moreno Maza http://www.csd.uwo.ca/~moreno/cs3350_moreno/index.html Department of Computer Science University of Western Ontario, Canada Thursday January

More information

The Disciplined Flood Protocol in Sensor Networks

The Disciplined Flood Protocol in Sensor Networks The Disciplined Flood Protocol in Sensor Networks Yong-ri Choi and Mohamed G. Goda Department of Compter Sciences The University of Texas at Astin, U.S.A. fyrchoi, godag@cs.texas.ed Hssein M. Abdel-Wahab

More information

CS3350B Computer Architecture

CS3350B Computer Architecture CS3350B Computer Architecture Winter 2015 Lecture 4.1: MIPS ISA: Introduction Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted d from lectures on Computer Organization and Design, Patterson & Hennessy,

More information

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle nimating the atapath PS atapath : Single-Cycle npt is either (-type) or sign-etended lower half of instrction (load/store) op offset/immediate W egister File 6 6 + from instrction path beq,, offset if

More information

This chapter is based on the following sources, which are all recommended reading:

This chapter is based on the following sources, which are all recommended reading: Bioinformatics I, WS 09-10, D. Hson, December 7, 2009 105 6 Fast String Matching This chapter is based on the following sorces, which are all recommended reading: 1. An earlier version of this chapter

More information

Chapter 2: Instructions:

Chapter 2: Instructions: Chapter 2: Instructions: Language of the Computer Computer Architecture CS-3511-2 1 Instructions: To command a computer s hardware you must speak it s language The computer s language is called instruction

More information

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Chapter 5 The Processor: Datapath and Control Big Picture: Where are We Now? Performance of a

More information

Course Administration

Course Administration Fall 2017 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture 2/4 Avinash Kodi Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701 E-mail: kodi@ohio.edu

More information

Merging datapaths: (add,lw, sw)

Merging datapaths: (add,lw, sw) COP 273 Winter 2012 1 - IPS datapath and control 2 ar., 2012 erging datapaths: (add,lw, sw) The datapaths that we saw last lecture considered each instruction in isolation. I drew only those elements that

More information

Control Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary

Control Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary Control Instructions Computer Organization Architectures for Embedded Computing Thursday, 26 September 2013 Many slides adapted from: Computer Organization and Design, Patterson & Hennessy 4th Edition,

More information

Control Instructions

Control Instructions Control Instructions Tuesday 22 September 15 Many slides adapted from: and Design, Patterson & Hennessy 5th Edition, 2014, MK and from Prof. Mary Jane Irwin, PSU Summary Previous Class Instruction Set

More information

CSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI.

CSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI. CSCI 402: Computer Architectures Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI Recall Big endian, little endian Memory alignment Unsigned

More information

Computer Architecture

Computer Architecture Computer Architecture Chapter 2 Instructions: Language of the Computer Fall 2005 Department of Computer Science Kent State University Assembly Language Encodes machine instructions using symbols and numbers

More information

Chapter 2A Instructions: Language of the Computer

Chapter 2A Instructions: Language of the Computer Chapter 2A Instructions: Language of the Computer Copyright 2009 Elsevier, Inc. All rights reserved. Instruction Set The repertoire of instructions of a computer Different computers have different instruction

More information

CSSE232 Computer Architecture I. Mul5cycle Datapath

CSSE232 Computer Architecture I. Mul5cycle Datapath CSSE232 Compter Architectre I Ml5cycle Datapath Class Stats Next 3 days : Ml5cycle datapath ing Ml5cycle datapath is not in the book! How long do instrc5ons take? ALU 2ns Mem 2ns Reg File 1ns Everything

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 153 Design of Operating Systems Spring 18 Lectre 3: OS model and Architectral Spport Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Last time/today

More information

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) ELEC 5200-001/6200-001 Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2) Victor P. Nelson, Professor & Asst. Chair Vishwani D. Agrawal, James J. Danaher Professor Department

More information

Functions of Combinational Logic

Functions of Combinational Logic CHPTER 6 Fnctions of Combinational Logic CHPTER OUTLINE 6 6 6 6 6 5 6 6 6 7 6 8 6 9 6 6 Half and Fll dders Parallel inary dders Ripple Carry and Look-head Carry dders Comparators Decoders Encoders Code

More information

Minimum Spanning Trees Outline: MST

Minimum Spanning Trees Outline: MST Minimm Spanning Trees Otline: MST Minimm Spanning Tree Generic MST Algorithm Krskal s Algorithm (Edge Based) Prim s Algorithm (Vertex Based) Spanning Tree A spanning tree of G is a sbgraph which is tree

More information

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2)

Overview. Introduction to the MIPS ISA. MIPS ISA Overview. Overview (2) Introduction to the MIPS ISA Overview Remember that the machine only understands very basic instructions (machine instructions) It is the compiler s job to translate your high-level (e.g. C program) into

More information

ECE 313 Computer Organization EXAM 2 November 9, 2001

ECE 313 Computer Organization EXAM 2 November 9, 2001 ECE 33 Computer Organization EA 2 November 9, 2 This exam is open book and open notes. You have 5 minutes. Credit for problems requiring calculation will be given only if you show your work. Choose and

More information

comp 180 Lecture 10 Outline of Lecture Procedure calls Saving and restoring registers Summary of MIPS instructions

comp 180 Lecture 10 Outline of Lecture Procedure calls Saving and restoring registers Summary of MIPS instructions Outline of Lecture Procedure calls Saving and restoring registers Summary of MIPS instructions Procedure Calls A procedure of a subroutine is like an agent which needs certain information to perform a

More information

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1 Instructions: MIPS ISA Chapter 2 Instructions: Language of the Computer 1 PH Chapter 2 Pt A Instructions: MIPS ISA Based on Text: Patterson Henessey Publisher: Morgan Kaufmann Edited by Y.K. Malaiya for

More information

More on Runtime Environments. Procedure Parameters (in Pascal) Traditional Stack Scheme. Restrictions in C & Pascal. code.

More on Runtime Environments. Procedure Parameters (in Pascal) Traditional Stack Scheme. Restrictions in C & Pascal. code. More on Rntime Environments How to efficiently implement procedre call and retrn in the presence of higher-order fnctions? 1. what are higher-order fnctions? 2. how to ext frames to spport higher-order

More information

Tdb: A Source-level Debugger for Dynamically Translated Programs

Tdb: A Source-level Debugger for Dynamically Translated Programs Tdb: A Sorce-level Debgger for Dynamically Translated Programs Naveen Kmar, Brce R. Childers, and Mary Lo Soffa Department of Compter Science University of Pittsbrgh Pittsbrgh, Pennsylvania 15260 {naveen,

More information

Instructions: Language of the Computer

Instructions: Language of the Computer CS359: Computer Architecture Instructions: Language of the Computer Yanyan Shen Department of Computer Science and Engineering 1 The Language a Computer Understands Word a computer understands: instruction

More information

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands Stored Program Concept Instructions: Instructions are bits Programs are stored in memory to be read or written just like data Processor Memory memory for data, programs, compilers, editors, etc. Fetch

More information

CENG3420 Lecture 03 Review

CENG3420 Lecture 03 Review CENG3420 Lecture 03 Review Bei Yu byu@cse.cuhk.edu.hk 2017 Spring 1 / 38 CISC vs. RISC Complex Instruction Set Computer (CISC) Lots of instructions of variable size, very memory optimal, typically less

More information

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science Outline of Lecture The Control Operation & Design The Datapath Control Operation & Design HKST 1 Computer Science Control After the design of partial single IPS datapath, we need to add the control unit

More information

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade CSE 141 Compter Architectre Smmer Session I, 2004 Lectres 10 Advanced Topics, emory Hierarchy and Cache Pramod V. Argade CSE141: Introdction to Compter Architectre Instrctor: TA: Pramod V. Argade (p2argade@cs.csd.ed)

More information

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed Lecture 3: General Purpose Processor Design CSCE 665 Advanced VLSI Systems Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, tet etc included in slides are borrowed from various books, websites,

More information

Computer Architecture. Lecture 6: Pipelining

Computer Architecture. Lecture 6: Pipelining Compter Architectre Lectre 6: Pipelining Dr. Ahmed Sallam Based on original slides by Prof. Onr tl Agenda for Today & Net Few Lectres Single-cycle icroarchitectres lti-cycle and icroprogrammed icroarchitectres

More information

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA CISC 662 Graduate Computer Architecture Lecture 4 - ISA Michela Taufer http://www.cis.udel.edu/~taufer/courses Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer Architecture,

More information

CSE 378 Midterm 2/12/10 Sample Solution

CSE 378 Midterm 2/12/10 Sample Solution Question 1. (6 points) (a) Rewrite the instruction sub $v0,$t8,$a2 using absolute register numbers instead of symbolic names (i.e., if the instruction contained $at, you would rewrite that as $1.) sub

More information

Lecture 10: Pipelined Implementations

Lecture 10: Pipelined Implementations U 8-7 S 9 L- 8-7 Lectre : Pipelined Implementations James. Hoe ept of EE, U Febrary 23, 29 nnoncements: Project is de this week idterm graded, d reslts posted Handots: H9 Homework 3 (on lackboard) Graded

More information

CS421 COMPILERS AND INTERPRETERS. the point it was passed (line 11). explicit vs implicit memory de-allocation? (malloc-free vs. garbage collection)

CS421 COMPILERS AND INTERPRETERS. the point it was passed (line 11). explicit vs implicit memory de-allocation? (malloc-free vs. garbage collection) rocedre arameters (in ascal) rocedre parameters permit procedres to be invoked ot-of-scope ; 1 program main(inpt, otpt); 2 3 procedre b(fnction h(n : integer): integer); 4 var m : integer; 5 begin m :=

More information

EE 361 University of Hawaii Fall

EE 361 University of Hawaii Fall C functions Road Map Computation flow Implementation using MIPS instructions Useful new instructions Addressing modes Stack data structure 1 EE 361 University of Hawaii Implementation of C functions and

More information

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W CSE 22 Computer Organization Hugh Chesser, CSEB 2U Agenda Topics:. Single Cycle Review (Sample Exam/Quiz Q) 2. ultiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday (November

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 9: Synchronization (1) Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Cooperation between Threads

More information

Course Administration

Course Administration Fall 2018 EE 3613: Computer Organization Chapter 2: Instruction Set Architecture Introduction 4/4 Avinash Karanth Department of Electrical Engineering & Computer Science Ohio University, Athens, Ohio 45701

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 8: Threads Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Processes P1 P2 Recall that Bt OS A process

More information