









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth exploration of flip flops, including definitions, latches (set-reset and d latch), triggers, edge-triggered and master-slave flip-flops, and hdl modeling. Students will learn about the differences between edge-triggered and level-sensitive flip-flops, as well as how to construct and simulate various flip-flop models.
Typology: Slides
1 / 15
This page cannot be seen from the preview
Don't miss anything!










Not a gymnastic movement.
ENTITY SR_latch IS PORT (S,R,C : IN BIT; Q, Q_bar : OUT BIT); END SR_latch; ARCHITECTURE one OF SR_latch IS SIGNAL CS,CR : BIT; SIGNAL Q_int, Q_bar_int : BIT; BEGIN CS <= S nand C after 1 ns; CR <= R nand C after 1 ns; Q_int <= CS nand Q_bar_int after 1 ns; Q_bar_int <= CR nand Q_int after 1 ns; Q <= Q_int; Q_bar <= Q_bar_int; END one;
ENTITY tb IS END tb; ARCHITECTURE one OF tb IS SIGNAL Clk,nClk,S,R,D : BIT; SIGNAL i1,i2 : BIT; SIGNAL SRq,SRqbar : BIT; COMPONENT SR_latch PORT (S,R,C : IN BIT; END COMPONENT; FOR ALL : SR^ Q,Q_bar : OUT BIT);_latch USE ENTITY work.sr_latch(one); BEGIN -- Clk <= not Clk after 10 ns; gen clock signals nClk <= not Clk after 1 ns; -- wire in master slave FF SRm : SR_latch PORT MAP(S,R,Clk,i1,i2); SRs : SR_latch PORT MAP(i1,i2,nClk,SRq,SRqbar); PROCESS BEGIN S<='0'; R<='0'; WAIT FOR 10 ns; S<='1'; R<='0'; WAIT FOR 20 ns; S<='0'; R<='0'; WAIT FOR 10 ns; S<='0'; R<='1'; WAIT FOR 20 ns; S<='0'; R<='0'; WAIT FOR 50 ns; S<='1'; R<='0'; WAIT FOR 20 ns; S<='0'; R<='0'; END PROCESS;^ WAIT FOR 10 ns;^ WAIT; END one;