- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks...
That will be a good start to learn tcl :)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page