L5: Simple Sequential Circuits and Verilog
L5: Simple Sequential Circuits and Verilog
D Q D Q Positive
Positive D Q D Q
Latch Register
Clk Clk
Latches are used to build Registers (using the Master-Slave Configuration), but
are almost NEVER used by itself in a standard digital design flow.
Quite often, latches are inserted in the design by mistake (e.g., an error in your
Verilog code). Make sure you understand the difference between the two.
Several types of memory elements (SR, JK, T, D). We will most commonly use
the D-Register, though you should understand how the different types are built
and their functionality.
a 1 a 1
out D Q out
b 0 b 0
tc-q
Clear on Clock Edge
DFF with Asynchronous Clear
Flip-Flop Based q1 q2
in D Q D Q D Q out
Digital Delay
Line
clk
“At each rising clock edge, q1, q2, and out “At each rising clock edge, q1 = in.
simultaneously receive the old values of in, After that, q2 = q1 = in.
q1, and q2.” After that, out = q2 = q1 = in.
Therefore out = in.”
q1 q2 q1 q2
in D Q D Q D Q out in D Q out
clk clk
Non-blocking Simulation
Blocking Simulation
Count [3]
Count [2]
Count [1]
Count [0]
Clock