W
Weng Tianxiang
Guest
Hi,
Help is needed.
I have some global constants shared among several modules, so I
set up a file to define a global package like the following:
Package MG_x_Constant is
constant DATA_BITS : integer := 16;
constant DATA_RANGE : real := (2.0**16);
-- constant DATA_BITS : integer := 64;
-- constant DATA_RANGE : real := (2.0**64);
-- used in all test bench
constant DATABITS : integer := DATA_BITS;
end MG_x_Constant;
Package body MG_x_Constant is
....
end MG_x_Constant;
In other modules, DATA_BITS, DATABITS are freely used.
This morning I found a problem:
when I changed DATA_BITS from 16 to 64, the ModelSim
sim window still shows constant DATABITS = 16 and it never changed,
even though I tried to delete the module from library and
re-compile it again. constant DATABITS = 16 doesn't change.
IN compilation order, the global package definition file is always the
first one.
I though if the global constant definition changes, all its appearance
should change, but it doesn't. Why?
What is wrong with the above statements?
Thank you.
Weng
Help is needed.
I have some global constants shared among several modules, so I
set up a file to define a global package like the following:
Package MG_x_Constant is
constant DATA_BITS : integer := 16;
constant DATA_RANGE : real := (2.0**16);
-- constant DATA_BITS : integer := 64;
-- constant DATA_RANGE : real := (2.0**64);
-- used in all test bench
constant DATABITS : integer := DATA_BITS;
end MG_x_Constant;
Package body MG_x_Constant is
....
end MG_x_Constant;
In other modules, DATA_BITS, DATABITS are freely used.
This morning I found a problem:
when I changed DATA_BITS from 16 to 64, the ModelSim
sim window still shows constant DATABITS = 16 and it never changed,
even though I tried to delete the module from library and
re-compile it again. constant DATABITS = 16 doesn't change.
IN compilation order, the global package definition file is always the
first one.
I though if the global constant definition changes, all its appearance
should change, but it doesn't. Why?
What is wrong with the above statements?
Thank you.
Weng