def on_ResetSignal(self, value):
if value.domain in self.domain_map:
- return ResetSignal(self.domain_map[value.domain])
+ return ResetSignal(self.domain_map[value.domain],
+ allow_reset_less=value.allow_reset_less)
return value
def map_domains(self, fragment, new_fragment):
"pix": cd_pix,
})
+ def test_rename_cd_preserves_allow_reset_less(self):
+ cd_pix = ClockDomain(reset_less=True)
+
+ f = Fragment()
+ f.add_domains(cd_pix)
+ f.add_statements(
+ self.s1.eq(ResetSignal(allow_reset_less=True)),
+ )
+
+ f = DomainRenamer("pix")(f)
+ f = DomainLowerer()(f)
+ self.assertRepr(f.statements, """
+ (
+ (eq (sig s1) (const 1'd0))
+ )
+ """)
+
+
def test_rename_cd_subfragment(self):
cd_sync = ClockDomain()
cd_pix = ClockDomain()