projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af7db88
)
back.pysim: give numeric names to unnamed subfragments in VCD.
author
whitequark
<whitequark@whitequark.org>
Fri, 21 Dec 2018 12:29:33 +0000
(12:29 +0000)
committer
whitequark
<whitequark@whitequark.org>
Fri, 21 Dec 2018 12:29:33 +0000
(12:29 +0000)
nmigen/back/pysim.py
patch
|
blob
|
history
diff --git
a/nmigen/back/pysim.py
b/nmigen/back/pysim.py
index 2d86d0ae7b2c3a69175bf315a4f884ba751be8d1..bd90d7a5af83548c361232138587f83a36e51822 100644
(file)
--- a/
nmigen/back/pysim.py
+++ b/
nmigen/back/pysim.py
@@
-417,8
+417,11
@@
class Simulator:
hierarchy = {}
def add_fragment(fragment, scope=()):
hierarchy[fragment] = scope
- for subfragment, name in fragment.subfragments:
- add_fragment(subfragment, (*scope, name))
+ for index, (subfragment, name) in enumerate(fragment.subfragments):
+ if name is None:
+ add_fragment(subfragment, (*scope, "#{}".format(index)))
+ else:
+ add_fragment(subfragment, (*scope, name))
add_fragment(root_fragment)
def add_signal(signal):