📄 add_constraints_for_ddr2_topecc.tcl
字号:
# ok, so we found one. Add it to the list but check that we haven't already found it
if {[info exists datapath_hier_path($datapath_name)]} {
if {$datapath_hier_path($datapath_name) != $hier_path} {
puts "ERROR : You have instantiated the same datapath more than once in the same design. You cannot instantiate the same datapath"
puts " more than once since the constraints are location specific. Please modify the design so that each datapath is unique."
}
}
if {[lsearch $datapath_name_list $datapath_name] < 0} {
lappend datapath_name_list $datapath_name
#puts $datapath_name_list
set datapath_hier_path($datapath_name) $hier_path
incr num_matches;
}
#puts "Full path to datapath module = $hier_path"
#puts "Found datapath instance = $datapath_name\n"
}
}
if {[lsearch $datapath_name_list $given_datapath_name] < 0} {
set warn_str "The datapath name (${given_datapath_name}_auk_ddr_datapath) doesn't match the name(s) found in the project (${datapath_name_list}) so this script will not add any constraints.\n"
puts "CRITICAL WARNING: $warn_str"; post_message -type critical_warning $warn_str
set warn_str "This may be caused by redundant entries in the auto_add_ddr_constraints.tcl script or you may have renamed the entity or module containing the datapath.\n"
puts "CRITICAL WARNING: $warn_str"; post_message -type critical_warning $warn_str
set returned_path "ERROR"
set path_correct 0
} else {
set path_correct 1
set returned_path $datapath_hier_path($given_datapath_name)
puts "Note: found ${given_datapath_name}_auk_ddr_datapath in $datapath_hier_path($given_datapath_name)"
}
if {($num_matches > 1)} {
puts "Note: found $num_matches datapath modules in top level entity \"$top_level\"\n";
}
set return_list ""
lappend return_list $path_correct $top_level $returned_path
return $return_list
}
###########################################################################
# Get paths and check them
###########################################################################
if {![info exists add_remove_string]} {set add_remove_string ""}
set wrapper_name ddr2_topecc
###########################################################################
# Check that the device is correct
###########################################################################
set current_project_device [get_global_assignment -name DEVICE]
set current_project_device [string tolower $current_project_device]
if {$add_remove_string == ""} {
if {[regexp -nocase ep2sgx90ff1508 $current_project_device] == 0 && [regexp -nocase nonenone $current_project_device] == 0} {
puts "*********************************************************************"
puts " WARNING: The device used by the MegaWizard no longer matches the "
puts " device selected in Quartus II. Please run the MegaWizard again to "
puts " ensure your constraints are correct for your chosen device. "
puts "*********************************************************************"
post_message -type error "The device expected by the constraint script (ep2sgx90ff1508) does not match the device currently selected in Quartus II."
}
}
set disableLogicPlacement ""
if { [regexp -nocase hc $current_project_device] == 1} {
set disableLogicPlacement "-disable"
}
if {$add_remove_string == ""} {
if {$check_path_from_report} {
set post_analysis_variables [check_paths $wrapper_name $do_analysis]
if {[lindex $post_analysis_variables 0] == 0} {
set datapath_not_found 1
puts "Error. Either Analysis & Elaboration failed or the script could not find your variation, check your Processing report panel for information. This script will now end without adding any constraints.";
#error "Either Analysis & Elaboration failed or the script could not find your variation, check your Processing report panel for information. This script will now end without adding any constraints."
}
set top_level [lindex $post_analysis_variables 1]
set hierarchy_path_to_instance [lindex $post_analysis_variables 2]
} else {
# don't extract path from report so use wizard entry for the path to the datapath
if {![info exists hierarchy_path_to_instance]} {
set hierarchy_path_to_instance $wizard_hier_path
set warn_str "The constraints script did not extract the path automatically. The entry you entered in the MegaWizard will be used ($hierarchy_path_to_instance)."
puts "WARNING: $warn_str"; post_message -type warning $warn_str
}
# don't extract path from report so use wizard entry for the top level
if {![info exists top_level]} {
set top_level $wizard_top_level
set warn_str "The constraints script did not extract the top level automatically. The entry detected by the MegaWizard will be used ($top_level)."
puts "WARNING: $warn_str"; post_message -type warning $warn_str
}
}
}
###########################################################################
#
# Actually apply the constraints
#
###########################################################################
if {![info exists datapath_not_found]} {
if {$add_remove_string == "-remove"} {set apply_remove_string "Removing"} else {set apply_remove_string "Applying"}
puts "---------------------------------------------------------------------"
puts "- $apply_remove_string constraints to datapath ${wrapper_name}_auk_ddr_sdram "
puts "- Path to the datapath: ${hierarchy_path_to_instance} "
puts "---------------------------------------------------------------------\n"
puts "$apply_remove_string DQS pins as clocks for ${top_level}"
eval [concat set_instance_assignment -name \"OUTPUT_ENABLE_GROUP\" -to \"${prefix_name}${dm_pin_name}\" -entity \"${top_level}\" \"1\" $add_remove_string]
eval [concat set_instance_assignment -name \"OUTPUT_ENABLE_GROUP\" -to \"${prefix_name}${dqs_pin_name}\" -entity \"${top_level}\" \"1\" $add_remove_string]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -