Bistable Circuits in Digital Logic
Bistable Circuits in Digital Logic
1 Introduction
In combinational logic circuits, the output at any instant is exclusively determined by the current
input values, assuming propagation delay is negligible.
In contrast, sequential logic circuits can remember past inputs. Here, the output depends on:
Figure below conceptually shows a sequential circuit composed of a combinational logic block and a
memory element connected in a feedback loop.
Figure 1: Sequential circuit consisting of a combinational logic block and a memory block in the
feedback loop
The feedback in sequential circuits gives rise to regenerative behavior, allowing them to retain
state and thus act as memory elements.
1 Introduction
Latches
Flip-flops
Registers
Memory elements
Figure 4: (a) VTC of Cross - Coupled Inverter; (b) Potential energy landscape
The voltage transfer curves (VTC) of both inverters can be plotted on the same graph as sown in
above figure(a). The intersection points indicate possible operating points of the circuit.
One is unstable
Stability analysis:
At the two stable points, the total potential energy is at a minimum. This occurs when the
voltage gains of both inverters are approximately zero.
At the intermediate operating point, the potential energy is at a maximum. Here, both
inverters exhibit maximum voltage gain, making the system highly sensitive to small
perturbations.
A small disturbance at the unstable point causes the system to transition into one of the two
stable states.
This bistable energy profile explains why the cross-coupled inverter configuration is widely
used in digital memory circuits such as SR latches and flip-flops, which rely on having two
stable states to store binary information.
2.2 CMOS Two-Inverter Bistable Element
Figure below shows the circuit diagram of a CMOS bistable element constructed using two
cascaded CMOS inverters.
These inverters are connected in a positive feedback loop — the output of the first inverter is
the input to the second, and vice versa.
This configuration creates a system with two stable states and one unstable state.
At the unstable operating point, both outputs are at an intermediate voltage level. At this
condition:
If the circuit is initialized exactly at the unstable point, any small voltage perturbation or noise will
move the system away from it. Due to the positive feedback:
The system settles in one of two stable states (refer the figure shown below):
Figure 6: One possible time-domain response of the output voltages when the circuit is initially
biased at its unstable operating point.
The direction in which each output voltage diverges is determined by the initial perturbation
polarity. For example:
If the output of inverter 1 is slightly higher than that of inverter 2, it will rise further toward
VOH.
This positive feedback ensures that the circuit acts as a memory element.
The metastable point is unstable and cannot retain a state in the presence of noise.
This circuit is the basis for SRAM cells, latches, and flip-flops.
However, the simple two-inverter setup does not allow external control to change its state.
3.2 Need for Triggering Inputs
To enable external control and allow a change of state, additional switching elements (inputs) must
be added. The resulting circuit is a CMOS SR Latch (see figure below), which includes:
S (Set) input
R (Reset) input
This circuit is often referred to as an SR flip-flop, as it can toggle between two stable states.
The second input of each NOR gate is connected to the external control input (S or R).
The gate-level schematic and its corresponding block diagram representation are illustrated in
figure below.
These figures clearly show how the SR latch structure supports both internal feedback and external
control via S and R inputs.
The circuit provides two outputs:
Q: Primary output
Q: Complement of Q
By definition:
Set state: Q = 1, Q = 0
Reset state: Q = 0, Q = 1
– Or M3 is ON → Q = VOL, Q = VOH
For simplicity, the operating states of the complementary pMOS transistors are not explicitly
listed.
The static operation modes and voltage levels of the NOR-based CMOS SR latch circuit are
summarized in the following table:
Table 3: Operation modes of the transistors in the NOR-based CMOS SR latch circuit
This approximation results in a slight overestimation of switching time but provides useful first-
order analysis.
The circuit diagram of the SR latch is shown in figure below together with the lumped load
M1 turns ON ⇒ Q falls
M2 and M4 are OFF (although M2 might turn ON during transition, helping Q fall faster)
This method avoids simultaneous differential equations and gives a simplified delay estimate.
Implementation Comparison:
CMOS Implementation:
Implementation:
– Logic works the same, but suffers from static power dissipation.
– Output levels may not reach full rail voltages.
Inputs: S, R (active-low)
Outputs: Q, Q
1. Set State:
S = 0, R = 1
⇒ Q = 1, Q = 0
2. Reset State:
3. Hold State:
S = 1, R = 1
⇒ Previous state is held
4. Invalid State:
S = 0, R = 0
⇒ Q = Q = 1 (invalid)
S R Q n +1 Q n +1 Operation
1 1 Qn Qn Hold(nochange)
0 1 1 0 Set
1 0 0 1 Reset
0 0 1 1 NotAllowed
The gate-level schematic and the corresponding block diagram representation of the NAND-based
SR latch circuit are shown in figure below:
Figure 12: Gate-level schematic and block diagram of the NAND-based SR latch
NAND latch with depletion-load NMOS gates is possible, but CMOS offers better noise margins
and full output swing
The NAND-based SR latch can also be implemented by using two cross-coupled depletion-load
NAND2 gates, as shown in figure below:
These circuits respond to changes in their inputs at a time determined by internal circuit
delays.
However, many digital systems require synchronous operation, where outputs change only in
response to a clock signal.
This clock restricts changes in the output to specific periods (when the clock is active),
enabling predictable and stable circuit behavior.
If CK = 0:
The AND gates output 0 regardless of S and R, so the SR latch maintains its current state.
If CK = 1:
The values of S and R propagate to the NOR-based SR latch, potentially altering its state.
If S = R = 1 during CK = 1:
Both outputs of the latch go to 0 momentarily. When CK returns to 0, the state becomes
indeterminate, depending on circuit delay mismatches.
To illustrate the operation of the clocked SR latch, a sample sequence of CK, S, and R
waveforms, and the corresponding output waveform Q are shown in figure below:
Figure 15: Sample input and output waveforms illustrating the operation of the clocked NOR - based
SR latch circuit.
Figure 17: Gate-level schematic of the clocked NAND-based SR latch circuit, with active low inputs
– S = 0, R = 1 ⇒ Q = 1 (Set)
– S = 1, R = 0 ⇒ Q = 0 (Reset)
Figure 18: Gate-level schematic of the clocked NAND-based SR latch circuit, with active high inputs,
and Partial block diagram representation of the same circuit.
CK = 1, S = 1, R = 0 ⇒ Set
CK = 1, S = 0, R = 1 ⇒ Reset
When both inputs (S and R) are activated simultaneously, the circuit enters an indeterminate
state.
This issue can be resolved by adding feedback paths from the outputs to the inputs,
resulting in a new type of latch called the JK Latch, as shown in figure below.
Figure 19: Gate-level schematic of the clocked NAND-based JK latch circuit
4.2.2 JK Latch: Structure and Working Principle
The JK latch enhances the basic SR latch by eliminating the forbidden input condition.
The J and K inputs correspond to the Set and Reset inputs of the SR latch, respectively.
The latch responds to inputs only when the clock (CK) is active (CK = 1).
Table6:DetailedTruthTableofJKLatch
J K Qn Qn S R Q n+ 1 Operation
0 0 0 1 1 1 0 Hold
1 0 1 1 1
0 1 0 1 1 1 0 Reset
1 0 1 0 0
1 0 0 1 0 1 1 Set
1 0 1 1 1
1 1 0 1 0 1 1 Toggle
1 0 1 0 0
While the JK latch resolves the undefined state issue of the SR latch, it introduces a new
potential problem:
– If J = K = 1 during an active clock pulse (CK = 1), the output toggles continuously.
– To avoid this, the clock pulse width must be less than the input-to-output
propagation delay.
– This ensures that only one toggle occurs per clock pulse.
If this timing constraint is met, the JK latch toggles its state only once per clock cycle when J =
K = 1.
Each active clock pulse causes the output to change state (i.e., from 0 to 1 or from 1 to 0).
Figure below shows an alternative implementation of the clocked JK latch using NOR gates.
This version, as opposed to the all-NAND realization, presents the following advantages:
This implementation is especially favorable in VLSI designs where area and power efficiency
are critical.
VLSI Design and Testing
Introduction
Each level provides multiple implementation options and supports a variety of design styles.
Here, we are mainly going to focus on popular design styles, and structured hierarchical
design.
PROBLEMSPECIFICATION
ARCHITECTUREDEFINITION
SIMULATE&COMPARE PROBLEMSPECIFICATION
BEHAVIORALCOMPILER
LOGICDESIGN
BEHAVIORALDESCRIPTION
SIMULATE&COMPARE
STRUCTURALCOMPILER
STRUCTURALDE-
CIRCUITDESIGN SCRIPTION(CIRCUIT)
PHYSICALCOMPILER
SIMULATE&COMPARE
PHYSICALDESCRIP-
TION(LAYOUT)
LAYOUT
FAB
EXTRACTSIMULATECOMPARE
FAB (b):
Ideal
VLSI Design and Testing 2 Design Styles
(a): Current
2 Design Styles
2.1 Introduction
A good VLSI design system should provide consistent descriptions across:
The effectiveness of a design system can be measured using various design parameters:
Size of die
Design is a process of making trade-offs to achieve acceptable results across all these parameters.
Therefore, the tools and methodologies selected for a particular chip depend on:
Given the complexity of silicon-based system design, the role of VLSI design aids is to:
Ideally, the choice of methodology is economically driven, provided all styles are available.
Key considerations:
To achieve this, it is essential to reduce the complexity of IC and system-level design. This is
especially important because:
2.2.1 Hierarchy
Repeating this subdivision recursively until each submodule is simple enough to be easily
understood and implemented
This strategy is similar to practices in software design, where:
Large programs are decomposed into smaller components
2. Structural
3. Physical
Hierarchy can be applied in parallel within each domain:
Behavioral domain: An adder may be represented by a subroutine describing its operation
VLSI Design and Testing 2 Design Styles
Structural domain: A gate-level connection diagram specifies how it is built logically
2.2.2 Modularity
Supporting team-based design, where multiple designers work on different parts of the chip
2. Iteration
3. Conditional selection
These have parallels in IC design:
Concatenation → Cell abutment: IC cells are placed adjacent to one another, with connections
formed on shared boundaries.
VLSI Design and Testing 2 Design Styles
Iteration → Arrays of cells: One- or two-dimensional arrays of identical cells (e.g., memory
arrays).
Conditional selection → Programmable Logic Arrays (PLAs): Logic behavior is defined by the
placement of transistors in an array.
When these programming constructs are combined with parameterization (e.g., setting sizes or bit
widths via parameters), the design becomes highly modular, reusable, and scalable.
2.2.3 Regularity
Regularity is another key principle in structured VLSI design. It refers to the repeated use of
uniform structures to simplify the design, verification, and manufacturing processes.
The formation of arrays of identical cells, such as those used in memory or arithmetic units, is a
basic form of regularity. It leverages repetition to reduce complexity.
Circuit Level:
– Use of uniform transistor sizes and types instead of individually optimized devices.
Architecture Level:
Data-path Construction:
– Modules may differ internally by function, but share a common interface structure (e.g.,
power, ground, clock, buses).
Benefits of Regularity
Simplifies design and layout
2.2.4 Locality
Locality is a design principle that supports modularity and hierarchy by reducing interdependence
between modules.
When a module has a well-characterized interface, the internal implementation details become
irrelevant to external modules. This technique, known as information hiding, reduces complexity
by:
This concept mirrors software engineering practices, where the use of global variables is
discouraged to preserve locality and reduce side effects.
Physical design should avoid overlapping connections with a module’s internals to preserve
its integrity.
Placement Strategy
Modern design approaches often favor:
“Wires first, then modules” — global wiring paths are planned before module placement,
ensuring shorter and more efficient interconnections.
This is in contrast to older methods of “place modules, then route”, which can result in
congested or suboptimal wiring.
Benefits of Locality
Reduces global interconnections
2.3.1 Characteristics
Traditional and still widely used, especially by semiconductor vendors.
Typically handled by designers with specialized knowledge in logic design, circuit behavior,
and fabrication processes.
2.3.3 Advantages
2.3.4 Challenges
Time-consuming and complex, especially for VLSI circuits with millions of transistors.
– Behavioral description
– Structural specification
– Physical layout
Before the development of circuit extraction tools, validating the layout was difficult.
Circuit extraction tools can now analyze the mask-level layout and reconstruct the equivalent
circuit.
Compatibility with TTL designs, enabling system designers to migrate from board-level to
silicon implementations with minimal effort, Cost-effectiveness for certain classes of ICs.
The constrained physical layout of gate arrays allows the development of bounded design tools.
While this does not necessarily reduce the complexity of the tools themselves, it makes the design
space more manageable.
Gate arrays are characterized by a regular array of identical sites, with each site consisting of a set of
circuit elements. In CMOS technology, these sites typically include multiple nMOS and pMOS
transistors.
Layout View: A physical layout corresponding to the six-transistor site, showing metal and
polysilicon routing.
VLSI Design and Testing 2 Design Styles
Four-Transistor Site: Includes two nMOS and two pMOS transistors. One n-p pair has a
common gate connection; the other pair has separate gate signals. This configuration easily
implements transmission gates and inverters, useful for latches.
Static Latch Site: Six transistors are ratioed specifically to implement static latches. This site is
one of two cells used in a memory-logic gate array.
VLSI Design and Testing 2 Design Styles
Wasted Area: All transistors are pre-fabricated; unused transistors occupy valuable chip area.
Fixed Placement and Configuration: Limits the achievable optimization in area and
performance.
START
Customer
Createschematicdiagrams;
Definepreliminarytestvectors;
Verifycorrectfunctionality
Customer/Intersil
Phase1 TranslatetoIGC20000CMOSmacros;
Design EncodedinTEGAS;
Translation Performpre-layoutsimulation
Revisions
Intersil
Performpreliminaryplacementonarray;
Recommendschematic
changeswhererequired
Intersil
Performfinalplacement
andautomaticrouting
Intersil Customerapproval
Calculateinterconnection-relateddelays;
Phase2 Performpost-layoutTEGASsimulation
Design
Implementation Customer
Providecompletetestvectors
Intersil
Createpatterngeneratortape
Intersil
Fabricatemasksandwafers;
Phase3
Performwaferprobe;
Fabrication
Assemblepackages;Test;Shipprototypes
Figure9:Gatearraydesignflow
Customer provides a logic schematic and test vectors.
Intersil: A semiconductor manufacturing company known for analog and mixed-signal ICs. In
the diagram, “Intersil” refers to the internal design or fabrication team responsible for tasks like
macro translation, simulation, placement, routing, and chip fabrication.
TEGAS: A design and simulation environment, possibly proprietary or domain-specific. TEGAS
is used for pre-layout and post-layout simulation of CMOS designs to verify functionality before
and after physical implementation.
These cells enable efficient digital system design and are modular in nature, similar to TTL-
based gate arrays.
Designers familiar with ITL (Integrated TTL Logic) databooks can easily relate to this
approach.
MSI/LSI (Medium/Large Scale Integration): More complex modules such as ROMs, RAMs,
and PLAs.
Over time, commercial tools have made standard cell design accessible to broader markets,
facilitating faster and more affordable custom chip design.
However, design trade-offs can be introduced to reuse chips for various applications.
For example, personalizing a ROM or control PLA block allows flexibility in functionality
without redesigning the entire chip.
Larger functional blocks (e.g., RAMs) are positioned for optimal interconnect with surrounding
logic.
MSI cells often have a fixed height and variable width to accommodate logic complexity, as
illustrated in figure below:
I/O connections are routed vertically using polysilicon or second metal layer.
I/O access styles can vary depending on the cell library and are illustrated in figure below:
Hierarchy
Regularity
Modularity
Locality
Building upon these ideas, there is now a growing interest in symbolic layout methods. These
approaches aim to simplify the lower-level details of IC design by:
Capturing structural and physical domain information in a looser, more abstract format
Ease of use for system designers, without needing to handle the detailed process-specific
layout rules
Key Points:
Symbolic layout methods focus on abstraction to speed up and simplify IC layout tasks.
They represent structural and physical properties symbolically rather than with strict
geometrical precision.
3 Testing
3.1 Introduction
In LSI (Large Scale Integration) and VLSI (Very Large Scale Integration) design, an important
consideration is the testing of circuits.
Testing must be incorporated during the design phase itself and should proceed concurrently
with architectural development.
To test this circuit exhaustively, a sequence of 2n input combinations, known as test vectors,
must be applied.
Each input combination must be observed to fully verify the behavior of the circuit.
In a sequential circuit, the output depends not only on the current inputs but also on the
previous state.
– N = 25 inputs
– M = 50 storage elements
If test patterns are applied at a rate of 1 microsecond per pattern, the total time needed
would exceed one billion years (109 years).
Exhaustive testing is completely impractical for complex LSI and VLSI circuits. Thus, efficient
testing strategies must be adopted.
References
[1] Williams, “Testing techniques for LSI and VLSI circuits,” 1983.
1. Test Generation:
Concerned with creating a minimal number of tests required to verify the circuit’s
behavior.
Aims to achieve maximum coverage of internal nodes efficiently.
2. Test Verification:
1. Designer-Supplied Tests:
2. Manufacturer-Supplied Tests:
These models help in generating test vectors and understanding the effectiveness of tests.
One of the most widely used fault models is the Stuck-At fault model.
In this model, a gate input or output is assumed to be stuck at logic ‘0’ (S-A-0) or stuck at logic
‘1’ (S-A-1).
When an input sequence is applied to a circuit, the fault coverage is defined as the percentage
of S-A-0 or S-A-1 faults that can be detected by that sequence.
Many faults arise from short circuits or open circuits, which alter the circuit behavior in ways
not modeled by S-A-0/1.
For example, in a CMOS NAND gate, the intermediate node in the series n-transistor path is
hidden at the schematic level.
Test generation should consider faults at the switch level, including possible shorts and opens.
Although switch-level modeling is more accurate, most test systems still use Boolean logic
models.
A unique issue in CMOS is that certain faults may convert a combinational circuit into a
sequential circuit.
For example, a 2-input NOR gate with a stuck-open transistor may retain part of its previous
state.
F = A + B + A · B · Fn
F = A + B + A · B · Fn
If a p-transistor is missing, the output node may remain arbitrarily charged until discharged,
causing unreliable behavior.
VLSI Design and Testing References
3.2.4 CMOS Fault Modeling for Test Generation
Due to such behavior, researchers have proposed new fault models and test generation
techniques.
One such method is the use of the D-algorithm for logic-level test generation.
The X-state is unpredictable and may lean towards 0 or 1 depending on logic and fabrication.
VLSI Design and Testing References
VLSI Design and Testing References
Designing for testability enhances fault detection and diagnosis, making circuits easier to test
and maintain.
Observability: The ability to observe the state of any internal node, either directly at the
outputs or indirectly through other observable nodes.
Ad Hoc Testing
Key Techniques
Partitioning Large Sequential Circuits:
– Large circuits, such as long counters, are split into smaller blocks.
– Each block can then be tested using fewer test vectors.
– Example: A 16-bit counter might be partitioned into four 4-bit counters.
Adding Test Points:
– In bus-oriented systems, the bus can be reused for transferring test patterns and
capturing test responses.
– Efficient for testing multiple modules connected to the same data bus.
Testing Bit-Sliced Systems:
– Bit-sliced systems use modular logic slices (e.g., 4-bit ALUs chained to build larger
words).
– These can be tested using methods derived from testing Iterative Logic Arrays (ILAs).
– Can be tested with a constant number of input patterns, regardless of array size.
– Reduces test vector count significantly for large arrays.
I-testable ILA:
An example of a modified ILA for I-testability involves a cascaded 1-bit counter cell, to which
two extra gates are added.
These gates enable control and observation of the cell’s operation during testing.
Such modifications allow the entire ILA to be tested using minimal test patterns and simple
comparison logic.
In normal mode, SRLs function as standard storage elements within the sequential circuit.
In test mode, all SRLs are connected in series to form a scan chain, allowing data to be shifted
through the latches.
Testing Procedure Using LSSD:
1. Shift in a known pattern to initialize all SRLs (achieving controllability).
2. Allow the circuit to operate for one clock cycle, propagating values through the combinational
logic.
Advantages:
Simplifies test generation, since the combinational portion can be tested separately using
Automatic Test Pattern Generation (ATPG) tools. Improves fault coverage in large
sequential designs.
Drawbacks:
Increased circuit complexity due to additional logic in the latches.
Additional I/O pins may be required for scan control and data.
Physical placement challenges, as latches across the chip must be chained into a scan path.
Trade-off: Designers must weigh the increased area, power, and possible speed penalties against the
benefits of enhanced testability.
Structured design for testability trades off complexity and area for efficient test access and fault
detection.
VLSI Design and Testing References
The LFSR is initialized, and the resulting register value becomes a function of:
A correct circuit produces a known signature. A faulty circuit will produce a different signature.
A 3-bit register with associated logic can operate in multiple modes depending on control
inputs C0 and C1:
– Asserting TEST,
– Strobing the C/D control line high and then low.
Correct outputs respond by toggling, while stuck-open lines remain charged or discharged.
5. Syndrome Testing
Syndrome testing is an exhaustive method where all possible input patterns are applied and the
number of logical 1s in the output is counted.
Required components:
– Pattern generator,
– Output counter,
– Comparison circuit.
6. Other Techniques
Additional BIT approaches include:
Implications:
Specific layout rules can improve testability.
Design Techniques:
Incorporate test structures early in the design cycle.
– Chip area
– Speed/performance
Example:
A data-path approach might be easier to test than a random logic approach, with only minor
area differences.
Conclusion:
VLSI Design and Testing References
Embed testability early in the design process.