Sequential Circuits. CS/EE 3700 : Fundamentals of Digital System Design

Size: px
Start display at page:

Download "Sequential Circuits. CS/EE 3700 : Fundamentals of Digital System Design"

Transcription

1 Sequential Circuits CS/EE 37 : Fundamentals of igital System esign Chris J. Myers Lecture 7: Flip-flops, Registers, Counters Chapter 7 Combinational output depends only on the input. Sequential output depends on input and past behavior. Require use of storage elements. Contents of storage elements is called state. Circuit goes through sequence of states as a result of changes in inputs. Sensor Reset Set Memory element On Off Alarm A B Figure 7. Control of an alarm system Figure 7.2 A simple memory element Load ata G A B Output Reset Set G2 Figure 7.3 A controlled memory element Figure 7.4 A memory element with NOR gates

2 R S a b S R a b // (no change) (b) ruth table R Clk S R S Clk S R x x ( t + ) (t ) (no change) (t ) (no change) x t t 2 t 3 t 4 t 5 t 6 t 7 t 8 t 9 t (b) ruth table R Clk S a b Figure 7.5 (c) iming diagram A latch built with NOR gates?? ime R S (c) iming diagram Figure 7.6 Gated SR latch?? ime S Clk R (d) Graphical symbol (ata) S Clk S R Clk R Clk x ( t + ) ( t ) Clk (b) ruth table (c) Graphical symbol Figure 7.7 Gated SR latch with NAN gates Figure 7.8 Gated latch (ata) S Clk R t su t h t t 2 t 3 t 4 Clk Clk (d) iming diagram ime Figure 7.8 Gated latch Figure 7.9 Setup and hold times 2

3 Master Slave m s P3 Clk Clk 2 P 5 3 P2 6 m = s 4 P4 (b) Graphical symbol (b) iming diagram (c) Graphical symbol Figure 7. Master-slave flip-flop Figure 7. A positive-edge-triggered flip-flop Preset a Clk a b b a c b Preset c c (b) iming diagram (b) Graphical symbol Figure 7.2 Comparison of level-sensitive and edge-triggered Figure 7.3 Master-slave flip-flop with and Preset Preset Preset (b) Graphical symbol Figure 7.4 Positive-edge-triggered flip-flop with and Preset Figure 7.5 Synchronous reset for a flip-flop 3

4 ( t + ) ( t ) ( t ) (b) ruth table (c) Graphical symbol J K J K ( t + ) ( t) ( t) J K (d) iming diagram (b) ruth table (c) Graphical symbol Figure 7.6 flip-flop Figure 7.7 JK flip-flop In Out Summary of erminology Basic latch cross-coupled NAN/NOR Gated latch output changes when clk =. Gated SR latch Gated latch Flip-flop output changes only on clk edge. Edge-triggered flip-flop Master-slave flip-flop t t t 2 t 3 t 4 t 5 t 6 t 7 In = Out (b) A sample sequence Figure 7.8 A simple shift register Parallel output Serial input Shift/Load Parallel input Count (b) iming diagram Figure 7.9 A simple shift register Figure 7.2 A three-bit up-counter 4

5 2 cycle changes 2 changes 2 Count (b) iming diagram Figure 7.2 A three-bit down-counter able 7. erivation of the synchronous up-counter 2 3 Enable Count (b) iming diagram Figure 7.22 A four-bit synchronous up-counter Figure 7.23 Inclusion of enable and clear capability Enable Enable Output carry Load Output carry Figure 7.24 A four-bit counter with flip-flops Figure 7.25 A counter with parallel-load capability 5

6 Enable Load 2 Count (b) iming diagram 2 Count (b) iming diagram Figure 7.26 A modulo-6 counter with synchronous reset Figure 7.27 A modulo-6 counter with asynchronous reset n Enable BC Start Load (a) An n -bit ring counter Enable 2 2 BC 2 3 y y y 2 y 3 2-to-4 decoder 3 3 w w En Load wo-bit up-counter Start Figure 7.28 A two-digit BC counter Figure 7.29 Ring counter (b) A four-bit ring counter n Reset Figure 7.3 Johnson counter Figure 7.3 hree types of storage elements in a schematic 6

7 Interconnection wires ata PAL-like block ata Latch Latch Flip- op oggle (Other macrocells not shown) Figure 7.32 Gated latch generated by CA tools Figure 7.33 Implementation of a circuit in a CPL USE ieee.std_logic_64.all ; LIBRARY altera ; USE altera.maxplus2.all ; ENIY flipflop IS POR (, : IN S_LOGIC ; Resetn, Presetn : IN S_LOGIC ; : OU S_LOGIC ) ; EN flipflop ; ARCHIECURE Structure OF flipflop IS dff_instance: dff POR MAP (,, Resetn, Presetn, ) ; EN Structure ; Figure 7.34 iming simulation of storage elements Figure 7.35 Instantiating a flip-flop from a package USE ieee.std_logic_64.all ; ENIY implied IS POR ( A, B : IN S_LOGIC ; AeqB : OU S_LOGIC ) ; EN implied ; ARCHIECURE Behavior OF implied IS PROCESS ( A, B ) IF A = B HEN AeqB <= '' ; EN IF ; EN PROCESS ; EN Behavior ; USE ieee.std_logic_64.all ; ENIY latch IS POR (, Clk : IN S_LOGIC ; : OU S_LOGIC) ; EN latch ; ARCHIECURE Behavior OF latch IS PROCESS (, Clk ) IF Clk = '' HEN <= ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.36 Implied memory Figure 7.37 Code for a gated latch 7

8 USE ieee.std_logic_64.all ; ENIY flipflop IS POR (, : IN S_LOGIC ; : OU S_LOGIC) ; EN flipflop ; ARCHIECURE Behavior OF flipflop IS PROCESS ( ) IF 'EVEN AN = '' HEN <= ; EN IF ; EN PROCESS ; EN Behavior ; LIBRARY ieee; USE ieee.std_logic_64.all; ENIY flipflop IS POR (, : IN S_LOGIC ; : OU S_LOGIC ) ; EN flipflop ; ARCHIECURE Behavior OF flipflop IS PROCESS WAI UNIL 'EVEN AN = '' ; <= ; EN PROCESS ; EN Behavior ; Figure 7.38 Code for a flip-flop Figure 7.39 Code for a flip-flop using WAI UNIL USE ieee.std_logic_64.all ; ENIY flipflop IS POR (, Resetn, : IN S_LOGIC ; : OU S_LOGIC) ; EN flipflop ; ARCHIECURE Behavior OF flipflop IS PROCESS ( Resetn, ) IF Resetn = '' HEN <= '' ; ELSIF 'EVEN AN = '' HEN <= ; EN IF ; EN PROCESS ; EN Behavior ; USE ieee.std_logic_64.all ; ENIY flipflop IS POR (, Resetn, : IN S_LOGIC ; : OU S_LOGIC) ; EN flipflop ; ARCHIECURE Behavior OF flipflop IS PROCESS WAI UNIL 'EVEN AN = '' ; IF Resetn = '' HEN <= '' ; <= ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.4 flip-flop with asynchronous reset Figure 7.4 flip-flop with synchronous reset Figure 7.42 he lpm_ff parameterized flip-flop module Figure 7.43 An adder with registered feedback 8

