Forum Discussion
Altera_Forum
Honored Contributor
8 years ago[SDC] Input/Output delay for All ports -> script writing
Hi All,
How can I create the timing constraints (set_input/output_delay) for all ports (excepting clocks and reset ports)? Let's say the design has the following clocks: clk0, clk1, clk2 and following resets: rstn0, rstn1, rstn2 and hundreds of other ports. How can I write a script, which set input delays of 0ns for all input ports (excepting clk0, clk1, clk2, rstn0, rstn1, rstn2) and output delays of 0ns for all output ports? Thank you!25 Replies
- Altera_Forum
Honored Contributor
set_input_delay [get_ports * ] ... =====>the * wildcard covers all the input ports
remove_input_delay [get_ports clk] ===> will remove the input delay on the specified port Same thing for output delay. http://quartushelp.altera.com/15.0/mergedprojects/tafs/tafs/tcl_pkg_sdc_ver_1.5_cmd_remove_input_delay.htm - Altera_Forum
Honored Contributor
--- Quote Start --- Just use all_inputs or all_outputs as your collection. --- Quote End --- OK, how could I list all the elements in these collections? What are the generated collections names? - Altera_Forum
Honored Contributor
--- Quote Start --- OK, how could I list all the elements in these collections? What are the generated collections names? --- Quote End --- I have a TCL script that has these lines in it to create files with the various 'collections' contents listed:set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan set chan foreach_in_collection element { puts $chan ] } close $chan - Altera_Forum
Honored Contributor
I tried to run the ferst example:
---------------------------------------------------------------------- set chan [open "TQ_all_clocks.rpt" "w"] foreach_in_collection element [all_clocks] { puts $chan [concat $element : [get_object_info -name $element]] } close $chan ---------------------------------------------------------------------- The 'all_clocks' command is not recognized (ran from the Tcl Console). I've got the following: ---------------------------------------------------------------------- Error:ERROR: Quartus Prime Tcl command "all_clocks" is only available for use in the following executables: Error: quartus_fit Error: quartus_sta Error: while executing Error:"all_clocks" Error: invoked from within Error:"foreach_in_collection element [all_clocks] { puts $chan [concat $element : [get_object_info -name $element]]}" ---------------------------------------------------------------------- So, what's the problem? How could be fixed? Thank you! - Altera_Forum
Honored Contributor
--- Quote Start --- I tried to run the ferst example: ---------------------------------------------------------------------- set chan [open "TQ_all_clocks.rpt" "w"] foreach_in_collection element [all_clocks] { puts $chan [concat $element : [get_object_info -name $element]] } close $chan ---------------------------------------------------------------------- The 'all_clocks' command is not recognized (ran from the Tcl Console). I've got the following: ---------------------------------------------------------------------- Error:ERROR: Quartus Prime Tcl command "all_clocks" is only available for use in the following executables: Error: quartus_fit Error: quartus_sta Error: while executing Error:"all_clocks" Error: invoked from within Error:"foreach_in_collection element [all_clocks] { puts $chan [concat $element : [get_object_info -name $element]]}" ---------------------------------------------------------------------- So, what's the problem? How could be fixed? Thank you! --- Quote End --- Ok, so here is my complete example. Previously I just posted snippets but they need to be run in the correct context. I run this on the command line:
Where the contents of the file generate_timing.tcl is as follows:$(QUARTUS_BIN)/quartus_sta -t generate_timing.tcl $(DESIGN) 10set projname set numpaths project_open $projname create_timing_netlist read_sdc set_operating_conditions -model slow -grade c update_timing_netlist report_timing -setup -npaths $numpaths -detail path_only -file "TQ_setup_slow.rpt" set_operating_conditions -model fast -grade c update_timing_netlist report_timing -hold -npaths $numpaths -detail path_only -file "TQ_hold_fast.rpt" report_exceptions -file "TQ_exceptions.rpt" set chan foreach_in_collection reg { puts $chan ] } close $chan set chan foreach_in_collection reg { puts $chan ] } close $chan set chan foreach_in_collection reg { puts $chan ] } close $chan set chan foreach_in_collection reg { puts $chan ] } close $chan set chan foreach_in_collection cell { puts $chan ] } close $chan set chan foreach_in_collection pin { puts $chan ] } close $chan set chan foreach_in_collection net { puts $chan ] } close $chan set chan foreach_in_collection port { puts $chan ] } close $chan set chan foreach_in_collection clk { puts $chan ] } close $chan set chan foreach_in_collection keeper { puts $chan ] } close $chan exit - Altera_Forum
Honored Contributor
where do you run the script? from outside of the Quartus? But ow can I run the same commands from the TCL Console (from inside of Quartus)?
- Altera_Forum
Honored Contributor
--- Quote Start --- where do you run the script? from outside of the Quartus? But ow can I run the same commands from the TCL Console (from inside of Quartus)? --- Quote End --- As I indicated I run the commands from the command line using this command:
so the tcl script is fed to the Quartus Static Timing Analyzer (quartus_sta) application. So basically the tcl command script in the file is run on the TCL console within the quartus_sta application.quartus_sta -t generate_timing.tcl MY_DESIGN 10 - Altera_Forum
Honored Contributor
If run from a script, then the following are necessary:
set projname [lindex $quartus(args) 0] set numpaths [lindex $quartus(args) 1] project_open $projname Most scripts I run I launch TimeQuest on the project and double-click on Update Timing Netlist, which does the following: create_timing_netlist read_sdc set_operating_conditions -model slow -grade c update_timing_netlist At that point I run a timing analysis script or whatever I need to do. - Altera_Forum
Honored Contributor
--- Quote Start --- If run from a script, then the following are necessary: create_timing_netlist read_sdc update_timing_netlist --- Quote End --- Why this order? Intuitively I'd do it in this order: read_sdc create_timing_netlist Why this order will not work? - Altera_Forum
Honored Contributor
--- Quote Start --- Why this order? Intuitively I'd do it in this order: read_sdc create_timing_netlist Why this order will not work? --- Quote End --- You have to create the timing netlist before you can apply the sdc commands to it ... doesn't work the other way around.