Skip to content

Commit

Permalink
Make sure we use separate --Mdir in sv tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alasdair committed Sep 25, 2023
1 parent 9fdc3f9 commit 98745e0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sail_sv_backend/sail_plugin_sv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,13 @@ let verilog_target _ default_sail_dir out_opt ast effect_info env =
Util.close_output_with_check file_info;

Reporting.system_checked
(sprintf "verilator --cc --exe --build -j 0 -I%s sim_%s.cpp %s.sv" sail_sv_libdir out out);
(sprintf "verilator --cc --exe --build -j 0 -I%s --Mdir %s_obj_dir sim_%s.cpp %s.sv" sail_sv_libdir out out
out
);
begin
match !opt_verilate with Verilator_run -> Reporting.system_checked (sprintf "obj_dir/V%s" out) | _ -> ()
match !opt_verilate with
| Verilator_run -> Reporting.system_checked (sprintf "%s_obj_dir/V%s" out out)
| _ -> ()
end
| _ -> ()
end
Expand Down

0 comments on commit 98745e0

Please sign in to comment.