Created
December 28, 2015 09:53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my_pkg1; | |
int unsigned a = 1; | |
endpackage : my_pkg1 | |
package my_pkg2; | |
import my_pkg1 :: *; | |
int unsigned b = 2; | |
function void pkg2_print(); | |
$display("my_pkg2 : pkg2_print : my_pkg1::a = %0d, my_pkg2::b = %0d", a, b); | |
endfunction : pkg2_print | |
endpackage : my_pkg2 | |
module top4(); | |
import my_pkg2 :: *; | |
initial begin | |
void '(pkg2_print()); | |
end | |
endmodule : top4 | |
//Output: | |
// my_pkg2 : pkg2_print : my_pkg1::a = 1, my_pkg2::b = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment