UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
6,756 Views
Registered: ‎12-29-2013

XSim hangs on power operations with large exponents

The following module should return 6'b110011, but instead it just hangs xsim 2013.4:

 

module issue_021(y);
  output [5:0] y;
  assign y = 6'd3 ** 123456789;
  initial #10 $display("%b", y);
endmodule

XSim 2013.4 seems to try to evaluate this expression by performing 123456789 multiplications instead of using a proper power-modulus algorithm.

 

In my tests I have run this module with:

 

xvlog issue_021.v
xelab -R work.issue_021

Crosscheck: Modelsim 10.1d can simulate this module in an instant and Vivado 2013.4 can synthesize it correctly. Isim 14.7 and XST 14.7 seem to suffer from a similar problem.

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
6,733 Views
Registered: ‎07-31-2012

Re: XSim hangs on power operations with large exponents

In case the Vivado Tool does synthesize it well and not the ISE, then i guess that is something to do with the way XST handles the code. Which device are you targetting. In case you are targetting the 7 series device, it is better to go for Vivado.

Thanks,
Anirudh

PS: Please MARK this as an answer in case it helped resolve your query.Give kudos in case the post guided you to a solution.
0 Kudos
Contributor
Contributor
6,727 Views
Registered: ‎12-29-2013

Re: XSim hangs on power operations with large exponents

Hi Anirudh,

 

thanks for your reply. Usually I annotate the my bug reports with "Note: This is a bug report. I don't need support.". I've forgotten it this time.

 

Regarding XST: I posted this as an XSIM bug report only because my XST bug reports only got "we don't fix bugs in XST anymore" replies. But as you brought up XST: This clearly is a problem with high level synthesis and will happen for any target device.

 

In the context of this bug reports I don't really target any specific device, I'm systematically identifying bugs in a couple of tools and so far have identified and reported 19 bugs, including 10 bugs in Xilinx tools (2 in XST, not counting this one, 4 in vivado and 4 in xsim):

 

http://www.clifford.at/yosys/vloghammer.html

 

 

My hope is that this bug reports will help fixing this bugs before anyone has to spend hours (or even days) identifying those bugs from production code that "mysteriously" does not work with one of those tools. Chances are that this happened already, but people did not file bug reports.

0 Kudos
Moderator
Moderator
6,709 Views
Registered: ‎04-17-2011

Re: XSim hangs on power operations with large exponents

This is interesting. Would escalate the same. Thanks for bring up the faults in our notice.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
6,496 Views
Registered: ‎04-17-2011

Re: XSim hangs on power operations with large exponents

Thanks for posting. Sorry this one got missed last time. I would file bug report for this one and provide you the CR number.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos