projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4063a4
)
fhdl.ir: make sure clocks and resets of used CDs appear as inputs.
author
whitequark
<cz@m-labs.hk>
Thu, 13 Dec 2018 02:43:22 +0000
(
02:43
+0000)
committer
whitequark
<cz@m-labs.hk>
Thu, 13 Dec 2018 02:43:22 +0000
(
02:43
+0000)
nmigen/fhdl/ir.py
patch
|
blob
|
history
diff --git
a/nmigen/fhdl/ir.py
b/nmigen/fhdl/ir.py
index 2af5a525b0f21dbe4b7d390245b8f9546764dcdc..8de3388869ee0e04cd1a09373b5bc5ea4ba97c59 100644
(file)
--- a/
nmigen/fhdl/ir.py
+++ b/
nmigen/fhdl/ir.py
@@
-58,6
+58,11
@@
class Fragment:
self_driven = union(s._lhs_signals() for s in self.statements)
self_used = union(s._rhs_signals() for s in self.statements)
+ for cd_name, _ in self.iter_sync():
+ cd = clock_domains[cd_name]
+ self_used.add(cd.clk)
+ if cd.reset is not None:
+ self_used.add(cd.reset)
ins = self_used - self_driven
outs = ports & self_driven