LSSK · Verilog MeetupРусский

Breadboard exercises

The full curriculum: Basics, gates, arithmetic, multiplexers, memory, FIFO, arbiters, sequence FSMs and three traffic-light variants. Each lesson connects physical wiring to two equivalent SystemVerilog designs and platform examples.

SystemVerilog style rules

BB-BAS-01

AND, OR, NOT and XOR

Combinational logic calculates an output from the inputs present now. AND combines requirements, OR combines alternatives, NOT reverses a condition, and XOR detects a difference. These functions become the equations inside decoders, adders and processor control logic. This build places all four chips on one board so the same A and B can be compared simultaneously.

Open the lesson →
AND, OR, NOT and XOR
BB-BAS-02

D flip-flop with asynchronous reset

A D flip-flop stores one bit. Registers, pipeline stages and FSM state registers consist of D flip-flops. This lesson separates an edge-triggered data update from an asynchronous reset: changing D between rising edges does not change Q, but asserting RESET does.

Open the lesson →
D flip-flop with asynchronous reset
BB-BAS-03

4029 binary / decimal up-down counter

A counter is a state register whose next value is derived arithmetically from its present value. Counters measure events, select addresses and schedule repeated actions. The 4029 combines binary/decimal counting, direction selection and an active-low count-enable input.

Open the lesson →
4029 binary / decimal up-down counter
BB-BAS-04

4015 serial-to-parallel shift register

Serial-to-parallel conversion receives one bit per clock and exposes a word on several wires. Shift registers appear in serial interfaces, delay lines and pipelines. The CD4015 contains two independent four-stage registers; the main build uses section A and observes every stage.

Open the lesson →
4015 serial-to-parallel shift register
BB-BAS-05

Seven-segment display and 4511 decoder

A seven-segment display contains seven independently controlled LED segments, plus an optional decimal point. A decoder translates a numerical code into a visible pattern. The 4511 combines a transparent data latch, BCD decoder and active-high segment drivers for a common-cathode display.

Open the lesson →
Seven-segment display and 4511 decoder
BB-BAS-06

4008 adder with three decimal displays

The 4008 performs a four-bit binary addition without a clock. Carry propagates through combinational logic; no state or sequence is required. Three 4511 chips decode operand A, operand B and the low result nibble. This connects the full-adder equations to the arithmetic datapath used inside a processor.

Open the lesson →
4008 adder with three decimal displays
BB-FSM-01A

Timofei: green 3 → yellow 1 → red 3

Clock intervals: green / yellow / red = 3 / 1 / 3

Open the lesson →
FSM
BB-FSM-01B

Yuri: green 4 → yellow 2 → red 4

Clock intervals: green / yellow / red = 4 / 2 / 4

Open the lesson →
FSM
BB-FSM-01C

COUT: green 5 → yellow 1 → red 4

Clock intervals: green / yellow / red = 5 / 1 / 4

Open the lesson →
FSM

Remaining exercises

Coverage of all 61 source entries

A01

Half adder from gates

Build sum=A XOR B and carry=A AND B; test all four input pairs.

Open lesson →
Half adder from gates
A02

Full adder from gates

Use two XOR, two AND and one OR gates; verify all eight input triples.

Open lesson →
Full adder from gates
A03

2-bit adder: half adder plus full adder

Use a half adder for bit 0 and a full adder for bit 1. Verify 3+3=110; no external carry-in.

Open lesson →
2-bit adder: half adder plus full adder
A04

8-bit parallel adder

Cascade carry-out to carry-in. Set sixteen operand bits with rail patch leads; observe 8 sum bits and carry.

Open lesson →
8-bit parallel adder
B06

Both De Morgan identities

Compare ¬(A∧B) with ¬A∨¬B, and ¬(A∨B) with ¬A∧¬B. Rewire between the two comparisons.

Open lesson →
Both De Morgan identities
B09

4015: cascade both sections into eight stages

Cascade the two 4-bit sections; follow a single 1 through eight positions.

Open lesson →
4015: cascade both sections into eight stages
B11

4-bit adder with binary output

Enter two 4-bit operands; show four sum bits and carry. Carry-in is tied low.

Open lesson →
4-bit adder with binary output
C01

Configurable logic function

Patch mode controls to fixed levels, then investigate how the same data inputs implement different functions.

Open lesson →
Configurable logic function
C02

Parallel-in, serial-out register

Patch an 8-bit parallel word, load it on a clock edge, then shift and record the serial sequence.

Open lesson →
Parallel-in, serial-out register
C03

4-bit magnitude comparator

Compare A and B; initialize cascade inputs to equal=1, less=greater=0.

Open lesson →
4-bit magnitude comparator
C04

4051 multiplexer

Patch fixed data patterns, vary select inputs and observe selected channels.

Open lesson →
4051 multiplexer
C05

4052 multiplexer

Patch fixed data patterns, vary select inputs and observe selected channels.

Open lesson →
4052 multiplexer
C06

4053 multiplexer

Patch fixed data patterns, vary select inputs and observe selected channels.

Open lesson →
4053 multiplexer
C07

4019 multiplexer

Patch fixed data patterns, vary select inputs and observe selected channels.

Open lesson →
4019 multiplexer
C08

BCD-to-decimal decoder

Observe ten one-hot outputs for inputs 0–9; check the response to 10–15.

Open lesson →
BCD-to-decimal decoder
C09

8-to-3 priority encoder with decimal display

Assert multiple requests and show the highest selected input number; show valid status separately.

Open lesson →
8-to-3 priority encoder with decimal display
C10

Decoded decade counter

Follow the single active output through Q0–Q9; reset to Q0.

Open lesson →
Decoded decade counter
C11

Single FIFO with clock, push/pop and four data switches

