RTL Studio Open IDE

Bus Interfaces

Wishbone Byte-Strobe Slave 8

A Wishbone B.4 compliant slave module with byte-strobe support and a 256-byte internal memory map.

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

Wishbone Byte-Strobe Slave 8 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.

A simple, synthesizable Wishbone B.4 compliant slave IP implementing byte-strobe support for granular 32-bit data transfers. It includes a 256-byte internal register file and demonstrates proper byte-lane handling.

This IP provides a functional Wishbone byte-strobe slave suitable for educational purposes and basic integration testing.

It demonstrates how to implement granular byte writes and reads using the wb_sel (byte strobe) signal.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Wishbone Byte-Strobe Slave 8.
  2. Read the Verilog module in the editor. The catalog line for this block: A Wishbone B.4 compliant slave module with byte-strobe support and a 256-byte internal memory map.
  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

  • Wishbone B.4 Compliant: Supports standard signaling (cyc, stb, we, adr, dat, sel, ack).
  • Byte-Select Logic: Implements granular byte updates using the 4-bit wb_sel_i mask.
  • Internal Memory: Contains a 256-byte register file (mem[0:255]).
  • Immediate Read-Back: Read operations return current memory contents.
  • Synchronous Design: Fully synchronous with active-low reset.

Ports

Port NameDirectionWidthDescription
clkinput1Clock input
rst_ninput1Active-low reset
wb_adr_iinput32Address input (lower 8 bits used for 256-byte map)
wb_dat_iinput32Data input
wb_sel_iinput4Byte strobe input (bit 0 = LSB byte)
wb_we_iinput1Write enable input
wb_cyc_iinput1Cycle valid input
wb_stb_iinput1Strobe input
wb_dat_ooutput32Data output
wb_ack_ooutput1Acknowledge output
wb_err_ooutput1Error output

Architecture

The module decodes the Wishbone cycle and strobe signals. If cyc and stb are asserted, it checks we to determine operation type:

  1. Write: Updates specific bytes in the internal memory array based on wb_sel_i.
  2. Read: Returns the current value from the memory array at the specified address.

Verification

The testbench validates core functionality through five test cases:

Test CaseDescriptionExpected Result
TC1Full 32-bit write/readData matches written value
TC2Byte 0 write (LSB)LSB matches written value
TC3Byte 3 write (MSB)MSB matches written value
TC4Byte 1 writeMiddle byte matches written value
TC5No transfer without cycAck remains deasserted

All test cases passed successfully in simulation using Icarus Verilog. A VCD dump is available for waveform inspection.

Expected log output:

  • TC1 PASS Full write/read
  • TC2 PASS Byte 0 write
  • TC3 PASS Byte 3 write
  • TC4 PASS Byte 1 write
  • TC5 PASS No transfer without cyc
  • Simulation ends with INFO: PASS.

More in Bus Interfaces

All Bus Interfaces blocks