Digital7 hours total3 h on the project

Combinational Logic Design

Design and verify the standard combinational building blocks — decoders, multiplexers, encoders, comparators and adders — and reason about propagation delay and glitches.

Learning material0/21
Project0/12
Competence checklist0/6

Two ways in. Work the material, or if you already know this, go straight to the project and prove it.

How this skill is structured

  1. 1. Concepts — the ideas stated plainly, with the equations worth memorising.
  2. 2. Worked example — one real problem solved end to end, numbers included.
  3. 3. Tool demonstration — do the thing in a real open-source tool.
  4. 4. Resources — the specific free readings and videos, and what part of each to use.
  5. 5. Project — built alone, producing something a reviewer can check.
  6. 6. Competence checklist — what you must be able to do. This is also the audit rubric.

1. Concepts

Read these first. Tick each one when you could explain it to someone else without notes.

0/8

2. Worked example

A glitch that resets your processor

ProblemA 3-to-8 decoder drives eight chip selects from an address bus. A colleague reports that occasionally the wrong peripheral responds. The logic is provably correct. What is happening?

  1. 1
    The decoder is combinational and correct in steady state: for any settled address, exactly one output asserts.
  2. 2
    But the address bus bits do not change simultaneously. If the address goes from 011 to 100, all three bits change, and they arrive skewed by routing and driver differences.
  3. 3
    During the transition the decoder may momentarily see 111, 001, 000 or other intermediate codes, and it will faithfully assert the corresponding chip select for a few nanoseconds each.
  4. 4
    A chip select is an asynchronous, edge-sensitive control input on most peripherals. A 3 ns pulse can be enough to latch a write.
  5. 5
    Quantify: if the bus skew is 2 ns and the decoder's propagation delay is 8 ns, the glitch window is roughly the skew, so glitches of up to about 2 ns can appear on the wrong outputs.
  6. 6
    Fix 1 (the correct one): gate the decoder with a qualified strobe. Add an enable input to the decoder driven by a signal that only asserts after the address has settled. The 74HC138 has exactly this — three enable inputs — and this is why.
  7. 7
    Fix 2 (synchronous): register the decoder outputs in flip-flops clocked after the address is stable. Glitches on a D input are harmless; only the value at the clock edge matters.
  8. 8
    Fix 3 (wrong): adding an RC filter to the chip select. This slows the edge, causes a slow transition through the threshold region, and can make things worse by adding metastability risk.
  9. 9
    General rule that falls out: never drive an asynchronous control input directly from unqualified combinational logic on a changing bus.

AnswerDecoding glitches during address transitions. Fix by gating the decoder with a settled strobe (the enable pins exist for this) or by registering the outputs. This is why address decoders in real designs always have an enable.

3. Tool demonstration

Build a 4-bit adder and an address decoder, measure the critical path, and see a real glitch on a simulated waveform.

0/9

Tool: Digital (hneemann) with delay modelling, plus Logisim-evolution

4. Resources

Free and, wherever possible, openly licensed. The note tells you which part to actually use — do not read them cover to cover.

0/4

5. Project — build this on your own

About 3 hours. This is the artifact that proves the skill. Work it without a walkthrough.

0/12

Design, simulate and verify a 4-bit arithmetic and logic unit supporting at least four operations, with a full timing analysis and a demonstrated, then eliminated, glitch.

Deliverables

Acceptance criteria — how you know it is good enough

If you want to push further

  • Export the design to VHDL or Verilog from Logisim-evolution and read the generated code, comparing it to what you would have written by hand.
  • Implement the same ALU as a lookup table in a ROM and compare size, delay and flexibility.

6. Competence checklist

Tick these honestly. If you are auditing this skill, this is your rubric — you should be able to demonstrate every line from the project you just built.

0/6
Tick every line above first — 6 remaining.