Add support for using non-compat Elaboratable instances with compat.fhdl.verilog.convert and compat.run_simulation
Fixes #344
This commit is contained in:
parent
6e1145e2e7
commit
995f3a147b
3 changed files with 36 additions and 2 deletions
|
|
@ -4,6 +4,7 @@ from ...hdl.ir import Fragment
|
|||
from ...hdl.cd import ClockDomain
|
||||
from ...back import verilog
|
||||
from .conv_output import ConvOutput
|
||||
from .module import Module
|
||||
|
||||
|
||||
def convert(fi, ios=None, name="top", special_overrides=dict(),
|
||||
|
|
@ -17,11 +18,14 @@ def convert(fi, ios=None, name="top", special_overrides=dict(),
|
|||
DeprecationWarning, stacklevel=1)
|
||||
# TODO: attr_translate
|
||||
|
||||
if isinstance(fi, Module):
|
||||
fi = fi.get_fragment()
|
||||
|
||||
def missing_domain(name):
|
||||
if create_clock_domains:
|
||||
return ClockDomain(name)
|
||||
v_output = verilog.convert(
|
||||
elaboratable=fi.get_fragment(),
|
||||
elaboratable=fi,
|
||||
name=name,
|
||||
ports=ios or (),
|
||||
missing_domain=missing_domain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue