mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl/verilog: optionally disable clock domain creation
This commit is contained in:
parent
af4eb02551
commit
17f2b17654
1 changed files with 7 additions and 3 deletions
|
@ -258,6 +258,7 @@ def _printinit(f, ios, ns):
|
|||
def convert(f, ios=None, name="top",
|
||||
return_ns=False,
|
||||
special_overrides=dict(),
|
||||
create_clock_domains=True,
|
||||
display_run=False):
|
||||
if not isinstance(f, Fragment):
|
||||
f = f.get_fragment()
|
||||
|
@ -268,9 +269,12 @@ def convert(f, ios=None, name="top",
|
|||
try:
|
||||
f.clock_domains[cd_name]
|
||||
except KeyError:
|
||||
cd = ClockDomain(cd_name)
|
||||
f.clock_domains.append(cd)
|
||||
ios |= {cd.clk, cd.rst}
|
||||
if create_clock_domains:
|
||||
cd = ClockDomain(cd_name)
|
||||
f.clock_domains.append(cd)
|
||||
ios |= {cd.clk, cd.rst}
|
||||
else:
|
||||
raise KeyError("Unresolved clock domain: '"+cd_name+"'")
|
||||
|
||||
_insert_resets(f)
|
||||
f = lower_basics(f)
|
||||
|
|
Loading…
Reference in a new issue