UNIT3 - Logic Design With Behavioral Models of Combinational and Sequential Logic
UNIT3 - Logic Design With Behavioral Models of Combinational and Sequential Logic
•In general CN-j+1 =1, then the input to stage j is formed as the
ex-or of Y[j-1] and Y[N], for j=2,3,…., N
• Verilog code of
8-Cell autonomous
LFSR
Data movements in LFSR with modulo-2
addition
Algorithm model Verilog code for LFSR
Alternate loops
• A for loop has the form
for(initial statement; control_expression; index_statement)
statement_for_execution;
while(enable)
begin @ (posedge clock)
count <= count + 1;
end
Machines with multi cycle operations
•Some of the digital machines have repetitive operations
distributed over multiple clock cycles
Data movement
• Synthesized circuit
Universal Shift Register
• It is an important unit of digital machines that employ a bit-slice
architecture, with multiple identical slices of a 4-bit shift register
chained together with additional logic to form a wider and more
versatile data path.
• Its features include
- Synchronous reset
- Parallel inputs
- Parallel outputs
- Bidirectional serial input form either the LSB or MSB
- Bidirectional serial output to either the LSB or MSB
• Four Modes of operation
• A) Serial-in, Serial-out – Unidirectional Shift Register
• Limitation: Register files are not used for mass storage, because they
occupy significantly more silicon area than compiled memory.
A 32-word register file in tandem with an ALU
having 32-bit data path
Verilog code
Switch debounce, Metastability, and
Synchronizers for asynchronous signals
• A hardware latch can enter the meta stable state if pulse at one of its
inputs is too short, or both inputs asserted simultaneously or within a
small interval each other.
• A transparent latch enter metastable state, if the data are unstable at
edge of the enable input.
• A D-flip flop can enter metastable state, if the data are unstable at
setup interval preceding the clock edge or if the clock pulse is too
narrow.
• A push button input
device with closure
bounce
A NAND latch configuration for eliminating
the effects of switch closure bounce
e
•Example of metastability
Synchronizers for Asynchronous input
signals
•Circuit, when width of
the asynch input signal
> period of clock
• Circuit, when width of
the asynch input signal
< period of clock
• Waveforms without
Metastability condition
• Waveforms having
Metastability condition