Tests: New test

This commit is contained in:
Wilson Snyder 2012-04-02 19:38:42 -04:00
parent b4a31bd292
commit f32a422330
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/usr/bin/perl
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
#
# 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
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug474");
compile (
);
execute (
check_finished=>1,
);
ok(1);
1;

View File

@ -0,0 +1,30 @@
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2012 by Wilson Snyder.
// see bug 474
package functions;
localparam LP_PACK = 512;
localparam LP_PACK_AND_MOD = 19;
task check_param;
$display("In %m\n"); // "In functions::check_param"
if (LP_PACK_AND_MOD != 19) $stop;
endtask
endpackage
module t ();
// synthesis translate off
import functions::*;
// synthesis translate on
localparam LP_PACK_AND_MOD = 20;
initial begin
#10;
if (LP_PACK_AND_MOD != 20) $stop;
check_param();
$write("*-* All Finished *-*\n");
$finish;
end
endmodule