VLSI_topic__1720707023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

HANUMANTH REDDY DIGITAL INTERVIEW Q&A

Combinational circuit Sequential circuit

❖ The output of a combinational ❖ The output of a sequential


circuit depends solely on the circuit relies on both the
present combination of inputs. current input and the circuit's
In other words, its past inputs previous state. This previous
don't affect the current output. state is essentially stored
information from past inputs.

❖ Since output does not depend ❖ The output relies on its


on the time instant, no previous feedback so output
feedback is required for its of previous input is being
next output generation. transferred as feedback used
with input for next output
generation.

❖ It is faster and better in ❖ Sequential circuits are


performance as compared to comparatively slower and has
that of Sequential circuit. low performance.

❖ combinational circuit less ❖ The implementation of


complex as compared to feedback makes sequential
sequential circuit. circuit more complex.

❖ Building blocks of ❖ The building blocks of a


combinational circuit are its sequential circuit are the logic
logic gates. gates along with flip flops.

❖ These circuits are ideal for ❖ Sequential circuits excel in


performing logical operations storing and manipulating
(AND, OR, NOT) and data. They form the building
arithmetic operations (adders, blocks of memory devices,
subtractors) due to their registers, and counters. They
speed and simplicity. are essential for creating
more complex digital
❖ Combinational circuits are systems.
mainly used for arithmetic as
well as Boolean operations.
❖ Encoder, Decoder, ❖ Flip-flops and Counters.
Multiplexer, etc.
HANUMANTH REDDY day-2 DIGITAL INTERVIEW Q&A

LATCH FLIP FLOP

• Level-triggered • Edge-triggered

• Responds to changes in the • Changes state only on a specific


input signal as soon as they edge (rising or falling) of a clock
occur. signal.

• Built from logic gates • Can be built from latches with


• May have an enable signal to clock
control when it responds to • Requires a clock signal to
the input. function.
• Faster because they react • Generally slower than latches
immediately to input changes due to the clock dependency.

• Often used in asynchronous • More common in synchronous


circuits for data capture or circuits where precise timing is
holding temporary values. crucial.

• Like a light switch. Turns on • Like a turnstile at a metro


(changes state) immediately station. Only allows passage
when flipped up or down (changes state) when a token
(change in input). (clock pulse) is inserted.

• Latches are simpler to design • Flip-flops can be further


than flip-flops but require classified into various types like
more attention to avoid timing D flip-flop, JK flip-flop, etc., each
hazards in circuits. with specific functionalities.

• Latches are often used for • They are used in memory


design flipflops, temporary elements, counters, registers,
storage, and holding signals and many other digital
during specific operations. components.
HANUMANTH REDDY day-3 DIGITAL INTERVIEW Q&A

MULTIPLEXER ENCODER
• A multiplexer is a combinational • An encoder is a combinational circuit
circuit that selects one of several that converts a set of input signals
input signals and forwards it to a into a coded output, where each
single output line based on the combination of input signals
control signals applied to its select corresponds to a unique binary code.
lines.
• The number of input lines is [2N]
• The number of select lines[N] determines the number [N] output
determines the number of input lines
lines [2N] and one output line,
• When a particular input combination
• The selection of the input line to be is present, the corresponding binary
transmitted to the output is code is generated on the output
determined by the binary value on lines.
the select lines.
• It essentially compresses the input
• It implements a Boolean function information into a more compact
where each select line represents a form, reducing the number of output
variable, and the output lines required.
corresponds to the selected input.
• Encoders output a binary code
• Multiplexers output the selected representing the active input line(s).
input signal directly.
• Encoders are commonly used in
• Multiplexers are used in various applications such as data
applications, including data transmission, data compression,
routing, data selection, signal address generation, and control
switching, and address decoding in systems where efficient data
memory systems and representation is crucial.
communication systems.
HANUMANTH REDDY day-4 DIGITAL INTERVIEW Q&A

SOP (Sum of Products) POS (Product of Sums)

• SOP:- A way to represent a Boolean • POS:- A way to represent a Boolean


expression using minterms (product expression using maxterms (sum
terms where all variables are ANDed terms where all variables are ORed
together). together).

• SOP focuses on conditions that make • POS focuses on conditions that


the output a 1 (minterms), make the output a 0 (maxterms).

• SOP uses AND (product) for • POS uses OR (sum) for maxterms
minterms and OR (sum) to combine and AND (product) to combine
them. them.

• SOP expression results in a 1 output • POS results in a 0 output.

• SOP uses Σ (sigma) for sum • POS uses Π (pi) for product.

