Skip to content

Instantly share code, notes, and snippets.

@keesj
Created January 20, 2025 15:57
Show Gist options
  • Save keesj/7562d07053a70320b7e1ca663e1d0b65 to your computer and use it in GitHub Desktop.
Save keesj/7562d07053a70320b7e1ca663e1d0b65 to your computer and use it in GitHub Desktop.
pure verilog litex wishbone slave?
# wishbone slave
myslave = Instance("myslave", i_clk_i = ClockSignal(), i_rst_i = ResetSignal(),
i_cyc = wb_cyc_i,
i_stb = wb_stb_i,
i_we = wb_we_i,
i_adr = wb_addr_i,
i_dat_w = wb_data_i,
i_sel = wb_sel_i,
wb_stall_o,
o_ack = wb_ack_o,
o_dat_r = wb_data_o)
soc.specials += myslave
soc.platform.add_source("slave.v")
soc.bus.add_slave(name="myslave", slave=myslave, region=SoCRegion(
origin = 0x2000_0000,
size = 32*4,
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment