Testbench Environment
The TbEnv class (aliased as Tb) is the standardized testbench wrapper for all
RouteRTL cocotb tests. It manages clock generation, reset sequencing, structured
logging, and protocol monitor lifecycle.
Usage
from routertl.sim import Tb
@cocotb.test()
async def my_test(dut):
tb = Tb(dut, clk="CLK", rst="RST", period_ns=10)
await tb.start_clock()
await tb.reset()
# Attach protocol monitors (optional)
tb.attach_monitors(axi_lite={"S_AXI": {}})
# ... test logic ...
# Assert no protocol violations
tb.check_monitors()
API
::: sim.cocotb.tb.env.TbEnv options: members: - init - start_clock - reset - attach_monitors - check_monitors show_root_heading: true show_source: true