mirror of
https://github.com/alexforencich/verilog-ethernet.git
synced 2025-01-14 06:43:18 +08:00
Remove deprecated assignments
This commit is contained in:
parent
7d8b5560b7
commit
23fb9d0bd8
@ -93,10 +93,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -138,10 +138,10 @@ async def run_test(dut, idle_inserter=None, backpressure_inserter=None):
|
||||
gateway_ip = '192.168.1.1'
|
||||
subnet_mask = '255.255.255.0'
|
||||
|
||||
dut.local_mac <= int.from_bytes(mac2str(local_mac), 'big')
|
||||
dut.local_ip <= atol(local_ip)
|
||||
dut.gateway_ip <= atol(gateway_ip)
|
||||
dut.subnet_mask <= atol(subnet_mask)
|
||||
dut.local_mac.value = int.from_bytes(mac2str(local_mac), 'big')
|
||||
dut.local_ip.value = atol(local_ip)
|
||||
dut.gateway_ip.value = atol(gateway_ip)
|
||||
dut.subnet_mask.value = atol(subnet_mask)
|
||||
|
||||
for k in range(10):
|
||||
await RisingEdge(dut.clk)
|
||||
|
@ -62,10 +62,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -195,9 +195,9 @@ async def run_test(dut):
|
||||
tb.log.info("Clear cache")
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
dut.clear_cache <= 1
|
||||
dut.clear_cache.value = 1
|
||||
await RisingEdge(dut.clk)
|
||||
dut.clear_cache <= 0
|
||||
dut.clear_cache.value = 0
|
||||
|
||||
await tb.query_request_source.send(CacheOpTransaction(ip=0xc0a80111))
|
||||
|
||||
|
@ -79,10 +79,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -79,10 +79,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -67,10 +67,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -68,10 +68,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -80,7 +80,7 @@ async def run_test(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -109,7 +109,7 @@ async def run_test_alignment(dut, payload_data=None, ifg=12):
|
||||
|
||||
byte_width = tb.source.width // 8
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -62,10 +62,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -84,7 +84,7 @@ class TB:
|
||||
|
||||
async def _run_enable(self):
|
||||
for val in self._enable_generator:
|
||||
self.dut.clk_enable <= val
|
||||
self.dut.clk_enable.value = val
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ async def run_test(dut, payload_lengths=None, payload_data=None, ifg=12, enable_
|
||||
tb = TB(dut)
|
||||
|
||||
tb.source.ifg = ifg
|
||||
tb.dut.mii_select <= mii_sel
|
||||
tb.dut.mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator(enable_gen())
|
||||
|
@ -63,10 +63,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -85,7 +85,7 @@ class TB:
|
||||
|
||||
async def _run_enable(self):
|
||||
for val in self._enable_generator:
|
||||
self.dut.clk_enable <= val
|
||||
self.dut.clk_enable.value = val
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
||||
@ -93,8 +93,8 @@ async def run_test(dut, payload_lengths=None, payload_data=None, ifg=12, enable_
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.mii_select <= mii_sel
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
tb.dut.mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator(enable_gen())
|
||||
|
@ -56,10 +56,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -56,10 +56,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -58,10 +58,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -70,7 +70,7 @@ async def run_test(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -99,7 +99,7 @@ async def run_test_alignment(dut, payload_data=None, ifg=12):
|
||||
|
||||
byte_width = tb.source.width // 8
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -58,10 +58,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -70,7 +70,7 @@ async def run_test(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
|
||||
tb = TB(dut)
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -99,7 +99,7 @@ async def run_test_alignment(dut, payload_data=None, ifg=12):
|
||||
|
||||
byte_width = tb.source.width // 8
|
||||
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -358,8 +358,8 @@ class BaseRSerdesSource():
|
||||
data = sum(1 << (63-i) for i in range(64) if (data >> i) & 1)
|
||||
header = sum(1 << (1-i) for i in range(2) if (header >> i) & 1)
|
||||
|
||||
self.data <= data
|
||||
self.header <= header
|
||||
self.data.value = data
|
||||
self.header.value = header
|
||||
|
||||
|
||||
class BaseRSerdesSink:
|
||||
|
@ -73,10 +73,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -74,10 +74,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -67,12 +67,12 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
|
||||
@ -82,7 +82,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -109,7 +109,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -139,7 +139,7 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12):
|
||||
byte_width = tb.axis_source.width // 8
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -71,14 +71,14 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.logic_rst.value = 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.logic_rst.value = 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
|
||||
@ -88,7 +88,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -115,7 +115,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -145,7 +145,7 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12):
|
||||
byte_width = tb.axis_source.width // 8
|
||||
|
||||
tb.xgmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -74,12 +74,12 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
@ -111,12 +111,12 @@ class TB:
|
||||
|
||||
async def _run_enable_rx(self):
|
||||
for val in self._enable_generator_rx:
|
||||
self.dut.rx_clk_enable <= val
|
||||
self.dut.rx_clk_enable.value = val
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
|
||||
async def _run_enable_tx(self):
|
||||
for val in self._enable_generator_tx:
|
||||
self.dut.tx_clk_enable <= val
|
||||
self.dut.tx_clk_enable.value = val
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
|
||||
@ -125,9 +125,9 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, enab
|
||||
tb = TB(dut)
|
||||
|
||||
tb.gmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.rx_mii_select <= mii_sel
|
||||
tb.dut.tx_mii_select <= mii_sel
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
tb.dut.rx_mii_select.value = mii_sel
|
||||
tb.dut.tx_mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator_rx(enable_gen())
|
||||
@ -158,9 +158,9 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, enab
|
||||
tb = TB(dut)
|
||||
|
||||
tb.gmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.rx_mii_select <= mii_sel
|
||||
tb.dut.tx_mii_select <= mii_sel
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
tb.dut.rx_mii_select.value = mii_sel
|
||||
tb.dut.tx_mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator_rx(enable_gen())
|
||||
|
@ -74,14 +74,14 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.logic_rst.value = 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.logic_rst.value = 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
|
||||
@ -113,12 +113,12 @@ class TB:
|
||||
|
||||
async def _run_enable_rx(self):
|
||||
for val in self._enable_generator_rx:
|
||||
self.dut.rx_clk_enable <= val
|
||||
self.dut.rx_clk_enable.value = val
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
|
||||
async def _run_enable_tx(self):
|
||||
for val in self._enable_generator_tx:
|
||||
self.dut.tx_clk_enable <= val
|
||||
self.dut.tx_clk_enable.value = val
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
|
||||
@ -127,9 +127,9 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, enab
|
||||
tb = TB(dut)
|
||||
|
||||
tb.gmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.rx_mii_select <= mii_sel
|
||||
tb.dut.tx_mii_select <= mii_sel
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
tb.dut.rx_mii_select.value = mii_sel
|
||||
tb.dut.tx_mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator_rx(enable_gen())
|
||||
@ -160,9 +160,9 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, enab
|
||||
tb = TB(dut)
|
||||
|
||||
tb.gmii_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.rx_mii_select <= mii_sel
|
||||
tb.dut.tx_mii_select <= mii_sel
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
tb.dut.rx_mii_select.value = mii_sel
|
||||
tb.dut.tx_mii_select.value = mii_sel
|
||||
|
||||
if enable_gen is not None:
|
||||
tb.set_enable_generator_rx(enable_gen())
|
||||
|
@ -59,10 +59,10 @@ class TB:
|
||||
self.dut.gtx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.gtx_rst <= 1
|
||||
self.dut.gtx_rst.value = 1
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.gtx_rst <= 0
|
||||
self.dut.gtx_rst.value = 0
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
@ -75,7 +75,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.gmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
tb.set_speed(speed)
|
||||
|
||||
@ -114,7 +114,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.gmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
tb.set_speed(speed)
|
||||
|
||||
|
@ -61,12 +61,12 @@ class TB:
|
||||
self.dut.logic_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.gtx_rst <= 1
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.gtx_rst.value = 1
|
||||
self.dut.logic_rst.value = 1
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.gtx_rst <= 0
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.gtx_rst.value = 0
|
||||
self.dut.logic_rst.value = 0
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
@ -79,7 +79,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.gmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
tb.set_speed(speed)
|
||||
|
||||
@ -118,7 +118,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.gmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
tb.set_speed(speed)
|
||||
|
||||
|
@ -61,23 +61,23 @@ class TB:
|
||||
self.dut.gtx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
self.dut.gtx_rst <= 1
|
||||
self.dut.gtx_rst.value = 1
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
self.dut.gtx_rst <= 0
|
||||
self.dut.gtx_rst.value = 0
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
|
||||
async def _run_gtx_clk(self):
|
||||
t = Timer(2, 'ns')
|
||||
while True:
|
||||
self.dut.gtx_clk <= 1
|
||||
self.dut.gtx_clk.value = 1
|
||||
await t
|
||||
self.dut.gtx_clk90 <= 1
|
||||
self.dut.gtx_clk90.value = 1
|
||||
await t
|
||||
self.dut.gtx_clk <= 0
|
||||
self.dut.gtx_clk.value = 0
|
||||
await t
|
||||
self.dut.gtx_clk90 <= 0
|
||||
self.dut.gtx_clk90.value = 0
|
||||
await t
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.rgmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -123,7 +123,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.rgmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
|
@ -65,25 +65,25 @@ class TB:
|
||||
self.dut.logic_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
self.dut.gtx_rst <= 1
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.gtx_rst.value = 1
|
||||
self.dut.logic_rst.value = 1
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
self.dut.gtx_rst <= 0
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.gtx_rst.value = 0
|
||||
self.dut.logic_rst.value = 0
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
await RisingEdge(self.dut.gtx_clk)
|
||||
|
||||
async def _run_gtx_clk(self):
|
||||
t = Timer(2, 'ns')
|
||||
while True:
|
||||
self.dut.gtx_clk <= 1
|
||||
self.dut.gtx_clk.value = 1
|
||||
await t
|
||||
self.dut.gtx_clk90 <= 1
|
||||
self.dut.gtx_clk90.value = 1
|
||||
await t
|
||||
self.dut.gtx_clk <= 0
|
||||
self.dut.gtx_clk.value = 0
|
||||
await t
|
||||
self.dut.gtx_clk90 <= 0
|
||||
self.dut.gtx_clk90.value = 0
|
||||
await t
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.rgmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -129,7 +129,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.rgmii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
|
@ -56,10 +56,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
@ -69,7 +69,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.mii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -96,7 +96,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.mii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
|
@ -59,10 +59,10 @@ class TB:
|
||||
self.dut.logic_rst.setimmediatevalue(0)
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.logic_rst.value = 1
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.logic_rst.value = 0
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
|
||||
@ -72,7 +72,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.mii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -99,7 +99,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12, spee
|
||||
tb = TB(dut, speed)
|
||||
|
||||
tb.mii_phy.rx.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
|
@ -81,12 +81,12 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
await RisingEdge(self.dut.rx_clk)
|
||||
|
||||
@ -96,7 +96,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -130,7 +130,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -160,7 +160,7 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12):
|
||||
byte_width = tb.axis_source.width // 8
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -85,14 +85,14 @@ class TB:
|
||||
self.dut.tx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 1
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.logic_rst.value = 1
|
||||
self.dut.rx_rst.value = 1
|
||||
self.dut.tx_rst.value = 1
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
self.dut.logic_rst <= 0
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.logic_rst.value = 0
|
||||
self.dut.rx_rst.value = 0
|
||||
self.dut.tx_rst.value = 0
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
await RisingEdge(self.dut.logic_clk)
|
||||
|
||||
@ -102,7 +102,7 @@ async def run_test_rx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -136,7 +136,7 @@ async def run_test_tx(dut, payload_lengths=None, payload_data=None, ifg=12):
|
||||
tb = TB(dut)
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
await tb.reset()
|
||||
|
||||
@ -166,7 +166,7 @@ async def run_test_tx_alignment(dut, payload_data=None, ifg=12):
|
||||
byte_width = tb.axis_source.width // 8
|
||||
|
||||
tb.serdes_source.ifg = ifg
|
||||
tb.dut.ifg_delay <= ifg
|
||||
tb.dut.ifg_delay.value = ifg
|
||||
|
||||
for length in range(60, 92):
|
||||
|
||||
|
@ -72,12 +72,12 @@ class TB:
|
||||
self.dut.rx_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.tx_rst <= 1
|
||||
self.dut.rx_rst <= 1
|
||||
self.dut.tx_rst.value = 1
|
||||
self.dut.rx_rst.value = 1
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
self.dut.tx_rst <= 0
|
||||
self.dut.rx_rst <= 0
|
||||
self.dut.tx_rst.value = 0
|
||||
self.dut.rx_rst.value = 0
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
await RisingEdge(self.dut.tx_clk)
|
||||
|
||||
|
@ -66,10 +66,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -122,15 +122,15 @@ async def run_load_timestamps(dut):
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_ts_96 <= 12345678
|
||||
dut.input_ts_96_valid <= 1
|
||||
dut.input_ts_64 <= 12345678
|
||||
dut.input_ts_64_valid <= 1
|
||||
dut.input_ts_96.value = 12345678
|
||||
dut.input_ts_96_valid.value = 1
|
||||
dut.input_ts_64.value = 12345678
|
||||
dut.input_ts_64_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_ts_96_valid <= 0
|
||||
dut.input_ts_64_valid <= 0
|
||||
dut.input_ts_96_valid.value = 0
|
||||
dut.input_ts_64_valid.value = 0
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
@ -178,15 +178,15 @@ async def run_seconds_increment(dut):
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_ts_96 <= 999990000*2**16
|
||||
dut.input_ts_96_valid <= 1
|
||||
dut.input_ts_64 <= 999990000*2**16
|
||||
dut.input_ts_64_valid <= 1
|
||||
dut.input_ts_96.value = 999990000*2**16
|
||||
dut.input_ts_96_valid.value = 1
|
||||
dut.input_ts_64.value = 999990000*2**16
|
||||
dut.input_ts_64_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_ts_96_valid <= 0
|
||||
dut.input_ts_64_valid <= 0
|
||||
dut.input_ts_96_valid.value = 0
|
||||
dut.input_ts_64_valid.value = 0
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
@ -239,13 +239,13 @@ async def run_frequency_adjustment(dut):
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_period_ns <= 0x6
|
||||
dut.input_period_fns <= 0x6624
|
||||
dut.input_period_valid <= 1
|
||||
dut.input_period_ns.value = 0x6
|
||||
dut.input_period_fns.value = 0x6624
|
||||
dut.input_period_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_period_valid <= 0
|
||||
dut.input_period_valid.value = 0
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
await RisingEdge(dut.clk)
|
||||
@ -290,14 +290,14 @@ async def run_drift_adjustment(dut):
|
||||
|
||||
await tb.reset()
|
||||
|
||||
dut.input_drift_ns <= 0
|
||||
dut.input_drift_fns <= 20
|
||||
dut.input_drift_rate <= 5
|
||||
dut.input_drift_valid <= 1
|
||||
dut.input_drift_ns.value = 0
|
||||
dut.input_drift_fns.value = 20
|
||||
dut.input_drift_rate.value = 5
|
||||
dut.input_drift_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_drift_valid <= 0
|
||||
dut.input_drift_valid.value = 0
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
await RisingEdge(dut.clk)
|
||||
|
@ -73,12 +73,12 @@ class TB:
|
||||
self.dut.output_rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.input_clk)
|
||||
await RisingEdge(self.dut.input_clk)
|
||||
self.dut.input_rst <= 1
|
||||
self.dut.output_rst <= 1
|
||||
self.dut.input_rst.value = 1
|
||||
self.dut.output_rst.value = 1
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.input_clk)
|
||||
self.dut.input_rst <= 0
|
||||
self.dut.output_rst <= 0
|
||||
self.dut.input_rst.value = 0
|
||||
self.dut.output_rst.value = 0
|
||||
for k in range(10):
|
||||
await RisingEdge(self.dut.input_clk)
|
||||
|
||||
@ -94,9 +94,9 @@ class TB:
|
||||
|
||||
while True:
|
||||
await t
|
||||
self.dut.output_clk <= 1
|
||||
self.dut.output_clk.value = 1
|
||||
await t
|
||||
self.dut.output_clk <= 0
|
||||
self.dut.output_clk.value = 0
|
||||
|
||||
def get_input_ts_ns(self):
|
||||
ts = self.dut.input_ts.value.integer
|
||||
|
@ -64,10 +64,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
@ -79,39 +79,39 @@ async def run_test(dut):
|
||||
|
||||
await tb.reset()
|
||||
|
||||
dut.enable <= 1
|
||||
dut.enable.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_start <= 100 << 16
|
||||
dut.input_start_valid <= 1
|
||||
dut.input_period <= 100 << 16
|
||||
dut.input_period_valid <= 1
|
||||
dut.input_width <= 50 << 16
|
||||
dut.input_width_valid <= 1
|
||||
dut.input_start.value = 100 << 16
|
||||
dut.input_start_valid.value = 1
|
||||
dut.input_period.value = 100 << 16
|
||||
dut.input_period_valid.value = 1
|
||||
dut.input_width.value = 50 << 16
|
||||
dut.input_width_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_start_valid <= 0
|
||||
dut.input_period_valid <= 0
|
||||
dut.input_width_valid <= 0
|
||||
dut.input_start_valid.value = 0
|
||||
dut.input_period_valid.value = 0
|
||||
dut.input_width_valid.value = 0
|
||||
|
||||
await Timer(10000, 'ns')
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_start <= 0 << 16
|
||||
dut.input_start_valid <= 1
|
||||
dut.input_period <= 100 << 16
|
||||
dut.input_period_valid <= 1
|
||||
dut.input_width <= 50 << 16
|
||||
dut.input_width_valid <= 1
|
||||
dut.input_start.value = 0 << 16
|
||||
dut.input_start_valid.value = 1
|
||||
dut.input_period.value = 100 << 16
|
||||
dut.input_period_valid.value = 1
|
||||
dut.input_width.value = 50 << 16
|
||||
dut.input_width_valid.value = 1
|
||||
|
||||
await RisingEdge(dut.clk)
|
||||
|
||||
dut.input_start_valid <= 0
|
||||
dut.input_period_valid <= 0
|
||||
dut.input_width_valid <= 0
|
||||
dut.input_start_valid.value = 0
|
||||
dut.input_period_valid.value = 0
|
||||
dut.input_width_valid.value = 0
|
||||
|
||||
await Timer(10000, 'ns')
|
||||
|
||||
|
@ -64,10 +64,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
@ -64,10 +64,10 @@ class TB:
|
||||
self.dut.rst.setimmediatevalue(0)
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 1
|
||||
self.dut.rst.value = 1
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
self.dut.rst <= 0
|
||||
self.dut.rst.value = 0
|
||||
await RisingEdge(self.dut.clk)
|
||||
await RisingEdge(self.dut.clk)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user