nmigen.compat.ClockDomain would alias this, for Migen compatibility.
sys = ClockDomain(async_reset=True)
ctr = ClockDivisor(factor=16)
frag = ctr.get_fragment(platform=None)
-# print(rtlil.convert(frag, ports=[sys.clk, sys.rst, ctr.o], clock_domains={"sys": sys}))
-print(verilog.convert(frag, ports=[sys.clk, sys.rst, ctr.o], clock_domains={"sys": sys}))
+# print(rtlil.convert(frag, ports=[sys.clk, sys.reset, ctr.o], clock_domains={"sys": sys}))
+print(verilog.convert(frag, ports=[sys.clk, sys.reset, ctr.o], clock_domains={"sys": sys}))
cd = clock_domains[cd_name]
triggers.append(("posedge", xformer(cd.clk)))
if cd.async_reset:
- triggers.append(("posedge", xformer(cd.rst)))
+ triggers.append(("posedge", xformer(cd.reset)))
for trigger in triggers:
with process.sync(*trigger) as sync:
clk : Signal, inout
The clock for this domain. Can be driven or used to drive other signals (preferably
in combinatorial context).
- rst : Signal or None, inout
+ reset : Signal or None, inout
Reset signal for this domain. Can be driven or used to drive.
"""
def __init__(self, name=None, reset_less=False, async_reset=False):
self.clk = Signal(name=self.name + "_clk")
if reset_less:
- self.rst = None
+ self.reset = None
else:
- self.rst = Signal(name=self.name + "_rst")
+ self.reset = Signal(name=self.name + "_reset")
self.async_reset = async_reset
def prepare(self, ports, clock_domains):
from .xfrm import ResetInserter
- resets = {cd.name: cd.rst for cd in clock_domains.values() if cd.rst is not None}
+ resets = {cd.name: cd.reset for cd in clock_domains.values() if cd.reset is not None}
frag = ResetInserter(resets)(self)
self_driven = union(s._lhs_signals() for s in self.statements)