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
Hi, after a short discussion with @whitequark I was asked to make an issue of this behavior.
What I have is a module which as a local clock domain, and if I make another global clock domain which has a colliding name I get an assert error.
This can quite easily happen when making a module, in which one has a local clock that might have a common enough name.
The generated assert error:
Traceback (most recent call last):
File "/home/emifre/Git/alink-hdl/clock_error.py", line 31, in <module>
sim = Simulator(m)
File "/usr/lib/python3.8/site-packages/nmigen/back/pysim.py", line 916, in __init__
self._fragment = Fragment.get(fragment, platform=None).prepare()
File "/usr/lib/python3.8/site-packages/nmigen/hdl/ir.py", line 530, in prepare
new_domains = fragment._propagate_domains(missing_domain)
File "/usr/lib/python3.8/site-packages/nmigen/hdl/ir.py", line 378, in _propagate_domains
self._propagate_domains_down()
File "/usr/lib/python3.8/site-packages/nmigen/hdl/ir.py", line 340, in _propagate_domains_down
assert self.domains[domain] is subfrag.domains[domain]
Minimal example:
fromtypingimportList, TuplefromnmigenimportModule, Signal, Elaboratable, ClockDomain, ClockSignalfromnmigen.buildimportPlatformfromnmigen.back.pysimimportSimulatorclassClockSpiTest(Elaboratable):
defelaborate(self, platform: Platform) ->Module:
m=Module()
m.domains+=ClockDomain("spi_slave", local=True)
returnmif__name__=="__main__":
# This causes colision with clock in ClockSpiTest,# even though it is set as `local=True`spi=ClockDomain(name="spi_slave")
sync=ClockDomain(name="sync")
m=Module()
m.domains.sync=syncm.domains.spi_slave=spim.submodules.test=test=ClockSpiTest()
# Set up some simulationsim=Simulator(m)
Thanks for an awesome framework and keep up the amazing work!
The text was updated successfully, but these errors were encountered:
Hi, after a short discussion with @whitequark I was asked to make an issue of this behavior.
What I have is a module which as a local clock domain, and if I make another global clock domain which has a colliding name I get an assert error.
This can quite easily happen when making a module, in which one has a local clock that might have a common enough name.
The generated assert error:
Minimal example:
Thanks for an awesome framework and keep up the amazing work!
The text was updated successfully, but these errors were encountered: