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

for loop in sdc file

Altera_Forum
Honored Contributor II
3,100 Views

is it possible to use for loops in the sdc file to help add constraints for multiple interfaces of the same type. 

For example, I have 4 ata intefaces and so it would be easier if I could have a for loop setting the contraints the same for each. 

I have tried the code below which doesn't work, I get the error  

"Warning: Ignored filter at squid.sdc(115): ATA$x_DD 

[*] could not be matched with a port" and "Warning: Ignored filter at squid.sdc(115): ATA$x_IORDY could not be matched with a clock". 

 

for {set x 0} {$x<4} {incr x} { set_input_delay -max 2.3 }] -clock }Thanks in advance, 

Richard
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
2,173 Views

SDC is just tcl with a different extension so yes, you can use loops. But they need to be correct tcl syntax. 

 

In your code, tcl has no way to tell that you want to replace $x instead of $x_DD. I don't have access to Quartus to try but I believe you need to use ${x}_DD. If that does not work, simply use string manipulation to build the signal name before using it: 

 

Set signal "ATA" 

String append $signal $x 

String append "_DD" 

 

Or something like that. 

 

Hope this helps 

 

DK
0 Kudos
Altera_Forum
Honored Contributor II
2,173 Views

Thanks for the help, I couldn't get the first method to work but the second one does with some slight changes. I ended up with 

set data_in "ATA" append data_in $x append data_in "_DD"Thanks again, 

Richard
BKevi
Novice
2,040 Views

I think you can put all varibles that you want to concatenate behind the append.

for {set x 0} {$x<24} {incr x} {

set data_in {}
set dataout_h {}
set DFFLO {}

append data_in {HDMI_RX_DAT[} $x {]}
append dataout_h {ddio_rx_24b:\ddio_rx_gen:ddio_rx_24b_inst|altddio_in:ALTDDIO_IN_component|ddio_in_87i:auto_generated|dataout_h[} $x {]}
append DFFLO {ddio_rx_24b:\ddio_rx_gen:ddio_rx_24b_inst|altddio_in:ALTDDIO_IN_component|ddio_in_87i:auto_generated|ddio_ina[} $x {]~DFFLO}

eval {set_multicycle_path -from $data_in -to $dataout_h -setup } $l2h_setup_ref
eval {set_multicycle_path -from $data_in -to $DFFLO -setup } $l2l_setup_ref
eval {set_multicycle_path -from $data_in -to $dataout_h -hold } $l2h_hold_ref
eval {set_multicycle_path -from $data_in -to $DFFLO -hold } $l2l_hold_ref

}

0 Kudos
sstrell
Honored Contributor III
2,030 Views

This is an 11 year old post.  Perhaps you wanted to create a new one?

0 Kudos
BKevi
Novice
2,025 Views

@sstrell 

This topic was right on the top of my google search result, and it indeed solved my problems.

Although it is an old one, useful to me at least, I think giving feedback is alright.

0 Kudos
Altera_Forum
Honored Contributor II
2,173 Views
0 Kudos
Reply