mirror of
https://git.sr.ht/~kivikakk/niar
synced 2024-12-23 03:32:24 +00:00
emit debug IL, it's helpful.
This commit is contained in:
parent
a4b04502b6
commit
f880c95ec5
|
@ -226,10 +226,12 @@ def _cxxrtl_convert_with_header(
|
||||||
raise AssertionError(
|
raise AssertionError(
|
||||||
"cc_out must be relative to cwd for builtin-yosys to write to it"
|
"cc_out must be relative to cwd for builtin-yosys to write to it"
|
||||||
)
|
)
|
||||||
|
rtlil_out = f"{cc_out}.il"
|
||||||
rtlil_text = rtlil.convert(design, name=name, platform=platform)
|
rtlil_text = rtlil.convert(design, name=name, platform=platform)
|
||||||
script = []
|
script = []
|
||||||
for box_source in black_boxes.values():
|
for box_source in black_boxes.values():
|
||||||
script.append(f"read_rtlil <<rtlil\n{box_source}\nrtlil")
|
script.append(f"read_rtlil <<rtlil\n{box_source}\nrtlil")
|
||||||
script.append(f"read_rtlil <<rtlil\n{rtlil_text}\nrtlil")
|
script.append(f"read_rtlil <<rtlil\n{rtlil_text}\nrtlil")
|
||||||
|
script.append(f"write_rtlil {rtlil_out}")
|
||||||
script.append(f"write_cxxrtl -header {cc_out}")
|
script.append(f"write_cxxrtl -header {cc_out}")
|
||||||
yosys.run(["-q", "-"], "\n".join(script))
|
yosys.run(["-q", "-"], "\n".join(script))
|
||||||
|
|
Loading…
Reference in a new issue