Hi there!
I don’t think this is a tool specific question, but rather probably a misunderstanding around how packages work. I am not able to see variables defined in a package during simulation. Here is a simple test case.
I created this package:
package test_pkg;
logic [7:0] test_pkg_vect = 0;
function set_vect(input logic [7:0] val);
test_pkg_vect = val;
endfunction
endpackage
Then I imported the package in my test bench, and added a tiny bit of test code.
import test_pkg::*;
logic [7:0] sim_test_pkg_vect;
always_comb begin
sim_test_pkg_vect = test_pkg::test_pkg_vect;
end
initial begin
#500ns;
test_pkg::set_vect(8'h55);
#500ns;
test_pkg::set_vect(8'hAA);
end
During simulation, I am able to see sim_test_pkg_vect that was defined in the test bench, but I am not able to see test_pkg_vect that was defined in the package, which was imported into the test bench. In the initial block, I am able to set test_pkg::test_pkg_vect and see the results show up in sim_test_pkg_vect.
My confusion is this: if I imported the test_pkg into my test bench, why can I not see the variables defined in that package during simulation?
Thanks much!
Aaron