-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avalon MM Master read capturing readdata from unexpected clock cycle #24
Comments
This belongs in cocotb-bus, so I'm transferring it. |
The cause is the cocotb-bus/src/cocotb_bus/drivers/avalon.py Lines 135 to 148 in a3e22f7
I don't understand why this is in the bus drivers. As noted it doesn't match the behavior of HDL. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm attempting to read an avalon mm bus using the read method of the AvalonMaster driver:
readdata = await amm.read(addr)
In my waveforms, I can see that the amm_address changes, amm_read goes high, then a few clock cycles later, amm_waitrequest goes low and amm_readdata changes to value A. One clock cycle after that, amm_waitrequest goes high and amm_readdata changes to value B. The read method returns me value B, when I was expecting value A.
If I manually carry out an avalon mm read (assign dut.amm_address, assign dut.amm_read to 1, wait for dut.amm_waitrequest to fall, wait until the next rising edge of dut.amm_clk and then capture dut.amm_readdata), I get value A. We also have vhdl and system verilog sim drivers that return value A.
It's like the read method is sampling readdata marginally late... has anyone else come across this? I have zoomed in as far as I can on my waveforms and everything looks to be changing exactly on the clock, no visible delta.
Happening with Modelsim and Questa (64bit) .
Thanks
The text was updated successfully, but these errors were encountered: