Skip to content

Commit

Permalink
Merge pull request #373 from chipsalliance/72015-lib-ahb-axi-tb-vcs
Browse files Browse the repository at this point in the history
Update lib_ahb_axi testbench
  • Loading branch information
kgugala authored Jan 23, 2025
2 parents 27bf984 + 88f322c commit f87da68
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion verification/block/lib_ahb_to_axi4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ TOPLEVEL = ahb_to_axi4_wrapper

VERILOG_SOURCES = \
$(SRCDIR)/lib/ahb_to_axi4.sv \
$(CURDIR)/lib_ahb_to_axi4/ahb_to_axi4_wrapper.sv
$(TEST_DIR)/ahb_to_axi4_wrapper.sv

include $(TEST_DIR)/../common.mk
2 changes: 1 addition & 1 deletion verification/block/lib_ahb_to_axi4/testbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def __init__(self, name, parent, uut, signal_prefix="", signal_map=None):
self.axi_awready.value = 0
self.axi_wready.value = 0
self.axi_arready.value = 0
self.axi_rready.value = 0
self.axi_rvalid.value = 0

async def _wait(self, signal, max_cycles=200):
"""
Expand Down
50 changes: 25 additions & 25 deletions verification/block/lib_axi4_to_ahb/testbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def __init__(self, name, parent):

def build_phase(self):
self.env = BaseEnvironment("env", self)
cocotb.top.rst_l = 0
cocotb.top.rst_l.value = 0

def start_clock(self, name):
period = ConfigDB().get(None, "", "TEST_CLK_PERIOD")
Expand All @@ -312,30 +312,30 @@ def start_clock(self, name):

async def do_reset(self, signalName, timeLength="100e-9", isActiveHigh=True):

cocotb.top.rst_l = 0
cocotb.top.free_clk = 0
cocotb.top.bus_clk_en = 1
cocotb.top.clk_override = 0
cocotb.top.dec_tlu_force_halt = 0
cocotb.top.axi_awvalid = 0
cocotb.top.axi_awid = 0
cocotb.top.axi_awaddr = 0
cocotb.top.axi_awsize = 0
cocotb.top.axi_awprot = 0
cocotb.top.axi_wvalid = 0
cocotb.top.axi_wdata = 0
cocotb.top.axi_wstrb = 0
cocotb.top.axi_wlast = 0
cocotb.top.axi_bready = 0
cocotb.top.axi_arvalid = 0
cocotb.top.axi_arid = 0
cocotb.top.axi_araddr = 0
cocotb.top.axi_arsize = 0
cocotb.top.axi_arprot = 0
cocotb.top.axi_rready = 0
cocotb.top.ahb_hrdata = 0
cocotb.top.ahb_hready = 0
cocotb.top.ahb_hresp = 0
cocotb.top.rst_l.value = 0
cocotb.top.free_clk.value = 0
cocotb.top.bus_clk_en.value = 1
cocotb.top.clk_override.value = 0
cocotb.top.dec_tlu_force_halt.value = 0
cocotb.top.axi_awvalid.value = 0
cocotb.top.axi_awid.value = 0
cocotb.top.axi_awaddr.value = 0
cocotb.top.axi_awsize.value = 0
cocotb.top.axi_awprot.value = 0
cocotb.top.axi_wvalid.value = 0
cocotb.top.axi_wdata.value = 0
cocotb.top.axi_wstrb.value = 0
cocotb.top.axi_wlast.value = 0
cocotb.top.axi_bready.value = 0
cocotb.top.axi_arvalid.value = 0
cocotb.top.axi_arid.value = 0
cocotb.top.axi_araddr.value = 0
cocotb.top.axi_arsize.value = 0
cocotb.top.axi_arprot.value = 0
cocotb.top.axi_rready.value = 0
cocotb.top.ahb_hrdata.value = 0
cocotb.top.ahb_hready.value = 0
cocotb.top.ahb_hresp.value = 0

signal = getattr(cocotb.top, signalName)
signal.value = int(isActiveHigh)
Expand Down
4 changes: 2 additions & 2 deletions verification/block/pmp/test_multiple_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ async def body(self):
await self.pmp_seqr.start_item(item)
await self.pmp_seqr.finish_item(item)

self.checkRangeBoundary(LOWER_BOUNDARY)
await self.checkRangeBoundary(LOWER_BOUNDARY)
for _ in range(test_iterations):
await self.randomAccessInAddrRange(LOWER_BOUNDARY, UPPER_BOUNDARY)
self.checkRangeBoundary(UPPER_BOUNDARY)
await self.checkRangeBoundary(UPPER_BOUNDARY)


# ==============================================================================
Expand Down

0 comments on commit f87da68

Please sign in to comment.