Altera_Forum
Honored Contributor
9 years agopreferred way to eliminate sdc time value truncated messages
Hi,
In my sdc file I calculate various timing values based on a constant that I set in the file. For example:# Clock frequency in MHz
set clk_base_freq 14.0
# Clock period in ns
set clk_base_period
create_clock -period $clk_base_period
When I use the above code, I get truncation warnings like this: --- Quote Start --- Time value "71.4285714286 ns" truncated to "71.428 ns" --- Quote End --- I could put rounding/truncation code, such as the following, into every expression, but that's a bit painful.
set clk_base_period
A better solution would be some sort of function, like this:
proc rndto {value places} {
set retval
return $retval
}
set clk_base_period
Unfortunately, this doesn't seem to work, or I can't find the appropriate syntax. What's the best solution to allowing calculations such as these, while avoiding the time value truncated messages? thanks, galen