2 n. (finite state machines).

Size: px
Start display at page:

Download "2 n. (finite state machines)."

Transcription

1 . - S,, T FI-FO. ;. 2. ;,,.,, (sequential).. ( ) ; (state) (state variables),.,, (state)..,,..,,. 4. ;. n 2 n., 2 n,, (finite state machines). 5. (feedback).,..,.,,. 6.,,., ( )..

2 ,.,. 7., ( ).,.., AN,., AN. 2. _ _ t T=t per t t per t per t f=/t t IG uty ycle = t /t OW uty ycle = t /t 2.., IG IG, OW. quartz. 3. T VF VF2 2p M U2 SN744 U 49S_Y2BS (feedback sequential circuit),, (latch) (flipflops),. 9. k 2 2p 4 Mz. VF VF2. 2.5u 5.u 7.5u.u U M 2

3 3 : : : : T. 2.5u 5.u 7.5u.u 4. Mz.... (clocked synchronous state machine) Flip- Flops,. 2. (latch),. 3. Flip-Flops flip-flop., flip-flops. bit. flip-flops bit. flip-flop flip-flop. flip-flop ( ),. flip-flop. 4. S T5. S ' S :2 S: U U2 :3 ':4. 5.n.u.5u 2.u 5. S NO. 5 S NO. S- -.

4 .. / S. S + + ( ) ( ). / S. S=,=, =, =..,.. =, =. =, =.,. S. S :2 S: U U2 :3 ':4 6. S NAN. T S '. 5.n.u.5u 2.u 7. S. flip-flop.. S. 6 S- NAN 7. / ( 2). S= =. S,. S ( ) ( ) 2. S NAN.. S-FF ( 8) 4bits ( 9). 4 :2 U3 U : S: U2 ':4 8.

5 5 T S '..u 2.u 3.u 4.u 5.u S = S Flip-Flop S S. M. To S flip-flop. ( ).. 5k :3 : M U3 SN74 U SN74 :4 T S '. 2.5u 5.u 7.5u.u 6. S flip-flop. S-FF 4bit 2. 3 S ( Flip-Flops). ata 7. S-Flip-Flop NAN. ata S (set) (reset) S (set) (reset) 3 4 SFF S 2 ' S 25k S:2 U4 SN74 U2 SN74 ':5. 8. S-Flip-Flop. Flip-Flop S. = :.. + =. S=, =, = :. + =X. S=, =, = :. + =. S=, =, = :. + =. S=, =, = :. + =X. ( ) flip-flop S ( Flip-Flop ).. S-FF. S-FF TINA NAN ( 4) ( 5). U5 k U7 4k U8 2k S:2 : :3 U3 SN74 U4 SN74 U SN74 U2 SN74 U6 S :4 ':5 2:6

6 9.. T S ' 2..m 2.m 3.m.. 2. ( 3) ( 6) S-FF. 3. S-FF. S + X X 3. ( 7) ( 8). a) ( ). b) ; U T S M :3 S:2 U2 Noname :4 S :. 2.5u 5.u 7.5u.u FI-FO. arnaugh S-FF. arnaugh, : + = S + S = ( S flip-flop S=, S=,=.) S flip-flop S. -flip-flop. :,. =. =, = = : A =, = = : -flip-flop (ata).. arnaugh -FF. +

7 7 Flop. 4. -Flip , - FF 23,. T k Flop. 9. -Flip- -FF : + =. FF. -FF TINA NAN. ( 2, 2). u :2 : M 5 SN74 3 SN74 4 SN74 U2 5 SN74 2 SN74 :3 2. -Flip-Flop, NAN o -Flip-Flop TINA. T U4 5 U SN7474 2:4. 2.u 4.u 6.u FF -atch. ( 24, 25). u u M :2 : M k E 24. U SN74 U3 SN74 E U2 5 U4 5 U SN7474 :3 2:4 2..u 2.u 3.u 4.u 5.u 6.u 7.u

8 8 T u 5.u 7.5u.u 7. -FI-FO 25. To -flip-flop S-flip-flop S,.,, S.,.,, (t+)=,, reset (t+)=,, set (t+)=,, toggle ( ) (t+)= 27. -FF. : (t+)= +. -flip-flop, =,...., flip-flop.,,. flip-flop, -. T-flip-flop. ata 5. -FF (reset) S (set) 2 '. ( ) -FF SN7476. ; FF FF.

9 9 8. T-FI-FO -FF flip-flop (toggle),. flip-flop, =. =, (t+)=,. T + 6. T-FF. 3 (reset) FF - (master-slave) FF. FF - FF, (master), (slave). FF -. S FF FF. 3 S-FF. S k 4k S:2 : S 4 S (set) 2 ' S U3 U master:4 2k :3 U8 U5 slave: FF -FF. 4. T-FF. Master U4 S U Slave U2 U9 U7 'slave:8 'master:5 U6 2master:6 U2 2slave:9 S S U Master U3 Slave 3. S-FF. -FF : + = T + T 9. FI-FOS - FF. ( - ), -. FF, (edge triggering). 32. master slave. T S master 'master 2master slave 'slave 2slave..m 2.m 3.m 32. S-FF.

10 FF -,,. - FF FF S. 33 -FF. FF. u M u U3 5 U U FF M, S M. T M S : :2 :3 M: FF -. FF -. FF U2 S:5..u 2.u 3.u 4.u 5.u 6.u 7.u ( ).,, FF.,, -., FF, FF. FF. FF, FF. ( arnaugh); ( -FF). reset lear 7476 ; ; 2., - FF T-FF. 3. -FF -FF. 4. -FF ( 35) ( 36). u M k U SN74 E 35.

11 T k. 2.u 4.u 6.u FF -FF. 6. -FF ( 37) ( 38). 7. T-FF ( 39) ( 4). T ' T u M 39. U 5 U2 SN74S3 ' r 5. 2.u 4.u 6.u U9 T k ' U7 M k 38. U SN7476 r 5 ' u.u 5.u 2.u SN742 - UA NEGATIVE EGE- TIGGEE FI-FO WIT ESET AN EA. encil Box (MOE SEET TUT TABE) SN742 ( 4). ( 42).

12 2. SN742 -FF. encil Box SN742 -FF. (SN744). ( 44).. 4. SN742 - UA NEGATIVE EGE-TIGGEE FI-FO WIT ESET AN EA.. 6,7 6 V 5 () 8 6 5,9 () 3,,3 2,2 5,4 () 4, 4, (S) U SN74S2 5,9 6,7 3, 2,2,3 6,7 6 V 5 () 8,inv(7) 6,inv(4) 5,9 () 3,,3 2,2 5,4 5,4 () 4, , (S) U SN74S2 5,9 6,7 5, SN742 -FF. encil Box SN742 -FF. ( 43). N() = No Internal onnection. () () = = 2 3 6,7 5,9 () (S) = 3, = 6 inv () inv(2) 2,2 inv SN744,3 V ,(2,2),3 5,4 4, 4, 3,(2,2) U SN74S2 5,9 6,7,3 5, SN7472 AN-GATE MASTE-SAVE NEGATIVE EGE-TIGGEE FI-FO

