eth: Test ordered sets via XGMII in XGMII-BASE-R encode/decode modules

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2026-06-19 20:40:07 -07:00
parent cb8ee730e6
commit 6706b9b30b
2 changed files with 18 additions and 0 deletions

View File

@@ -193,6 +193,7 @@ async def run_test_os(dut):
assert int(dut.rx_os.value) == os
assert int(dut.rx_os_sig.value) == sig
assert tb.sink.get_os() == (os, sig)
tb.source.set_os(None)

View File

@@ -62,6 +62,10 @@ class TB:
dut.xgmii_tx_valid.setimmediatevalue(1)
dut.tx_gbx_sync_in.setimmediatevalue(0)
dut.tx_os.setimmediatevalue(0)
dut.tx_os_sig.setimmediatevalue(0)
dut.tx_os_valid.setimmediatevalue(0)
async def reset(self):
self.dut.rst.setimmediatevalue(0)
await RisingEdge(self.dut.clk)
@@ -200,6 +204,19 @@ async def run_test_os(dut):
for k in range(20):
await RisingEdge(dut.clk)
tb.sink.get_os()
tb.source.set_os(os, sig)
for k in range(20):
await RisingEdge(dut.clk)
assert tb.sink.get_os() == (os, sig)
tb.source.set_os(None)
for k in range(20):
await RisingEdge(dut.clk)
for k in range(10):
await RisingEdge(dut.clk)