Chargement…
Chargement…
Write synthesizable Verilog and validate each module with a self-checking testbench run by Icarus Verilog.
0/80 exercises completed
Air-conditioning Controller
VerilogImplement combinational logic that arbitrates automatic and manual heating, cooling, and fan commands.
8-to-3 Priority Encoder
VerilogEncode eight requests into a three-bit index with fixed priority and a validity flag.
BCD-to-7-segment Decoder
VerilogConvert a BCD digit into active-high controls for a 7-segment display with priority blanking.
12-bit Unsigned Adder-subtractor
VerilogBuild a combinational arithmetic unit with addition overflow and subtraction underflow detection.
Dead-band Thermostat
VerilogControl a heater and cooler around a target using a five-degree dead band.
Three-input Boolean Circuit
VerilogTranslate a Boolean expression into a combinational network.
Complete Dead-band Thermostat
Inkjet Bus Decoder
VerilogDecode a nozzle number into a safe one-hot command.
Complete Three-input Boolean Circuit
Fail-safe Traffic-light Decoder
VerilogDecode a one-hot state and force red for every invalid code.
Complete Inkjet Bus Decoder
Traffic-light Enable Gate
VerilogAdd a global enable to traffic-light commands.
Complete Fail-safe Traffic-light Decoder
3-bit 2-to-1 Multiplexer
VerilogSelect one of two three-bit words.
Complete Traffic-light Enable Gate
Active-low Night Light
VerilogDrive an active-low lamp from daylight and an active-low enable.
Complete 3-bit 2-to-1 Multiplexer
8-bit Adder with Carry
VerilogAdd two bytes and a carry-in without losing the ninth bit.
Complete Active-low Night Light
4-bit Magnitude Comparator
VerilogCompare two unsigned numbers with three mutually exclusive flags.
Complete 8-bit Adder with Carry
Parity Generator and Checker
VerilogGenerate an even-parity bit and detect an invalid parity frame.
Complete 4-bit Magnitude Comparator
D Flip-flop with Asynchronous Reset
VerilogStore one bit on rising edges with a priority asynchronous reset.
Complete Parity Generator and Checker
8-bit Register with Enable
VerilogLoad or retain one byte according to an enable signal.
Complete D Flip-flop with Asynchronous Reset
Serial-in Parallel-out Shift Register
VerilogAssemble eight serially received bits into a parallel register.
Complete 8-bit Register with Enable
Ripple-carry Adder
VerilogBuild a four-bit adder from four full adders.
Complete Serial-in Parallel-out Shift Register
Adder-subtractor with Overflow
VerilogPerform signed addition and subtraction with carry and overflow flags.
Complete Ripple-carry Adder
4-bit Unsigned Multiplier
VerilogCompute the full product of two four-bit unsigned numbers.
Complete Adder-subtractor with Overflow
Two-digit BCD Adder
VerilogAdd two BCD numbers from 00 to 99 with a decimal carry.
Complete 4-bit Unsigned Multiplier
PAL-style Address Decoder
VerilogDecode three memory regions and report forbidden transactions.
Complete Two-digit BCD Adder
Four-digit BCD Sanitizer
VerilogValidate every BCD nibble and block illegal words. Implement every specified decision.
Complete PAL-style Address Decoder
Eight-bit Thermometer Decoder
VerilogConvert a contiguous run of LSB ones into binary. Implement every specified decision.
Complete Four-digit BCD Sanitizer
Eight-bit Saturating Adder
VerilogAdd two bytes without allowing wraparound. Implement every specified decision.
Complete Eight-bit Thermometer Decoder
BCD Magnitude Comparator
VerilogCompare two BCD numbers after validation. Implement every specified decision.
Complete Eight-bit Saturating Adder
Five-input Majority Voter
VerilogTake a majority decision across five redundant channels. Implement every specified decision.
Complete BCD Magnitude Comparator
One-hot Vector Analyzer
VerilogVerify that exactly one bit is active and return its index. Implement every specified decision.
Complete Five-input Majority Voter
Leading-one Detector
VerilogLocate the most-significant active bit. Implement every specified decision.
Complete One-hot Vector Analyzer
Programmable Address Window
VerilogDecode an address between two inclusive bounds. Implement every specified decision.
Complete Leading-one Detector
Modulo-10 Decade Counter
VerilogDesign a four-bit synchronous counter that advances from 0 through 9 and then wraps to zero.
10-bit Down-counter Timer
VerilogLoad a duration, decrement it every cycle, and flag zero before arithmetic wraparound.
Reloading Periodic Timer
VerilogStore a period, count down to zero, and then automatically reload the programmed value.
Parameterized Counter
VerilogCreate a counter whose width is selected at instantiation.
4-bit Up-down Counter
VerilogCount in both directions with enable and modulo-sixteen wraparound.
Modulo-12 Counter
VerilogCount from zero through eleven and pulse on wraparound.
Complete 4-bit Up-down Counter
Pulse Stretcher
VerilogTurn a one-cycle pulse into an active level of a fixed duration.
Complete Modulo-12 Counter
Switch Debouncer
VerilogFilter unstable transitions on an asynchronous input.
Complete Pulse Stretcher
16 x 8 Asynchronous-read RAM
VerilogModel a small memory with synchronous write and combinational read.
Complete Switch Debouncer
16 x 8 Synchronous-read RAM
VerilogModel a RAM whose read and write operations occur on rising edges.
Complete 16 x 8 Asynchronous-read RAM
Dual-read Register File
VerilogBuild an eight-register file with one write and two simultaneous reads.
Complete 16 x 8 Synchronous-read RAM
8 x 8 Synchronous FIFO
VerilogImplement an eight-byte queue with empty and full flags.
Complete Dual-read Register File
Seven-segment Decoder ROM
VerilogUse a combinational lookup table to display a hexadecimal digit or blank the display.
Complete 8 x 8 Synchronous FIFO
Single-digit BCD Adder
VerilogAdd two BCD decimal digits and a carry-in.
Complete Seven-segment Decoder ROM
Barrel Shifter and Rotator
VerilogShift or rotate a byte by zero through seven positions in one combinational cycle.
Complete Single-digit BCD Adder
1011 Sequence Detector
VerilogDetect an overlapping serial sequence with a Mealy state machine.
Complete Barrel Shifter and Rotator
Programmable Timer
VerilogLoad a period and produce a pulse after the requested number of cycles.
Complete 1011 Sequence Detector
Hamming (7,4) Code
VerilogEncode four bits and automatically correct one single-bit error.
Complete Programmable Timer
LFSR Stream Cipher
VerilogCombine each byte with a reproducible pseudo-random sequence.
Complete Hamming (7,4) Code
One’s-complement Checksum
VerilogCompute the checksum of packets made of sixteen-bit words.
Complete LFSR Stream Cipher
PS/2 Mouse Packet Decoder
VerilogAssemble three PS/2 bytes into buttons and signed movements.
Complete One’s-complement Checksum
Blackjack Score Engine
VerilogCompute the best value of a five-card hand without exceeding 21.
Complete PS/2 Mouse Packet Decoder
PRBS Sequence Checker
VerilogCompute the next LFSR state and count mismatches. Implement every specified decision.
Complete Blackjack Score Engine
SRAM Byte-lane Mapper
VerilogMerge one byte according to two byte enables. Implement every specified decision.
Complete PRBS Sequence Checker
PS/2 Frame Validator
VerilogCheck start, stop, and odd parity. Implement every specified decision.
Complete SRAM Byte-lane Mapper
Reciprocal Frequency Estimator
VerilogDivide a reference count by a measured period. Implement every specified decision.
Complete PS/2 Frame Validator
Windowed Watchdog Decision
VerilogClassify a kick as early, valid, or late. Implement every specified decision.
Complete Reciprocal Frequency Estimator
Eight-request Rotating Arbiter
VerilogSelect the first request after the previous winner. Implement every specified decision.
Complete Windowed Watchdog Decision
Complex Multiplier FSM Controller
VerilogSequence datapath selects, partial-product enables, and result writes across five states for complex multiplication.
Complex Multiplier Datapath
VerilogCombinationally compute the product of two signed complex numbers.
Iterative 8 x 8 Multiplier
VerilogMultiply two bytes in eight cycles using shifts and additions.
Iterative Restoring Divider
VerilogCompute an unsigned quotient and remainder in eight iterations.
8-bit ALU with Flags
VerilogCombine eight arithmetic and logic operations with status flags.
4 x 4 Matrix Keypad Scanner
VerilogScan four rows and encode the detected key.
Complete 8-bit ALU with Flags
8N1 UART Transmitter
VerilogSerialize one byte with a start bit, eight data bits, and a stop bit.
Complete 4 x 4 Matrix Keypad Scanner
8N1 UART Receiver
VerilogSample an 8N1 serial frame and report invalid stop bits.
Complete 8N1 UART Transmitter
PS/2 Receiver
VerilogReceive a PS/2 keyboard frame and check its start, parity, and stop bits.
Complete 8N1 UART Receiver
VGA Synchronization Generator
VerilogGenerate pixel counters, visible area, and parameterized synchronization pulses.
Complete PS/2 Receiver
Fixed-priority Bus Arbiter
VerilogGrant a bus to one requester at a time and hold the grant until release.
Complete VGA Synchronization Generator
3 x 3 Sobel Operator
VerilogCompute a gradient-magnitude approximation over a nine-pixel window.
Complete Fixed-priority Bus Arbiter
Asynchronous SRAM Controller
VerilogTurn an internal request into a timed asynchronous SRAM read or write cycle.
Complete 3 x 3 Sobel Operator
Burst DMA Controller
VerilogCopy a sequence of words between two address spaces with separate handshakes.
Complete Asynchronous SRAM Controller
Direct-mapped Cache Controller
VerilogCache four words and refill one line on a miss.
Complete Burst DMA Controller
Digital PLL Loop Filter
VerilogIntegrate lead and lag events from a digital phase detector.
Complete Direct-mapped Cache Controller
DRAM Refresh Decision Unit
VerilogArbitrate between normal access and overdue refresh. Implement every specified decision.
Complete Digital PLL Loop Filter
Fast-page DRAM Command
VerilogDetect an open-row hit and select RAS/CAS. Implement every specified decision.
Complete DRAM Refresh Decision Unit
Urgent Memory Arbiter
VerilogPrioritize urgent requests, then apply rotation. Implement every specified decision.
Complete Fast-page DRAM Command
Cache Write-policy Unit
VerilogDecide hit, allocation, or write-back. Implement every specified decision.
Complete Urgent Memory Arbiter
DMA Descriptor Address
VerilogCompute an indexed descriptor address. Implement every specified decision.
Complete Cache Write-policy Unit
Binary16 Floating-point Classifier
VerilogClassify zero, subnormal, normal, infinity, and NaN. Implement every specified decision.
Complete DMA Descriptor Address