diff --git a/test_regress/t/t_package_ddecl.pl b/test_regress/t/t_package_ddecl.pl new file mode 100755 index 000000000..eb1f82e1f --- /dev/null +++ b/test_regress/t/t_package_ddecl.pl @@ -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; diff --git a/test_regress/t/t_package_ddecl.v b/test_regress/t/t_package_ddecl.v new file mode 100644 index 000000000..af51139d8 --- /dev/null +++ b/test_regress/t/t_package_ddecl.v @@ -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 + + \ No newline at end of file