CSCE 611 Fall 2026 Lecture 13: Digital Building Blocks 1
Overview
Jason D. Bakos reviews sequential-logic quiz concepts, then connects combinational path delays, setup and hold constraints, clock skew, and metastability to practical timing design. He explains how two-flip-flop synchronizers reduce asynchronous-input failure risk, then compares ripple-carry addition with carry-lookahead and prefix adders using propagate and generate signals to shorten carry delay.
Key takeaways
- A combinational FSM process needs an assignment on every control-flow path; a default next_state = current_state prevents unintended latch inference and implements a safe state hold.
- Setup timing is constrained by the longest register-to-register path, while hold timing is constrained by the shortest path, so reliable design must check both extremes.
- Clock skew can help one timing constraint while hurting the other: the lecture's convention adds skew to setup delay and subtracts it from contamination delay.
- A two-flip-flop synchronizer gives a metastable first stage nearly one clock period, minus setup time, to resolve before the second stage samples it.
- Ripple-carry delay grows with adder width because every carry waits for the previous bit; carry-lookahead reduces serial work by computing group propagate and generate signals in parallel.
- Prefix adders extend carry-lookahead's group-signal idea to arbitrary consecutive bit ranges, enabling carry computation without a full bit-by-bit ripple.
Chapters
- Find a flip-flop's next-state function by tracing the logic driving its D input; Q is the current state and D is the next state.
- For Q0, the logic is A AND (Q1 OR Q0), including feedback from Q0 into its own next-state logic.
- With A held at 1 and reset applied, the example state sequence reaches 001 and remains there.
- Combinational next-state logic must assign a value on every possible path; omitted conditions can cause latch inference.
- A default assignment such as next_state = current_state gives unspecified conditions a defined state-hold behavior.
- The shown design also declares fu as four bits while current_state and next_state are two bits, creating a width mismatch.
- always_comb is intended for combinational logic and can flag incomplete assignments; always_latch explicitly describes latch behavior.
- Five students with five possible moods each create 5^5 combined configurations, requiring ceil(log2(5^5)) = 12 state bits.
- To identify S1's next-state logic, trace the S1 flip-flop's D input backward through its OR gate and connected wires.
- The example's S1 next-state expression is S0 OR NOT S1.
- Contamination delay is the earliest possible output change, while propagation delay is the latest; actual transitions can occur within that range.
- Fanout creates multiple input-to-output paths; the illustrated circuit has seven paths, with three to X and four to Y.
- Unequal path delays can produce a temporary glitch when one input reaches an OR gate through both a short and a long route.
- For unequal gate delays, timing analysis compares total contamination and propagation delay across the relevant paths.
- The setup constraint requires the clock period to cover clock-to-Q delay, combinational propagation delay, and the destination flip-flop's setup time.
- Maximum clock frequency, or fmax, is limited by the slowest register-to-register path and conservative assumptions about temperature and chip variation.
- Adding pipeline stages reduces the logic delay per stage; Bakos contrasts the course's three-stage CPU with real CPUs that may use 20 to 30 stages.
- Hold timing depends on the shortest path, represented by contamination delay, rather than on the clock period in the simplified constraint.
- If a newly launched value reaches the destination D input too quickly after the clock edge, it can overwrite data during the hold interval.
- Designers must ensure the minimum path delay is long enough to satisfy the destination flip-flop's hold time.
- A clock network's large fanout, wire resistance, and capacitance cause clock edges to reach chip registers at different times.
- If the launch clock arrives later than the capture clock, the setup path effectively gains delay, reducing setup margin.
- The opposite skew direction can shorten the minimum data path and worsen hold timing; the lecture accounts for skew by adding it to setup delay and subtracting it from contamination delay.
- Overclocking takes a risk beyond the timing guarantees based on worst-case process and operating conditions; increasing voltage also raises power, approximately with voltage squared.
- Changing a flip-flop's D input during its setup-and-hold aperture can cause metastability, a temporary output voltage between valid logic levels.
- The output eventually resolves to 0 or 1, but the resolution time follows an exponential probability model involving the technology parameter tau.
- External events such as button presses and arriving network data cannot be scheduled to avoid the aperture, so input sampling always carries some metastability risk.
- A synchronizer places two flip-flops in series so the first stage has roughly one clock period minus the second stage's setup time to resolve.
- A first-stage metastable event can still persist long enough to affect the second stage, but the probability is reduced by the available resolution time.
- Failure-rate estimates combine the chance of an input transition during the aperture, the exponential resolution probability, and the input transition rate; the inverse gives mean time between failures.
- SPI and I2C use shared clocks, while UART is asynchronous and samples without a shared clock phase, making reliable sampling and error detection important.
- A one-bit full adder combines A, B, and carry-in to produce a sum bit and carry-out.
- Cascading full adders creates a ripple-carry adder, where each column waits for the previous column's carry.
- For an n-bit ripple adder, the worst-case carry path grows roughly as n times the full-adder propagation delay.
- A top-level carry-in is useful for two's-complement subtraction, which complements B and adds one.
- Generate G is 1 when A and B are both 1, so the bit produces a carry regardless of carry-in.
- Propagate P is A XOR B in the lecture's definition, so an incoming carry passes through when exactly one operand bit is 1.
- The carry-out equation combines generate with propagate AND carry-in; P and G depend only on A and B and can be computed before the carry arrives.
- Expanding carry equations recursively avoids waiting for every ripple stage but can create a large, slow logic expression.
- A 32-bit adder can be partitioned into eight four-bit blocks, with a short ripple path retained inside each block.
- Each block calculates group generate and group propagate from its constituent bits, allowing block-level carry behavior to be determined in parallel.
- Group propagate indicates whether a carry entering the block passes through it; group generate indicates whether the block creates a carry without relying on its input carry.
- Block size is a design choice: the same approach can use two-, eight-, or 16-bit groups.
- Bit-level and group-level propagate and generate signals are calculated in parallel across the blocks, with the group calculation following the bit calculation.
- Only the carry signal ripples between blocks, passing through the short group carry logic rather than through every individual full adder.
- For eight four-bit blocks, the carry traverses the inter-block logic across seven boundaries, then the final block uses its incoming carry to produce sums.
- This hybrid structure trades more parallel logic for less serial carry delay than a 32-bit ripple-carry adder.
- A prefix adder forms group generate and propagate signals for arbitrary consecutive bit ranges, not just fixed-size blocks.
- Larger ranges are built by merging adjacent smaller ranges, such as combining bits 10 through 9 with bits 8 through 7.
- The prefix network computes carries for output bits from these combined ranges rather than relying on a bit-by-bit ripple.
- Bakos introduces prefix adders as faster than the carry-lookahead design and notes that the full construction continues beyond the lecture.
Transcript excerpt
0:00 We had a quiz due last week on the sequential logic. I'll just go through that real quick just to make sure there are no questions. What's the This first question asks what's the next state function of state bit Q0 in the circuit below. Uh so that to answer this uh you're looking at the input to the Q0 register. So you have to kind of start with the input and work your way backwards to figure out what the logic is that's driving the Dinput on that guy. And the Q output is the current state and the D input is the next state. Right? So uh so the next state function is going to be something and something because there's an AND gate. So we're ending with A which is the input and the second input to that ANDgate is an OR gate. Uh we're
0:50 oring Q1 with Q0. Right? So we have this wraparound. So the current state of Q0 wraps around and it feeds the next state logic for that same for that same uh bit. So um so I have the next state logic for all three bits here. But for the quiz we were just asking for Q0. So I've got Q0 apostrophe meaning next state and it's Q1 or Q0 and A. Okay. Any questions about that? All right. Um, this one says in the circuit below, is the same circuit? Yeah, same circuit. Uh, suppose we set the A input to a constant one and then pulse the reset input. What is the state of Q0,
1:38 Q1, Q0 in the third cycle? Uh, recall that the S and R register in indicate set and reset. So yeah, the reset is just you know if you assert reset it it sets the output of the
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jason D. Bakos.