13 3 WIT ESET AN EA.. SN7472 AN-GATE MASTE- SAVE NEGATIVE EGE-TIGGEE FI-FO WIT ESET AN EA. encil Box SN7472. ( 45). ( : 7472 and. V. preset clear. ). ( 46).. V () 8 () AN AN E 5 SN SN747 AN-GATE MASTE-SAVE OSITIVE EGE-TIGGEE FI-FO WIT ESET AN EA. 2. SN747 AN-GATE MASTE- SAVE OSITIVE EGE-TIGGEE FI-FO WIT ESET AN EA. encil Box SN747. ( 47). ( 48).. () () E V not not AN not AN SN N() = No Internal onnection FF -FF, MUX 4x NOT = 2 - = 2 U6 U5 U4 SN744 U9 MyMux4x I I MyMux4x I2 I3 S :3 S F 2 U2 5 U3 5 U SN7474 :4 5 :2 : 49. -FF -FF, MUX 4x NOT.

14 T FF, x, y S. -FF ( 5) m 5.m 75.m.m x:3 y:4 y u y u x y x y x y U7 FA A B in U SN7474 :2 U : Sum x y out = x y + x + y. FF : = out = x y + x + y. : (t+) = = out = x y + x + y x y (t+) S U3 5 FA out Sum : S:5 M ( State Editor ). 53. State Editor, V ( ). T x y S u 4.u 6.u 8.u 53.. library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity SAME is port ( reset: in std_logic; : in std_logic; x: in std_logic; y: in std_logic; S: out std_logic; : out std_logic); end; architecture SAME_arch of SAME is type SMachine_type is (S,S); signal SMachine: SMachine_type := S; begin SMachine_machine: process () begin if reset = '' then S<=''; <=''; SMachine <= S; elsif 'event and = '' then case SMachine is when S => <= ''; if x='' and y='' then S<=''; SMachine <= S; elsif x='' and y=''then S<=''; SMachine <= S; elsif x='' and y=''then S<=''; SMachine <= S;

15 5 elsif x='' and y=''then S <= ''; SMachine <= S; when S => <='' if x='' and y='' then S<=''; SMachine <= S; elsif x='' and y=''then S<=''; SMachine <= S; elsif x='' and y=''then S<=''; SMachine <= S; when others => null; end case; end process; end SAME_arch;. V. 5. -FF x. FF: A = x, A = B', B = x, B = A. A(t+) B(t+).. -FF : (t+) = ' + '. FF : A(t+) = x A' + B A B(t+) = x B' + A' B. O ( 8). 54 ( State Editor ). V FF A B x A + B + A A B B library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity SAME is port ( reset: in std_logic; : in std_logic; x: in std_logic; A: out std_logic; B: out std_logic); end; architecture SAME_arch of SAME is type SMachine_type is (S,S3,S2,S); signal SMachine: SMachine_type := S; begin SMachine_machine: process () begin if reset='' then A<=''; B<=''; SMachine <= S; elsif 'event and = '' then case SMachine is when S => A<=''; B<=''; if x='' then SMachine <= S3; elsif x=''then SMachine <= S; when S3 => A<=''; B<=''; if x='' or x='' then SMachine <= S2; when S2 => A<=''; B<=''; if x='' then SMachine <= S; elsif x=''then SMachine <= S; when S => A<=''; B<=''; if x='' then SMachine <= S; elsif x=''then SMachine <= S3; when others => null; end case; end process; end SAME_arch;

16 2. V. 6. ( 9). (.. =,.. = ).. b, e. e ( ) b., d h. h ( ) d ( )..... X= X= X= X= a f b b d c c f e d g a e d c f f b g g h h g a X= X= X= X= a f b b d c c f e d g a e d c f f b g g h h g a.. a c, c ( ) a X= X= X= X= a f b b d c c f b d g a f f b g g d..... X= X= X= X= a f b b d a d g a f f b g g d a, :... : state a f b c e d g h g g h a input output 3. : state a f b a b d g d g g d a input output 4..

17 7 8. -FF x. x=. x=.., 55. ( 5) A B x A B 5. -FF : (t+) =. : A(t+) = A (A,B,X) = (3,4,6,7) B(t+) = B (A,B,X) = (,2,3,6). arnaugh : A = BX + AX' B = A'X + BX' 56. O V FSM Editor 3. x' A x B x A' x' B x x,k U2 U6 U7 U8 U9 x' : A = BX + AX' 56. library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; x U U x:2 entity SAME is port ( reset: in std_logic; : in std_logic; x: in std_logic; a: out std_logic; b: out std_logic); end; architecture SAME_arch of SAME is type SMachine_type is (S,S,S3,S2); signal SMachine: SMachine_type := S; begin SMachine_machine: process () begin if reset='' then a<=''; b<=''; SMachine <= S; elsif 'event and = '' then case SMachine is when S => a<=''; b<=''; if x='' then SMachine <= S; elsif x=''then SMachine <= S; when S => a<=''; b<=''; if x='' then SMachine <= S3; elsif x=''then SMachine <= S; A B A B = A'X + BX' B U3 U4 U5 U U2 A A' B B' A:3 B:4

18 when S3 => a<=''; b<=''; if x='' then SMachine <= S3; elsif x=''then SMachine <= S2; when S2 => a<=''; b<=''; if x='' then SMachine <= S2; elsif x=''then SMachine <= S; when others => null; end case; end process; end SAME_arch; 3. V State Editor. 9. -FFs x. An E= x. = x=. = x=. X X X X X X X X X X X X X X X X X X X X X X 6. 8 FFs. A A A = BEX +B'EX' = E (B X)'. FSM Editor 57. A = BEX +B'EX' = E (B X)' FI-... FOS A B E X A B A A B B X X X X X X X X X X B B = E