9 iming Constraints 2 ns from register clocked to data output. 8 ns for adder to produce sum. 4 ns for sum to propagate to register input. 3 ns for setup time. cycle time must be 7 ns. Figure 7.44 iming simulation USE ieee.std_logic_64.all ; LIBRARY lpm ; USE lpm.lpm_components.all ; ENIY shift IS POR ( : IN S_LOGIC ; Reset : IN S_LOGIC ; Shiftin, Load : IN S_LOGIC ; R : IN S_LOGIC_VECOR(3 OWNO ) ; : OU S_LOGIC_VECOR(3 OWNO ) ) ; EN shift ; ARCHIECURE Structure OF shift IS instance: lpm_shiftreg GENERIC MAP (LPM_WIH => 4, LPM_IRECION => "RIGH") POR MAP (data => R, clock =>, aclr => Reset, load => Load, shiftin => Shiftin, q => ) ; EN Structure ; USE ieee.std_logic_64.all ; ENIY reg8 IS POR ( : IN S_LOGIC_VECOR(7 OWNO ) ; Resetn, : IN S_LOGIC ; : OU S_LOGIC_VECOR(7 OWNO ) ) ; EN reg8 ; ARCHIECURE Behavior OF reg8 IS PROCESS ( Resetn, ) IF Resetn = '' HEN <= "" ; ELSIF 'EVEN AN = '' HEN <= ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.45 Instantiation of the lpm_shiftreg module Figure 7.46 Code for an eight-bit register with asynchronous clear USE ieee.std_logic_64.all ; ENIY regn IS GENERIC ( N : INEGER := 6 ) ; POR ( : IN S_LOGIC_VECOR(N- OWNO ) ; Resetn, : IN S_LOGIC ; : OU S_LOGIC_VECOR(N- OWNO ) ) ; EN regn ; ARCHIECURE Behavior OF regn IS PROCESS ( Resetn, ) IF Resetn = '' HEN <= (OHERS => '') ; ELSIF 'EVEN AN = '' HEN <= ; EN IF ; EN PROCESS ; EN Behavior ; USE ieee.std_logic_64.all ; ENIY muxdff IS POR (,, Sel, : IN S_LOGIC ; : OU S_LOGIC ) ; EN muxdff ; ARCHIECURE Behavior OF muxdff IS PROCESS WAI UNIL 'EVEN AN = '' ; IF Sel = '' HEN <= ; <= ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.47 Code for an n-bit register with asynchronous clear Figure 7.48 Code for a flip-flop with a 2-to- multiplexer on the input 9

10 USE ieee.std_logic_64.all ; ENIY shift4 IS POR ( R : IN S_LOGIC_VECOR(3 OWNO ) ; L, w, : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR(3 OWNO ) ) ; EN shift4 ; ARCHIECURE Structure OF shift4 IS COMPONEN muxdff POR (,, Sel, : IN S_LOGIC ; : OU S_LOGIC ) ; EN COMPONEN ; Stage3: muxdff POR MAP ( w, R(3), L,, (3) ) ; Stage2: muxdff POR MAP ( (3), R(2), L,, (2) ) ; Stage: muxdff POR MAP ( (2), R(), L,, () ) ; Stage: muxdff POR MAP ( (), R(), L,, () ) ; EN Structure ; Figure 7.49 Hierarchical code for a four-bit shift register USE ieee.std_logic_64.all ; ENIY shift4 IS POR ( R : IN S_LOGIC_VECOR(3 OWNO ) ; : IN S_LOGIC ; L, w : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR(3 OWNO ) ) ; EN shift4 ; ARCHIECURE Behavior OF shift4 IS PROCESS WAI UNIL'EVEN AN = '' ; IF L = '' HEN <= R ; () <= () ; () <= (2); (2) <= (3) ; (3) <= w ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.5 Alternative code for a shift register USE ieee.std_logic_64.all ; ENIY shift4 IS POR ( R : IN S_LOGIC_VECOR(3 OWNO ) ; : IN S_LOGIC ; L, w : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR(3 OWNO ) ) ; EN shift4 ; ARCHIECURE Behavior OF shift4 IS PROCESS WAI UNIL'EVEN AN = '' ; IF L = '' HEN <= R ; (3) <= w ; (2) <= (3) ; () <= (2); () <= () ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.5 Code that reverses the ordering of statements USE ieee.std_logic_64.all ; ENIY shiftn IS GENERIC ( N : INEGER := 8 ) ; POR ( R : IN S_LOGIC_VECOR(N- OWNO ) ; : IN S_LOGIC ; L, w : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR(N- OWNO ) ) ; EN shiftn ; ARCHIECURE Behavior OFshiftn IS PROCESS WAI UNIL'EVEN AN = '' ; IF L = '' HEN <= R ; Genbits: FOR i IN O N-2 LOOP (i) <= (i+) ; EN LOOP ; (N-) <= w ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.52 Code for an n-bit left-to-right shift register USE ieee.std_logic_64.all ; USE ieee.std_logic_unsigned.all ; ENIY upcount IS POR (, Resetn, E : IN S_LOGIC ; : OU S_LOGIC_VECOR (3 OWNO )) ; EN upcount ; ARCHIECURE Behavior OFupcountIS SIGNAL Count : S_LOGIC_VECOR (3 OWNO ) ; PROCESS (, Resetn ) IF Resetn = '' HEN Count <= "" ; ELSIF ('EVENAN = '') HEN IF E = '' HEN Count <= Count + ; Count <= Count ; EN IF ; EN IF ; EN PROCESS ; <= Count ; EN Behavior ; Figure 7.53 Code for a four-bit up-counter USE ieee.std_logic_64.all ; ENIY upcount IS POR ( R : IN INEGER RANGE O 5 ;, Resetn, L : IN S_LOGIC ; : BUFFER INEGER RANGE O 5 ) ; EN upcount ; ARCHIECURE Behavior OFupcountIS PROCESS (, Resetn ) IF Resetn = '' HEN <= ; ELSIF ('EVENAN = '') HEN IF L = '' HEN <= R ; <= + ; EN IF; EN IF; EN PROCESS; EN Behavior; Figure 7.54 A four-bit counter with parallel load, using INEGER signals

11 USE ieee.std_logic_64.all ; ENIY downcnt IS GENERIC ( modulus : INEGER := 8 ) ; POR (, L, E : IN S_LOGIC ; : OU INEGER RANGE O modulus- ) ; EN downcnt ; Extern ata Bus ARCHIECURE Behavior OFdowncnt IS SIGNAL Count : INEGER RANGE O modulus- ; PROCESS WAI UNIL ('EVENAN = '') ; IF E = '' HEN IF L = '' HEN Count <= modulus- ; Count <= Count- ; EN IF ; EN IF ; EN PROCESS; <= Count ; EN Behavior ; R R 2 Rk R in R out R 2 in R 2 out Rk in Rk out Control circuit Function Figure 7.55 Code for a down-counter Figure 7.56 A digital system with k registers Register Swapping Bus R o u t R 2 o u t Consider 3 register example (R, R2, R3) that swaps contents of R and R2 using R3. hree steps: Contents of R2 transferred to R3. R i n R 2 i n R R 2 Contents of R transferred to R2. Contents of R3 transferred to R. Figure 7.57 etails for connecting registers to a bus R 2 out, R 3 in R out, R 2 in R 3 out, R in R 2 out, R 3 in R out, R 2 in R 3 out, R in Reset w w P Reset Figure 7.58 A shift-register control circuit Figure 7.59 A modified control circuit

12 R 2 out, R 3 in R out, R 2 in R 3 out, R in Bus w R in R 2 in Rk R R 2 in Rk ata S Multiplexers S j Reset Figure 7.6 A control circuit that does not require flip-flop preset inputs Figure 7.6 Using multiplexers to implement a bus USE ieee.std_logic_64.all ; ENIY regn IS GENERIC ( N : INEGER := 8 ) ; POR ( R : IN S_LOGIC_VECOR(N- OWNO ) ; Rin, : IN S_LOGIC ; : OU S_LOGIC_VECOR(N- OWNO ) ) ; EN regn ; ARCHIECURE Behavior OF regn IS PROCESS WAI UNIL 'EVEN AN = '' ; IF Rin = '' HEN <= R ; EN IF ; EN PROCESS ; EN Behavior ; USE ieee.std_logic_64.all ; ENIY trin IS GENERIC ( N : INEGER := 8 ) ; POR ( X : IN S_LOGIC_VECOR(N- OWNO ) ; E : IN S_LOGIC ; F : OU S_LOGIC_VECOR(N- OWNO ) ) ; EN trin ; ARCHIECURE Behavior OF trin IS F <= (OHERS => 'Z') WHEN E = '' X ; EN Behavior ; Figure 7.62 Code for an n-bit register with enable Figure 7.63 Code for an n-bit tri-state buffer USE ieee.std_logic_64.all ; USE ieee.std_logic_64.all ; ENIY shiftr IS -- left-to-right shift register withasync reset GENERIC ( K : INEGER := 4 ) ; POR ( Resetn,, w : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR( O K) ) ; EN shiftr ; ARCHIECURE Behavior OFshiftr IS PROCESS ( Resetn, ) IF Resetn = '' HEN <= (OHERS => '') ; ELSIF 'EVENAN = '' HEN Genbits: FOR i IN K OWNO 2 LOOP (i) <= (i-) ; EN LOOP ; () <= w ; EN IF ; EN PROCESS ; EN Behavior ; Figure 7.64 Code for the shift-register controller PACKAGE components IS COMPONENregn -- register GENERIC ( N : INEGER := 8 ) ; POR ( R : IN S_LOGIC_VECOR(N- OWNO ) ; Rin, : IN S_LOGIC ; : OU S_LOGIC_VECOR(N- OWNO ) ) ; EN COMPONEN ; COMPONENshiftr -- left-to-right shift register withasync reset GENERIC ( K : INEGER := 4 ) ; POR ( Resetn,, w : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR( O K) ) ; EN component ; COMPONENtrin -- tri-state buffers GENERIC ( N : INEGER := 8 ) ; POR ( X : IN S_LOGIC_VECOR(N- OWNO ) ; E : IN S_LOGIC ; F : OU S_LOGIC_VECOR(N- OWNO ) ) ; EN COMPONEN ; EN components ; Figure 7.65 Package and component declarations 2

13 USE ieee.std_logic_64.all ; USE work.components.all ; ENIY swap IS POR ( ata : IN S_LOGIC_VECOR(7 OWNO ) ; Resetn, w : IN S_LOGIC ;, Extern : IN S_LOGIC ; RinExt : IN S_LOGIC_VECOR( O 3) ; BusWires : INOU S_LOGIC_VECOR(7 OWNO ) ) ; EN swap ; tri_ext: trin POR MAP ( ata, Extern,BusWires ) ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg2: regnpor MAP ( BusWires, Rin(2),, R2 ) ; reg3: regnpor MAP ( BusWires, Rin(3),, R3 ) ; tri: trin POR MAP ( R, Rout(),BusWires) ; tri2: trin POR MAP ( R2, Rout(2),BusWires) ; tri3: trin POR MAP ( R3, Rout(3),BusWires) ; EN Behavior ; ARCHIECURE Behavior OF swap IS SIGNALRin, Rout, : S_LOGIC_VECOR( O 3) ; SIGNAL R, R2, R3 : S_LOGIC_VECOR(7 OWNO ) ; control: shiftr GENERIC MAP ( K => 3 ) POR MAP ( Resetn,, w, ) ; Rin() <= RinExt() OR (3) ; Rin(2) <= RinExt(2) OR (2) ; Rin(3) <= RinExt(3) OR () ; Rout() <= (2) ; Rout(2) <= () ; Rout(3) <= (3) ; Figure 7.66 A digital system with a bus Figure 7.66 A digital system with a bus USE ieee.std_logic_64.all ; USE work.components.all ; ENIY swapmux IS POR ( ata : IN S_LOGIC_VECOR(7 OWNO ) ; Resetn, w : IN S_LOGIC ; : IN S_LOGIC ; RinExt : IN S_LOGIC_VECOR( O 3) ; BusWires : BUFFER S_LOGIC_VECOR(7 OWNO ) ) ; EN swapmux; ARCHIECURE Behavior OFswapmuxIS SIGNALRin, : S_LOGIC_VECOR( O 3) ; SIGNAL S : S_LOGIC_VECOR( OWNO ) ; SIGNAL R, R2, R3 : S_LOGIC_VECOR(7 OWNO ) ; control: shiftr GENERIC MAP ( K => 3 ) POR MAP ( Resetn,, w, ) ; con t Rin() <= RinExt() OR (3) ; Rin(2) <= RinExt(2) OR (2) ; Rin(3) <= RinExt(3) OR () ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg2: regnpor MAP ( BusWires, Rin(2),, R2 ) ; reg3: regnpor MAP ( BusWires, Rin(3),, R3 ) ; encoder: WIH SELEC S <= "" WHEN "", "" WHEN "", "" WHEN "", "" WHEN OHERS ; muxes: --eight 4-to- multiplexers WIH S SELEC BusWires <= ata WHEN "", R WHEN "", R2 WHEN "", R3 WHEN OHERS ; EN Behavior ; Figure 7.67a Using multiplexers to implement a bus Figure 7.67b Using multiplexers to implement a bus (con t) (ENIY declaration not shown) ARCHIECURE Behavior OFswapmuxIS SIGNALRin, : S_LOGIC_VECOR( O 3) ; SIGNAL R, R2, R3 : S_LOGIC_VECOR(7 OWNO ) ; control: shiftr GENERIC MAP ( K => 3 ) POR MAP ( Resetn,, w, ) ; Rin() <= RinExt() OR (3) ; Rin(2) <= RinExt(2) OR (2) ; Rin(3) <= RinExt(3) OR () ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg2: regnpor MAP ( BusWires, Rin(2),, R2 ) ; reg3: regnpor MAP ( BusWires, Rin(3),, R3 ) ; muxes: WIH SELEC BusWires <= ata WHEN "", R2 WHEN "", R WHEN "", R3 WHEN OHERS ; EN Behavior ; Figure 7.68 Simplified code for describing a bus Figure 7.69 iming simulation 3

14 Figure 7.7 A digital system that implements a simple processor able 7.2 Operations performed in the processor I I I 2 I 3 X X X 2 X 3 Y Y Y 2 Y 3 y y y 2 y 3 y y y 2 y 3 y y y 2 y to-4 decoder w w En 2-to-4 decoder w w En 2-to-4 decoder w w En y y y 2 y 3 2-to-4 decoder w w En Up-counter Reset FR in Function Register f f Rx Rx Ry Ry Function Figure 7.7 A part of the control circuit for the processor Figure 7.72 he function registers and decoders Processor Control Logic = w + one FR in = w Extern = I one = (I + I ) + (I 2 + I 3 ) 3 A in = (I 2 + I 3 ) G in = (I 2 + I 3 ) 2 G out = (I 2 + I 3 ) 3 AddSub = I 3 R in = (I + I ) X + (I 2 +I 3 ) 3 X R out = I Y + (I 2 + I 3 )( X + 2 Y ) able 7.3 Control signals asserted in each operation/time step 4

15 USE ieee.std_logic_64.all ; USE ieee.std_logic_unsigned.all ; ENIY upcount IS POR (, : IN S_LOGIC ; : BUFFER S_LOGIC_VECOR( OWNO ) ) ; EN upcount ; ARCHIECURE Behavior OF upcount IS upcount: PROCESS ( ) IF ('EVEN AN = '') HEN IF = '' HEN <= "" ; <= + '' ; EN IF ; EN IF; EN PROCESS; EN Behavior ; Figure 7.73 Code for a two-bit up-counter with asynchronous reset USE ieee.std_logic_64.all ; USE ieee.std_logic_signed.all ; USE work.subccts.all ; ENIY proc IS POR ( ata : IN S_LOGIC_VECOR(7 OWNO ) ; Reset, w : IN S_LOGIC ; : IN S_LOGIC ; F, Rx, Ry : IN S_LOGIC_VECOR( OWNO ) ; one : BUFFER S_LOGIC ; BusWires : INOU S_LOGIC_VECOR(7 OWNO ) ) ; EN proc ; ARCHIECURE Behavior OF proc IS SIGNALRin, Rout : S_LOGIC_VECOR( O 3) ; SIGNAL, High,AddSub : S_LOGIC ; SIGNAL Extern,Ain, Gin, Gout, FRin : S_LOGIC ; SIGNAL Count, Zero : S_LOGIC_VECOR( OWNO ) ; SIGNAL, I, X, Y : S_LOGIC_VECOR( O 3) ; SIGNAL R, R, R2, R3 : S_LOGIC_VECOR(7 OWNO ) ; SIGNAL A, Sum, G : S_LOGIC_VECOR(7 OWNO ) ; SIGNALFunc, FuncReg : S_LOGIC_VECOR( O 6) ; con t Figure 7.74a Code for the processor Zero <= "" ; High <= '' ; <= Reset OR one OR (NO w AN ()) ; counter: upcountpor MAP (,, Count ) ; dec: dec2to4 POR MAP ( Count, High, ); Func <= F & Rx & Ry ; FRin <= w AN () ; functionreg: regn GENERIC MAP ( N => 6 ) POR MAP ( Func, FRin,, FuncReg) ; deci: dec2to4 POR MAP (FuncReg( O 2), High, I ) ; decx: dec2to4 POR MAP (FuncReg(3 O 4), High, X ) ; decy: dec2to4 POR MAP (FuncReg(5 O 6), High, Y ) ; Extern <= I() AN () ; one <= ((I() OR I()) AN ()) OR ((I(2) OR I(3)) AN (3)) ; Ain <= (I(2) OR I(3)) AN () ; Gin <= (I(2) OR I(3)) AN (2) ; Gout <= (I(2) OR I(3)) AN (3) ; AddSub <= I(3) ; con t Figure 7.74b Code for the processor (con t) RegCntl: FOR k IN O 3 GENERAE Rin(k) <= ((I() OR I()) AN () AN X(k)) OR ((I(2) OR I(3)) AN (3) AN X(k)) ; Rout(k) <= (I() AN () AN Y(k)) OR ((I(2) OR I(3)) AN ((() AN X(k)) OR ((2) AN Y(k)))) ; EN GENERAERegCntl; tri_extern: trin POR MAP ( ata, Extern,BusWires ) ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg2: regnpor MAP ( BusWires, Rin(2),, R2 ) ; reg3: regnpor MAP ( BusWires, Rin(3),, R3 ) ; tri: trin POR MAP ( R, Rout(),BusWires) ; tri: trin POR MAP ( R, Rout(),BusWires) ; tri2: trin POR MAP ( R2, Rout(2),BusWires) ; tri3: trin POR MAP ( R3, Rout(3),BusWires) ; rega: regn POR MAP ( BusWires, Ain,, A ) ; alu: WIH AddSub SELEC Sum <= A + BusWires WHEN '', A - BusWires WHEN OHERS ; regg: regn POR MAP ( Sum, Gin,, G ) ; trig: trin POR MAP ( G, Gout,BusWires ) ; EN Behavior ; Figure 7.74c Code for the processor (con t) (ENIY declaration not shown) ARCHIECURE Behavior OF proc IS SIGNAL X, Y,Rin, Rout : S_LOGIC_VECOR( O 3) ; SIGNAL, High,AddSub : S_LOGIC ; SIGNAL Extern,Ain, Gin, Gout, FRin : S_LOGIC ; SIGNAL Count, Zero,, I : S_LOGIC_VECOR( OWNO ) ; SIGNAL R, R, R2, R3 : S_LOGIC_VECOR(7 OWNO ) ; SIGNAL A, Sum, G : S_LOGIC_VECOR(7 OWNO ) ; SIGNALFunc, FuncReg, Sel : S_LOGIC_VECOR( O 6) ; Zero <= "" ; High <= '' ; <= Reset OR one OR (NO w AN NO () AN NO ()) ; counter: upcountpor MAP (,, Count ) ; <= Count ; Func <= F & Rx & Ry ; FRin <= w AN NO () AN NO () ; functionreg: regn GENERIC MAP ( N => 6 ) POR MAP ( Func, FRin,, FuncReg) ; I <= FuncReg( O 2) ; decx: dec2to4 POR MAP (FuncReg(3 O 4), High, X ) ; decy: dec2to4 POR MAP (FuncReg(5 O 6), High, Y ) ; controlsignals: PROCESS (, I, X, Y ) con t Figure 7.75a Alternative code for the processor Extern <= '' ; one <= '' ;Ain <= '' ; Gin <= '' ; Gout <= '' ; AddSub <= '' ; Rin <= "" ; Rout <= "" ; CASE IS WHEN "" => -- no signals asserted in time step WHEN "" => -- define signals asserted in time step CASE I IS WHEN "" => -- Load Extern <= '' ;Rin <= X ; one <= '' ; WHEN "" => -- Move Rout <= Y ;Rin <= X ; one <= '' ; WHEN OHERS => -- Add, Sub Rout <= X ;Ain <= '' ; EN CASE ; WHEN "" => -- define signals asserted in time step 2 CASE I IS WHEN "" => -- Add Rout <= Y ; Gin <= '' ; WHEN "" => -- Sub Rout <= Y ;AddSub <= '' ; Gin <= '' ; WHEN OHERS => -- Load, Move EN CASE ; WHEN OHERS => -- define signals asserted in time step 3 CASE I IS Figure 7.75b Alternative code for the processor (con t) 5

16 WHEN "" => -- Load WHEN "" => -- Move WHEN OHERS => -- Add, Sub Gout <= '' ; Rin <= X ; one <= '' ; EN CASE ; EN CASE ; EN PROCESS ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg: regnpor MAP ( BusWires, Rin(),, R ) ; reg2: regnpor MAP ( BusWires, Rin(2),, R2 ) ; reg3: regnpor MAP ( BusWires, Rin(3),, R3 ) ; rega: regn POR MAP ( BusWires, Ain,, A ) ; alu: WIH AddSub SELEC Sum <= A + BusWires WHEN '', A - BusWires WHEN OHERS ; regg: regn POR MAP ( Sum, Gin,, G ) ; Sel <= Rout & Gout & Extern ; WIH Sel SELEC BusWires <= R WHEN "", R WHEN "", R2 WHEN "", R3 WHEN "", G WHEN "", ata WHEN OHERS ; EN Behavior ; Figure 7.75c Alternative code for the processor (con t) Figure 7.76 iming simulation of the processor V V V V R R L c 9 c c R L -bit counter V LE w a b g a b g Converter Converter w w w 2 w 3 w w w 2 w 3 (a) divider (b) LE circuit c 9 BC BC E wo-digit BC counter Reset (c) Push-button switch, LE, and 7-segment displays Figure 7.77 A reaction-timer circuit Figure 7.77 A reaction-timer circuit USE ieee.std_logic_64.all ; USE ieee.std_logic_unsigned.all ; ENIY BCcount IS POR ( : IN S_LOGIC ;, E : IN S_LOGIC ; BC, BC : BUFFER S_LOGIC_VECOR(3 OWNO ) ) ; EN BCcount ; ARCHIECURE Behavior OF BCcount IS PROCESS ( ) IF 'EVEN AN = '' HEN IF = '' HEN BC <= "" ; BC <= "" ; con t ELSIF E = '' HEN IF BC = "" HEN BC <= "" ; IF BC = "" HEN BC <= ""; BC <= BC + '' ; EN IF ; BC <= BC + '' ; EN IF ; EN IF ; EN IF; EN PROCESS; EN Behavior ; Figure 7.78a Code for a two-digit BC counter Figure 7.78b Code for a two-digit BC counter (con t) 6

17 USE ieee.std_logic_64.all ; ENIY reaction IS POR ( c9, Reset : IN S_LOGIC ; w, Pushn : IN S_LOGIC ; LEn : OU S_LOGIC ; igit, igit : BUFFER S_LOGIC_VECOR( O 7) ) ; EN reaction ; ARCHIECURE Behavior OF reaction IS COMPONENBCcount POR ( : IN S_LOGIC ;, E : IN S_LOGIC ; BC, BC : BUFFER S_LOGIC_VECOR(3 OWNO ) ) ; EN COMPONEN ; COMPONEN seg7 POR ( bcd : IN S_LOGIC_VECOR(3 OWNO ) ; leds : OU S_LOGIC_VECOR( O 7) ) ; EN COMPONEN ; SIGNAL LE : S_LOGIC ; SIGNAL BC, BC : S_LOGIC_VECOR(3 OWNO ) ; flipflop: PROCESS WAI UNIL c9'even AN c9 = '' ; IF Pushn = '' HEN LE <= '' ; ELSIF w = '' HEN LE <= '' ; EN IF ; EN PROCESS ; LEn <= NO LE ; counter: BCcountPOR MAP ( c9, Reset, LE, BC, BC ) ; seg : seg7 POR MAP ( BC, igit ) ; seg : seg7 POR MAP ( BC, igit ) ; EN Behavior ; con t Figure 7.79a Code for the reaction timer Figure 7.79b Code for the reaction timer (con t) Summary Latches / flip-flops Registers / counters VHL esign examples Figure 7.8 Simulation of the reaction-timer circuit 7

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

L4: Sequential Building Blocks (Flip-flops, Latches and Registers) L4: Sequential Building Blocks (Flip-flops, Latches and Registers) Acknowledgements: Lecture material adapted from R. Katz, G. Borriello, Contemporary Logic esign (second edition), Prentice-Hall/Pearson

More information

CprE 281: Digital Logic

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

More information

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

LOGIC CIRCUITS. Basic Experiment and Design of Electronics Basic Experiment and Design of Electronics LOGIC CIRCUITS Ho Kyung Kim, Ph.D. hokyung@pusan.ac.kr School of Mechanical Engineering Pusan National University Outline Combinational logic circuits Output

More information

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D. Basic Experiment and Design of Electronics LOGIC CIRCUITS Ho Kyung Kim, Ph.D. hokyung@pusan.ac.kr School of Mechanical Engineering Pusan National University Digital IC packages TTL (transistor-transistor

More information

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010 EE 224: INTROUCTION TO IGITAL CIRCUITS & COMPUTER ESIGN Lecture 6: Sequential Logic 3 Registers & Counters 05/10/2010 Avinash Kodi, kodi@ohio.edu Introduction 2 A Flip-Flop stores one bit of information

More information

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

L4: Sequential Building Blocks (Flip-flops, Latches and Registers) L4: Sequential Building Blocks (Flip-flops, Latches and Registers) Acknowledgements:., Materials in this lecture are courtesy of the following people and used with permission. - Randy H. Katz (University

More information

Sample Test Paper - I

Sample Test Paper - I Scheme G Sample Test Paper - I Course Name : Computer Engineering Group Marks : 25 Hours: 1 Hrs. Q.1) Attempt any THREE: 09 Marks a) Define i) Propagation delay ii) Fan-in iii) Fan-out b) Convert the following:

