You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python bug16.py
Traceback (most recent call last):
File "bug16.py", line 15, in <module>
sim.run()
File "/home/cstrauss/src/nmigen/nmigen/sim/core.py", line 168, in run
while self.advance():
File "/home/cstrauss/src/nmigen/nmigen/sim/core.py", line 159, in advance
return self._engine.advance()
File "/home/cstrauss/src/nmigen/nmigen/sim/cxxsim.py", line 241, in advance
self._step()
File "/home/cstrauss/src/nmigen/nmigen/sim/cxxsim.py", line 231, in _step
process.run()
File "/home/cstrauss/src/nmigen/nmigen/sim/_pycoro.py", line 123, in run
self.coroutine.throw(exn)
File "/home/cstrauss/src/nmigen/nmigen/sim/core.py", line 84, in wrapper
yield from process()
File "bug16.py", line 10, in process
yield s.eq(0)
File "/home/cstrauss/src/nmigen/nmigen/sim/_pycoro.py", line 76, in run
self.exec_locals)
File "<string>", line 1, in <module>
File "/home/cstrauss/src/nmigen/nmigen/sim/cxxsim.py", line 38, in next
value |= part.next
File "/home/cstrauss/src/nmigen/nmigen/sim/_cxxrtl.py", line 115, in next
value |= self._next[chunk]
ValueError: NULL pointer access
The text was updated successfully, but these errors were encountered:
I'm fairly certain this doesn't actually work in PySim either (the "override" is silently reverted the next time any inputs to the combinatorial function change), so I would classify the fact that it seems to be allowed in PySim as a bug.
whitequark
changed the title
cxxsim: Python process can't override combinatorial assignment
pysim: Python testbenches should not be able to assign combinatorially driven signals
Dec 8, 2020
whitequark
changed the title
pysim: Python testbenches should not be able to assign combinatorially driven signals
Python testbenches should not be able to assign combinatorially driven signals
Dec 8, 2020
Found this by accident, as I don't really have a use case for overriding driven signals. Nevertheless, pysim seems to allow this.
Consider:
I get:
The text was updated successfully, but these errors were encountered: