Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,217 Views

for loop in sdc file

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 I
290 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
Altera_Forum
Honored Contributor I
290 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
Altera_Forum
Honored Contributor I
290 Views

BKevi
Beginner
157 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

}

sstrell
Honored Contributor II
147 Views

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

BKevi
Beginner
142 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.

Reply