Forum Discussion
[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
I don't quite understand what you want to accomplish here. Your input and output delays could be 0 for a *minimum* delay, but you also need a matching *maximum* delay. The range of delay is required to give the Fitter an idea of what it has to work with as to the placement of the input or output register.
set_input_delay -clock <virtual clock that drives upstream device> -max [get_ports in*] <max external delay based on tco of upstream device and board delays> set_input_delay -clock <virtual clock that drives upstream device> -min [get_ports in*] 0 set_output_delay -clock <virtual clock that drives downstream device> -max [get_ports out*] <max external delay based on tsu of downstream device and board delays> set_output_delay -clock <virtual clock that drives downstream device> -min [get_ports out*] 0 - Altera_Forum
Honored Contributor
Does the [get_ports out*] list all the output ports and [get_ports in*] list all the input ports?
How can I exclude certain ports from these listings? Is it possible to work with collections here? How to remove the input/output delay constraints from the certain ports? Thank you! - Altera_Forum
Honored Contributor
When I run the get_ports out* command from Quartus console, I'm receiving the following errors?
Why? How to fix?Error:ERROR: Quartus Prime Tcl command "get_ports" is only available for use in the following executables: Error: quartus_fit Error: quartus_sta Error: while executing Error: get_ports out* - Altera_Forum
Honored Contributor
I used in* and out* as examples. You have to put in your own port names.
- Altera_Forum
Honored Contributor
this is exactly what I asked for :-) how to list ALL input ports without listing each port separately!
How can I make a collection (list) of ALL the input ports (something like 'create_collection all_inputs')? - Altera_Forum
Honored Contributor
Just use all_inputs or all_outputs as your collection.
- Altera_Forum
Honored Contributor
running the all_inputs command gives the same result:
So, what's the solution?Error:ERROR: Quartus Prime Tcl command "all_inputs" is only available for use in the following executables: Error: quartus_fit Error: quartus_sta Error: while executing Error:"all_inputs" - Altera_Forum
Honored Contributor
Can you show your sdc file?
- Altera_Forum
Honored Contributor
It's very simple - just several lines...
set_time_format -unit ns -decimal_places 3 create_clock -name {clk} -period 10.000 -waveform { 0.000 5.000 } create_clock -name {fifo_rclk} -period 10.000 -waveform { 0.000 5.000 } set_input_delay -clock { clk } 5 set_output_delay -clock { clk } 5 - Altera_Forum
Honored Contributor
Use something like:
set data_inputs [all_inputs] set data_inputs [remove_from_collection [all_inputs] clk] That will create a list without clock. If you want to remove something else, do another line: set data_inputs [remove_from_collection $data_inputs reset] Repeat as necessary. If you want to visually see what's in it, then do: query_collection -all -report $data_inputs Once correct, use in constraint: set_input_delay -clock clk -max 0.0 $data_inputs Then repeat for outputs