Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17041 Discussions

a very strange problem with Modelsim simulation

Altera_Forum
Honored Contributor II
1,118 Views

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!!
0 Kudos
0 Replies
Reply