More information

Sequential vs. Combinational

Sequential vs. Combinational Sequential Circuits Sequential vs. Combinational Combinational Logic: Output depends only on current input TV channel selector (-9) inputs system outputs Sequential Logic: Output depends not only on current

More information

ELCT201: DIGITAL LOGIC DESIGN

ELCT201: DIGITAL LOGIC DESIGN ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 6 Following the slides of Dr. Ahmed H. Madian محرم 1439 ه Winter

More information

P2 (10 points): Given the circuit below, answer the following questions:

P2 (10 points): Given the circuit below, answer the following questions: P1 (10 points): Given the function f(a, b, c, d) = m(3,4,5,10,14) + D(6,7): A: Fill in the timing diagram for f. B: Implement f using only 2-1 MUXes. Your circuit should not include more than four 2-1

More information

Digital Design. Sequential Logic

Digital Design. Sequential Logic Principles Of igital esign Chapter 6 Sequential Logic Chapter preview Boolean algebra 3 Logic gates and flip-flops 3 Finite-state machine 6 Logic design techniques 4 Sequential design techniques 6 Binary

More information

Synchronous Sequential Logic

Synchronous Sequential Logic 1 IT 201 DIGITAL SYSTEMS DESIGN MODULE4 NOTES Synchronous Sequential Logic Sequential Circuits - A sequential circuit consists of a combinational circuit and a feedback through the storage elements in

