From ebf2e9c360b54cf8b64095a9ca700d13bf3a8266 Mon Sep 17 00:00:00 2001 From: Mateusz Gancarz Date: Thu, 13 Feb 2025 15:33:35 +0100 Subject: [PATCH] [#72179] add t_trace_abort test for SAIF --- test_regress/t/t_trace_abort.saif | 15 +++++++++++++++ test_regress/t/t_trace_abort_saif.py | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 test_regress/t/t_trace_abort.saif create mode 100755 test_regress/t/t_trace_abort_saif.py diff --git a/test_regress/t/t_trace_abort.saif b/test_regress/t/t_trace_abort.saif new file mode 100644 index 000000000..ffed290c6 --- /dev/null +++ b/test_regress/t/t_trace_abort.saif @@ -0,0 +1,15 @@ +(SAIFILE +(SAIFVERSION "2.0") +(DIRECTION "backward") +(DESIGN "foo") +(PROGRAM_NAME "Verilator") +(VERSION "5.032") +(DIVIDER .) +(TIMESCALE 1ps) +(DURATION 75) +(INSTANCE foo (NET +(cyc[0] (T0 40) (T1 35) (TZ 0) (TX 0) (TB 0) (TC 7)) +(cyc[1] (T0 40) (T1 35) (TZ 0) (TX 0) (TB 0) (TC 3)) +(cyc[2] (T0 40) (T1 35) (TZ 0) (TX 0) (TB 0) (TC 1)) +(clk (T0 40) (T1 35) (TZ 0) (TX 0) (TB 0) (TC 14)) +))) diff --git a/test_regress/t/t_trace_abort_saif.py b/test_regress/t/t_trace_abort_saif.py new file mode 100755 index 000000000..aa5b252f2 --- /dev/null +++ b/test_regress/t/t_trace_abort_saif.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2024 by Wilson Snyder. This program is free software; you can +# redistribute it and/or modify it under the terms of either the GNU +# Lesser General Public License Version 3 or the Perl Artistic License +# Version 2.0. +# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 + +import vltest_bootstrap + +test.scenarios('vlt_all') +test.top_filename = "t/t_trace_abort.v" + +test.compile(verilator_flags2=['--cc --trace']) + +test.execute(fails=True) + +test.saif_identical(test.trace_filename, test.golden_filename) + +test.passes()