From f7782d10e4dbecab7c043f8409772d6e2b0eb7d6 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 22 Apr 2020 00:13:14 +0100 Subject: Improve the printing of results --- driver/CoqupDriver.ml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'driver') diff --git a/driver/CoqupDriver.ml b/driver/CoqupDriver.ml index 80b4145..8363ca5 100644 --- a/driver/CoqupDriver.ml +++ b/driver/CoqupDriver.ml @@ -105,15 +105,16 @@ let compile_c_file sourcename ifile ofile = Coqup.PrintVerilog.print_program oc verilog; close_out oc end else begin - print_endline "Simulating"; - let result = + let result, state = match Coqup.Simulator.simulate (Nat.of_int 100) verilog with | Coqup.Errors.OK r -> r | Coqup.Errors.Error msg -> let loc = file_loc sourcename in fatal_error loc "%a" print_error msg in - printf "Length: %d\n" (List.length result); - Coqup.PrintVerilog.print_result result + Coqup.PrintVerilog.print_result stdout state; + print_string "Result: "; + Coqup.PrintVerilog.print_value stdout result; + print_newline () end end -- cgit