RTL Studio Open IDE

Bus Interfaces

Wishbone to Simple CSR Bridge

Single-cycle Wishbone B3 slave bridging to a configurable array of 32-bit CSRs with byte-select write support.

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

Wishbone to Simple CSR Bridge is a Verilog reference block in the Bus Interfaces catalog. AXI, APB, Wishbone, and other on-chip bus interface adapters. Marked Hard: a larger reference. Simulate the packaged testbench before you change the RTL.

This IP provides a single-cycle Wishbone B3 slave interface bridging to a configurable array of 32-bit Control and Status Registers (CSRs). It supports byte-select write operations for granular register updates and is implemented in Verilog, targeting Icarus Verilog for simulation.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Wishbone to Simple CSR Bridge.
  2. Read the Verilog module in the editor. The catalog line for this block: Single-cycle Wishbone B3 slave bridging to a configurable array of 32-bit CSRs with byte-select write support.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. 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.

Features

  • Single-cycle latency: Read and write operations complete in one clock cycle.
  • Configurable:

- CSR_COUNT: Number of 32-bit registers. - CSR_BASE_ADDR: Base address for the CSR space. - CSR_WIDTH: Width of each CSR (default 32-bit).

  • Byte-enable support: Partial register writes using wb_sel.
  • Resettable: Synchronous reset clears all registers to zero.

Ports

Port NameDirectionWidthDescription
wb_clkInput1Clock input.
wb_rst_nInput1Active-low asynchronous reset.
wb_cycInput1Cycle valid signal.
wb_stbInput1Strobe signal.
wb_adrInput32Address bus.
wb_datInput32Data input bus.
wb_selInput4Byte select mask.
wb_weInput1Write enable signal.
wb_ackOutput1Acknowledge signal.
wb_dat_oOutput32Data output bus.

Parameters

ParameterDefaultDescription
CSR_BASE_ADDR32'h1000_0000Base address for the CSR space.
CSR_COUNT4Number of 32-bit registers in the array.
CSR_WIDTH32Width of each CSR register.

Verification

The testbench (tb_wishbone_simple_csr_bridge.v) validates:

  • TC1: Write and Read CSR 0.
  • TC2: Write and Read CSR 1.
  • TC3: Byte Write and Read (partial update).
  • TC4: Invalid Address Access (no ACK generated).

All tests passed with zero errors in the simulation log.

More in Bus Interfaces

All Bus Interfaces blocks