mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 08:25:32 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
32 lines
660 B
Verilog
32 lines
660 B
Verilog
// This tests SystemVerilog packages
|
|
//
|
|
// This tests the elaboration infrastructure of packages in
|
|
// SystemVerilog. It actually covers a fair number of features,
|
|
// given the small size of the program:
|
|
//
|
|
// *) Parsing of package blocks and import statements
|
|
// *) Manage scope of names in package
|
|
// *) Actual references of imported names from packages.
|
|
//
|
|
|
|
package pkg;
|
|
parameter int foo = 1;
|
|
endpackage
|
|
|
|
|
|
module test ();
|
|
|
|
// import all from p1
|
|
import pkg::*;
|
|
|
|
initial begin
|
|
$display("pkg::foo = %0d", foo);
|
|
if (foo != 1) begin
|
|
$display("FAILED");
|
|
$finish;
|
|
end
|
|
$display("PASSED");
|
|
end
|
|
|
|
endmodule // test
|