Forum Discussion
Altera_Forum
Honored Contributor
16 years agoModelsim: Unknown State
In the modelsim simulation, there is a signal, delay1, shows its value and undefined state(red colour) periodically. It shouldn't show unknown state based on my code. I wonder why. Pls have a look...
Altera_Forum
Honored Contributor
16 years ago --- Quote Start --- I can find the q1 and q2 under FIR(instantiation of Delay1_Redline). If run functional simulation in qii, there is always no problem with it. thanks --- Quote End --- Hi, your are right , I could also find q1 and q2. The reason for your problem is here : if (count2 < 57) begin no_shiftreg <= no_shiftreg + 1; // +1 end else begin no_shiftreg <= 0; -- here you set shift_reg to "0" end if (count<count_half) begin delay1 <= q2[no_shiftreg]; -- here you set delay1 to q[0] end -- but q[0] is not defined, else -- reg [signal_mag_w-1:0] q1 [num_shiftreg:1]; begin delay1 <= q1[no_shiftreg]; end Kind regards GPK