mirror of
https://github.com/alexforencich/verilog-ethernet.git
synced 2025-01-14 06:43:18 +08:00
Work around MyHDL sync race condition
This commit is contained in:
parent
20017c04b9
commit
733044b0df
@ -206,6 +206,7 @@ def bench():
|
|||||||
|
|
||||||
yield wait()
|
yield wait()
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
@ -241,11 +242,13 @@ def bench():
|
|||||||
|
|
||||||
yield wait()
|
yield wait()
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
assert rx_frame == test_frame1
|
assert rx_frame == test_frame1
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
@ -283,12 +286,14 @@ def bench():
|
|||||||
|
|
||||||
yield wait()
|
yield wait()
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
assert rx_frame == test_frame1
|
assert rx_frame == test_frame1
|
||||||
assert rx_frame.payload.user[-1]
|
assert rx_frame.payload.user[-1]
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
@ -329,6 +334,7 @@ def bench():
|
|||||||
|
|
||||||
yield wait()
|
yield wait()
|
||||||
|
|
||||||
|
yield clk.posedge
|
||||||
yield sink.wait()
|
yield sink.wait()
|
||||||
rx_frame = sink.recv()
|
rx_frame = sink.recv()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user