More information

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering Sp 6 Reg. No. Question Paper Code : 27156 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2015. Second Semester Computer Science and Engineering CS 6201 DIGITAL PRINCIPLES AND SYSTEM DESIGN (Common

More information

Chapter 9. Counters and Shift Registers. Counters and Shift Registers

Chapter 9. Counters and Shift Registers. Counters and Shift Registers Chapter 9 Counters and Shift Registers Counters and Shift Registers Counter: A Sequential Circuit that counts pulses. Used for Event Counting, Frequency Division, Timing, and Control Operations. Shift

More information

EE141- Spring 2007 Digital Integrated Circuits

EE141- Spring 2007 Digital Integrated Circuits EE141- Spring 27 igital Integrated Circuits Lecture 19 Sequential Circuits 1 Administrative Stuff Project Ph. 2 due Tu. 5pm 24 Cory box + email ee141- project@bwrc.eecs.berkeley.edu Hw 8 Posts this Fr.,

More information

Integrated Circuits & Systems

Integrated Circuits & Systems Federal University of Santa Catarina Center for Technology Computer Science & Electronics Engineering Integrated Circuits & Systems INE 5442 Lecture 18 CMOS Sequential Circuits - 1 guntzel@inf.ufsc.br

More information

Preparation of Examination Questions and Exercises: Solutions

Preparation of Examination Questions and Exercises: Solutions Questions Preparation of Examination Questions and Exercises: Solutions. -bit Subtraction: DIF = B - BI B BI BO DIF 2 DIF: B BI 4 6 BI 5 BO: BI BI 4 5 7 3 2 6 7 3 B B B B B DIF = B BI ; B = ( B) BI ( B),

More information

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs Appendix B Review of Digital Logic Baback Izadi Division of Engineering Programs bai@engr.newpaltz.edu Elect. & Comp. Eng. 2 DeMorgan Symbols NAND (A.B) = A +B NOR (A+B) = A.B AND A.B = A.B = (A +B ) OR

More information

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner

CPS 104 Computer Organization and Programming Lecture 11: Gates, Buses, Latches. Robert Wagner CPS 4 Computer Organization and Programming Lecture : Gates, Buses, Latches. Robert Wagner CPS4 GBL. RW Fall 2 Overview of Today s Lecture: The MIPS ALU Shifter The Tristate driver Bus Interconnections

More information

vidyarthiplus.com vidyarthiplus.com vidyarthiplus.com ANNA UNIVERSITY- COMBATORE B.E./ B.TECH. DEGREE EXAMINATION - JUNE 2009. ELECTRICAL & ELECTONICS ENGG. - FOURTH SEMESTER DIGITAL LOGIC CIRCUITS PART-A

More information

Boolean Logic Continued Prof. James L. Frankel Harvard University

Boolean Logic Continued Prof. James L. Frankel Harvard University Boolean Logic Continued Prof. James L. Frankel Harvard University Version of 10:18 PM 5-Sep-2017 Copyright 2017, 2016 James L. Frankel. All rights reserved. D Latch D R S Clk D Clk R S X 0 ~S 0 = R 0 ~R

More information

Lecture 7: Logic design. Combinational logic circuits

Lecture 7: Logic design. Combinational logic circuits /24/28 Lecture 7: Logic design Binary digital circuits: Two voltage levels: and (ground and supply voltage) Built from transistors used as on/off switches Analog circuits not very suitable for generic

More information

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing IT 204 Section 3.0 Boolean Algebra and Digital Logic Boolean Algebra 2 Logic Equations to Truth Tables X = A. B + A. B + AB A B X 0 0 0 0 3 Sum of Products The OR operation performed on the products of

More information

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) ELEC 2200-002 Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering

More information

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

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

More information

ECE 341. Lecture # 3

ECE 341. Lecture # 3 ECE 341 Lecture # 3 Instructor: Zeshan Chishti zeshan@ece.pdx.edu October 7, 2013 Portland State University Lecture Topics Counters Finite State Machines Decoders Multiplexers Reference: Appendix A of

More information

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals University of Wisconsin - Madison ECE/Comp Sci 352 Digital Systems Fundamentals Charles R. Kime Section 2 Fall 2001 Lecture 5 Registers & Counters Part 2 Charles Kime Counters Counters are sequential circuits

More information

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4 Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4 4.1.1 Signal... 4 4.1.2 Comparison of Analog and Digital Signal... 7 4.2 Number Systems... 7 4.2.1 Decimal Number System... 7 4.2.2 Binary

More information

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI DEPARTMENT: ECE MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI 6 QUESTION BANK SUBJECT NAME: DIGITAL ELECTRONICS UNIT : Design of Sequential Circuits PART A ( Marks). Draw the logic diagram 4: Multiplexer.(AUC

More information

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science Sequential Logic Rab Nawaz Khan Jadoon DCS COMSATS Institute of Information Technology Lecturer COMSATS Lahore Pakistan Digital Logic and Computer Design Sequential Logic Combinational circuits with memory

More information

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007 EECS 150 - Components and Design Techniques for Digital Systems FSMs 9/11/2007 Sarah Bird Electrical Engineering and Computer Sciences University of California, Berkeley Slides borrowed from David Culler

More information

EEE2135 Digital Logic Design

EEE2135 Digital Logic Design EEE2135 Digital Logic Design Chapter 7. Sequential Circuits Design 서강대학교 전자공학과 1. Model of Sequential Circuits 1) Sequential vs. Combinational Circuits a. Sequential circuits: Outputs depend on both the

More information

ALU A functional unit

ALU A functional unit ALU A functional unit that performs arithmetic operations such as ADD, SUB, MPY logical operations such as AND, OR, XOR, NOT on given data types: 8-,16-,32-, or 64-bit values A n-1 A n-2... A 1 A 0 B n-1

More information

Chapter 7 Sequential Logic

Chapter 7 Sequential Logic Chapter 7 Sequential Logic SKEE2263 Digital Systems Mun im/ismahani/izam {munim@utm.my,e-izam@utm.my,ismahani@fke.utm.my} March 28, 2016 Table of Contents 1 Intro 2 Bistable Circuits 3 FF Characteristics

More information

PGT104 Digital Electronics. PGT104 Digital Electronics

PGT104 Digital Electronics. PGT104 Digital Electronics 1 Part 6 Sequential Logic ircuits Disclaimer: Most of the contents (if not all) are extracted from resources available for Digital Fundamentals 10 th Edition 2 Basic Shift Register Operations A shift register

More information

ALU, Latches and Flip-Flops

ALU, Latches and Flip-Flops CSE14: Components and Design Techniques for Digital Systems ALU, Latches and Flip-Flops Tajana Simunic Rosing Where we are. Last time: ALUs Plan for today: ALU example, latches and flip flops Exam #1 grades

More information

Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic. November Digital Integrated Circuits 2nd Sequential Circuits

Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic. November Digital Integrated Circuits 2nd Sequential Circuits igital Integrated Circuits A esign Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic esigning i Sequential Logic Circuits November 2002 Sequential Logic Inputs Current State COMBINATIONAL

More information

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution S.E. Sem. III [ETRX] Digital Circuits and Design Prelim uestion Paper Solution. (a) Static Hazard Static hazards have two cases: static and static. static- hazard exists when the output variable should

More information

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 100 Q.1(a) Attempt any SIX of the following : [12] Q.1(a) (i) Derive AND gate and OR gate

More information

Digital Integrated Circuits A Design Perspective

Digital Integrated Circuits A Design Perspective igital Integrated Circuits A esign Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic esigning Sequential Logic Circuits November 2002 Naming Conventions In our text: a latch is level sensitive

More information

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 100 Q.1(a) Attempt any SIX of the following : [12]

More information

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Computers also need devices capable of Storing data and information Performing mathematical operations on such data Sequential Machines Introduction Logic devices examined so far Combinational Output function of input only Output valid as long as input true Change input change output Computers also need devices capable

More information

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI 6 DEPARTMENT: EEE QUESTION BANK SUBJECT NAME: DIGITAL LOGIC CIRCUITS SUBJECT CODE: EE55 SEMESTER IV UNIT : Design of Synchronous Sequential Circuits PART

More information

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

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline. Review: esigning with FSM EECS 150 - Components and esign Techniques for igital Systems Lec 09 Counters 9-28-0 avid Culler Electrical Engineering and Computer Sciences University of California, Berkeley

More information

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS 5. Sequential Logic 6.004x Computation Structures Part 1 igital Circuits Copyright 2015 MIT EECS 6.004 Computation Structures L5: Sequential Logic, Slide #1 Something We Can t Build (Yet) What if you were

More information

Sequential Logic Circuits

Sequential Logic Circuits Chapter 4 Sequential Logic Circuits 4 1 The defining characteristic of a combinational circuit is that its output depends only on the current inputs applied to the circuit. The output of a sequential circuit,

