⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 remove_add_constraints_for_ddr_sdram_2005_05_13___11_42.tcl

📁 这个是基于NIOS II的FPGA平台的一个CF卡的接口模块
💻 TCL
📖 第 1 页 / 共 5 页
字号:
            if {$err} {
                post_message -type error "Analysis and Elaboration failed. The constraints script will not be able to add any constraints."
                puts "ERROR: Analysis and Elaboration failed. The constraints script will not be able to add any constraints."
                error $result
            } else {
                puts "Analysis and Elaboration was successful.\n"

                # get the top level name from Quartus
                set top_level [get_name_info -info entity_name [get_top_level_entity]]
                #puts "Top level name                = $top_level\n"
            }
        }

        set num_matches 0;
        set datapath_name_list ""
        array set datapath_hier_path {}


        # This get_names will return all the datapaths and their submodules - we'll extract just the datapath tops later
        set err [catch {set datapath_names [get_names -filter *auk_ddr_datapath* -node_type hierarchy]} msg]
        if {$err} { puts "ERROR: $msg\n"}

        foreach_in_collection found_datapath $datapath_names {

            set item_to_test [get_name_info -info full_path $found_datapath]

            # Extract just the datapath top levels (ie not all their submodule) by looking for instance name are at the end of the string
            if {[regexp -nocase {^(.*\|)(\S+)_auk_ddr_datapath:\w+$} $item_to_test dummy hier_path datapath_name]} {

                # 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 expected name of the datapath (${given_datapath_name}_auk_ddr_datapath) doesn't match the names found in the project (${datapath_name_list})."
            puts "WARNING: $warn_str"; post_message -type warning $warn_str
            set warn_str "This suggest that you have renamed the entity or module containing the datapath and the constraints will therefore not be correctly applied.\n"
            puts "WARNING: $warn_str"; post_message -type 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         ddr_sdram 
if {$add_remove_string == ""} {
    set current_project_device [get_global_assignment -name DEVICE]
    if {[regexp -nocase ep2c35f672 $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  "*********************************************************************"
        error "The device expected by the constraint script (ep2c35f672) does not match the device currently selected in Quartus II."
     }
}
	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} {
                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."

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -