2020-05-04 22:42:15 +00:00
|
|
|
#!/usr/bin/env perl
|
2018-02-28 11:58:41 +00:00
|
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
2020-03-21 15:24:24 +00:00
|
|
|
# Copyright 2003 by Wilson Snyder. This program is free software; you
|
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2018-02-28 11:58:41 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2018-02-28 11:58:41 +00:00
|
|
|
|
2018-05-08 00:58:30 +00:00
|
|
|
scenarios(vlt_all => 1);
|
2018-02-28 11:58:41 +00:00
|
|
|
|
2018-08-23 09:09:12 +00:00
|
|
|
compile(
|
2018-02-28 11:58:41 +00:00
|
|
|
verilator_flags2 => ["--stats"],
|
|
|
|
);
|
|
|
|
|
2018-08-23 09:09:12 +00:00
|
|
|
file_grep($Self->{stats}, qr/Optimizations, Split always\s+(\d+)/i, 0);
|
2018-02-28 11:58:41 +00:00
|
|
|
# Important: if reorder succeeded, we should see no dly vars.
|
|
|
|
# Equally important: twin test t_alw_noreorder should see dly vars,
|
|
|
|
# is identical to this test except for disabling the reorder step.
|
2021-07-14 21:37:37 +00:00
|
|
|
foreach my $file (
|
|
|
|
glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}*.h"),
|
|
|
|
glob_all("$Self->{obj_dir}/$Self->{VM_PREFIX}*.cpp")
|
|
|
|
) {
|
2018-02-28 11:58:41 +00:00
|
|
|
file_grep_not($file, qr/dly__t__DOT__v1/i);
|
|
|
|
file_grep_not($file, qr/dly__t__DOT__v2/i);
|
|
|
|
file_grep_not($file, qr/dly__t__DOT__v3/i);
|
|
|
|
}
|
|
|
|
|
2018-08-23 09:09:12 +00:00
|
|
|
execute(
|
2021-09-08 03:50:28 +00:00
|
|
|
check_finished => 1,
|
2018-02-28 11:58:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
ok(1);
|
|
|
|
1;
|