tb: phy_core: Make signal_status more robust
signal_status and must be low for a rising edge before it goes high. At the moment we depend on ClockEnable to wait for a rising edge. Instead, wait for a falling edge explicitly. This makes this test less dependent on how tx_ce is generated. Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
19a588bd81
commit
ec04874781
|
@ -26,9 +26,9 @@ async def test_transfer(phy):
|
||||||
phy.link_monitor_test_mode.value = 1
|
phy.link_monitor_test_mode.value = 1
|
||||||
await cocotb.start(ClockEnable(phy.clk, phy.tx_ce, 5))
|
await cocotb.start(ClockEnable(phy.clk, phy.tx_ce, 5))
|
||||||
await Timer(1)
|
await Timer(1)
|
||||||
phy.signal_status.value = 1
|
|
||||||
await cocotb.start(Clock(phy.clk, 8, units='ns').start())
|
await cocotb.start(Clock(phy.clk, 8, units='ns').start())
|
||||||
await FallingEdge(phy.tx_ce)
|
await FallingEdge(phy.clk)
|
||||||
|
phy.signal_status.value = 1
|
||||||
|
|
||||||
tx_data = list(as_nibbles([0x55, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]))
|
tx_data = list(as_nibbles([0x55, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]))
|
||||||
rx_data = list(as_nibbles((0x55, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10)))
|
rx_data = list(as_nibbles((0x55, 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10)))
|
||||||
|
|
Loading…
Reference in New Issue