1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-22 22:32:23 +00:00

emit debug IL, it's helpful.

This commit is contained in:
Asherah Connor 2024-06-16 11:58:15 +03:00
parent a4b04502b6
commit f880c95ec5

View file

@ -226,10 +226,12 @@ def _cxxrtl_convert_with_header(
raise AssertionError(
"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)
script = []
for box_source in black_boxes.values():
script.append(f"read_rtlil <<rtlil\n{box_source}\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}")
yosys.run(["-q", "-"], "\n".join(script))