19 9 end; x: in std_logic; E: in std_logic; A: out std_logic; B: out std_logic); architecture SAME_arch of SAME is type SMachine_type is (S,S,S2,S3); signal SMachine: SMachine_type := S; begin B B = E 58. 2bit X=, =, V. T E x A B x u E u U6 5 k x:3 B E count-up : U SN7486 U2 SN744 E:2 E U3 SN748 A SN7476 A:4 B SN7476 B:5. 2.5m 5.m 7.5m.m count-down B SMachine_machine: process () begin if reset='' then A<=''; B<=''; SMachine <= S; elsif 'event and = '' then case SMachine is when S => A<=''; B<=''; if E='' and x='' then SMachine <= S3; elsif E='' and x=''then SMachine <= S; elsif (E='' and x='') or (E='' amd x='')then SMachine <= S; when S => A<=''; B<=''; if E='' and x='' then SMachine <= S; elsif E='' and x=''then SMachine <= S2; elsif (E='' and x='') or (E='' and x='')then SMachine <= S; when S2 => A<=''; B<=''; if E='' and x='' then SMachine <= S; elsif E='' and x=''then SMachine <= S3; elsif (E='' and x='') or (E='' and x='')then SMachine <= S2; when S3 => A<=''; B<=''; if E='' and x='' then SMachine <= S2; elsif E='' and x=''then SMachine <= S; elsif (E='' and x='') or (E='' and x='')then SMachine <= S3; when others => null; end case; end process; end SAME_arch; 4. V State Editor. library IEEE; use IEEE.std_logic_64.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity SAME is port ( reset: in std_logic; : in std_logic;

20 2. a).,.5 Mz. b) 3 s. c).mz.. lock2 Sources Voltage in Meters. 6. Analysis igital Timing Analysis 3 s (3u ), 6. k 2 5k 3 M U4 U5 5 x y z w x y z w y z' y z x y z U SN744 x' U SN744 y' U7 SN744 z' U6 SN7432 y+z' U8 SN748 yz y y+z' w x' yz y' U FFs ( 63). A B G 2 3 2G Y 2Y k : U2 SN7474 U3 SN7474 :3 2:2 2 T 6. ==> ( ) ==> ( ) u 2.u 3.u 6.

21 2 V GUAE BO IBAY ieee; USE ieee.std_logic_64.all; ENTITY latch IS OT (d, clk: IN ST_OGI; q: OUT ST_OGI); EN latch; AITETUE latch OF latch IS b: BO (clk='') guard expression q <= GUAE d; -- guarded statement EN BO b; EN latch; FF GUAE BO IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT ( d, clk, rst: IN ST_OGI; q: OUT ST_OGI); EN dff; AITETUE dff OF dff IS b: BO (clk'event AN clk='') q <= GUAE '' WEN rst='' ESE d; EN BO b; EN dff; V. OESS, FUNTION OEUE ( ).,..,,. (behavioral code)., OESS, FUNTIO OEUE). IF, WAIT, ASE OO. VAIABES ( OESS, FUNTIO OEUE)., SIGNA, VAIABE,. OESSES. FUNTIONS OEUES. OESS OESS V. IF, WAIT, ASE, OO ( WAIT). OESS, ( WAIT ). : [label:] OESS (sensitivity list) [VAIABE name type [range] [:= initial_value;]] (sequential code) EN OESS [label]; VAIABES.,.. label.. V., (.. ). EVENT... clk, clk EVENT TUE clk

22 ( ).. FF eset IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT (d, clk, rst: IN ST_OGI; q: OUT ST_OGI); EN dff; AITETUE behavior OF dff IS OESS (clk, rst) IF (rst='') TEN q <= ''; ESIF (clk'event AN clk='') TEN q <= d; EN OESS; EN behavior; V - : SIGNA VAIABE. SIGNA AAGE, ENTITY AITETUE,, VAIABE (.. OESS)., SIGNA, VAIABE. VAIABE, OESS., SIGNA. VAIABE,. SIGNA ( OESS), OESS. SIGNA «<=» VAIABE = «:=». IF IF, WAIT, ASE OO. 22 OESS, FUNTION OEUE. IF.,, ( IF/ESE ),. IF : IF conditions TEN assignments; ESIF conditions TEN assignments;... ESE assignments; : IF (x<y) TEN temp:=""; ESIF (x=y AN w='') TEN temp:=""; ESE temp:=(otes =>''); WAIT WAIT IF., WAIT. IF, ASE OO, OESS WAIT. WAIT : WAIT UNTI signal_condition; WAIT ON signal [, signal2,... ]; WAIT FO time; WAIT UNTI,,. OESS, WAIT UNTI OESS. OESS. : 8bit reset: OESS -- no sensitivity list WAIT UNTI (clk'event AN clk=''); IF (rst='') TEN output <= ""; ESIF (clk'event AN clk='') TEN output <= input; EN OESS; WAIT ON,. OESS., OESS

23 23 rst clk. : 8bit reset: OESS WAIT ON clk, rst; IF (rst='') TEN output <= ""; ESIF (clk'event AN clk='') TEN output <= input; EN OESS;, WAIT FO ( testbenches)...: WAIT FO 5ns;. FF eset WAIT ON IF IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT (d, clk, rst: IN ST_OGI; q: OUT ST_OGI); EN dff; AITETUE dff OF dff IS OESS WAIT ON rst, clk; IF (rst='') TEN q <= ''; ESIF (clk'event AN clk='') TEN q <= d; EN OESS; EN dff; ASE ASE,, ( IF, WAIT OO). : ASE identifier IS WEN value => assignments; WEN value => assignments;... EN ASE; : ASE control IS WEN "" => x<=a; y<=b; WEN "" => x<=b; y<=c; WEN OTES => x<=""; y<="zzzz"; EN ASE; ASE ( ) WEN ( ).,, OTES. NU ( UNAFFETE),... : WEN OTES => NU;., ASE ( ), WEN. WEN, «WEN value» : WEN value -- single value WEN value to value2 -- range, for enumerated data types -- only WEN value value value or value2 or.... FF reset ASE IBAY ieee; -- Unnecessary declaration, because -- BIT was used instead of ST_OGI USE ieee.std_logic_64.all; ENTITY dff IS OT (d, clk, rst: IN BIT; q: OUT BIT); EN dff; AITETUE dff3 OF dff IS OESS (clk, rst) ASE rst IS WEN '' => q<=''; WEN '' => IF (clk'event AN clk='') TEN q <= d; WEN OTES => NU; -- Unnecessary, rst is of type BIT EN ASE; EN OESS; EN dff3;

24 OO OO. IF, WAIT, ASE, OO OESS, FUNTION OEUE. OO : FO / OO:. [label:] FO identifier IN range OO (sequential statements) EN OO [label]; WIE / OO:. [label:] WIE condition OO (sequential statements) EN OO [label]; EXIT:. [label:] EXIT [label] [WEN condition]; NEXT: Used for skipping loop steps. [label:] NEXT [loop_label] [WEN condition];.. OO/EXIT. EXIT escape ( OO, )., OO. IBAY ieee; USE ieee.std_logic_64.all; ENTITY eadingzeros IS OT ( data: IN ST_OGI_VETO (7 OWNTO ); zeros: OUT INTEGE ANGE TO 8); EN eadingzeros; AITETUE behavior OF eadingzeros IS OESS (data) VAIABE count: INTEGE ANGE TO 8; count := ; FO i IN data'ange OO ASE data(i) IS WEN '' => count := count + ; WEN OTES => EXIT; EN ASE; EN OO; zeros <= count; EN OESS; EN behavior; ASE IF 24, ESE IF/ESE ( ASE),., IF ( ),.,, V IF ASE., : ---- With IF: IF (sel="") TEN x<=a; ESIF (sel="") TEN x<=b; ESIF (sel="") TEN x<=c; ESE x<=d; ---- With ASE: ASE sel IS WEN "" => x<=a; WEN "" => x<=b; WEN "" => x<=c; WEN OTES => x<=d; EN ASE; ASE WEN ASE WEN., WEN ASE. : WEN ASE OESS, FUNTION OESS, FUNTION OEUE OEUE, WIT /

25 25 SEET / WEN UNAFFETE NU, : ---- With WEN: WIT sel SEET x <= a WEN "", b WEN "", c WEN "", UNAFFETE WEN OTES; ---- With ASE: ASE sel IS WEN "" => x<=a; WEN "" => x<=b; WEN "" => x<=c; WEN OTES => NU; EN ASE; V - : SIGNA VAIABE. ONSTANT GENEI. ONSTANT SIGNA ( ).. VAIABE ( OESS, FUNTION OEUE). SIGNA VAIABE. ONSTANT ONSTANT : ONSTANT name : type := value; : ONSTANT set_bit : BIT := ''; ONSTANT datamemory : memory := (('','','',''), ('','','',''), ('','','','')); ONSTANT AAGE, AITETUE.,,. ENTITY ( OT) ENTITY., AITETUE ( ) AITETUE., ONSTANT AITETUE AAGE. SIGNA SIGNA,.... OTS ENTITY SINGA. : SIGNA name : type [range] [:= initial_value]; : SIGNA control: BIT := ''; SIGNA count: INTEGE ANGE TO ; SIGNA y: ST_OGI_VETO (7 OWNTO ); SIGNA ONSTANT. SIGNA (.. OESS)., OESS, FUNTION OEUE. SIGNA «<=».,. SIGNA., (.. ).,, VAIABE..

26 ..,.,, OEUE,. VAIABE SIGNA. IBAY ieee; USE ieee.std_logic_64.all; ENTITY count_ones IS OT ( din: IN ST_OGI_VETO (7 OWNTO ); ones: OUT INTEGE ANGE TO 8); EN count_ones; AITETUE not_ok OF count_ones IS SIGNA temp: INTEGE ANGE TO 8; OESS (din) temp <= ; -- not immediate FO i IN TO 7 OO IF (din(i)='') TEN temp <= temp + ; -- not immmediate EN OO; ones <= temp; EN OESS; EN not_ok; temp, ones., ones OUT BUFFE, ones. ones (OUT), (temp). VAIABE ONSTANT SIGNA, VAIABE. OESS, FUNTION, OEUE ( ),.,,. VAIABE, : VAIABE name : type [range] [:= init_value]; 26 : VAIABE control: BIT := ''; VAIABE count: INTEGE ANGE TO ; VAIABE y: ST_OGI_VETO (7 OWNTO ) := ""; VAIABE, OESS, FUNTION OEUE. VAIABE «:=»., SIGNA,,.., VAIABE SIGNA. VAIABE, VAIABE. IBAY ieee; USE ieee.std_logic_64.all; ENTITY count_ones IS OT ( din: IN ST_OGI_VETO (7 OWNTO ); ones: OUT INTEGE ANGE TO 8); EN count_ones; AITETUE ok OF count_ones IS OESS (din) VAIABE temp: INTEGE ANGE TO 8; temp := ; FO i IN TO 7 OO IF (din(i)='') TEN temp := temp + ; EN OO; ones <= temp; EN OESS; EN ok; SIGNA VAIABE SIGNA VAIABE <= :=

27 27. ( OESS, FUNTION, OEUE). AAGE, ENTITY, AITETUE. ENTITY OTS SIGNA. ( OESS, FUNTION, OEUE). ( ). ( OESS, FUNTION OEUE)... : IF (s='') TEN sel <= sel + 2; ASE sel IS WEN => y<=a; WEN => y<=b; WEN 2 => y<=c; WEN 3 => y<=d; EN ASE; EN OESS; EN not_ok; SIGNA., sel<=sel+, sel<=, sel. sel<=sel+2. VAIABE,. SIGNA ( sel). OESS. sel<=sel+2., VAIABE. VAIABE: -- Solution 2: using a VAIABE (ok) IBAY ieee; USE ieee.std_logic_64.all; ENTITY mux IS OT ( a, b, c, d, s, s: IN ST_OGI; y: OUT ST_OGI); EN mux; SINGA ( ): -- Solution : -- using a SIGNA (not ok) -- IBAY ieee; USE ieee.std_logic_64.all; ENTITY mux IS OT ( a, b, c, d, s, s: IN ST_OGI; y: OUT ST_OGI); EN mux; AITETUE not_ok OF mux IS SIGNA sel : INTEGE ANGE TO 3; OESS (a, b, c, d, s, s) sel <= ; IF (s='') TEN sel <= sel + ; AITETUE ok OF mux IS OESS (a, b, c, d, s, s) VAIABE sel : INTEGE ANGE TO 3; sel := ; IF (s='') TEN sel := sel + ; IF (s='') TEN sel := sel + 2; ASE sel IS WEN => y<=a; WEN => y<=b; WEN 2 => y<=c; WEN 3 => y<=d; EN ASE; EN OESS; EN ok;

28 FF SIGNA FF: IF (clk'event AN clk='') TEN q <= d; EN OESS; qbar<= NOT q; EN ok; 28 OT SIGNA. q<=d qbar<=not q, OESS. qbar, q. qbar q. qbar, Solution : not O IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT ( d, clk: IN ST_OGI; q: BUFFE ST_OGI; qbar: OUT ST_OGI); EN dff; AITETUE not_ok OF dff IS OESS (clk) IF (clk'event AN clk='') TEN q <= d; qbar <= NOT q; EN OESS; EN not_ok; qbar <= NOT q, OESS, Solution 2: O IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT ( d, clk: IN ST_OGI; q: BUFFE ST_OGI; qbar: OUT ST_OGI); EN dff; AITETUE ok OF dff IS OESS (clk) 6: count SIGNA count2 VAIABE. : IBAY ieee; USE ieee.std_logic_64.all; ENTITY freq_divider IS OT ( clk : IN ST_OGI; out, out2 : BUFFE ST_OGI); EN freq_divider; AITETUE example OF freq_divider IS SIGNA count : INTEGE ANGE TO 7; OESS (clk) VAIABE count2 : INTEGE ANGE TO 7; IF (clk'event AN clk='') TEN count <= count + ; count2 := count2 + ; IF (count =? ) TEN out <= NOT out; count <= ; IF (count2 =? ) TEN out2 <= NOT out2; count2 := ; EN OESS; EN example; flip-flops.

29 29,. SIGNA flip-flop.., OESS, FUNTION OEUE ( IF signal EVENT WAIT UNTI VAIABE, flip-flops OESS ( FUNTION OEUE). VAIABE, ( ), flip-flops. VAIABE.,, output output2 ( flip-flops), (clk): OESS (clk) IF (clk'event AN clk='') TEN output <= temp; -- output stored output2 <= a; -- output2 stored EN OESS;, output ( output2 ): OESS (clk) IF (clk'event AN clk='') TEN output <= temp; -- output stored output2 <= a; -- output2 not stored EN OESS;, temp x ( ): OESS (clk) VAIABE temp: BIT; IF (clk'event AN clk='') TEN temp <= a; x <= temp; -- temp causes x to be stored EN OESS; FF FF FF: SIGNA, FFs: -- Solution : Two FFs IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT ( d, clk: IN ST_OGI; q: BUFFE ST_OGI; qbar: OUT ST_OGI); EN dff; AITETUE two_dff OF dff IS OESS (clk) IF (clk'event AN clk='') TEN q <= d; -- generates a register qbar <= NOT d; -- generates a register EN OESS; EN two_dff; :,, : -- Solution 2: One FF IBAY ieee; USE ieee.std_logic_64.all; ENTITY dff IS OT ( d, clk: IN ST_OGI; q: BUFFE ST_OGI;

30 qbar: OUT ST_OGI); EN dff; AITETUE one_dff OF dff IS OESS (clk) IF (clk'event AN clk='') TEN q <= d; -- generates a register EN OESS; qbar <= NOT q; -- uses logic gate (no register) EN one_dff;, : count <= ; IF count < half TEN lk <= ''; ESE lk <= ''; EN OESS; EN Behavior; 3 ode. V behavioral description of a clock divider circuit. /FGAs, q qbar pins, o fitter (place & route) FFs.. fitter (place & route),.. V E. O. wang, igital ogic and Microprocessor esign withv. atches and Flip-Flops IBAY IEEE; USE IEEE.ST_OGI_64.A; ENTITY lockdiv IS OT ( lk25mhz: IN ST_OGI; lk: OUT ST_OGI); EN lockdiv; AITETUE Behavior OF lockdiv IS ONSTANT max: INTEGE := 25; ONSTANT half: INTEGE := max/2; SIGNA count: INTEGE ANGE TO max; OESS WAIT UNTI lk25mhz'event and lk25mhz = ''; IF count < max TEN count <= count + ; ESE

12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr

12. A B C A B C A B C 1 A B C A B C A B C JK-FF NETr 2..,.,.. Flip-Flops :, Flip-Flops, Flip Flop. ( MOD)... -8 8, 7 ( ).. n Flip-Flops. n Flip-Flops : 2 n. 2 n, Modulo. (-5) -4 ( -), (-) - ( -).. / A A A 2 3 4 5 MOD-5 6 MOD-6 7 MOD-7 8 9 / A A A 2 3 4 5

More information

Digital Design with VHDL

Digital Design with VHDL Digital Design with VHDL CSE 560M Lecture 5 Shakir James Shakir James 1 Plan for Today Announcement Commentary due Wednesday HW1 assigned today. Begin immediately! Questions VHDL help session Assignment

More information

ECE380 Digital Logic

ECE380 Digital Logic ECE38 igital Logic Flip-Flops, Registers and Counters: Flip-Flops r.. J. Jackson Lecture 25- Flip-flops The gated latch circuits presented are level sensitive and can change states more than once during

More information

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process) ECE 3401 Lecture 7 Concurrent Statements & Sequential Statements (Process) Concurrent Statements VHDL provides four different types of concurrent statements namely: Signal Assignment Statement Simple Assignment

More information

Engr354: Digital Logic Circuits

Engr354: Digital Logic Circuits Engr354: igital Circuits Chapter 7 Sequential Elements r. Curtis Nelson Sequential Elements In this chapter you will learn about: circuits that can store information; Basic cells, latches, and flip-flops;

More information

Design Verification & Testing Design for Testability and Scan

Design Verification & Testing Design for Testability and Scan Overview esign for testability (FT) 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

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 8. Sequential Circuits for Registers and Counters Chapter 8 Sequential Circuits for Registers and Counters Lesson 3 COUNTERS Ch16L3- "Digital Principles and Design", Raj Kamal, Pearson Education, 2006 2 Outline Counters T-FF Basic Counting element State

More information

Lenguaje VHDL. Diseño de sistemas digitales secuenciales

Lenguaje VHDL. Diseño de sistemas digitales secuenciales Lenguaje VHDL Diseño de sistemas digitales secuenciales Flip-Flop D 1 entity d_ff is clk: in std_logic; d: in std_logic; q: out std_logic 2 end d_ff; P3 P1 5 Q D Q Q(t+1) 0 0 0 0 1 0 1 0 1 1 1 1 architecture

More information

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

INTEGRATED CIRCUITS. For a complete data sheet, please also download: INTEGRATED CIRCUITS DATA SEET For a complete data sheet, please also download: The IC6 74C/CT/CU/CMOS ogic Family Specifications The IC6 74C/CT/CU/CMOS ogic Package Information The IC6 74C/CT/CU/CMOS ogic

More information

VHDL GUIDELINES FOR SYNTHESIS

VHDL GUIDELINES FOR SYNTHESIS VHDL GUIDELINES FOR SYNTHESIS Claudio Talarico For internal use only 1/19 BASICS VHDL VHDL (Very high speed integrated circuit Hardware Description Language) is a hardware description language that allows

More information

SELECT INPUTS STROBE OUTPUTS

SELECT INPUTS STROBE OUTPUTS 1 9. 1. I SN74153. 4x1 U1 74153 2 21 22 23 1. SN74153 ( ), ogic Is-MUs MUX. SEET DT INPUTS STROE OUTPUT INPUTS 1 2 3 G Y X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 1. SN74153. : SEET INPUTS

More information

Modeling Latches and Flip-flops

Modeling Latches and Flip-flops Lab Workbook Introduction Sequential circuits are digital circuits in which the output depends not only on the present input (like combinatorial circuits), but also on the past sequence of inputs. In effect,

More information

Lesson 12 Sequential Circuits: Flip-Flops

Lesson 12 Sequential Circuits: Flip-Flops Lesson 12 Sequential Circuits: Flip-Flops 1. Overview of a Synchronous Sequential Circuit We saw from last lesson that the level sensitive latches could cause instability in a sequential system. This instability

More information

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010 EE4800 CMOS igital IC esign & Analysis Lecture 10 Sequential Circuit esign Zhuo Feng 10.1 Z. Feng MTU EE4800 CMOS igital IC esign & Analysis 2010 Sequencing Outline Sequencing Element esign Max and Min-elay

More information

Lecture 11: Sequential Circuit Design

Lecture 11: Sequential Circuit Design Lecture 11: Sequential Circuit esign Outline Sequencing Sequencing Element esign Max and Min-elay Clock Skew Time Borrowing Two-Phase Clocking 2 Sequencing Combinational logic output depends on current

More information

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs Principles of VLSI esign Sequential Circuits Sequential Circuits Combinational Circuits Outputs depend on the current inputs Sequential Circuits Outputs depend on current and previous inputs Requires separating

More information

Systems I: Computer Organization and Architecture

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

More information

Master/Slave Flip Flops

Master/Slave Flip Flops Master/Slave Flip Flops Page 1 A Master/Slave Flip Flop ( Type) Gated latch(master) Gated latch (slave) 1 Gate Gate GATE Either: The master is loading (the master in on) or The slave is loading (the slave

More information

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

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

More information

CSE140: Components and Design Techniques for Digital Systems

CSE140: Components and Design Techniques for Digital Systems CE4: Components and esign Techniques for igital ystems Tajana imunic osing ources: Where we are now What we ve covered so far (Chap -5, App. A& B) Number representations Boolean algebra OP and PO Logic

More information

Lecture 10: Sequential Circuits

Lecture 10: Sequential Circuits Introduction to CMOS VLSI esign Lecture 10: Sequential Circuits avid Harris Harvey Mudd College Spring 2004 Outline q Sequencing q Sequencing Element esign q Max and Min-elay q Clock Skew q Time Borrowing

More information

Set-Reset (SR) Latch

Set-Reset (SR) Latch et-eset () Latch Asynchronous Level sensitive cross-coupled Nor gates active high inputs (only one can be active) + + Function 0 0 0 1 0 1 eset 1 0 1 0 et 1 1 0-? 0-? Indeterminate cross-coupled Nand gates

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 sources and are used with permission. Prof. Randy Katz (Unified

More information

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline SR Latch D Latch Edge-Triggered D Flip-Flop (FF) S-R Flip-Flop (FF) J-K Flip-Flop (FF) T Flip-Flop

More information

Memory Elements. Combinational logic cannot remember

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

More information

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1 WEEK 8.1 egisters and Counters ECE124 igital Circuits and Systems Page 1 Additional schematic FF symbols Active low set and reset signals. S Active high set and reset signals. S ECE124 igital Circuits

More information

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012 Latches, the D Flip-Flop & Counter Design ECE 52A Winter 22 Reading Assignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7. Basic Latch 7.2 Gated SR Latch 7.2. Gated SR

More information

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

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

More information

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012 Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

Flip-Flops and Sequential Circuit Design

Flip-Flops and Sequential Circuit Design Flip-Flops and Sequential Circuit Design ECE 52 Winter 22 Reading ssignment Brown and Vranesic 7 Flip-Flops, Registers, Counters and a Simple Processor 7.5 T Flip-Flop 7.5. Configurable Flip-Flops 7.6

More information

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad A. M. Niknejad University of California, Berkeley EE 100 / 42 Lecture 24 p. 1/20 EE 42/100 Lecture 24: Latches and Flip Flops ELECTRONICS Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad University of California,

More information

7. Latches and Flip-Flops

7. Latches and Flip-Flops Chapter 7 Latches and Flip-Flops Page 1 of 18 7. Latches and Flip-Flops Latches and flip-flops are the basic elements for storing information. One latch or flip-flop can store one bit of information. The

More information

ASYNCHRONOUS COUNTERS

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

More information

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse. DIGITAL COUNTERS http://www.tutorialspoint.com/computer_logical_organization/digital_counters.htm Copyright tutorialspoint.com Counter is a sequential circuit. A digital circuit which is used for a counting

More information

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram SEQUENTIAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/sequential_circuits.htm Copyright tutorialspoint.com The combinational circuit does not use any memory. Hence the previous

More information

Chapter 5. Sequential Logic

Chapter 5. Sequential Logic Chapter 5 Sequential Logic Sequential Circuits (/2) Combinational circuits: a. contain no memory elements b. the outputs depends on the current inputs Sequential circuits: a feedback path outputs depends

More information

Digital Logic Design Sequential circuits

Digital Logic Design Sequential circuits Digital Logic Design Sequential circuits Dr. Eng. Ahmed H. Madian E-mail: ahmed.madian@guc.edu.eg Dr. Eng. Rania.Swief E-mail: rania.swief@guc.edu.eg Dr. Eng. Ahmed H. Madian Registers An n-bit register

More information

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell Digital Electronics Part I Combinational and Sequential Logic Dr. I. J. Wassell Introduction Aims To familiarise students with Combinational logic circuits Sequential logic circuits How digital logic gates

More information

CHAPTER 11 LATCHES AND FLIP-FLOPS

CHAPTER 11 LATCHES AND FLIP-FLOPS CHAPTER 11 LATCHES AND FLIP-FLOPS This chapter in the book includes: Objectives Study Guide 11.1 Introduction 11.2 Set-Reset Latch 11.3 Gated D Latch 11.4 Edge-Triggered D Flip-Flop 11.5 S-R Flip-Flop

More information

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology Topics of Chapter 5 Sequential Machines Memory elements Memory elements. Basics of sequential machines. Clocking issues. Two-phase clocking. Testing of combinational (Chapter 4) and sequential (Chapter

More information

Flip-Flops, Registers, Counters, and a Simple Processor

Flip-Flops, Registers, Counters, and a Simple Processor June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 Flip-Flops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number

More information

VGA video signal generation

VGA video signal generation A VGA display controller VGA video signal generation A VGA video signal contains 5 active signals: horizontal sync: digital signal, used for synchronisation of the video vertical sync: digital signal,

More information

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency

Timing Methodologies (cont d) Registers. Typical timing specifications. Synchronous System Model. Short Paths. System Clock Frequency Registers Timing Methodologies (cont d) Sample data using clock Hold data between clock cycles Computation (and delay) occurs between registers efinition of terms setup time: minimum time before the clocking

More information

Admin. ECE 550: Fundamentals of Computer Systems and Engineering. Last time. VHDL: Behavioral vs Structural. Memory Elements

Admin. ECE 550: Fundamentals of Computer Systems and Engineering. Last time. VHDL: Behavioral vs Structural. Memory Elements Admin C 55: Fundamentals of Computer ystems and ngineering torage and Clocking eading Finish up Chapter ecitation How is it going? VHL questions/issues? Homework Homework ubmissions vis akai C 55 (Hilton):

More information

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

INTEGRATED CIRCUITS. For a complete data sheet, please also download: INTEGRATED CIRCUITS DATA SEET For a complete data sheet, please also download: The IC06 74C/CT/CU/CMOS ogic Family Specifications The IC06 74C/CT/CU/CMOS ogic Package Information The IC06 74C/CT/CU/CMOS

More information

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw. Sequential Circuit Modeling Sequential Elements with Verilog Prof. Chien-Nan Liu TEL: 03-4227151 ext:34534 Email: jimmy@ee.ncu.edu.tw 4-1 Sequential Circuit Outputs are functions of inputs and present states of storage elements

More information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit - FSM A Sequential circuit contains: Storage

More information

Sequential Logic: Clocks, Registers, etc.

Sequential Logic: Clocks, Registers, etc. ENEE 245: igital Circuits & Systems Lab Lab 2 : Clocks, Registers, etc. ENEE 245: igital Circuits and Systems Laboratory Lab 2 Objectives The objectives of this laboratory are the following: To design

More information

The enable pin needs to be high for data to be fed to the outputs Q and Q bar.

The enable pin needs to be high for data to be fed to the outputs Q and Q bar. of 7 -Type flip-flop (Toggle switch) The -type flip-flops are used in prescalar/divider circuits and frequency phase detectors. Figure shows how the flip-flop (latch) can be made using -input logic circuits

More information

Lecture-3 MEMORY: Development of Memory:

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

More information

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop. describe how such a flip-flop can be SET and RESET. describe the disadvantage

More information

In this example the length of the vector is determined by D length and used for the index variable.

In this example the length of the vector is determined by D length and used for the index variable. Loops Loop statements are a catagory of control structures that allow you to specify repeating sequences of behavior in a circuit. There are three primary types of loops in VHDL: for loops, while loops,

More information

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE Ioan Lemeni Computer and Communication Engineering Department Faculty of Automation, Computers and Electronics University of Craiova 13, A.I. Cuza, Craiova,

More information

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems Harris Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems David Harris Harvey Mudd College David_Harris@hmc.edu Based on EE271 developed by Mark Horowitz, Stanford University MAH

More information

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0

Counters. Present State Next State A B A B 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 ounter ounters ounters are a specific type of sequential circuit. Like registers, the state, or the flip-flop values themselves, serves as the output. The output value increases by one on each clock cycle.

More information

Layout of Multiple Cells

Layout of Multiple Cells Layout of Multiple Cells Beyond the primitive tier primitives add instances of primitives add additional transistors if necessary add substrate/well contacts (plugs) add additional polygons where needed

More information

Clocking. Figure by MIT OCW. 6.884 - Spring 2005 2/18/05 L06 Clocks 1

Clocking. Figure by MIT OCW. 6.884 - Spring 2005 2/18/05 L06 Clocks 1 ing Figure by MIT OCW. 6.884 - Spring 2005 2/18/05 L06 s 1 Why s and Storage Elements? Inputs Combinational Logic Outputs Want to reuse combinational logic from cycle to cycle 6.884 - Spring 2005 2/18/05

More information

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa Experiment # 9 Clock generator circuits & Counters Eng. Waleed Y. Mousa 1. Objectives: 1. Understanding the principles and construction of Clock generator. 2. To be familiar with clock pulse generation

More information

Lecture 8: Synchronous Digital Systems

Lecture 8: Synchronous Digital Systems Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered

More information

Using Xilinx ISE for VHDL Based Design

Using Xilinx ISE for VHDL Based Design ECE 561 Project 4-1 - Using Xilinx ISE for VHDL Based Design In this project you will learn to create a design module from VHDL code. With Xilinx ISE, you can easily create modules from VHDL code using

More information

Digital Fundamentals

Digital Fundamentals igital Fundamentals with PL Programming Floyd Chapter 9 Floyd, igital Fundamentals, 10 th ed, Upper Saddle River, NJ 07458. All Rights Reserved Summary Latches (biestables) A latch is a temporary storage

More information

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

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

More information

Register File, Finite State Machines & Hardware Control Language

Register File, Finite State Machines & Hardware Control Language Register File, Finite State Machines & Hardware Control Language Avin R. Lebeck Some slides based on those developed by Gershon Kedem, and by Randy Bryant and ave O Hallaron Compsci 04 Administrivia Homework

More information

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies ETEC 2301 Programmable Logic Devices Chapter 10 Counters Shawnee State University Department of Industrial and Engineering Technologies Copyright 2007 by Janna B. Gallaher Asynchronous Counter Operation

More information

BINARY CODED DECIMAL: B.C.D.

BINARY CODED DECIMAL: B.C.D. BINARY CODED DECIMAL: B.C.D. ANOTHER METHOD TO REPRESENT DECIMAL NUMBERS USEFUL BECAUSE MANY DIGITAL DEVICES PROCESS + DISPLAY NUMBERS IN TENS IN BCD EACH NUMBER IS DEFINED BY A BINARY CODE OF 4 BITS.

More information

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Asynchronous & Synchronous Reset Design Techniques - Part Deux Clifford E. Cummings Don Mills Steve Golson Sunburst Design, Inc. LCDM Engineering Trilobyte Systems cliffc@sunburst-design.com mills@lcdm-eng.com sgolson@trilobyte.com ABSTRACT This paper will investigate

More information

Chapter 9 Latches, Flip-Flops, and Timers

Chapter 9 Latches, Flip-Flops, and Timers ETEC 23 Programmable Logic Devices Chapter 9 Latches, Flip-Flops, and Timers Shawnee State University Department of Industrial and Engineering Technologies Copyright 27 by Janna B. Gallaher Latches A temporary

More information

Lecture 7: Clocking of VLSI Systems

Lecture 7: Clocking of VLSI Systems Lecture 7: Clocking of VLSI Systems MAH, AEN EE271 Lecture 7 1 Overview Reading Wolf 5.3 Two-Phase Clocking (good description) W&E 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.9, 5.5.10 - Clocking Note: The analysis

More information

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter Description: The NTE2053 is a CMOS 8 bit successive approximation Analog to Digital converter in a 20 Lead DIP type package which uses a differential

More information

Sequential Logic Design Principles.Latches and Flip-Flops

Sequential Logic Design Principles.Latches and Flip-Flops Sequential Logic Design Principles.Latches and Flip-Flops Doru Todinca Department of Computers Politehnica University of Timisoara Outline Introduction Bistable Elements Latches and Flip-Flops S-R Latch

More information

Digital Design with Synthesizable VHDL

Digital Design with Synthesizable VHDL Digital Design with Synthesizable VHDL Prof. Stephen A. Edwards Columbia University Spring 2012 Combinational Logic in a Dataflow Style Hierarchy: Instantiating Components (entities) Combinational Logic

More information

Hardware Implementation of the Stone Metamorphic Cipher

Hardware Implementation of the Stone Metamorphic Cipher International Journal of Computer Science & Network Security VOL.10 No.8, 2010 Hardware Implementation of the Stone Metamorphic Cipher Rabie A. Mahmoud 1, Magdy Saeb 2 1. Department of Mathematics, Faculty

More information

Asynchronous Counters. Asynchronous Counters

Asynchronous Counters. Asynchronous Counters Counters and State Machine Design November 25 Asynchronous Counters ENGI 25 ELEC 24 Asynchronous Counters The term Asynchronous refers to events that do not occur at the same time With respect to counter

More information

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

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

More information

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER

LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER LAB #3 VHDL RECOGNITION AND GAL IC PROGRAMMING USING ALL-11 UNIVERSAL PROGRAMMER OBJECTIVES 1. Learn the basic elements of VHDL that are implemented in Warp. 2. Build a simple application using VHDL and

More information

CS311 Lecture: Sequential Circuits

CS311 Lecture: Sequential Circuits CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

SN74LS74AMEL. Dual D Type Positive Edge Triggered Flip Flop LOW POWER SCHOTTKY

SN74LS74AMEL. Dual D Type Positive Edge Triggered Flip Flop LOW POWER SCHOTTKY SN74S74A ual Type Positive Edge Triggered Flip Flop The SN74S74A dual edge-triggered flip-flop utilizes Schottky TT circuitry to produce high speed -type flip-flops. Each flip-flop has individual clear

More information

A CPLD VHDL Introduction

A CPLD VHDL Introduction Application Note: CPLD R XAPP105 (v2.0) August 30, 2001 Summary This introduction covers the fundamentals of VHDL as applied to Complex Programmable Logic Devices (CPLDs). Specifically included are those

More information

Using Altera MAX Series as Microcontroller I/O Expanders

Using Altera MAX Series as Microcontroller I/O Expanders 2014.09.22 Using Altera MAX Series as Microcontroller I/O Expanders AN-265 Subscribe Many microcontroller and microprocessor chips limit the available I/O ports and pins to conserve pin counts and reduce

More information

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs. equential Logic o far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs. In sequential logic the output of the

More information

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary RTL Design RTL Overview Gate-level design is now rare! design automation is necessary to manage the complexity of modern circuits only library designers use gates automated RTL synthesis is now almost

More information

VHDL programmering H2

VHDL programmering H2 VHDL programmering H2 VHDL (Very high speed Integrated circuits) Hardware Description Language IEEE standard 1076-1993 Den benytter vi!! Hvornår blev den frigivet som standard første gang?? Ca. 1980!!

More information

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

74LS193 Synchronous 4-Bit Binary Counter with Dual Clock 74LS193 Synchronous 4-Bit Binary Counter with Dual Clock General Description The DM74LS193 circuit is a synchronous up/down 4-bit binary counter. Synchronous operation is provided by having all flip-flops

More information

Quartus II Introduction for VHDL Users

Quartus II Introduction for VHDL Users Quartus II Introduction for VHDL Users This tutorial presents an introduction to the Quartus II software. It gives a general overview of a typical CAD flow for designing circuits that are implemented by

More information

路 論 Chapter 15 System-Level Physical Design

路 論 Chapter 15 System-Level Physical Design Introduction to VLSI Circuits and Systems 路 論 Chapter 15 System-Level Physical Design Dept. of Electronic Engineering National Chin-Yi University of Technology Fall 2007 Outline Clocked Flip-flops CMOS

More information

Counters & Shift Registers Chapter 8 of R.P Jain

Counters & Shift Registers Chapter 8 of R.P Jain Chapter 3 Counters & Shift Registers Chapter 8 of R.P Jain Counters & Shift Registers Counters, Syllabus Design of Modulo-N ripple counter, Up-Down counter, design of synchronous counters with and without

More information

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute DIGITAL TECHNICS II Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 2. LECTURE: ELEMENTARY SEUENTIAL CIRCUITS: FLIP-FLOPS 1st year BSc course 2nd (Spring) term 2012/2013 1

More information

DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock

DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock September 1986 Revised March 2000 DM74LS193 Synchronous 4-Bit Binary Counter with Dual Clock General Description The DM74LS193 circuit is a synchronous up/down 4-bit binary counter. Synchronous operation

More information

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters LAB OBJECTIVES 1. Introduction to latches and the D type flip-flop 2. Use of actual flip-flops to help you understand sequential

More information

(1) D Flip-Flop with Asynchronous Reset. (2) 4:1 Multiplexor. CS/EE120A VHDL Lab Programming Reference

(1) D Flip-Flop with Asynchronous Reset. (2) 4:1 Multiplexor. CS/EE120A VHDL Lab Programming Reference VHDL is an abbreviation for Very High Speed Integrated Circuit Hardware Description Language, and is used for modeling digital systems. VHDL coding includes behavior modeling, structure modeling and dataflow

More information

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division

Introduction to Programmable Logic Devices. John Coughlan RAL Technology Department Detector & Electronics Division Introduction to Programmable Logic Devices John Coughlan RAL Technology Department Detector & Electronics Division PPD Lectures Programmable Logic is Key Underlying Technology. First-Level and High-Level

More information

Sequential Circuit Design

Sequential Circuit Design Sequential Circuit Design Lan-Da Van ( 倫 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2009 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outlines

More information

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

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

More information

An Example VHDL Application for the TM-4

An Example VHDL Application for the TM-4 An Example VHDL Application for the TM-4 Dave Galloway Edward S. Rogers Sr. Department of Electrical and Computer Engineering University of Toronto March 2005 Introduction This document describes a simple

More information

Lab 7: VHDL 16-Bit Shifter

Lab 7: VHDL 16-Bit Shifter Lab 7: VHDL 16-Bit Shifter Objectives : Design a 16-bit shifter which need implement eight shift operations: logic shift right, logic shift left, arithmetic shift right, arithmetic shift left, rotate right,

More information

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs

DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary Outputs August 1986 Revised March 2000 DM74LS112A Dual Negative-Edge-Triggered Master-Slave J-K Flip-Flop with Preset, Clear, and Complementary General Description This device contains two independent negative-edge-triggered

More information

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics PROGETTO DI SISTEMI ELETTRONICI DIGITALI Digital Systems Design Digital Circuits Advanced Topics 1 Sequential circuit and metastability 2 Sequential circuit A Sequential circuit contains: Storage elements:

More information

I 2 S bus specification

I 2 S bus specification 1.0 INTOUCTION Many digital audio systems are being introduced into the consumer audio market, including compact disc, digital audio tape, digital sound processors, and digital TV-sound. The digital audio

More information