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

need more infomation about TimeQuest

Altera_Forum
Honored Contributor II
1,372 Views

Hi, 

I hope to implement the following calculation in TimeQuest's *.sdc file, set ad_clock_period 80 

set ad_sclk_board_delay_max 5 

set ad_sclk_board_delay_min 3 

set ad_data_board_delay_max 5 

set ad_data_board_delay_min 3 

set ad_data_tco_max 2 

set ad_data_tco_min 1 

set max_delay $ad_clock_period/2 + $ad_sclk_board_delay_max + $ad_data_board_delay_max + $ad_data_tco_max 

set min_delay $ad_clock_period/2 + $ad_sclk_board_delay_min + $ad_data_board_delay_min + $ad_data_tco_min 

 

But after *.sdc being reading into TimeQuest, error occur: 

Error: wrong# args: should be "set varName ?newValue?" 

while executing 

"set max_delay $ad_clock_period/2 + $ad_sclk_board_delay_max + $ad_data_board_delay_max + $ad_data_tco_max" 

(file "E:/Altera_Project/QuartusII/FreqMeasure/FreqMeasure_AvalonInterface.sdc" line 190) 

 

Any response will be very appreciated.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
688 Views

To do calculations you have to use the expr command within square brackets: 

set a 2.0 

set b 3.0 

set c [expr $a + $b] 

 

So expr calculates the value, and the square brackets mean execute the commands inside and use their returned value. 

Finally, I recommend using decimals for all numbers. In Tcl, integer types are handled differently than decimals, so: 

expr 5 / 2 

will return 2, not 2.5. (Dumb, I know, but it's part of the Tcl language...)
0 Kudos
Altera_Forum
Honored Contributor II
688 Views

Thanks... 

That will be a good start to learn tcl :)
0 Kudos
Reply