Register (multi-bit flip-flop) in Verilog
📖 Scenario: You are designing a simple digital circuit that stores a 4-bit value. This is like a small memory box that remembers the bits when a clock signal ticks.
🎯 Goal: Build a 4-bit register using flip-flops in Verilog. The register should store the input value on the rising edge of the clock when the enable signal is high.
📋 What You'll Learn
Create a 4-bit input called
data_inCreate a 4-bit output called
data_outCreate an input clock signal called
clkCreate an input enable signal called
enOn the rising edge of
clk, if en is high, store data_in into the registerOtherwise, keep the previous value
💡 Why This Matters
🌍 Real World
Registers like this are used in CPUs and digital devices to hold temporary data during processing.
💼 Career
Understanding registers is essential for hardware design engineers and anyone working with digital circuits or FPGA programming.
Progress0 / 4 steps