cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
728 Views
Registered: ‎05-09-2018

Synthesis does not correctly interpret timed based constants

Jump to solution

In the old ISE tools, I was able to define time based constants and have synthesis interpret them correctly. Vivado does not interpret them and sets them to zero. For example:

 

constant clock_period : time := 10 ns;

constant cycle_period : time := 100 us;

constant clocks_per_cycle : integer := cycle_period/clock_period;

 

Is there a particular library needed by Vivado to properly interpret time based constants?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Mentor
Mentor
776 Views
Registered: ‎02-24-2014

This is a known issue with Vivado synthesis.  It usually makes an error when doing division on type TIME.    The workaround is to use type REAL, which is IEEE double precision.   This may require more documentation in the comments to make the units and scale more obvious, but the arithmetic is always correct.

Don't forget to close a thread when possible by accepting a post as a solution.

View solution in original post

0 Kudos
2 Replies
Highlighted
Mentor
Mentor
777 Views
Registered: ‎02-24-2014

This is a known issue with Vivado synthesis.  It usually makes an error when doing division on type TIME.    The workaround is to use type REAL, which is IEEE double precision.   This may require more documentation in the comments to make the units and scale more obvious, but the arithmetic is always correct.

Don't forget to close a thread when possible by accepting a post as a solution.

View solution in original post

0 Kudos
Adventurer
Adventurer
709 Views
Registered: ‎05-09-2018
Thanks!
0 Kudos