From 98745e09e9516e505ac89847a542b04491029f1c Mon Sep 17 00:00:00 2001 From: Alasdair Date: Mon, 25 Sep 2023 16:40:58 +0100 Subject: [PATCH] Make sure we use separate --Mdir in sv tests --- src/sail_sv_backend/sail_plugin_sv.ml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sail_sv_backend/sail_plugin_sv.ml b/src/sail_sv_backend/sail_plugin_sv.ml index 16c3ad284..da87e39a1 100644 --- a/src/sail_sv_backend/sail_plugin_sv.ml +++ b/src/sail_sv_backend/sail_plugin_sv.ml @@ -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