Forum Discussion
MBrom6
New Contributor
5 years agoHi,
I have written a script that allows for a more or less automatic solution within Quartus to replace the line causing the error. As it is possible to execute a tcl script after quartus_ipgenerate to replace the line in sdc_util.tcl, I wrote such a script.
The content of the script is:
set module [lindex $quartus(args) 0]
if [string match "quartus_ipgenerate" $module] {
post_message "Correcting name of LVDS clock tree instance"
set timestamp [clock format [clock seconds] -format {%Y%m%d%H%M%S}]
set filename "ip/../xxx_lvds_rx/altera_lvds_core20_191/synth/sdc_util.tcl"
set temp $filename.new.$timestamp
set backup $filename.bak.$timestamp
set in [open $filename r]
set out [open $temp w]
# line-by-line, read the original file
while {[gets $in line] != -1} {
if {[string first "set fclk_name" $line] != -1} {
set line " foreach_in_collection lvds_node \[get_nodes -nowarn \"\$lvds_instance_name|*|fclk\"\] { set fclk_name \[get_node_info -name \[get_edge_info -src \[get_node_info -clock_edges \[lindex \$lvds_node 0\]\]\]\]; break }"
}
# then write the transformed line
puts $out $line
}
close $in
close $out
# move the new data to the proper filename
file link -hard $backup $filename
file rename -force $temp $filename
}You have to set the filename to the correct location.
Additionally, add the following line to .qsf file:
set_global_assignment -name POST_MODULE_SCRIPT_FILE "quartus_sh:name_of_script.tcl"
Maybe, this solution is benificial for someone, therefore I decided to share it with you.
-Michael