Memory & FIFOs
Registered ROM 64x8 with Output Enable
A registered Read-Only Memory with 64 words of 8 bits and an active-low output enable signal.
About this block
Simulate it in the Verilog IDE
Registered ROM 64x8 with Output Enable is a Verilog reference block in the Memory & FIFOs catalog. SRAM models, FIFOs, register files, and memory-style storage. Marked Medium: more state or a wider datapath, still one workspace in the IDE.
This IP implements a registered Read-Only Memory (ROM) with 64 words of 8 bits. It features an active-low output enable signal (oe_n) to control data availability on the output bus. When oe_n is active (low), the output reflects the ROM data; when inactive (high), the output is driven to 0x00.
The design includes a synchronous register stage that captures data from the ROM lookup only when oe_n is active. This is suitable for simple storage, buffering, or lookup table applications in digital logic designs where controlled output drive is required.
- Choose Open in IDE. RTL Studio loads the packaged workspace for Registered ROM 64x8 with Output Enable.
- Read the Verilog module in the editor. The catalog line for this block: A registered Read-Only Memory with 64 words of 8 bits and an active-low output enable signal.
- Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
- Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.
RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.
Architecture
The module consists of two main parts:
- ROM Initialization: A memory array
mem[0:63]is initialized with hardcoded 8-bit values using aninitialblock in Verilog. - Synchronous Logic: An
alwaysblock triggered by the positive clock edge (posedge clk) and asynchronous active-low reset (negedge rst_n).
- On reset (rst_n == 0), the output dout is forced to 0x00. - On normal operation, if the output enable is active (oe_n == 0), dout takes the value from mem[addr]. - If output enable is inactive (oe_n == 1), dout is forced to 0x00 (low drive).
Ports
| Port | Direction | Width | Description |
|---|---|---|---|
| clk | Input | 1 | Clock input (rising edge triggered) |
| rst_n | Input | 1 | Active-low asynchronous reset |
| addr | Input | 6 | Address input (0-63) |
| oe_n | Input | 1 | Active-low output enable. High = Drive 0x00, Low = Drive ROM Data |
| dout | Output | 8 | Data output |
Verification
The testbench (tb_registered_rom_oe_64x8) verifies the following behaviors:
- Reset Behavior: Ensures
doutis0x00whenrst_nis low. - Data Readout: Verifies that reading address 0 yields
0xAAand address 1 yields0xBBwhenoe_nis active. - Output Enable Control: Verifies that
doutis0x00whenoe_nis high (inactive).
All test cases passed successfully during simulation with Icarus Verilog.
More in Memory & FIFOs
- 16-Word 16-Bit Sync RAM with Byte Enable — L2 Upgrade
- 16×8 Sync RAM (No Reset, Registered Read) — L2 Upgrade
- 32-Bit Asynchronous FIFO with Gray Pointer Encoding
- 32-Bit Register with Byte Writes
- 32x16 Synchronous Single-Port RAM
- 4x8 1W1R Register File (Comb Read)
- 4×8 Sync RAM (Async Reset, Comb Read)
- 64-bit Wide Scratchpad RAM with Dual-Port Access
- 8-Bit Valid/Ready Skid Buffer
- 8x16 Single-Port Sync RAM
- 8x32 Dual-Read Register File
- 8×8 Sync RAM (Async Reset, Comb Read, Loop Init) — L1 Upgrade
- Asymmetric RAM WR8 RD16 — L2 Upgrade
- Byte-Enable Regfile 8x32 — L2 Upgrade
- CAM 4x8 with Invalidate
- Circular Buffer 16x8