From 95c80df5d6d704bf525f47ef6e58e98e27fedf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedad=20Had=C5=BEi=C4=87?= Date: Thu, 26 Sep 2024 14:50:04 +0200 Subject: [PATCH] Added step in verif.py where the number of cycles is determined to prevent issues with -1 argument --- verify.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/verify.py b/verify.py index df9139b..6b10ca8 100755 --- a/verify.py +++ b/verify.py @@ -237,6 +237,16 @@ def main(): module = circuit_json["modules"][args.top_module] label_dict = generate_labeling(args.label_file_path, module) ignored_set = generate_ignored(safe_graph, module, args.ignored) + + # find out how many cycles there really are + dummy_trace = VCDStorage(args.vcd_file_path) + while dummy_trace.parse_next_cycle(): + pass + cycles_upper_bound = (dummy_trace.cycle) - args.rst_cycles + if args.cycles > cycles_upper_bound: + print("Setting number of cycles to %d." % cycles_upper_bound) + args.cycles = cycles_upper_bound + del dummy_trace trace = VCDStorage(args.vcd_file_path) checker = SatChecker(label_dict, ignored_set, trace, safe_graph, args)