Set a 4-bit word with four self-locking TTP223 switches. PUSH and POP are requests sampled with the assembled clock; observe Q[3:0], EMPTY and FULL.

Open lesson →
Single FIFO with clock, push/pop and four data switches
C12

4 × 4 register file

Patch addresses and use data/write controls to store and read four independent words.

Open lesson →
4 × 4 register file
C13

4-bit ALU

Select addition, subtraction and a logic operation. Patch function controls from the actual datasheet; input 8 operand bits plus mode.

Open lesson →
4-bit ALU
G01

Triple 3-input AND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Triple 3-input AND investigation
G02

Dual 4-input AND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Dual 4-input AND investigation
G03

Quad 2-input NAND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Quad 2-input NAND investigation
G04

Dual 4-input NAND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Dual 4-input NAND investigation
G05

Triple 3-input NAND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Triple 3-input NAND investigation
G06

8-input AND/NAND investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
8-input AND/NAND investigation
G07

Quad 2-input NOR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Quad 2-input NOR investigation
G08

Dual 4-input NOR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Dual 4-input NOR investigation
G09

Triple 3-input NOR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Triple 3-input NOR investigation
G10

8-input NOR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
8-input NOR investigation
G11

Dual 4-input OR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Dual 4-input OR investigation
G12

Triple 3-input OR investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Triple 3-input OR investigation
G13

Quad 2-input XNOR (source typo corrected) investigation

Use the selected gate and its datasheet to predict and check a truth table. Other gates in the same package can remain unused with inputs tied.

Open lesson →
Quad 2-input XNOR (source typo corrected) investigation
M01

4051 replaced by decoder + AND/OR

Tie decoder bit 3 low; gate eight fixed data bits with decoded selects and OR the terms. Compare against C04 by rewiring.

Open lesson →
4051 replaced by decoder + AND/OR
M02

4051 replaced by decoder + AND-OR-INVERT

Use two four-term 4086 sections, invert each output and OR them. Compare against C04 by rewiring.

Open lesson →
4051 replaced by decoder + AND-OR-INVERT
M03

4052 replaced by decoder + AND/OR

Decode the two select bits for two channels. Each channel uses four AND terms and one 4-input OR; compare with C05.

Open lesson →
4052 replaced by decoder + AND/OR
M04

4052 replaced by decoder + AND-OR-INVERT

Use one 4086 per 4:1 channel and invert both outputs; compare with C05.

Open lesson →
4052 replaced by decoder + AND-OR-INVERT
M05

4019 vector selection and gate equivalent

Compare Y=(A AND {4{Ka}}) OR (B AND {4{Kb}}) for two 4-bit vectors, using common enables.

Open lesson →
4019 vector selection and gate equivalent
M06

Johnson counter from shift register

Use four stages with inverted last-stage feedback. Observe eight states; compare with the fixed 10-state CD4017 by rebuilding C10.

Open lesson →
Johnson counter from shift register
O01

Hexadecimal display with DM9368

Wire the source’s DM9368 alternative to display hexadecimal operands and result.

Open lesson →
Hexadecimal display with DM9368
P01

Serial adder with serializers and three displays

Patch two operands; load both 4014s, reset carry, then shift into 4032 and collect the result in 4015. Show three low nibbles through 4511.

Open lesson →
Serial adder with serializers and three displays
P02

Serial adder with discrete carry register

Replace the 4032 of P01 with the A02 full adder and one 4013 for carry; preserve the serializer, output register and displays.

Open lesson →
Serial adder with discrete carry register
P03

Automatic three-FIFO adder with backpressure

At each clock cycle, enqueue A and B independently. Automatically consume their oldest pair and enqueue the sum when both are available and the result FIFO can accept it.

Open lesson →
Automatic three-FIFO adder with backpressure
P04

Two-request round-robin arbiter

Observe requests, grants and priority. The assembled clock accepts one grant each rising edge; persistent simultaneous requests alternate.

Open lesson →
Two-request round-robin arbiter
P05

Sequence recognizer: 01

DATA is 1 while pressed and 0 while released. The assembled clock samples one bit per rising edge; RESET starts a new stream.

Open lesson →
Sequence recognizer: 01
P06

Custom sequence FSM: 1011

Set DATA before each rising edge of the assembled clock. Build a recognizer for a teacher-assigned binary pattern of length 2–4; show state and MATCH on LEDs.

Open lesson →
Custom sequence FSM: 1011
P07

Bit-serial comparator, least-significant bit first

On each rising edge of the assembled clock, overwrite greater/less for differing input bits or retain the comparison for equal bits. Reset both flags to 0.

Open lesson →
Bit-serial comparator, least-significant bit first
P08

Bit-serial comparator, most-significant bit first

On assembled-clock edges, latch the first differing input pair and ignore subsequent differences. Compare the final flags with 4063.

Open lesson →
Bit-serial comparator, most-significant bit first
P09

Cascaded 8-bit comparator

Patch sixteen operand bits; cascade from the least-significant nibble to the most-significant comparator.

Open lesson →
Cascaded 8-bit comparator
P10

Nibble comparator: LSB first

Use 4063 for each input nibble pair and two state bits to remember the first unequal nibble. The assembled clock advances the comparison; RESET starts a word.

Open lesson →
Nibble comparator: LSB first
P10

Nibble comparator: MSB first

Use 4063 for each input nibble pair and two state bits to remember the first unequal nibble. The assembled clock advances the comparison; RESET starts a word.

Open lesson →
Nibble comparator: MSB first
P12

Compare binary and Johnson counter streams

Clock a 4-bit binary counter and a 4-stage Johnson counter together; display both vectors and the greater/equal/less comparison.

Open lesson →
Compare binary and Johnson counter streams