RTL Studio Open IDE

Bus Interfaces

Wishbone B3 to AHB-Lite Simple Bridge

Converts Wishbone B3 master transactions into AHB-Lite master transactions for single-word transfers.

About this block

Simulate it in the Verilog IDE

Hardverilogsimsyn

Wishbone B3 to AHB-Lite Simple 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 core implements a bridge that converts Wishbone B3 master transactions into AHB-Lite master transactions. It acts as a slave to the Wishbone master and as a master to the AHB-Lite slave. The bridge supports single-word (32-bit) transfers for both read and write operations, handling protocol translation automatically. It is designed for simple, non-bursting communication scenarios where protocol interoperability is required.

This IP provides a robust, synchronous bridge between Wishbone B3 and AHB-Lite protocols. It is optimized for simple, single-word transactions without burst support. The design is fully verified with a testbench covering basic read/write cycles and error handling. It is suitable for systems requiring protocol translation between these two common bus standards, with the caveat of fixed 32-bit width and non-pipelined operation.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for Wishbone B3 to AHB-Lite Simple Bridge.
  2. Read the Verilog module in the editor. The catalog line for this block: Converts Wishbone B3 master transactions into AHB-Lite master transactions for single-word transfers.
  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

  • Protocol Translation: Converts Wishbone B3 signals to AHB-Lite master signals.
  • Single-Word Support: Handles 32-bit data transfers only.
  • NONSEQ Transfers: Generates AHB-Lite NONSEQ (non-sequential) transfers for each Wishbone cycle.
  • Read Data Return: Captures read data from the AHB-Lite slave and returns it to the Wishbone master.
  • Validation: Rejects invalid Wishbone cycles (e.g., stb high while cyc is low).
  • Synchronous Reset: All internal state is reset synchronously via rst_n.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low reset
wb_cycInput1Wishbone cycle valid
wb_stbInput1Wishbone select valid
wb_weInput1Wishbone write enable
wb_adrInput32Wishbone address
wb_datInput32Wishbone write data
wb_selInput4Wishbone byte select
wb_ackOutput1Wishbone acknowledge
wb_rdtOutput32Wishbone read data
ahbl_hreadyOutput1AHB-Lite ready
ahbl_hrespOutput2AHB-Lite response

Integration

### Instantiation

To integrate this IP into your design, instantiate the module wishbone_to_ahb_lite_bridge and connect the Wishbone master and AHB-Lite slave ports as shown below:

### Constraints

  • Clock Domain: The bridge operates in a single clock domain (clk).
  • Reset: Synchronous active-low reset (rst_n).
  • Burst Support: This IP does not support AHB-Lite burst transactions. Only single transfers (HTRANS_NONSEQ) are generated.
  • Data Width: Fixed 32-bit data width. Byte enables (wb_sel) are passed through but only 32-bit chunks are transferred.

Verification

The provided testbench validates the following scenarios:

  1. Basic Write Cycle: Verifies that a write transaction is correctly translated and acknowledged.
  2. Basic Read Cycle: Verifies that a read transaction retrieves data from the AHB-Lite slave and returns it to the Wishbone master.
  3. Multiple Sequential Writes: Verifies handling of back-to-back write transactions.
  4. Invalid Cycle Rejection: Verifies that the bridge ignores invalid Wishbone cycles (e.g., stb=1, cyc=0).

### Running Simulation

To run the simulation, use the following command (assuming ModelSim/QuestaSim):

### Expected Results

Limitations

  • No Pipelining: The bridge waits for the AHB-Lite transaction to complete before asserting wb_ack. This may introduce latency if the AHB-Lite slave is slow.
  • No Burst Support: Only single-word transfers are supported. Burst transactions from the Wishbone master are not supported.
  • Fixed Data Width: The bridge is hard-coded for 32-bit data. Changing the data width requires modifying the RTL.

More in Bus Interfaces

All Bus Interfaces blocks