Skip to content

Commit

Permalink
cxxrtl: add externals.
Browse files Browse the repository at this point in the history
Just assuming all (plain) Verilog for now.
  • Loading branch information
kivikakk committed Aug 24, 2024
1 parent 594d92f commit fb7a8c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions niar/cxxrtl.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ def main(np: Project, args):
with open(yosys_script_path, "w") as f:
for box_source in black_boxes.values():
f.write(f"read_rtlil <<rtlil\n{box_source}\nrtlil\n")
for p in np.externals:
f.write(f"read_verilog <<niar_read_verilog\n")
with open(np.path(p), 'r') as r:
f.write(r.read())
f.write(f"\nniar_read_verilog\n")
f.write(f"read_rtlil {_make_absolute(il_path)}\n")
if args.optimize.opt_rtl:
f.write("opt\n")
Expand Down

0 comments on commit fb7a8c2

Please sign in to comment.