# however, differs between domains: for comb domains, it is `always`, for sync domains
# with sync reset, it is `posedge clk`, for sync domains with async rest it is
# `posedge clk or posedge rst`.
- for domain, signals in fragment.iter_domains():
+ for domain, signals in fragment.drivers.items():
triggers = []
if domain is None:
triggers.append(("always",))
self.drivers[domain] = ValueSet()
self.drivers[domain].add(signal)
- def iter_domains(self):
- yield from self.drivers.items()
-
def iter_drivers(self):
for domain, signals in self.drivers.items():
for signal in signals:
new_fragment.add_statements(fragment.statements)
def map_drivers(self, fragment, new_fragment):
- for domain, signals in fragment.iter_domains():
- for signal in signals:
- new_fragment.drive(signal, domain)
+ for domain, signal in fragment.iter_drivers():
+ new_fragment.drive(signal, domain)
def on_fragment(self, fragment):
new_fragment = Fragment()
return value
def map_drivers(self, fragment, new_fragment):
- for domain, signals in fragment.iter_domains():
+ for domain, signals in fragment.drivers.items():
if domain in self.domains:
domain = self.domains[domain]
for signal in signals:
def on_fragment(self, fragment):
new_fragment = super().on_fragment(fragment)
- for domain, signals in fragment.iter_domains():
+ for domain, signals in fragment.drivers.items():
if domain is None or domain not in self.controls:
continue
self._insert_control(new_fragment, domain, signals)