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

📄 remove_add_constraints_for_ddr_sdram.tcl

📁 MagicSopc DDR-Sdram
💻 TCL
📖 第 1 页 / 共 5 页
字号:
				# 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 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		 ddr_sdram 

###########################################################################
#					 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 ep2c35f672 $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 (ep2c35f672) 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

⌨️ 快捷键说明

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