@@ -54,6 +54,11 @@ struct Cli {
5454 /// of cycles specified with this option.
5555 #[ arg( long) ]
5656 max_steps : Option < u32 > ,
57+
58+ /// Determines whether to display bit-vector literal values in
59+ /// error-messages in hexadecimal
60+ #[ arg( long, value_name = "DISPLAY_IN_HEX" ) ]
61+ display_hex : bool ,
5762}
5863
5964/// Examples (enables all tracing logs):
@@ -103,11 +108,13 @@ fn main() -> anyhow::Result<()> {
103108 // Print warning messages only if `--verbose` is enabled
104109 // (the --verbose flag triggers `LevelFilter::Info`)
105110 let emit_warnings = cli. verbosity . log_level_filter ( ) == LevelFilter :: Info ;
106- let protocols_handler =
107- & mut DiagnosticHandler :: new ( color_choice, cli. no_error_locations , emit_warnings) ;
111+ let protocols_handler = & mut DiagnosticHandler :: new (
112+ color_choice,
113+ cli. no_error_locations ,
114+ emit_warnings,
115+ cli. display_hex ,
116+ ) ;
108117
109- // At the moment we only allow the user to specify one Verilog file
110- // through the CLI, so we have to wrap it in a singleton Vec
111118 let ( parsed_data, ctx, sys) = setup_test_environment (
112119 cli. verilog . iter ( ) . map ( |v| v. as_str ( ) ) . collect ( ) ,
113120 & cli. protocol ,
@@ -130,8 +137,12 @@ fn main() -> anyhow::Result<()> {
130137 }
131138
132139 // Create a separate `DiagnosticHandler` when parsing the transactions file
133- let transactions_handler =
134- & mut DiagnosticHandler :: new ( color_choice, cli. no_error_locations , emit_warnings) ;
140+ let transactions_handler = & mut DiagnosticHandler :: new (
141+ color_choice,
142+ cli. no_error_locations ,
143+ emit_warnings,
144+ cli. display_hex ,
145+ ) ;
135146 let traces: Vec < Vec < ( String , Vec < baa:: BitVecValue > ) > > = parse_transactions_file (
136147 cli. transactions ,
137148 transactions_handler,
0 commit comments