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

Unable to simulate ALTSQRT in ModelSim Altera

Altera_Forum
Honored Contributor II
2,303 Views

I wrote a small program to try out the altera sqrt ip. i included the module in a quick script i wrote, but when i try to simulate it, i get X values in some of the bit fields. I thought it might be a latency thing, but i've let the simualtion run for 100 cycles and the result stays the same. Is there something more I should be doing to simulate ALTSQRT correctly?  

 

http://www.alteraforum.com/forum/attachment.php?attachmentid=10821&stc=1
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
1,406 Views

Does these X bits required initialization? Or they are output? Seems like these bits remain undefined throughout the simulation.

0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

Those are the output. As you can see until i write data to them, the output stays 0 and then some bits go to X. I think the X in modelsim is when a line is driven by multiple inputs. but i dont know why that happens for an altera IP block!

0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

Hi Karthik, 

 

In a simulation when the X comes out from an IP block is when the IP cannot determined whether the output should be '0' or '1'. From the pic it seems your reset was not defined after the second clk cycle. Of course the output would be 'X'
0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

The 'reset' is 'U' ? Try driving it with either a 1 or 0.

0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

 

--- Quote Start ---  

Hi Karthik, 

 

In a simulation when the X comes out from an IP block is when the IP cannot determined whether the output should be '0' or '1'. From the pic it seems your reset was not defined after the second clk cycle. Of course the output would be 'X' 

--- Quote End ---  

 

 

Hi, I tried that but didnt seem to change the result. its still driving the same output. The reset I've shown here is only for my logic which drives the input to the design. i dont even have any code that checks for that reset! also the reset itself isnt connected to the sqrt block.
0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

Review the modelsim log messages and pay particular attention to uninitialized or unconnected items.

0 Kudos
Altera_Forum
Honored Contributor II
1,406 Views

The output signals at X mean you have something else in your testbench driving it to '0'. It's causing a conflict when the SqRT function is trying to drive a '1' - hence the 'X' ('0' drives '0' to '0')

0 Kudos
Reply