2006-09-13 14:38:48 +00:00
|
|
|
#!/usr/bin/perl
|
2008-09-23 14:02:31 +00:00
|
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
2006-09-13 14:38:48 +00:00
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
2009-05-04 21:07:57 +00:00
|
|
|
# Copyright 2006-2009 by Wilson Snyder. This program is free software; you can
|
2006-09-13 14:38:48 +00:00
|
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
2009-05-04 21:07:57 +00:00
|
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
# Version 2.0.
|
2006-09-13 14:38:48 +00:00
|
|
|
|
2008-11-25 02:38:45 +00:00
|
|
|
top_filename("$Self->{obj_dir}/$Self->{name}.v");
|
2006-09-13 14:38:48 +00:00
|
|
|
|
|
|
|
# Rather then having to maintain a new .v and .out, simply add returns
|
|
|
|
# to all lines of the existing t_preproc test.
|
|
|
|
|
2009-06-12 13:50:27 +00:00
|
|
|
$Self->{golden_out} = "$Self->{obj_dir}/$Self->{name}.out";
|
2006-09-13 14:38:48 +00:00
|
|
|
|
|
|
|
{
|
2008-11-25 02:38:45 +00:00
|
|
|
my $wholefile = file_contents("$Self->{t_dir}/t_preproc.v");
|
2006-09-13 14:38:48 +00:00
|
|
|
$wholefile =~ s/\n/\r\n/og;
|
2008-11-25 02:38:45 +00:00
|
|
|
write_wholefile("$Self->{obj_dir}/$Self->{name}.v", $wholefile);
|
2006-09-13 14:38:48 +00:00
|
|
|
}
|
|
|
|
{
|
2008-11-25 02:38:45 +00:00
|
|
|
my $wholefile = file_contents("$Self->{t_dir}/t_preproc.out");
|
|
|
|
$wholefile =~ s!t/t_preproc.v!$Self->{obj_dir}/t_preproc_dos.v!og; # Fix `line's
|
2009-06-12 13:50:27 +00:00
|
|
|
write_wholefile($Self->{golden_out}, $wholefile);
|
2006-09-13 14:38:48 +00:00
|
|
|
}
|
|
|
|
|
2009-06-12 13:50:27 +00:00
|
|
|
do 't/t_preproc.pl';
|
2006-09-13 14:38:48 +00:00
|
|
|
|
|
|
|
1;
|