from .. import __version__
from .._toolchain import *
from ..hdl import *
+from ..hdl.xfrm import SampleLowerer, DomainLowerer
from ..lib.cdc import ResetSynchronizer
from ..back import rtlil, verilog
from .res import *
self._prepared = True
fragment = Fragment.get(elaboratable, self)
- fragment.create_missing_domains(self.create_missing_domain, platform=self)
+ fragment = SampleLowerer()(fragment)
+ fragment._propagate_domains(self.create_missing_domain, platform=self)
+ fragment = DomainLowerer()(fragment)
def add_pin_fragment(pin, pin_fragment):
pin_fragment = Fragment.get(pin_fragment, self)
add_pin_fragment(pin,
self.get_diff_input_output(pin, p_port, n_port, attrs, invert))
- fragment = fragment.prepare(ports=self.iter_ports(), missing_domain=lambda name: None)
+ fragment._propagate_ports(ports=self.iter_ports(), all_undef_as_ports=False)
return self.toolchain_prepare(fragment, name, **kwargs)
@abstractmethod
subfrag._propagate_domains_down()
- def create_missing_domains(self, missing_domain, *, platform=None):
+ def _create_missing_domains(self, missing_domain, *, platform=None):
from .xfrm import DomainCollector
collector = DomainCollector()
self.add_domains(new_fragment.domains.values())
return new_domains
- def _propagate_domains(self, missing_domain):
+ def _propagate_domains(self, missing_domain, *, platform=None):
self._propagate_domains_up()
self._propagate_domains_down()
self._resolve_hierarchy_conflicts()
- new_domains = self.create_missing_domains(missing_domain)
+ new_domains = self._create_missing_domains(missing_domain, platform=platform)
self._propagate_domains_down()
return new_domains