tb: pmd: Ensure signal_detect starts low

To make sure that pmd.signal_status comes up at the right time, keep
signal_detect low at the start of simulation. We don't need to set
pmd.rx, because X is the default value (or rather Z is, but it's the
same for our purposes).

Fixes: 1d65661 ("Add pmd")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson 2022-08-06 15:47:39 -04:00
parent 8f7c797800
commit e79807cdff
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ from cocotb.triggers import RisingEdge, Timer
@cocotb.test(timeout_time=100, timeout_unit='us')
async def test_rx(pmd):
pmd.rx.value = BinaryValue('X')
pmd.signal_detect.value = 0
await Timer(1)
await cocotb.start(Clock(pmd.rx_clk_125, 8, units='ns').start())
# random phase
await Timer(random.randrange(0, 8000), units='ps')