I have VHDL package files in my current directory which I'd like to convert to Verilog or SV using hdlConvertor. Is this possible?
As in the notebook example, I'm able to use visit_HdlContext(d) to display a VHDL package:
from hdlConvertor import HdlConvertor
from hdlConvertorAst.to.vhdl.vhdl2008 import ToVhdl2008
TEST_DIR = os.path.join("./")
filenames = [os.path.join(TEST_DIR, "axis_pkg.vhd"), ]
include_dirs = []
c = HdlConvertor()
d = c.parse(filenames, Language.VHDL, include_dirs, hierarchyOnly=False, debug=True)
to_vhdl = ToVhdl2008(sys.stdout)
to_vhdl.visit_HdlContext(d)
I see that the hdlConvertorAst.translate module may be able to help me, but I'm not sure how to proceed. If I import VHDL to verilog (from hdlConvertorAst.translate import vhdl_to_verilog), how could I use vhdl_to_verilog.link_module_dec_def(context) with my parsed VHDL?
Any help is appreciated, thanks!
I have VHDL package files in my current directory which I'd like to convert to Verilog or SV using hdlConvertor. Is this possible?
As in the notebook example, I'm able to use
visit_HdlContext(d)to display a VHDL package:I see that the hdlConvertorAst.translate module may be able to help me, but I'm not sure how to proceed. If I import VHDL to verilog (
from hdlConvertorAst.translate import vhdl_to_verilog), how could I usevhdl_to_verilog.link_module_dec_def(context)with my parsed VHDL?Any help is appreciated, thanks!