Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

a very strange problem with Modelsim simulation

A reg variable "cmp" is defined and set a initial value like this :

reg [47:0] cmp;

always @(posedge clk)

begin

if (reset)

cmp <= 48'd1;

end

When simulating the source code in Modelsim, at the "reset" time, the value of "tmp" appeared to be "zzzzzzzZ1" in Hexadecimal Radix or "Z" in Decimal Radix. if the initial value was changed to be 48'd10, it appeared to be "zzzzzzzZa" in Hexadecimal Radix or "Z" in Decimal Radix.

Other variables were all OK and had no such problem.

Does anyone know why?

Thanks a lot!!
No RepliesBe the first to reply