<cr1901>
Specifically, if I do "m = ROM()", the test passes. If I do "m = request.node.get_closest_marker("module").args[0]", memory reads return 0 on the second test to run.
<cr1901>
Obviously amaranth doesn't like something about reusing a simulation module, but I'd still like to know exactly what's going wrong if possible, seeing as this breaks my own custom Amaranth fixtures.
<cr1901>
s/module/elaboratable/
<cr1901>
(IME. most of the time, sharing elaboratables between parameterized tests/pytest sessions works, but here it does not)
jjsuperpower has quit [Ping timeout: 252 seconds]
jjsuperpower has joined #amaranth-lang
jjsuperpower has quit [Ping timeout: 260 seconds]
Darius has quit [Ping timeout: 260 seconds]
Darius has joined #amaranth-lang
charlottia has joined #amaranth-lang
<charlottia>
Indeed, can reproduce without the pytest stuff; it's sufficient to just create a Simulator(m) twice to reproduce; the second one won't work, the first does.
<charlottia>
not sure if you're meant to be able to elaborate() twice or what state is stuck there, but is likely obvious to others.
adamgreig[m] has joined #amaranth-lang
<adamgreig[m]>
Presumably because the Memory is created in init, my guess is moving it to elaborate would help, you could keep the init value in __init__ if you need to access it before elaboration as in this code
chaoticryptidz has quit [Ping timeout: 255 seconds]