Skip to content

Commit 9e59d41

Browse files
committed
Merge remote-tracking branch 'origin/main' into monitor_repeat_loops
2 parents 781819f + 41474fd commit 9e59d41

35 files changed

+1209
-42
lines changed

interp/src/main.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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,

monitor/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ fn main() -> anyhow::Result<()> {
120120

121121
// Note: for the monitor, error message locations in `.prot` files are suppressed
122122
// in the `DiagnosticHandlers` for now
123-
let mut protocols_handler = DiagnosticHandler::new(cli.color, false, emit_warnings);
123+
let mut protocols_handler =
124+
DiagnosticHandler::new(cli.color, false, emit_warnings, cli.display_hex);
124125

125126
// Parse protocols file
126127
let transactions_symbol_tables: Vec<(Transaction, SymbolTable)> =

0 commit comments

Comments
 (0)