Otherwise, two subfragments with the same local clock domain would
not be able to drive its clock or reset signals. This can be easily
hit if using two ResetSynchronizers in one module.
Fixes #265.
fragment = SampleLowerer()(self)
new_domains = fragment._propagate_domains(missing_domain)
- fragment._resolve_hierarchy_conflicts()
fragment = DomainLowerer()(fragment)
+ fragment._resolve_hierarchy_conflicts()
if ports is None:
fragment._propagate_ports(ports=(), all_undef_as_ports=True)
else:
self.f1._resolve_hierarchy_conflicts(mode="silent")
self.assertEqual(self.f1.subfragments, [])
+ def test_no_conflict_local_domains(self):
+ f1 = Fragment()
+ cd1 = ClockDomain("d", local=True)
+ f1.add_domains(cd1)
+ f1.add_driver(ClockSignal("d"))
+ f2 = Fragment()
+ cd2 = ClockDomain("d", local=True)
+ f2.add_domains(cd2)
+ f2.add_driver(ClockSignal("d"))
+ f3 = Fragment()
+ f3.add_subfragment(f1)
+ f3.add_subfragment(f2)
+ f3.prepare()
+
class InstanceTestCase(FHDLTestCase):
def test_construct(self):