More information

Digital Integrated Circuits A Design Perspective

Digital Integrated Circuits A Design Perspective igital Integrated Circuits A esign Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic esigning Sequential Logic Circuits November 2002 Sequential Logic Inputs Current State COMBINATIONAL LOGIC

More information

Digital Electronics Circuits 2017

Digital Electronics Circuits 2017 JSS SCIENCE AND TECHNOLOGY UNIVERSITY Digital Electronics Circuits (EC37L) Lab in-charge: Dr. Shankraiah Course outcomes: After the completion of laboratory the student will be able to, 1. Simplify, design

More information

Chapter 7. Sequential Circuits Registers, Counters, RAM

Chapter 7. Sequential Circuits Registers, Counters, RAM Chapter 7. Sequential Circuits Registers, Counters, RAM Register - a group of binary storage elements suitable for holding binary info A group of FFs constitutes a register Commonly used as temporary storage

More information

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

COE 202: Digital Logic Design Sequential Circuits Part 4. Dr. Ahmad Almulhem   ahmadsm AT kfupm Phone: Office: COE 202: Digital Logic Design Sequential Circuits Part 4 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324 Objectives Registers Counters Registers 0 1 n-1 A register is a group

More information

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU 534 007 DIGITAL INTEGRATED CIRCUITS (DIC) LABORATORY MANUAL III / IV B.E. (ECE) : I - SEMESTER DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING DIGITAL

More information

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary EECS50 - Digital Design Lecture - Shifters & Counters February 24, 2003 John Wawrzynek Spring 2005 EECS50 - Lec-counters Page Register Summary All registers (this semester) based on Flip-flops: q 3 q 2

More information

Digital Electronics Sequential Logic

Digital Electronics Sequential Logic /5/27 igital Electronics Sequential Logic r. I. J. Wassell Sequential Logic The logic circuits discussed previously are known as combinational, in that the output depends only on the condition of the latest

More information

Philadelphia University Student Name: Student Number:

Philadelphia University Student Name: Student Number: Philadelphia University Student Name: Student Number: Faculty of Engineering Serial Number: Final Exam, Second Semester: 2015/2016 Dept. of Computer Engineering Course Title: Logic Circuits Date: 08/06/2016

More information

I. Motivation & Examples

I. Motivation & Examples I. Motivation & Examples Output depends on current input and past history of inputs. State embodies all the information about the past needed to predict current output based on current input. State variables,

More information

GMU, ECE 680 Physical VLSI Design

GMU, ECE 680 Physical VLSI Design ECE680: Physical VLSI esign Chapter IV esigning Sequential Logic Circuits (Chapter 7) 1 Sequential Logic Inputs Current State COMBINATIONAL LOGIC Registers Outputs Next state 2 storage mechanisms positive

More information

9/18/2008 GMU, ECE 680 Physical VLSI Design

9/18/2008 GMU, ECE 680 Physical VLSI Design ECE680: Physical VLSI esign Chapter IV esigning Sequential Logic Circuits (Chapter 7) 1 Sequential Logic Inputs Current State COMBINATIONAL LOGIC Registers Outputs Next state 2 storage mechanisms positive

More information

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each) Subject Code: 17333 Model Answer Page 1/ 27 Important Instructions to examiners: 1) The answers should be examined by key words and not as word-to-word as given in the model answer scheme. 2) The model

More information

Ch 9. Sequential Logic Technologies. IX - Sequential Logic Technology Contemporary Logic Design 1

Ch 9. Sequential Logic Technologies. IX - Sequential Logic Technology Contemporary Logic Design 1 Ch 9. Sequential Logic Technologies Technology Contemporary Logic Design Overview Basic Sequential Logic Components FSM Design with Counters FSM Design with Programmable Logic FSM Design with More Sophisticated

More information

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1 Synchronous Sequential Circuit Design Dr. Ehab A. H. AL-Hialy Page Motivation Analysis of a few simple circuits Generalizes to Synchronous Sequential Circuits (SSC) Outputs are Function of State (and Inputs)

More information

CSC 322: Computer Organization Lab

CSC 322: Computer Organization Lab CSC 322: Computer Organization Lab Lecture 3: Logic Design Dr. Haidar M. Harmanani CSC 322: Computer Organization Lab Part I: Combinational Logic Dr. Haidar M. Harmanani Logical Design of Digital Systems

More information

Sequential Logic Worksheet

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

More information

Lecture 9: Sequential Logic Circuits. Reading: CH 7

Lecture 9: Sequential Logic Circuits. Reading: CH 7 Lecture 9: Sequential Logic Circuits Reading: CH 7 Sequential Logic FSM (Finite-state machine) Inputs Current State COMBINATIONAL LOGIC Registers Outputs = f(current, inputs) Next state 2 storage mechanisms

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) Quiz #1 - Spring 2003 Prof. Anantha Chandrakasan and Prof. Don

More information

Time Allowed 3:00 hrs. April, pages

Time Allowed 3:00 hrs. April, pages IGITAL ESIGN COEN 32 Prof. r. A. J. Al-Khalili Time Allowed 3: hrs. April, 998 2 pages Answer All uestions No materials are allowed uestion a) esign a half subtractor b) esign a full subtractor c) Using

More information

Layout of 7400-series Chips Commonly Used in. CDA 3101: Introduction to Computer Hardware and Organization

Layout of 7400-series Chips Commonly Used in. CDA 3101: Introduction to Computer Hardware and Organization Layout of 400-series Chips Commonly Used in CDA 30: Introduction to Computer Hardware and Organization Charles N. Winton Department of Computer and Information Sciences University of North Florida 999

More information

Vidyalankar S.E. Sem. III [EXTC] Digital Electronics Prelim Question Paper Solution ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD = B

Vidyalankar S.E. Sem. III [EXTC] Digital Electronics Prelim Question Paper Solution ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD = B . (a). (b). (c) S.E. Sem. III [EXTC] igital Electronics Prelim Question Paper Solution ABC ABC ABC ABC ABC ABC ABC ABC = B LHS = ABC ABC ABC ABC ABC ABC ABC ABC But ( ) = = ABC( ) ABC( ) ABC( ) ABC( )

More information

UMBC. At the system level, DFT includes boundary scan and analog test bus. The DFT techniques discussed focus on improving testability of SAFs.

UMBC. At the system level, DFT includes boundary scan and analog test bus. The DFT techniques discussed focus on improving testability of SAFs. Overview Design for testability(dft) makes it possible to: Assure the detection of all faults in a circuit. Reduce the cost and time associated with test development. Reduce the execution time of performing

More information

7 Multipliers and their VHDL representation

7 Multipliers and their VHDL representation 7 Multipliers and their VHDL representation 7.1 Introduction to arithmetic algorithms If a is a number, then a vector of digits A n 1:0 = [a n 1... a 1 a 0 ] is a numeral representing the number in the

More information

DE58/DC58 LOGIC DESIGN DEC 2014

DE58/DC58 LOGIC DESIGN DEC 2014 Q.2 a. In a base-5 number system, 3 digit representations is used. Find out (i) Number of distinct quantities that can be represented.(ii) Representation of highest decimal number in base-5. Since, r=5

More information

課程名稱 : 數位邏輯設計 P-1/ /6/11

課程名稱 : 數位邏輯設計 P-1/ /6/11 課程名稱 : 數位邏輯設計 P-1/41 2012/6/11 extbook: igital esign, 4 th. Edition M. Morris Mano and Michael. iletti Prentice-Hall, Inc. 教師 : 蘇慶龍 INSRUOR : HING-LUNG SU E-mail: kevinsu@yuntech.edu.tw hapter 6 P-2/41

