-
Notifications
You must be signed in to change notification settings - Fork 70
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
AxiLiteMaster reads forever #53
Comments
After some help I have a working minimal example: import cocotb
from cocotb.triggers import RisingEdge, FallingEdge
from cocotb.clock import Clock
from cocotbext.axi import AxiLiteBus, AxiLiteMaster
PERIOD = 8 # ns
@cocotb.test()
async def test_axi_read_version(dut):
"""Testing the """
clk = dut.s00_axi_aclk
rst = dut.s00_axi_aresetn
cocotb.start_soon(Clock(clk, period=PERIOD, units="ns").start())
bus = AxiLiteBus.from_prefix(dut, "s00_axi")
master = AxiLiteMaster(bus, clk, rst, False)
rst.value = 0
for _ in range(5):
await FallingEdge(clk)
rst.value = 1
await FallingEdge(clk)
version = await master.read(0x000c, 1)
print(f"The version is {version.data}.")
assert version.data == b'\x01', f"The version {version.data} is not 1." There is something strange going on with the reset. Is there a prettier way to do this? |
Hello, I did run into the same problem after reinstalling my system.
With the updated configuration I did run into the same endless loop. After testing some combinations I found a working one.
The error can be reliably reproduced by switching out cocotb-bus versions. Haven´t dig deeper yet. It's maybe a issue with the cocotb-bus extension. |
@Gatherer you're probably seeing a known verilator bug: verilator/verilator#3919 |
@vacagonzalo if you can post the HDL code, I'll take a look. Hard to say what's going on without seeing what the simulation models are interacting with. |
@alexforencich
|
@alexforencich
|
@alexforencich
|
Ah, I see your "minimal working example" is actually working, I though it was also hanging. That reset operation looks fine to me - assert it for a few cycles, then release it. Not sure if there is a "better" way of doing that, all of my reset drivers look pretty much just like that. |
I wrote a simple test for a slave. It has a register with a hard-coded version number (1).
The source code is in VHDL.
The master's read operation never ends.
This is my console output:
The text was updated successfully, but these errors were encountered: