Commit ecb5b0a2 authored by Robert Jordens's avatar Robert Jordens
Browse files

decorators: pass comb-only modules if no clock domain is specified

parent b8469c00
...@@ -71,7 +71,9 @@ class ControlInserter(ModuleTransformer): ...@@ -71,7 +71,9 @@ class ControlInserter(ModuleTransformer):
def transform_fragment(self, i, f): def transform_fragment(self, i, f):
if self.clock_domains is None: if self.clock_domains is None:
if len(f.sync) != 1: if not f.sync:
return
if len(f.sync) > 1:
raise ValueError("Control signal clock domains must be specified when module has more than one domain") raise ValueError("Control signal clock domains must be specified when module has more than one domain")
cdn = list(f.sync.keys())[0] cdn = list(f.sync.keys())[0]
to_insert = [(getattr(i, self.control_name), cdn)] to_insert = [(getattr(i, self.control_name), cdn)]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment