Tests: New test
This commit is contained in:
parent
b4a31bd292
commit
f32a422330
|
|
@ -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;
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue