§ 5.1Logic Gates
- Basic gates: AND (Y = A·B), OR (Y = A+B), NOT (Y = Ā).
- Universal gates: NAND and NOR — each alone can realize any Boolean function. Counting classics: NOT = 1 NAND; AND = 2; OR = 3; XOR = 4 NAND (5 NOR); XNOR = 5 NAND (4 NOR); half adder = 5 NAND; full adder = 9 NAND.
- XOR: Y = A⊕B = A B̄ + ĀB — "1 when inputs differ"; odd-1s detector for many inputs. Identities: A⊕0 = A, A⊕1 = Ā, A⊕A = 0, A⊕Ā = 1; associative and commutative; controlled inverter (one input as control) — basis of adder/subtractor sharing and parity logic.
- XNOR: equivalence gate, Y = 1 when inputs match; A⊙B = \(\overline{A\oplus B}\).
- Multi-input behaviour: n-input XOR = parity (1 for odd number of 1s); enable/inhibit use of AND (gate open when control = 1) and OR (control = 0).
- Positive vs negative logic: a positive-logic AND is a negative-logic OR (De Morgan duality in hardware).
- Special outputs: open-collector/open-drain (wired-AND, level shifting, shared bus with pull-up), tri-state (0, 1, high-Z — bus multiplexing; enable pin).
UGC NET focus
NAND/NOR universality counts (XOR = 4 NAND is a favourite); XOR identities and parity; tri-state vs open-collector use; recognizing functions from gate networks.
§ 5.2Boolean Algebra
Laws and theorems
| Law | Statement |
| Identity / Null | A+0 = A, A·1 = A; A+1 = 1, A·0 = 0 |
| Idempotent / Complement | A+A = A, A·A = A; A+Ā = 1, A·Ā = 0 |
| Commutative / Associative / Distributive | A+BC = (A+B)(A+C) — the "unusual" dual distribution |
| Absorption | A + AB = A; A(A+B) = A; A + ĀB = A + B |
| De Morgan | \( \overline{A+B} = \bar A\,\bar B; \quad \overline{AB} = \bar A + \bar B \) |
| Consensus | AB + ĀC + BC = AB + ĀC (BC is redundant) |
| Duality | swap +/·, 0/1 → dual identity also holds |
| Involution | \( \bar{\bar A} = A \) |
- Canonical forms: Sum of Products (SOP, minterms mᵢ, Σm notation) and Product of Sums (POS, maxterms Mᵢ, ΠM); Mᵢ = m̄ᵢ; complement of Σm(list) = Σm(remaining) = ΠM(list).
- n variables → 2ⁿ minterms → \( 2^{2^n} \) possible functions (n = 2 → 16).
- Shannon expansion: f = x·f(x=1) + x̄·f(x=0) — the theoretical basis of MUX-based implementation (§5.6) and FPGA LUTs (§5.15).
- Functionally complete sets: {AND, OR, NOT}, {NAND}, {NOR}, {AND, XOR, 1} (Reed–Muller).
UGC NET focus
Simplification one-liners using absorption/consensus (A + ĀB = A + B is the most used); De Morgan on multi-level expressions; minterm↔maxterm conversion; count-of-functions formula.
§ 5.3Minimization: K-Maps & Quine–McCluskey
Karnaugh map
- Truth table folded so adjacent cells differ in one variable (Gray-code ordering 00, 01, 11, 10); groups of 2ᵏ adjacent 1s eliminate k variables. Map edges wrap (left–right, top–bottom; the four corners are mutually adjacent).
- Procedure: cover every 1 with the largest possible power-of-two groups (octets → quads → pairs), as few groups as possible; overlap allowed; read each group as the product of unchanging variables.
- Prime implicant (PI): a group not contained in any larger group; essential PI (EPI): covers at least one 1 no other PI covers — EPIs must appear in every minimal cover (counting PIs/EPIs is a standard MCQ).
- Don't-cares (X/d): output irrelevant for unused input combinations (e.g., BCD codes 1010–1111) — include in groups when they enlarge a group, ignore otherwise.
- POS minimization: group the 0s, read as maxterms (or minimize f̄ and complement).
- Practical limit ~4–5 variables (5-var = two linked 4-var maps).
- Hazards link: a static-1 hazard exists where two adjacent groups are not bridged; add the consensus (redundant) group to kill the glitch — full story in §5.17.
Quine–McCluskey (tabular) method
- Algorithmic, computer-suitable, any number of variables: (1) list minterms grouped by 1-count; (2) repeatedly combine pairs differing in one bit (mark with −) until no more → prime implicants; (3) PI chart: select essential PIs, cover the rest minimally (Petrick's method for cyclic charts).
- Guaranteed minimal SOP; cost: exponential table growth — heuristics (Espresso) used in real EDA.
UGC NET focus
Solve 4-variable K-maps fast (watch corner and wrap groups); count prime vs essential prime implicants for a given Σm list; don't-care exploitation in BCD problems; Gray-code cell ordering itself is asked.
§ 5.4Logic Families
Definitions that anchor every comparison
$$ NM_H = V_{OH(min)} - V_{IH(min)}, \quad NM_L = V_{IL(max)} - V_{OL(max)}; \qquad \text{Fan-out} = \min\!\left(\frac{I_{OH}}{I_{IH}}, \frac{I_{OL}}{I_{IL}}\right) $$
$$ \text{Figure of merit (speed–power product)} = t_{pd} \times P_D \ \ (\text{pJ}) $$
Family comparison (standard textbook values)
| Property | TTL (74) | CMOS (4000/74HC) | ECL (10K) |
| Basic gate | NAND | NAND/NOR (inverter pair) | OR/NOR |
| t_pd | ~10 ns (74), 3 ns (74S/LS mix) | ~50 ns (4000), 8–10 ns (HC) | 1–2 ns (fastest) |
| Power/gate | 10 mW | ~nW static; dynamic fCV² | 25–50 mW (worst) |
| Fan-out | 10 | >50 (CMOS loads) | 25 |
| Noise margin | 0.4 V | ~0.3·V_DD per side (best) | ~0.25 V (small swing) |
| Logic levels | V_OL 0.4, V_OH 2.4; V_IL 0.8, V_IH 2.0 | rail-to-rail | −1.75 V / −0.9 V (negative supply) |
| Key trait | saturating BJTs; totem-pole output | zero static current; wide V_DD 3–15 V | non-saturating (current steering) → speed |
- TTL internals: multi-emitter input transistor, phase splitter, totem-pole output (never parallel totem-poles!); open-collector variant for wired-AND/bus; tri-state for buses. Floating TTL input reads HIGH (but never rely on it). Subfamilies: L, H, S (Schottky clamp prevents saturation), LS (the classic 2 mW/10 ns), AS, ALS, F.
- CMOS: complementary pair per §2.16 — static power ≈ 0, dissipation = αfC_LV²; unused inputs must be tied (floating gates drift, both devices conduct); handle ESD; 74HCT = HC with TTL-compatible thresholds (the interface family).
- ECL: differential current switch biased away from saturation → no storage delay; complementary outputs free; constant supply current (quiet supplies, but hot); used where raw speed mattered (mainframes, instrumentation, fiber front ends).
- Interfacing: TTL→CMOS (5 V): pull-up resistor to lift V_OH; CMOS→TTL: HC can drive LS directly (current check); level shifters between 3.3/5 V domains.
- Speed–power champions: lowest power = CMOS; fastest = ECL; best speed–power product historically = ALS/HC era; modern deep-submicron CMOS wins everything.
UGC NET focus
TTL level set (0.4/2.4/0.8/2.0 → NM = 0.4 V); why ECL is fastest (no saturation); CMOS static power ≈ 0 but dynamic ∝ fCV²; fan-out definition; totem-pole vs open-collector vs tri-state; floating-input behaviour of TTL vs CMOS.
§ 5.5Combinational Circuits: Adders & Arithmetic
UGC NET focus
FA equations and HA-composition; CLA G/P definitions and why it beats ripple; add-6 BCD correction rule; Gray conversion numericals; adder/subtractor with XOR + control line.
§ 5.6MUX, DEMUX, Encoders & Decoders
Multiplexer (data selector)
- 2ⁿ inputs → 1 output via n select lines: \( Y = \sum_{i} m_i(\text{select})\,D_i \). ICs: 74151 (8:1), 74153 (dual 4:1), 74157 (quad 2:1).
- Function implementation (guaranteed exam item): any n-variable function on a 2ⁿ:1 MUX directly (minterm per input), or on a 2ⁿ⁻¹:1 MUX using n−1 variables as selects and feeding each data input with 0, 1, the residual variable or its complement (Shannon expansion in hardware).
- Tree expansion: two 8:1 + one 2:1 → 16:1; MUX = universal logic element.
- Applications: data routing, parallel→serial conversion, time-division multiplexing.
Demultiplexer / Decoder
- DEMUX: 1 input → 2ⁿ outputs (select-steered); a decoder with enable used as data = DEMUX (74138 = 3:8 decoder/DEMUX, 74155).
- Decoder: n inputs → activates one of 2ⁿ outputs (minterm generator). Function realization: decoder + OR gates sums required minterms — multi-output friendly (e.g., FA from one 74138 + two OR gates). Address decoding in memory systems (§5.10).
Encoders
- 2ⁿ → n inverse of decoder; ordinary encoder fails for multiple simultaneous inputs → priority encoder (74147 decimal→BCD, 74148 octal) outputs the highest-priority active line + valid flag.
UGC NET focus
Implement a given Σm function on 8:1 or 4:1 MUX (residue-variable table method); decoder+OR realization; priority-encoder truth-table reading; MUX tree sizing arithmetic.
§ 5.7Flip-Flops
- Latch vs flip-flop: latch = level-sensitive (transparent while enabled); flip-flop = edge-triggered (samples on clock edge only).
- SR latch: cross-coupled NORs (S=R=1 forbidden) or NANDs (S̄R̄, 0-active, S=R=0 forbidden); clocked SR adds gating. Switch-debouncer application.
- D (data/delay): Q⁺ = D — the storage workhorse; D latch transparent, D-FF edge-clocked.
- JK: resolves the SR forbidden state — J=K=1 toggles. Characteristic equation:
Characteristic equations
$$ Q^{+}_{JK} = J\bar Q + \bar K Q, \qquad Q^{+}_{D} = D, \qquad Q^{+}_{T} = T \oplus Q, \qquad Q^{+}_{SR} = S + \bar R Q\ (SR = 0) $$
- Race-around: level-triggered JK with J=K=1 toggles repeatedly while CLK is high (t_pulse > t_pd) → unpredictable. Cures: master–slave (master latches on CLK high, slave copies on low — pulse-triggered; beware 1's-catching) or edge triggering (modern standard, e.g., 7474 D, 74112 JK negative-edge).
- T (toggle): JK with J=K=T; divide-by-2 when T=1 — the counter cell.
- Excitation tables (design direction: given Q→Q⁺, find inputs):
Excitation table — memorize whole
| Q→Q⁺ | S R | J K | D | T |
| 0→0 | 0 X | 0 X | 0 | 0 |
| 0→1 | 1 0 | 1 X | 1 | 1 |
| 1→0 | 0 1 | X 1 | 0 | 1 |
| 1→1 | X 0 | X 0 | 1 | 0 |
- Conversions: wire via characteristic/excitation match — JK→D: J = D, K = D̄; JK→T: J = K = T; D→JK: D = JQ̄ + K̄Q; D→T: D = T⊕Q; T→D: T = D⊕Q.
- Timing parameters: setup t_su (data stable before edge), hold t_h (after edge), propagation t_pd, recovery (async release); violation → metastability (output hovers; resolve with synchronizer chains). Max clock \( f_{max} = 1/(t_{pd} + t_{su} + t_{comb}) \). Asynchronous PRESET/CLEAR override the clock.
UGC NET focus
Characteristic vs excitation tables (direction of use!); race-around cause and master–slave cure; conversion wiring (JK→T and D→T asked repeatedly); f_max from timing budget; metastability from setup/hold violation.
§ 5.8Shift Registers
- Cascade of D flip-flops sharing one clock; data moves one stage per edge. Four I/O modes: SISO, SIPO, PISO, PIPO — serial load of n bits takes n clocks; parallel load takes 1.
- Universal shift register (74194): mode controls S₁S₀ select hold / shift-right / shift-left / parallel-load.
- Bidirectional shifting via MUX at each D input. 74164 = SIPO, 74165 = PISO, 7495 = 4-bit universal predecessors.
- Applications: serial↔parallel conversion (UART core), time delay (n/f_clk), multiplication/division by 2 per left/right shift (arithmetic shift preserves sign), keyboard scanning, pseudo-random sequence generation:
- LFSR: feedback = XOR of taps → maximal-length (PN) sequence of \( 2^n - 1 \) states (all-zeros excluded); CRC, scramblers, BIST.
- Counter cousins (ring/Johnson) in §5.9.
UGC NET focus
Clock-count questions (load/transfer n bits); mode table of 74194; LFSR length 2ⁿ−1; shift = ×2 / ÷2 arithmetic; identify SISO/SIPO/PISO/PIPO from data-path description.
§ 5.9Counters: Ripple, Synchronous, Ring & Johnson
Asynchronous (ripple) counters
Synchronous counters
- All FFs share the clock; next-state logic (from excitation tables — the §5.16 design procedure) feeds J/K or T inputs: stage toggles when all lower stages = 1 → \( T_k = Q_{k-1}Q_{k-2}\cdots Q_0 \).
- f_max set by one FF delay + gating: \( f_{max} = 1/(t_{pd} + t_{su} + t_{gate}) \) — fast and glitch-aligned. ICs: 74160–163 (sync decade/binary, sync load), 74190/191/193 (up–down).
- Arbitrary-sequence and self-correcting counters via unused-state analysis (lockout check: ensure stray states re-enter the main loop).
Shift-register counters
Ring vs Johnson (twisted ring)
| Ring | Johnson |
| Feedback | Q_last → D_first | Q̄_last → D_first |
| States from n FFs | n (one hot) | 2n |
| Decoding | none needed (self-decoded) | 2-input AND per state, glitch-free |
| Initialization | preset single 1 | clear all |
| Use | sequencers, stepper phases | quadrature/multiphase clocks (e.g., 4-FF → 8 states, 45° phases) |
Both waste states vs binary (need self-correction logic for stray states) but trade efficiency for speed and clean decoding.
UGC NET focus
FF-count ⌈log₂N⌉; ripple f_max = 1/n·t_pd vs synchronous independence of n; mod-10 reset decode; ring n states vs Johnson 2n (most-asked single fact); frequency division by 2ᵏ; glitch origin in ripple decoding.
§ 5.10Semiconductor Memories
- Hierarchy of terms: capacity = words × bits (e.g., 1K × 8); address lines n ↔ 2ⁿ words; access time, cycle time; volatile (RAM) vs non-volatile (ROM/flash).
RAM technologies
| SRAM | DRAM |
| Cell | 6-transistor cross-coupled latch | 1T + 1C (charge storage) |
| Refresh | none | required (~ms; leakage) |
| Speed | fast (ns) → caches | slower; dense → main memory |
| Density/cost per bit | low/high | high/low |
| Read | non-destructive | destructive (rewrite after read); sense amplifiers |
| Addressing extra | — | row/column multiplexed (RAS/CAS) |
- ROM family: mask ROM (factory) → PROM (fuse, one-time) → EPROM (UV-erase whole chip, quartz window, floating-gate FAMOS) → EEPROM (electrical byte-erase, Fowler–Nordheim tunneling) → Flash (electrical block-erase; NOR = code/XIP, random access; NAND = data storage, serial pages, cheapest/densest; wear ~10³–10⁵ cycles → wear leveling).
- Memory expansion (favourite numericals): word-length expansion = parallel chips sharing addresses (two 1K×4 → 1K×8); capacity expansion = decoder on upper address lines selects chips via CS (four 1K×8 + 2:4 decoder → 4K×8). Chips needed = (target words/chip words)×(target bits/chip bits).
- Memory class map: RWM (SRAM/DRAM), NVRAM (battery/FeRAM/MRAM), sequential (FIFO), CAM (associative — tag lookup).
- ROM as logic: address = input, stored word = truth-table output — fixed-AND PLD view (§5.13); lookup tables, character generators, code conversion, microprogram store.
UGC NET focus
6T vs 1T1C; why DRAM refreshes (and destructive read); EPROM-UV vs EEPROM-electrical; NOR vs NAND flash roles; chip-count and decoder-size expansion numericals; address-line ↔ capacity arithmetic.
§ 5.11D/A Converters
DAC fundamentals (n bits)
$$ V_o = V_{FS}\,\frac{D}{2^{n}} \ \ (D = \text{input code}); \qquad \text{Resolution} = \frac{V_{FS}}{2^{n}-1} = 1\,\text{LSB}; \qquad \%\,\text{res} = \frac{100}{2^n - 1} $$
- Weighted-resistor DAC: summing amp with R, 2R, 4R … 2ⁿ⁻¹R branches — simple but needs a 2ⁿ⁻¹:1 range of precise resistors (impractical beyond ~4–6 bits).
- R–2R ladder (the standard): only two values; each node sees R looking either way → binary current/voltage division; switches steer 2R branches to V_ref or ground. Output \( V_o = -\dfrac{R_f}{2R}\cdot\dfrac{V_{ref}\,D}{2^{n-1}} \)-form (inverted-ladder current-mode is fastest). Monotonicity by construction; trimming easy.
- Switched current-source DACs (high speed, comms), PWM + filter (cheap), sigma-delta (audio precision); multiplying DAC (MDAC): output ∝ digital code × analog V_ref → programmable attenuator.
- Specifications: resolution (bits), full-scale, accuracy; INL (deviation from ideal line), DNL (step-size error; DNL < 1 LSB ⇒ monotonic ⇒ no missing interaction with ADC codes), offset/gain errors, settling time, glitch energy at major-code transitions (0111→1000), deglitcher = track/hold.
UGC NET focus
Resolution/LSB numericals (10-bit, 10 V → 9.78 mV); R–2R advantage statement (two resistor values, equal node resistance); weighted-R spread problem; monotonicity ↔ DNL; output for a given code.
§ 5.12A/D Converters
Quantization (recap §3.20)
$$ Q = \frac{V_{FS}}{2^{n}};\quad e_{max} = \pm\frac{Q}{2};\quad SQNR = 6.02n + 1.76\ \text{dB} $$
ADC architectures — the comparison everything hinges on
| Type | Conversion time | Hardware | Traits / use |
| Flash (parallel) | 1 clock — fastest | 2ⁿ−1 comparators + priority encoder | hardware doubles per bit → ≤ 8–10 bits; scopes, video |
| Counter (ramp) | up to 2ⁿ clocks | counter + DAC + comparator | simple, slow |
| Tracking (servo) | follows input ±1 LSB | up/down counter + DAC | good for slowly varying signals |
| Successive approximation (SAR) | n clocks | SAR register + DAC + 1 comparator | binary search MSB→LSB; the general-purpose standard (8–18 bit, µs); needs S/H |
| Dual-slope (integrating) | slow (ms) | integrator + comparator + counter | ratiometric — R, C, clock tolerances cancel; integrates 50 Hz noise to zero (T₁ = k/50 s); DVMs |
| Sigma-delta (ΣΔ) | slow (oversampled) | 1-bit modulator + digital filter | noise shaping + decimation → 16–24 bits; audio, sensors |
Dual-slope core relation
$$ V_{in}\,T_1 = V_{ref}\,T_2 \ \Rightarrow\ V_{in} = V_{ref}\,\frac{T_2}{T_1} \quad (\text{count } \propto V_{in};\ R, C, f_{clk}\ \text{cancel}) $$
- SAR walk-through (the standard numerical): set MSB, compare via internal DAC, keep/clear, proceed bitwise — n comparisons total; e.g., 8-bit, 1 MHz clock → 8 µs.
- Sample-and-hold precedes SAR/flash so the input is frozen during conversion; aperture jitter limits SNR at high f_in; anti-alias filter before everything (Unit-3 §3.17).
- Specs: resolution, conversion time/throughput (SPS), INL/DNL, missing codes (DNL ≤ −1 LSB), ENOB = (SINAD − 1.76)/6.02.
- Counting comparators: flash n-bit needs 2ⁿ − 1 (8-bit → 255); two-step/pipeline ADCs split the flash to economize.
UGC NET focus
Speed ordering flash > SAR > dual-slope; SAR n-clock arithmetic; 2ⁿ−1 comparators; dual-slope noise rejection at mains frequency and the ratiometric identity; quantization error ±½ LSB; why S/H is mandatory.
§ 5.13Programmable Logic Devices: PROM, PAL, PLA
All three are AND-array → OR-array structures realizing SOP functions; they differ only in which array is programmable — the definitive table:
The PROM / PAL / PLA triangle (asked verbatim, repeatedly)
| Device | AND array | OR array | Consequence |
| PROM | Fixed (full decoder: all 2ⁿ minterms) | Programmable | any function as truth table; wasteful for few products; lookup tables/code converters |
| PAL | Programmable | Fixed (each OR owns a few ANDs) | fast, cheap, one-time; product terms per output limited (share-nothing) |
| PLA | Programmable | Programmable | most flexible; product terms shared among outputs; slower (two programmable planes), costlier |
- Programming technologies: fuse/antifuse (OTP), EPROM/EEPROM cells (erasable — GAL16V8 replaces PALs), SRAM (FPGA-style, volatile).
- PAL nomenclature: PAL16L8 = 16 inputs, 8 active-low outputs; PAL16R8 = registered (D-FF) outputs → first sequential PLDs (§5.15).
- Design flow: minimize to SOP → map products to AND lines → dot/X fuse maps (exam asks you to read or mark a fuse map).
- Sizing arithmetic: PLA spec "n × k × m" = n inputs, k product terms, m outputs; PROM for n inputs needs 2ⁿ words.
UGC NET focus
Fixed/programmable matrix table cold; product-term sharing = PLA's edge; PROM = fixed AND (decoder); registered PAL = FSM-capable; fuse-map reading; required PLA size for a given function set.
§ 5.14CPLD
- Complex PLD = several PAL-like macrocell blocks (each: programmable AND plane → OR → XOR polarity → D/T flip-flop → feedback) + a central programmable interconnect matrix + I/O blocks.
- Traits: non-volatile (EEPROM/flash — live at power-up, no boot stream), deterministic, predictable pin-to-pin timing (fixed routing crossbar), modest capacity (~10²–10⁴ macrocells), instant-on; in-system programmable via JTAG.
- Sweet spot: glue logic, address decoders, state machines, bus interfaces, power sequencing, FPGA configuration controllers.
- Classic families: Xilinx XC9500/CoolRunner, Altera MAX 7000/MAX II, Lattice ispMACH.
- Architecture lineage: SPLD (single PAL/GAL) → CPLD (many PALs + crossbar) → FPGA (sea of LUTs + segmented routing) — the granularity/volatility/timing trade tabled in §5.15.
UGC NET focus
CPLD = PAL blocks + global interconnect; non-volatile and instant-on vs FPGA; predictable timing as the CPLD keyword; macrocell anatomy.
§ 5.15Sequential PLDs & FPGA
Sequential PLDs
- Registered PAL/GAL macrocells (e.g., 16R8, 22V10): D flip-flop on each output, Q fed back into the AND plane → Mealy/Moore FSMs directly in one chip; output-enable and polarity programmable per macrocell. The 22V10's "versatile" macrocell (registered/combinational selectable) became the generic standard.
- Design = §5.16 procedure with excitation logic mapped onto product terms.
FPGA architecture
- Field-Programmable Gate Array: 2-D fabric of configurable logic blocks (CLBs) in a sea of programmable segmented routing, ringed by I/O blocks (IOBs); modern devices add block RAM, DSP (multiply–accumulate) slices, clock managers (PLL/DLL/DCM), high-speed serial transceivers, even hard CPU cores (SoC-FPGA).
- CLB/logic cell = LUT + FF: a k-input look-up table (k = 4 classic, 6 modern) is a tiny 2ᵏ×1 SRAM holding the truth table — implements any k-variable function in identical delay (Shannon/§5.2 made physical) — plus carry chain and a D flip-flop with bypass mux.
- Configuration: SRAM cells (dominant — reprogrammable, volatile → boot from external flash; SEU consideration), antifuse (OTP, rad-hard), flash-based (non-volatile, live-at-power-up).
- Design flow: HDL → synthesis → technology mapping → place & route → static timing analysis → bitstream. Timing depends on routing → reported post-P&R (contrast CPLD determinism).
CPLD vs FPGA — the standard differentiator table
| CPLD | FPGA |
| Logic granularity | Coarse (wide-AND macrocells) | Fine (small LUTs, thousands–millions) |
| Storage | Non-volatile (instant-on) | Mostly SRAM (needs configuration at boot) |
| Timing | Deterministic, fixed | Routing-dependent |
| Capacity | Small–medium | Very large (+RAM, DSP, transceivers) |
| Forte | Glue logic, simple FSMs | Datapaths, DSP, prototyping, SoC |
- FPGA vs ASIC: no NRE/mask cost, instant iteration, field updates ↔ higher unit cost, power, and lower f_max; structured-ASIC/hard-copy as midpoints. FPGAs dominate prototyping, low/medium volume, accelerators (and Ravindra-style lab instrumentation).
UGC NET focus
LUT = 2ᵏ-bit SRAM truth table (a 4-LUT realizes any 4-var function — count questions); CLB contents; SRAM-FPGA volatility vs antifuse/flash; CPLD–FPGA table rows; place-&-route in the flow.
§ 5.16Synchronous State Machines: Mealy & Moore
Mealy vs Moore
| Moore | Mealy |
| Output depends on | state only | state and present input |
| Output timing | synchronous, glitch-free, changes after the clock edge | can respond within the same clock; may glitch with input |
| States for a given job | usually more | usually fewer |
| Diagram labeling | output inside the state circle | output on the transition arc (in/out) |
Design procedure (the algorithm to internalize)
- Word statement → state diagram (bubbles = states, arcs = input/output).
- State table (present state, input → next state, output).
- State reduction: merge equivalent states (same outputs and equivalent next states — partition/implication-chart method).
- State assignment (binary codes; ⌈log₂S⌉ FFs; one-hot in FPGAs trades FFs for simpler logic).
- Choose FF type → apply excitation tables (§5.7) → K-map the FF-input and output equations.
- Check unused states: confirm they transition into the valid loop (self-starting; no lockout) or add reset logic.
- Worked archetypes the exam draws from: sequence detector ("detect 1011", overlapping vs non-overlapping → different transition arcs), serial adder (1 FF carries the carry), vending machine, up/down mod-N controllers (§5.9 synchronous counters are FSMs with no input).
- Analysis = reverse: from circuit → excitation expressions → next-state/state table → diagram → behaviour.
- Maximum clock from the timing budget \( f_{max} = 1/(t_{pd,FF} + t_{comb,max} + t_{su}) \).
UGC NET focus
Mealy/Moore identification from a diagram (where are the outputs written?); state-count for a named detector (n-bit sequence → up to n+1 Moore states); reduction by equivalence; overlapping-detector transitions; analysis from given JK equations.
§ 5.17Fundamental-Mode (Asynchronous) State Machines
No clock — state is held in feedback delays/latches; the circuit responds directly to input edges. Fundamental-mode assumptions: only one input changes at a time, and the circuit reaches a stable state (next state = present state) before the next change.
Analysis & design vocabulary
- State variables y (fed-back secondary variables) and excitation variables Y (their next values): stable ⟺ Y = y.
- Primitive flow table: one stable state per row (circled entries stable); merge compatible rows (using don't-cares) → reduced flow table → assign secondary variables → excitation maps → hazard-free SOP logic.
Races
- A transition requiring two or more state variables to change "simultaneously" — unequal delays decide the order. Non-critical race: all orders converge to the same stable state. Critical race: different orders → different stable states — a design failure.
- Cures: race-free (adjacent) state assignment — consecutive states differ in one variable (Gray-like; add cycle states or extra variables if needed); one-hot assignments.
Hazards
- Static-1 hazard: output momentarily drops 0 during a transition between two input states both giving 1 (two K-map groups not bridged) — kill with the consensus/redundant term. Static-0: dual (POS). Dynamic hazard: output bounces (1→0→1→0) during a single transition — arises in multi-level logic with multiple paths; eliminated by removing static hazards in two-level form.
- Essential hazard: a race between an input change and the fed-back state change (inherent in the flow table — detectable: state reached after 1 input change ≠ after 3 changes); cured only by inserting delay in the feedback path, not by added logic.
- In synchronous machines, hazards are harmless between clock edges (sampling waits) — one reason clocked design dominates; asynchronous design survives in latches themselves, arbiters/synchronizers, ripple counters, and ultra-low-power niches.
UGC NET focus
Definitions: stable state Y = y; critical vs non-critical race; static-1 hazard cure = consensus term (draw the bridging group); essential hazard cure = feedback delay; fundamental-mode single-input-change assumption.
§ 5.18Digital Design Using HDL
UGC NET focus
Blocking vs non-blocking rule-of-thumb (comb =, seq <=); incomplete if/case → inferred latch; x and z meanings; identify what hardware a snippet synthesizes to; sensitivity-list errors; structural/dataflow/behavioral labels.
§ 5.19Unit-5 Formula Sheet
One-stop reference table — Unit 5
| Topic | Result | Notes |
| Functions of n variables | \( 2^{2^n} \) | n = 2 → 16 |
| De Morgan | \( \overline{A+B} = \bar A\bar B;\ \overline{AB} = \bar A + \bar B \) | bubble pushing |
| Key absorption | A + ĀB = A + B | plus consensus AB + ĀC + BC = AB + ĀC |
| Universal-gate counts | XOR = 4 NAND; HA = 5; FA = 9 | NOT = 1, AND = 2, OR = 3 |
| Noise margins | NM_H = V_OH − V_IH; NM_L = V_IL − V_OL | TTL: 0.4 V both |
| TTL levels | 0.4 / 2.4 out; 0.8 / 2.0 in | fan-out 10 |
| CMOS power | P ≈ αfC_LV_DD² (static ≈ 0) | ECL fastest (no saturation) |
| Full adder | S = A⊕B⊕C; C_o = AB + C(A⊕B) | CLA: C_{i+1} = G_i + P_iC_i |
| BCD addition | sum > 9 or carry → +6 | correction 0110 |
| Gray code | G_i = B_{i+1} ⊕ B_i; B_i = B_{i+1} ⊕ G_i | MSB copies |
| MUX logic | n-var function on 2ⁿ⁻¹:1 MUX | Shannon expansion |
| JK characteristic | Q⁺ = JQ̄ + K̄Q | T: Q⁺ = T⊕Q; D: Q⁺ = D |
| Conversions | JK→D: J = D, K = D̄; D→T: D = T⊕Q | via excitation tables |
| Max clock | f_max = 1/(t_pd + t_comb + t_su) | ripple: 1/(n·t_pd) |
| Counter size | n = ⌈log₂N⌉ FFs for mod-N | stage k divides by 2ᵏ |
| Ring / Johnson | n states / 2n states | LFSR: 2ⁿ − 1 |
| Memory capacity | n address lines → 2ⁿ words | SRAM 6T; DRAM 1T1C + refresh |
| DAC resolution | 1 LSB = V_FS/(2ⁿ − 1); step V_FS/2ⁿ | R–2R: two values only |
| ADC quantization | e = ±½ LSB; SQNR = 6.02n + 1.76 dB | — |
| Flash ADC | 2ⁿ − 1 comparators, 1 clock | SAR: n clocks |
| Dual slope | V_in = V_ref·T₂/T₁ | R, C, f_clk cancel; rejects 50 Hz |
| PLD matrix | PROM: fixed-AND; PAL: fixed-OR; PLA: both prog. | PLA shares product terms |
| FPGA LUT | k-LUT = 2ᵏ×1 SRAM = any k-var function | CLB = LUT + FF + carry |
| Mealy / Moore | output on arc / in state | Moore needs ≥ states |
| Hazard cures | static: consensus term; essential: feedback delay | critical race: adjacent assignment |
| Verilog rule | comb: @(*) with =; seq: @(posedge clk) with <= | incomplete case → latch |
§ 5.20Quick Revision Notes — Unit 5 in 25 Points
Rapid-fire recap (last-day revision)
- NAND and NOR are universal; XOR = 4 NAND; n-input XOR = odd-parity detector; XOR with control input = programmable inverter.
- Workhorse identities: A + ĀB = A + B; consensus AB + ĀC + BC = AB + ĀC; dual distribution A + BC = (A+B)(A+C).
- n variables → 2ⁿ minterms → 2^{2ⁿ} functions; Mᵢ = complement of mᵢ; complement a Σm list = Σ of the missing minterms.
- K-map: Gray-ordered, edges wrap, corners adjacent; biggest groups first; EPIs are mandatory; don't-cares are free enlargers; Quine–McCluskey = tabular PI generation + cover chart.
- TTL card: V_OL 0.4 / V_OH 2.4 / V_IL 0.8 / V_IH 2.0 → NM 0.4 V; fan-out 10; basic gate NAND; floating input ≈ HIGH.
- CMOS: zero static power, P = αfCV²; tie unused inputs! ECL: non-saturating current steering → fastest, hottest, OR/NOR, negative supply.
- Never parallel totem-poles; open-collector → wired-AND with pull-up; tri-state → buses.
- FA: S = A⊕B⊕C, C_out = AB + C(A⊕B); CLA kills ripple with G = AB, P = A⊕B; BCD add-6 correction when >9/carry.
- Gray: XOR neighbours (MSB copies) — both directions; XOR-with-SUB + C_in = SUB turns an adder into a subtractor.
- MUX implements any n-var function with n−1 selects (Shannon); decoder + OR = multi-output minterm sums; priority encoder resolves multiple actives.
- Characteristic (analysis) vs excitation (design) tables — know both directions; JK: Q⁺ = JQ̄ + K̄Q.
- Race-around: level-triggered JK, J=K=1, pulse > t_pd → cured by master–slave (pulse-triggered, 1's-catching caveat) or edge triggering.
- Setup before edge, hold after; violation → metastability → synchronizer chains; f_max = 1/(t_pd + t_comb + t_su).
- Shift register modes SISO/SIPO/PISO/PIPO; n bits serial = n clocks; left shift ×2, right shift ÷2; LFSR runs 2ⁿ−1 states.
- Ripple counter: ⌈log₂N⌉ FFs, delays add (f_max = 1/n·t_pd), decoding glitches; synchronous: common clock, T_k = AND of lower Qs, speed independent of length.
- Ring: n states, self-decoding; Johnson (Q̄ feedback): 2n states, two-input decode; both need stray-state self-correction.
- SRAM = 6T latch, fast cache; DRAM = 1T1C, refresh, destructive read, RAS/CAS; EPROM UV-whole-chip vs EEPROM byte-electrical; NOR flash = code, NAND = storage.
- Memory expansion: parallel chips widen the word; decoder + CS multiplies capacity — count chips and decoder size.
- DAC: 1 LSB = V_FS/(2ⁿ−1); R–2R needs only two values with constant node resistance; DNL < 1 LSB ⇒ monotonic.
- ADC speed order: flash (1 clock, 2ⁿ−1 comparators) > SAR (n clocks, binary search) > dual-slope (ratiometric, kills 50 Hz) ; ΣΔ = oversampling + noise shaping for 16–24 bits; quantization ±½ LSB, 6 dB/bit.
- PROM fixed-AND / PAL fixed-OR / PLA both-programmable (shares product terms); registered PAL (16R8/22V10) = one-chip FSM.
- CPLD = PAL macrocells + crossbar: non-volatile, instant-on, deterministic timing; FPGA = LUT+FF CLBs + segmented routing: SRAM-configured, huge, timing post-P&R; k-LUT = any k-var function.
- Moore: output in the state (glitch-free, more states); Mealy: output on the arc (faster, input-sensitive). Design: diagram → table → reduce → assign → excitation → verify unused states.
- Asynchronous FSM: stable when Y = y; critical race → race-free (adjacent) assignment; static-1 hazard → add consensus group; essential hazard → delay in feedback only.
- Verilog discipline: @(*) with blocking (=) for combinational — complete the if/case or infer a latch; @(posedge clk) with non-blocking (<=) for registers; x = unknown, z = high-Z; testbench constructs aren't synthesizable.
↑ Back to top of Unit 5