More information

Review Problem 1. should be on. door state, false if light should be on when a door is open. v Describe when the dome/interior light of the car

Review Problem 1. should be on. door state, false if light should be on when a door is open. v Describe when the dome/interior light of the car Review Problem 1 v Describe when the dome/interior light of the car should be on. v DriverDoorOpen = true if lefthand door open v PassDoorOpen = true if righthand door open v LightSwitch = true if light

More information

Chapter 4. Sequential Logic Circuits

Chapter 4. Sequential Logic Circuits Chapter 4 Sequential Logic Circuits 1 2 Chapter 4 4 1 The defining characteristic of a combinational circuit is that its output depends only on the current inputs applied to the circuit. The output of

More information

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering SEQUENTIAL CIRCUITS: LATCHES Overview Circuits require memory to store intermediate

More information

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3 Digital Logic: Boolean Algebra and Gates Textbook Chapter 3 Basic Logic Gates XOR CMPE12 Summer 2009 02-2 Truth Table The most basic representation of a logic function Lists the output for all possible

More information

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering Final Examination ECE 241F - Digital Systems Examiners: J. Rose and

More information

Topics for Lecture #9. Button input processor

Topics for Lecture #9. Button input processor opics for Lecture # Reminder: midterm examination # next uesday starting at :0am. Examples of small state machines simultaneous button push detector (continued) button push processor pulse stretcher General

More information

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic CPE/EE 422/522 Chapter - Review of Logic Design Fundamentals Dr. Rhonda Kay Gaede UAH UAH Chapter CPE/EE 422/522. Combinational Logic Combinational Logic has no control inputs. When the inputs to a combinational

More information

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop EE210: Switching Systems Lecture 14: State Tables, Diagrams, Latches, and Flip Flop Prof. YingLi Tian Nov. 6, 2017 Department of Electrical Engineering The City College of New York The City University

More information

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE Estd-1984 KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE 641 006 QUESTION BANK UNIT I PART A ISO 9001:2000 Certified 1. Convert (100001110.010) 2 to a decimal number. 2. Find the canonical SOP for the function

More information

Topic 8: Sequential Circuits

Topic 8: Sequential Circuits Topic 8: Sequential Circuits Readings : Patterson & Hennesy, Appendix B.4 - B.6 Goals Basic Principles behind Memory Elements Clocks Applications of sequential circuits Introduction to the concept of the

More information

EE141. Lecture 28 Multipliers. Lecture #20. Project Phase 2 Posted. Sign up for one of three project goals today

EE141. Lecture 28 Multipliers. Lecture #20. Project Phase 2 Posted. Sign up for one of three project goals today EE141-pring 2008 igital Integrated ircuits Lecture 28 Multipliers 1 Announcements Project Phase 2 Posted ign up for one of three project goals today Graded Phase 1 and Midterm 2 will be returned next Fr

More information

Philadelphia University Student Name: Student Number:

Philadelphia University Student Name: Student Number: Philadelphia University Student Name: Student Number: Faculty of Engineering Serial Number: Final Exam, First Semester: 2017/2018 Dept. of Computer Engineering Course Title: Logic Circuits Date: 29/01/2018

More information

Fundamentals of Boolean Algebra

Fundamentals of Boolean Algebra UNIT-II 1 Fundamentals of Boolean Algebra Basic Postulates Postulate 1 (Definition): A Boolean algebra is a closed algebraic system containing a set K of two or more elements and the two operators and

More information

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters) EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters) March 19&21, 2002 John Wawrzynek Spring 2002 EECS150 - Lec13-seq3 version 2 Page 1 Counters Special sequential circuits (FSMs) that

More information

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1 Ch 7. Finite State Machines VII - Finite State Machines Contemporary Logic esign 1 Finite State Machines Sequential circuits primitive sequential elements combinational logic Models for representing sequential

More information

CMPEN 411. Spring Lecture 18: Static Sequential Circuits

CMPEN 411. Spring Lecture 18: Static Sequential Circuits CMPEN 411 VLSI Digital Circuits Spring 2011 Lecture 18: Static Sequential Circuits [Adapted from Rabaey s Digital Integrated Circuits, Second Edition, 2003 J. Rabaey, A. Chandrakasan, B. Nikolic] Sp11

More information

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

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

More information

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

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

More information

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison Introduction to Computer Engineering CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison Chapter 3 Digital Logic Structures Slides based on set prepared by

More information

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13

Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Combinatorial Logic Design Multiplexers and ALUs CS 64: Computer Organization and Design Logic Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Administrative Re: Midterm Exam #2 Graded! 5/22/18

More information

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University 1 OEN 312 DIGIAL SYSEMS DESIGN - LEURE NOES oncordia University hapter 6: Registers and ounters NOE: For more examples and detailed description of the material in the lecture notes, please refer to the

More information

Lecture 7: Sequential Networks

Lecture 7: Sequential Networks CSE 140: Components and Design Techniques for Digital Systems Lecture 7: Sequential Networks CK Cheng Dept. of Computer Science and Engineering University of California, San Diego 1 Part II: Sequential

More information

Digital Circuits ECS 371

Digital Circuits ECS 371 Digital Circuits ECS 371 Dr. Prapun Suksompong prapun@siit.tu.ac.th Lecture 18 Office Hours: BKD 3601-7 Monday 9:00-10:30, 1:30-3:30 Tuesday 10:30-11:30 1 Announcement Reading Assignment: Chapter 7: 7-1,

More information

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters EECS150 - Digital Design Lecture 18 - Counters October 24, 2002 John Wawrzynek Fall 2002 EECS150 - Lec18-counters Page 1 Counters Special sequential circuits (FSMs) that sequence though a set outputs.

More information

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters EECS50 - Digital Design Lecture 8 - Counters October 24, 2002 John Wawrzynek Fall 2002 EECS50 - Lec8-counters Page Counters Special sequential circuits (FSMs) that sequence though a set outputs. Examples:

More information

Chapter 13. Clocked Circuits SEQUENTIAL VS. COMBINATIONAL CMOS TG LATCHES, FLIP FLOPS. Baker Ch. 13 Clocked Circuits. Introduction to VLSI

Chapter 13. Clocked Circuits SEQUENTIAL VS. COMBINATIONAL CMOS TG LATCHES, FLIP FLOPS. Baker Ch. 13 Clocked Circuits. Introduction to VLSI Chapter 13 Clocked Circuits SEQUENTIAL VS. COMBINATIONAL CMOS TG LATCHES, FLIP FLOPS SET-RESET (SR) ARBITER LATCHES FLIP FLOPS EDGE TRIGGERED DFF FF TIMING Joseph A. Elias, Ph.D. Adjunct Professor, University

More information

Digital Integrated Circuits A Design Perspective

Digital Integrated Circuits A Design Perspective Digital Integrated Circuits A Design Perspective Jan M. Rabaey Anantha Chandrakasan Borivoje Nikolic Designing Sequential Logic Circuits November 2002 Sequential Logic Inputs Current State COMBINATIONAL

More information

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3 MOSIS REPORT Spring 2010 MOSIS Report 1 MOSIS Report 2 MOSIS Report 3 MOSIS Report 1 Design of 4-bit counter using J-K flip flop I. Objective The purpose of this project is to design one 4-bit counter

More information

Design of Sequential Circuits

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

More information