• SOP says: "output is 1 WHEN these • POS says: "output is 0 WHEN any of
specific conditions (all variables these conditions (all variables
ANDed) are true." ORed) are true."

• In SOP, simplification involves • In POS, simplification involves


identifying redundant terms and identifying redundant terms and
removing them to minimize the removing them to minimize the
expression. expression.

• It directly applies De Morgan's • De Morgan's Theorem needs to be


Theorem. applied before converting
expressions into POS form.
• X (SOP) = Σ m(1, 3, 6) =
A’.B’.C + A’.B.C + A.B.C’ • X (POS) = Π M(0,5,7) =
(A+B+C).(A’+B+C’).(A’+B’+C’)
• SOP: An example of a SOP
expression is • POS: An example of a POS
f(A,B,C)=𝐴⋅𝐵+𝐴’⋅𝐶+𝐵⋅𝐶 expression is
f(A,B,C)=(𝐴+𝐵)⋅(𝐴’+𝐶)⋅(𝐵+𝐶).
HANUMANTH REDDY day-5 DIGITAL INTERVIEW Q&A

2’s Complement Signed Magnitude

▪ Represents positive numbers the ▪ Splits the number into sign bit (0 for
same as unsigned binary. To get a positive, 1 for negative) and
negative number, take the one's magnitude (absolute value in binary).
complement (invert all bits) of the
positive version and add 1.
▪ Explicitly uses a sign bit, leading to
▪ Sign bit is inherent in the number two representations for zero (+0 and
itself (0 for positive, 1 for -0).
negative).Only one representation
for zero.

▪ Addition and subtraction are ▪ Requires separate circuits for


performed using the same adder addition and subtraction, considering
circuit! Negate a number by taking the sign bit during calculations.
its two's complement.

▪ Simpler and faster. ▪ Can be more complex.

▪ More efficient hardware utilization ▪ Needs dedicated circuits for


due to simpler arithmetic handling signs, increasing hardware
operations. requirements.

▪ +5 in binary as 0101 ▪ -5 in binary is 1101

▪ -5 in binary as [0101 –> 2’s =1011 ▪ 5 in binary is 0101

▪ Add 14{1110} and -13= {-1101} ▪ Add 5 , 3


[i] 2’s of -1101 = 0011 [i] 5=0101 ; 3 = 0011
[ii] 1110 + 0011 = 1 0001 [drop carry [ii] 0101+0011
it’s positive] [iii] 1000 [In Signed Magnitude, the
[iii] +0001 {+1} [result] result is also -1, but here, it doesn't
represent overflow. It's the correct result
of the addition.]
HANUMANTH REDDY day-6 DIGITAL INTERVIEW Q&A

Ripple Carry Adder Carry Lookahead Adder

Built from cascading full adders, where the carry Uses additional logic to anticipate carry bits
output from one adder becomes the carry input based on the input bits. This eliminates the
for the next. ripple effect, leading to faster addition.

The final sum depends on the ripple effect of Requires additional circuitry to calculate carry
each carry bit being calculated one after another. bits independently, making it more complex
This delay increases with the number of bits than RCAs.
being added.
Due to the additional logic, CLAs consume
Due to the simpler design, RCAs require less more power than RCAs.
power compared to CLAs.
High-performance applications, adding large
Low-power applications, adding small numbers numbers of bits.
of bits.
CLA is more complex to modify or extend due
RCA is relatively easier to modify or extend since to its parallel carry computation approach,
each stage is dependent only on the carry-out of which involves interdependencies among
the previous stage. multiple stages.

It is suitable for applications where speed is not It is ideal for applications requiring high-speed
critical or for small adders where the propagation addition of large numbers of bits.
delay is acceptable.

Si = Pi ⊕ Gi ; C i+1= CiPi + Gi
Gi = Ai.Bi where G is called carry generator
Pi = Ai ⊕ Bi where P is called carry
propagator

Advantages – simplicity, less hardware, regular


Advantages – Fast performance, parallelism,
structure.
low power consumption.
Disadvantages – slow propagation, limited
Disadvantages – Complexity, area overhead,
parallelism, high power consumption
lesss modular.
HANUMANTH REDDY day-7 DIGITAL INTERVIEW Q&A

EDGE-TRIGGERING LEVEL SENSITIVE TRIGGERING

➢ In edge-triggered systems, the input ➢ In level-triggered systems, the output


signal transitions at specific edges of the changes state when the input signal is
clock signal, typically rising edge or at a specified logic level (typically high
falling edge. or low).

➢ The output of the circuit changes state ➢ The output remains in its changed state
only when the specified edge of the as long as the input signal maintains
clock signal occurs, regardless of the that logic level.
duration of the input signal.

➢ It's particularly useful in synchronous ➢ Level triggering is commonly used in


digital systems where changes occur asynchronous circuits where the output
precisely at the rising or falling edge of a needs to follow the input signal
clock signal. continuously.

➢ Edge-triggered flip-flops include D flip- ➢ Latches are often level-triggered,


flops, JK flip-flops, and T flip-flops. including SR latch, D latch, and JK latch.

➢ Edge-triggered systems are less prone to ➢ LEVEL-triggered systems are MORE


glitches compared to level-triggered prone to glitches compared to edge-
systems. triggered systems.

➢ Precise timing, single events ➢ Continuous monitoring


HANUMANTH REDDY day-8 DIGITAL INTERVIEW Q&A

Synchronous Reset Asynchronous Reset

• In a synchronous reset, the reset signal is • In an asynchronous reset, the reset signal is
synchronized with the clock signal. [highest priority] not synchronized with the
clock signal.
• The reset is applied only at specific clock • Instead, it can be asserted (set to active
edges. state, usually logic low) at any time,
regardless of the clock state.
• Synchronous resets are typically • Asynchronous resets are typically
implemented using flip-flops or registers implemented using flip-flops or latches
with the reset signal being gated by the with dedicated reset inputs.
clock signal. • Asynchronous resets are simple to
• It ensures that the reset operation occurs implement but can introduce timing
at a defined point in the clock cycle, hazards, as the reset signal can potentially
eliminating glitches & timing hazards interfere with the normal operation of the
associated with asynchronous resets. circuit.
• preferred in synchronous digital designs • They are often used when a quick and
where timing constraints are critical and immediate reset is required, regardless of
synchronous operation is required. the current state of the clock.
• synchronous resets are preferred for their • Asynchronous resets are used when a reset
predictability and robustness. is needed before the clock is available or
for initializing outputs.

• Applications:
✓ Most synchronous circuits. • Applications:
✓ State machines ➢ Initializing circuits before the clock is
✓ Digital signal processing running (e.g., FPGAs).
✓ Microprocessor & Microcontroller ➢ Glitch filtering
HANUMANTH REDDY day-9 DIGITAL INTERVIEW Q&A

S-R flipflop J-K flipflop

• It has two inputs, Set (S) and Reset (R), and • It has two inputs, J and K, and two outputs, Q
two outputs, Q and Q'. The outputs change and Q'. It's an extension of the SR flip-flop,
state based on the inputs. solving the "race" condition.
• It can be in one of two stable states: SET • It has three inputs: J (set), K (reset), and
(Q=1, Q'=0) or RESET (Q=0, Q'=1). clock (C).
• When both inputs are low (0, 0), the • It can be in one of two stable states: SET
previous state is maintained. (Q=1, Q'=0) or RESET (Q=0, Q'=1).
• When S=1 and R=0, the flip-flop sets to 1 • When J=K=0, the previous state is
(Q=1). maintained.
• When S=0 and R=1, the flip-flop resets to • When J=1 and K=0, the flip-flop sets to 1
0 (Q=0). (Q=1).
• When both inputs are high (1, 1), it enters • When J=0 and K=1, the flip-flop resets to 0
an undefined state or metastable state. (Q=0).
• When J=K=1, the flip-flop toggles its state
(Q changes to its complement).
• Operation is synchronous, meaning the
state changes only occur on clock
transitions.

S R Q Q’

0 0 0 1
J K Q(n+1) State
0 1 0 1 0 0 Qn No Change
0 1 0 RESET
1 0 1 0 1 0 1 SET
1 1 Qn’ TOGGLE
1 1 ∞ ∞
Applications: Versatile flip-flop used in counters,
Applications: Used in memory storage, data shift registers, and control circuits due to its ability
transfer, and control circuits where a single bit of to toggle, hold, or complement outputs.
data needs to be stored. Example: Used in frequency dividers, digital
Example: Used in binary counters, shift registers, clocks, and sequence generators.
and frequency dividers.
HANUMANTH REDDY day-9 DIGITAL INTERVIEW Q&A

D flipflop T flipflop

• It has a single data input (D), a clock input • It has a single input (T), a clock input (CLK), and
(CLK), and two outputs, Q and Q'. two outputs, Q and Q'.
• It captures the input and changes its state • It toggles its output state whenever the clock
only at the rising (or falling) edge of the clock transitions occur.
signal. • It toggles its output state (Q) whenever T is
• It can be in one of two stable states: SET high (1) and clock transition occurs.
(Q=1, Q'=0) or RESET (Q=0, Q'=1). • When T=0, the flip-flop maintains its
• When the clock signal transitions, the D current state.
input is transferred to the output. • When T=1 and clock transitions, the output
• It's commonly used in shift registers, toggles (Q changes to its complement).
counters, and memory storage.

Clock D Q Q’

↓»0 0 0 1 T Q Q (t+1)

↑»1 0 0 1 0 0 0

↓»0 1 0 1 0 1 1

↑»1 1 1 0 1 0 1

1 1 0
Applications: Commonly used for synchronizing
signals, delaying signals, and as storage
Applications: Used for frequency division, binary
elements in registers and memory units.
counters, and waveform generation.
Example: Used in synchronous circuits for clock
Example: Used in mod-2 counters and frequency
synchronization, in data storage elements such
dividers
as registers and latches.
HANUMANTH REDDY day-10 DIGITAL INTERVIEW Q&A

Binary code Gray code

• Standard way to represent information • Gray code, also known as reflected binary
using 0s and 1s. code, is a binary numeral system

• Each bit position has a weight (1, 2, 4, • A special type of binary code where adjacent
8...), so changing a bit can cause a larger values differs by only one bit leading to a
jump in value. unique bit pattern.

• Simpler to convert between decimal and
binary. • Conversion between decimal and gray code
can be slightly more complex
• Binary code is widely used in digital
computation and storage systems where • Useful in situations where glitches or noise
each digit's positional value matters. might cause misreading’s during transitions
between binary values.
• In binary code, transitioning from one
value to the next might involve multiple bit • Used in rotary encoders, position sensors etc.
changes to ensure smooth transitions.

• Binary code follows a regular counting • Gray code, transitioning between consecutive
sequence where each bit has a value values involves only one-bit change.
based on its position and the base (2).
• For example, in Gray code, the sequence
from 0 to 7 is: 000, 001, 011, 010, 110, 111,
101, 100. Each adjacent pair of numbers
differs by only one bit.

• Ex:- Binary code of 01101 is 01001


• Ex:- Gray code of 01001 is 01101
• Advantages:-simplicity, widely used, easy
implementation & conversion. • Advantages:- error resilience, sequential
ordering, smooth transitions.
• Disadvantages:-Glitch prone, sensitivity
to errors • Disadvantages:- complexity design,
conversion overhead, less intuitive.
HANUMANTH REDDY day-11 DIGITAL INTERVIEW Q&A

Synchronous Counter Asynchronous Counter

▪ All flip-flops (circuits that store ▪ The first flip-flop receives the main
binary data) are triggered clock, but subsequent flip-flops use the
simultaneously by the same clock output of the previous flip-flop as
signal. their clock signal. This creates a
▪ Generally faster because all flip-flops cascading effect.
change state at the same time. ▪ Slower because each flip-flop waits for
▪ Less prone to errors due to the the output of the previous one to change
simultaneous flip-flop updates. before it can change its own state. This
▪ Design can be more complex, creates a delay that accumulates with
especially for counters with a large more flip-flops.
number of flip-flops or custom ▪ The delay between flip-flops can cause
counting sequences. glitches or inconsistencies in the
▪ Can be designed for various counting counting sequence, especially at high
sequences (up/down, modulo-n). speeds.
▪ Also known as parallel counter. ▪ Typically limited to fixed counting
▪ synchronous counters are faster, sequences (up/down).
more reliable, and flexible, but more ▪ Also known as ripple counter due to the
complex. cascading effect.
▪ Asynchronous counters are simpler and
easier to design, but slower and more
prone to errors.

▪ Synchronous counters have


consistent propagation delays across ▪ Asynchronous counters load new values
all stages since all flip-flops are sequentially, with each flip-flop updating
triggered simultaneously by the its state based on the output of the
clock signal. This makes them easier previous flip-flop.
to predict and analyze in terms of
timing. ▪ Advantages:- simplicity, low power
consumption, scalability.
▪ Advantages: higher speed, ▪ Disadvantages: timing issues,
synchronized operation, propagation delay, complex timing
▪ Disadvantages: complex circuit, high analysis.
power consumption, limited
scalability.
HANUMANTH REDDY day-12 DIGITAL INTERVIEW Q&A

Johnson counter Ring counter

• The inverted output (Q') of the last flip-flop is • The output (Q) of the last flip-flop is fed back
fed back to the input of the first flip-flop. to the input of the first flip-flop.
• It can count in both directions (up and down) • : It can only count in one direction (typically in
depending on how the feedback is configured. a loop).
• Transitions between states involve toggling • Transitions involve shifting the entire
only one bit at a time, resulting in smoother sequence by one position, potentially causing
transitions. a more abrupt change in the output
• It requires additional logic gates for feedback • It can be implemented using just flip-flops and
to generate the sequence of states. connections between them.
• Used in applications requiring bidirectional • Commonly used in applications such as shift
counting or for generating non-overlapping register-based delay lines or cyclic redundancy
clock signals. checks.
• Generally more complex due to bidirectional • Simpler in design as it operates in a single
counting capability and additional feedback direction and doesn't require additional
logic. feedback.
• It produces a sequence of all 2^n states, • It circulates a single '0' or '1' bit around the
making it more efficient. (Imagine a ripple ring, resulting in 2^(n-1) distinct states for n
effect where all bits change state). flip-flops. (Think of shifting a single bit)
• Johnson counters are also known as twisted
ring counters or creeping counters.

[D0 = Q’] .
• Total number of used and unused states in • No. of states in Ring counter = No. of flip-flop
n-bit Johnson counter: //if n=4 used
• no. of used states=2n // 2*4 = 8
• number of unused states=2n – 2*n // 24- • 4 states are: [D0 = Q]
2*4 =8. 1000
0100
0010
0001
HANUMANTH REDDY day-13 DIGITAL INTERVIEW Q&A

Mealy Machine Moore Machine

❖ Output depends on both the current ❖ Output depends only on the current
state and the current input. state, not the current input.
❖ Reacts faster to changes in input ❖ Output has a one-clock cycle delay
(output can change in the same clock compared to changes in input.
cycle). ❖ Requires more states for equivalent
❖ Requires fewer states for equivalent functionality compared to Mealy
functionality compared to Moore machines.
machines. (More efficient design in ❖ Considered easier to design due to the
some cases) reliance solely on the current state for
❖ Considered more complex to design output.
due to the dependence on both state ❖ Synchronous output and state
and input for output. generation.
❖ Asynchronous output generation. ❖ Output is associated with the state
❖ Output is associated with the transition itself.
between states. ❖ Suitable for applications where output
❖ Suitable for applications where output changes are primarily determined by
changes need to be responsive to input the current state and where
changes and where minimizing output synchronization with state transitions is
delay is critical. preferred.
HANUMANTH REDDY day-14 DIGITAL INTERVIEW Q&A

Over lapping Non -Over lapping

• Permits sequences to partially overlap.. • Demands a clear separation between detected


sequences.
• End of one sequence becomes start of • Once a sequence is identified, the FSM needs
another: In an overlapping FSM, the final bits to reset and wait for a new, independent
of a detected sequence can be used as the sequence to begin.
starting bits for a new sequence. This allows • Complete detection required before next
for continuous detection without requiring a sequence: A non-overlapping FSM requires the
complete reset between sequences. entire first sequence to be detected before it
• More complex design: Overlapping FSMs tend can begin processing a new sequence. Any
to be more intricate as they need to account overlap between sequences is considered
for transitions between sequences within the irrelevant.
state transitions themselves. • Simpler design: Non-overlapping FSMs are
• Example: Imagine a traffic light controller. The generally simpler to design as they focus
red-to-green transition can be the start of a solely on identifying individual sequences
green-to-yellow sequence, creating an without worrying about potential overlaps.
overlap. • Example: A vending machine might have a
non-overlapping sequence detector for a
• This means that while one transition is in specific coin combination. It wouldn't care if
progress, another one can be initiated. the coin sequence is interrupted by other
• This can lead to concurrent transitions and denominations.
potentially complex behavior, especially in • This ensures that only one transition occurs at
systems where multiple inputs can trigger a time, simplifying the behavior of system and
state changes simultaneously. making it easier to analyze and understand.
• Non-overlapping FSMs are often used in
applications where precise control over state
transitions is required, or where concurrent
transitions could lead to undesirable behavior.
HANUMANTH REDDY day-15 DIGITAL INTERVIEW Q&A

Clock Glitch Clock Hazard

• A temporary fluctuation in the clock • A condition within the clock design that
signal. Imagine a brief spike or dip in can potentially cause glitches.
the voltage level representing a logical • Arises from unequal propagation delays
0 or 1. in different parts of the clock
• Caused by: distribution network.
o Issues with the power supply • Imagine two signals feeding a logic
o Faulty clock driver circuits gate, but one arrives slightly earlier
o Electromagnetic interference than the other due to different path
• Typically very short-lived (nanoseconds lengths. This can create an ambiguous
or less) output for a short period.
• May not always cause problems, • Not a guaranteed glitch, but creates the
especially if the glitch duration is possibility of one if certain input
insignificant compared to the circuit's conditions are met.
timing requirements. But in critical • Like having wires of different lengths
circuits, even a brief glitch can lead to going to multiple light switches in a
unexpected behavior. room. Flipping one switch first might
• Like a momentary power flicker in your cause a brief flicker in another bulb
house. Lights might dim for a split before everything stabilizes.
second, but most devices will be • Can create a brief glitch on the clock
unaffected. signal itself, leading to similar problems
• Can cause the circuit to misread data or as a clock glitch. Think of it as a
enter an unexpected state. Imagine a weakness in the design that makes the
hiccup in the rhythm that the circuit circuit prone to hiccups.
relies on to function.
Causes of Clock Glitch: Causes of Clock Hazards:
• Noise • Propagation Delays
• Poor Circuit Design • Circuit Design
• Cross-Talk • Asynchronous Inputs
• Transition Issues
Effects of Clock Glitch: Effects of Clock Hazards:
• Setup/Hold Time Violations • Logic Errors
• Logic Errors • Inconsistent Outputs
• Data Corruption • Unreliable Performance
HANUMANTH REDDY day-16 DIGITAL INTERVIEW Q&A

PLA PAL
• Programmable AND and OR Arrays: Both the AND • Programmable AND Array, Fixed OR Array: The
array and the OR array in a PLA are programmable. AND array is programmable, but the OR array is
This allows for a high degree of flexibility in the fixed. This means that while the number of
implementation of logic functions. product terms can be varied, the way they are
• Customizable Logic: Because both arrays are combined is pre-determined by the fixed OR gates.
programmable, PLAs can implement any • Fixed Logic Structure: The fixed OR array limits
combinational logic function with fewer the flexibility compared to a PLA but simplifies the
restrictions, allowing for more complex logic programming and can lead to faster logic
designs. evaluation.
• Flexibility: PLAs offer the most flexibility in terms • Predefined OR Gates: The fixed OR array typically
of logic design, as both the product terms and the limits the number of output functions that can be
sum terms can be fully customized. generated directly, potentially requiring additional
• Potentially Slower: The flexibility comes at the logic levels to achieve more complex functions.
cost of potentially slower operation because of the • Faster Operation: The fixed OR array can result in
complexity of programmable connections. faster operation since it simplifies the logic
evaluation process.
• Complex Logic Functions: Used in applications • Less Flexible: While still programmable, PALs offer
where complex logic functions are required and less flexibility than PLAs due to the fixed nature of
where flexibility is paramount. the OR array, making them suitable for less
• Custom Designs: Ideal for custom digital logic complex or more repetitive logic functions.
designs that require unique and varied logic • Simpler Logic Functions: Used in applications
functions. where the logic functions are relatively simple or
where speed is more critical than flexibility.
• More Complex Design: Designing with PLAs can be • High-Speed Applications: Suitable for high-speed
more complex due to the need to program both logic designs where the fixed OR array can
the AND and OR arrays, which might require more optimize performance.
design and verification effort. • Simpler Design: PALs generally offer a simpler
design process because the fixed OR array reduces
the complexity of the programming.
HANUMANTH REDDY day-17 DIGITAL INTERVIEW Q&A

Setup Time Hold Time


• Represents the minimum amount of • Represents the minimum amount of
time the data signal needs to be time the data signal needs to remain
stable (at either a high or low stable (at the same voltage level)
voltage level) before the active after the active edge of the clock
edge of the clock signal arrives. signal has passed.
• Think of it as the data needing to be • Once the clock has captured the
prepared and in place for the clock data, the data needs to hold steady
to register it correctly. for a minimum duration to ensure
• If the data isn't stable for long accurate storage.
enough before the clock edge • If the data changes state too soon
(violating setup time), the data might after the clock edge (violating hold
be misinterpreted by the circuit. time), the circuit might again
• Setup time is like the subject misinterpret the data.
needing to be in position and ready • Hold time is like the subject
to smile before the photographer needing to hold their smile for a
clicks the shutter. moment after the shutter clicks to
• Setup time: Data must be stable ensure a clear picture.
before the clock edge.
• Timing: It is checked before the • Hold time: Data must be stable
clock edge (typically the rising or after the clock edge
falling edge) and is a constraint that
ensures the data is valid and can be • Timing: It is checked after the clock
correctly sampled by the clock edge. edge and is a constraint that
• Violation Consequence: If setup ensures the data remains valid for a
time is violated, the flip-flop may not sufficient duration after the clock
latch the correct data, leading to edge.
incorrect or indeterminate states • Violation consequence: If hold time
(also known as metastability). is violated, the flip-flop may latch
• Setup Time: Affects the maximum incorrect data or enter a metastable
operating frequency of the circuit; it state because the data may change
is a factor in determining the clock too quickly after the clock edge.
cycle time.
• Hold Time: Typically less critical
than setup time in terms of
frequency, but crucial for data
integrity immediately after the clock
edge.
HANUMANTH REDDY day-18 DIGITAL INTERVIEW Q&A

RAM ROM
(Random Access Memory) (Read-Only Memory)

➢ RAM: Volatile memory. This means ➢ ROM: Non-volatile memory. Data


data is temporary and erased once the persists even when the power is off.
computer shuts down. Imagine it as a Think of it like a permanent marker on
whiteboard - you can write on it (store the whiteboard - the information stays
data) and erase it (lose data) easily. there.
➢ RAM: Read and write access. CPU can
constantly read from and write data to ➢ ROM: Read-only access. Data can only
RAM as needed during program be read, not modified by the user.
execution.
➢ RAM: Much faster than ROM. RAM ➢ ROM: Slower access speeds compared
allows for rapid data retrieval, essential to RAM.
for smooth program operation.
➢ RAM: Stores data currently being ➢ ROM: Stores permanent instructions
used by the CPU. This includes running needed for the computer to boot up
programs, opened files, and the and function. Examples include BIOS
operating system itself. firmware, which initializes hardware
➢ RAM: Generally, more expensive per during startup, and microcode for
unit of storage than ROM. device controllers.
➢ RAM acts as your computer's ➢ ROM: Less expensive than RAM due to
workspace, constantly changing as you its simpler design.
work ➢ ROM holds the essential, unchanging
instructions it needs to function.
➢ Includes Dynamic RAM (DRAM) and ➢ Includes Programmable ROM (PROM),
Static RAM (SRAM). DRAM needs to Erasable Programmable ROM
be refreshed thousands of times per (EPROM), Electrically Erasable
second, while SRAM does not but is Programmable ROM (EEPROM), and
more expensive. Flash memory. Each type varies in how
and if it can be rewritten.
➢ Used in desktops, laptops, ➢ Used in devices to store the firmware,
smartphones, and other devices for such as in microcontrollers, embedded
running applications, operating systems, game consoles, and other
systems, and temporary data storage. electronic devices where permanent
data storage is necessary.
HANUMANTH REDDY day-19 DIGITAL INTERVIEW Q&A

Volatile Memory Non-volatile Memory


❖ Memory that requires power to maintain the ❖ Memory that retains stored data even when
stored information. When the power is turned the power is turned off.
off, all data is lost. ❖ ROM (Read-Only Memory), Flash memory,
❖ RAM (Random Access Memory) such as DRAM EEPROM (Electrically Erasable Programmable
(Dynamic RAM) and SRAM (Static RAM). Read-Only Memory), SSDs (Solid State Drives),
❖ Data is retained only as long as the device is and HDDs (Hard Disk Drives).
powered. ❖ Data is retained even after the device is
❖ Used for temporary storage that requires fast powered off.
access and is often written to and read from, ❖ Used for permanent storage where data
such as system memory (RAM) in computers. persistence is important, such as firmware
storage (ROM), file storage (SSDs, HDDs), and
❖ Generally faster with higher data transfer rates, removable storage (USB drives).
making it suitable for tasks that require quick ❖ Typically, slower compared to volatile memory,
access to data. but advancements like NVMe (Non-Volatile
Memory Express) SSDs are bridging the speed
❖ Consumes power continuously to retain data, gap.
leading to higher power consumption. ❖ Does not require power to retain data, thus
❖ Usually more expensive per bit of storage due consuming less power when idle.
to higher performance. ❖ Generally cheaper per bit of storage, making it
❖ Data reliability is high as long as power is cost-effective for larger storage capacities.
supplied; however, data is lost on power ❖ More reliable for long-term storage as it does
failure. not depend on a continuous power supply.
❖ Applications: ❖ Applications:
• DRAM: Used as the main memory in • ROM: Stores firmware, such as the BIOS in
computers, where the CPU stores data and computers.
instructions for quick access. • Flash Memory: Used in USB drives, memory
• SRAM: Used in cache memory for faster cards, and SSDs for persistent data
access speeds compared to DRAM. storage.
• EEPROM: Used in small amounts for
❖ Volatile memory is essential for tasks requiring storing configuration settings that need to
rapid data access and temporary storage be updated infrequently.
❖ non-volatile memory is crucial for long-term
data retention and storage without the need
for continuous power.
HANUMANTH REDDY day-20 DIGITAL INTERVIEW Q&A

SRAM DRAM
{Static Random-Access Memory} {Dynamic Random-Access Memory }
 Composed of flip-flop circuits using 4 to  Composed of a single transistor and a
6 transistors per memory cell. It doesn't capacitor per memory cell. The
require refreshing. capacitor stores the bit of data and
 Faster access times (typically in the requires periodic refreshing.
range of a few nanoseconds) due to the  Slower access times (typically in the
absence of a need for refreshing and range of tens of nanoseconds) because
simpler control logic. of the need to refresh the capacitors
 Consumes more power because it uses periodically.
multiple transistors per cell and  Consumes less power in standby mode
maintains the state as long as power is but more power overall due to the
supplied. constant refreshing of memory cells.
 Lower density as it requires more  Higher density because it uses fewer
transistors per memory cell. transistors per cell, allowing more
 More expensive to produce due to the memory cells to fit in the same silicon
higher number of transistors and lower area.
density.  Less expensive due to higher density
 Used for cache memory (CPU cache), and fewer transistors per cell.
register files, and small memory banks  Used for main system memory (RAM) in
where speed is critical. computers, where larger capacity is
 Volatile memory, meaning they lose needed at a lower cost.
their stored data when power is turned  Volatile memory, meaning they lose
off. their stored data when power is turned
 Simpler interface and control circuitry off.
since it doesn’t require refreshing.  More complex control circuitry to
 Often integrated directly on the same handle the refresh cycles.
chip as the CPU (e.g., L1/L2 cache).  Typically found on separate
 SRAM offers superior speed but at the chips/modules (e.g., DIMMs) and
cost of being expensive and having connected via the memory bus.
lower density.  DRAM is slower but cheaper, more
 Used in applications where speed is compact, and consumes less power,
critical, such as CPU cache memory and making it ideal for main memory
high-performance networking applications.
equipment.  Used as the main memory (RAM) in
most computers due to its lower cost
and higher density.
HANUMANTH REDDY day-21 DIGITAL INTERVIEW Q&A

Clock Domain Crossing Metastability


• Deals with the movement of data between • Focuses on a specific issue that can arise
different clock domains in a digital circuit. A during CDC - the possibility of a signal being in
clock domain refers to a group of flip-flops or an unstable state for an unpredictable amount
latches that share a common clock signal. of time.
• When data needs to be transferred from a • Occurs when a signal transition on the data
register controlled by one clock to a register line happens too close to the clock edge of the
controlled by another clock. This can happen receiving flip-flop. This violates the setup and
because of design choices or the inherent hold time requirements of the flip-flop,
nature of the system. leaving it in an indeterminate state (neither a
• In itself, CDC isn't inherently bad. However, if clear 0 nor 1).
not handled properly, it can lead to • Can cause the receiving flip-flop to output an
metastability and other issues like data loss or unpredictable value (0 or 1) or take an
glitches in the receiving clock domain. abnormally long time to settle. This can lead
• Requires techniques like synchronizers to malfunctions in the circuit.
(special circuits) to ensure the data is stable • By itself, metastability can't be entirely
before it's captured by the receiving flip-flop prevented. However, CDC techniques like
in the different clock domain. synchronizers help to reduce the probability
• Imagine two teams working independently of its occurrence and its impact on the circuit.
(different clock domains). When they need to • The designated person might momentarily
exchange information (data transfer), a fumble with the information (unstable state)
designated person (synchronizer) ensures a due to bad timing, but they eventually deliver
smooth handover to avoid confusion. it correctly (resolves to a stable state).
• Specialized EDA tools are often used to • Metastability is typically analyzed using timing
analyze and verify CDC issues during the analysis tools and simulation to ensure that
design phase. the probability of occurrence is minimized.
HANUMANTH REDDY day-22 DIGITAL INTERVIEW Q&A

Static Hazard Dynamic Hazard

• A static hazard occurs when the output • A dynamic hazard occurs when the
is supposed to remain at a constant value output is supposed to change from one
(either 0 or 1) but temporarily glitches to the value to another (e.g., from 0 to 1 or from 1
opposite value before stabilizing back to the to 0), but it oscillates (glitches multiple
intended value. times) before settling to the final correct
o Static1 hazard output is supposed to value.
stay at 1. • Dynamic hazards are caused by the
o Static0 hazard output is supposed to presence of multiple paths with different
stay at 0. delays that affect the output during a
• Occurs for specific combinations of transition. When an input change leads to a
inputs due to the presence of redundant terms condition where different paths propagate
in the logic expression. These redundant terms signals at different times, the output can
can cause a momentary change in the output oscillate before reaching its final stable
even when the overall logic function doesn't state.
require it. • Behavior: The output exhibits multiple
• Behavior: The output incorrectly unintended transitions (0->1->0 or 1->0->1)
transitions from 0 to 1 (static-1 hazard) or 1 to during the settling time. This can be
0 (static-0 hazard) for a short duration before visualized as a series of spikes or dips in the
settling to the correct value. output voltage.
• Adding redundant logic to ensure all • Ensuring minimal delay differences
paths provide the correct output despite among all paths that influence the output
input changes. transition.
• Careful design and optimization of the • Using faster logic gates and better
circuit to minimize propagation delay synchronization techniques.
differences. • Occur when the output is intended to
• Occur when the output is intended to change from one value to another but
remain constant but temporarily glitches to oscillates multiple times before settling to
the opposite value (either 0 or 1). They can the correct value.
be static-1 or static-0 hazards based on
whether the glitch is a brief drop from 1 to 0
or a brief rise from 0 to 1.
HANUMANTH REDDY day-23 DIGITAL INTERVIEW Q&A

Clock Skew Clock Jitter

• Clock skew refers to the difference in timing • Clock jitter refers to the short-term variations in
between the arrival of clock signals at different the timing of clock edges from their ideal
components or locations within a synchronous positions. It is essentially a measure of the
system. instability of the clock signal.

• Clock skew is a spatial variation, affecting • Clock jitter is a temporal variation, affecting the
different parts of a system at different times. consistency of clock edges over time.

• Skew typically affects the relative timing • Jitter affects the timing accuracy of the clock
between different clocked components. signal itself at a single point.

• Skew arises mainly due to physical layout and • Jitter is caused by noise and instability in the
design issues within the clock distribution clock generation and propagation process.
network.
• Causes:
• Causes: o Power supply noise and variations.
o Variations in the length of the clock o Electromagnetic interference (EMI).
distribution paths. o Thermal noise and other forms of electronic
o Differences in the loading of the clock signal. noise.
o Variations in the propagation delay through o Imperfections in the clock generation
the clock distribution network. circuitry (e.g., phase-locked loops (PLLs)).
o Process variations and temperature
differences across the chip. • Mitigation Techniques:-
• Mitigation Techniques:- o Improving power supply filtering and
o Designing balanced clock tree structures. regulation.
o Using clock buffers and repeaters to equalize o Shielding sensitive circuits from EMI.
path delays. o Using low-jitter clock generation circuits
o Employing skew compensation techniques (e.g., high-quality PLLs).
such as delay lines. o Implementing jitter cleaning techniques
o Implementing synchronous circuits with such as phase-locked loops or delay-locked
skew-tolerant design methodologies. loops (DLLs).
HANUMANTH REDDY day-24 DIGITAL INTERVIEW Q&A

Synthesis Simulation
• Synthesis is the process of transforming a high-level • Simulation is the process of verifying the functionality
hardware description (written in an HDL) into a gate- and timing of a digital design by executing its HDL
level representation that can be implemented on a description in a software environment.
physical hardware platform, such as an FPGA or an • The primary purpose of simulation is to validate that
ASIC. the design behaves as intended before it is synthesized
• The primary purpose of synthesis is to create a and implemented in hardware. This includes checking
hardware implementation of a design that can be for logical correctness and timing issues.
fabricated or programmed into a physical device. • Process:
• Process: o Compilation: The HDL code is compiled into a format
o Parsing: The HDL code is parsed to create an that the simulator can execute.
intermediate representation. o Execution: The compiled code is executed, and the
o Optimization: The intermediate representation is design’s behavior is observed over time.
optimized for area, speed, or power consumption. o Verification: The output of the simulation is compared
o Mapping: The optimized design is mapped to the target against expected results to verify correct functionality.
technology (e.g., specific FPGA architecture or ASIC • Types:
standard cells). o Functional Simulation: Focuses on verifying the logical
o Place and Route: For FPGA designs, the mapped design correctness of the design without considering timing
is placed and routed on the target device. constraints.
• The output of synthesis is typically a netlist, which is a o Timing Simulation: Includes timing information to
description of the logical elements and their check for issues related to signal propagation delays
connections in the circuit. and setup/hold times.
• Optimizes the design for factors like size and speed. • The output of a simulation is typically a waveform or
• Examples of synthesis tools include Synopsys Design log file that shows how signals change over time in
Compiler, Xilinx Vivado, and Intel Quartus Prime. response to test inputs.
• It can also include reports that highlight any
mismatches between expected and actual behavior.
• Examples of simulation tools include ModelSim,
Cadence Xcelium, and Synopsys VCS.
HANUMANTH REDDY day-25 DIGITAL INTERVIEW Q&A

Cache Memory Flash Memory


▪ Cache memory is used to temporarily ▪ Flash memory is used for long-term data
store frequently accessed data and storage. It is non-volatile, meaning it
instructions to speed up processing. It retains data even when the power is
acts as a buffer between the CPU and the turned off. Common uses include solid-
main memory (RAM). state drives (SSDs), USB flash drives, and
memory cards.
▪ Cache memory is extremely fast, much ▪ Flash memory is slower than cache
faster than both RAM and flash memory. memory and RAM but faster than
This high speed is essential for keeping up traditional mechanical hard drives
with the CPU. (HDDs).
▪ Cache memory is volatile, meaning it loses ▪ Flash memory is non-volatile, meaning it
its data when the power is turned off. retains data without needing a constant
power supply.
▪ Cache memory is typically located very ▪ Flash memory is typically used in storage
close to the CPU, often on the same chip devices that can be internal or external
or die. This proximity helps in reducing to the computer. It is not directly
access time. connected to the CPU.
▪ Cache memory is relatively small in size ▪ Flash memory can store large amounts of
compared to RAM and flash memory, data, ranging from gigabytes (GB) to
usually ranging from a few kilobytes (KB) terabytes (TB).
to several megabytes (MB).
▪ Flash memory is cheaper per byte than
▪ Cache memory is more expensive per cache memory but more expensive than
byte compared to both RAM and flash traditional HDDs.
memory due to its high speed and low
latency characteristics. ▪ Flash memory has a limited number of
▪ cache memory is highly durable in terms write/erase cycles, meaning it can wear
of operational write cycles and longevity out after a certain amount of use.
under normal operating conditions but However, modern flash memory devices
requires effective thermal management use wear-leveling algorithms to extend
to ensure longevity. their lifespan.
▪ There are different levels of cache ▪ Flash memory comes in various forms
memory (L1, L2, L3) with L1 being the such as NAND and NOR. NAND flash is
smallest and fastest, and L3 being larger commonly used in SSDs and memory
and slower compared to L1 and L2 but still cards, while NOR flash is used in devices
faster than main memory. requiring fast read operations and
reliability.

You might also like