2020-05-04 22:42:15 +00:00
|
|
|
#!/usr/bin/env perl
|
2014-11-24 02:06:10 +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-2009 by Wilson Snyder. This program is free software; you
|
|
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
2014-11-24 02:06:10 +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
|
2014-11-24 02:06:10 +00:00
|
|
|
|
2018-05-08 00:42:28 +00:00
|
|
|
scenarios(dist => 1);
|
2014-11-24 02:06:10 +00:00
|
|
|
|
2024-03-01 00:08:28 +00:00
|
|
|
run(cmd => ["$ENV{VERILATOR_ROOT}/bin/verilator_coverage",
|
2020-10-14 01:13:52 +00:00
|
|
|
"--no-unlink", "--nounlink",
|
2018-05-08 00:42:28 +00:00
|
|
|
"--write", "$Self->{obj_dir}/coverage.dat",
|
|
|
|
"t/t_vlcov_data_a.dat",
|
|
|
|
"t/t_vlcov_data_b.dat",
|
|
|
|
"t/t_vlcov_data_c.dat",
|
|
|
|
"t/t_vlcov_data_d.dat",
|
2020-05-16 10:15:25 +00:00
|
|
|
],
|
|
|
|
verilator_run => 1,
|
|
|
|
);
|
2018-02-01 00:27:42 +00:00
|
|
|
|
2020-10-14 01:13:52 +00:00
|
|
|
# Not deleted e.g. parsed --no-unlink properly
|
|
|
|
files_identical("$Self->{t_dir}/t_vlcov_data_a.dat",
|
|
|
|
"$Self->{t_dir}/t_vlcov_data_a.dat");
|
|
|
|
|
2018-02-01 00:27:42 +00:00
|
|
|
# Older clib's didn't properly sort maps, but the coverage data doesn't
|
|
|
|
# really care about ordering. So avoid false failures by sorting.
|
2020-06-05 11:28:51 +00:00
|
|
|
files_identical_sorted("$Self->{obj_dir}/coverage.dat", $Self->{golden_filename});
|
2018-11-02 01:40:55 +00:00
|
|
|
|
|
|
|
ok(1);
|
2014-11-24 02:06:10 +00:00
|
|
|
1;
|