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

📄 data_pilot_insert.restore

📁 基于Xilinx+FPGA的OFDM通信系统基带设计-程序
💻 RESTORE
📖 第 1 页 / 共 4 页
字号:
   set iconflict 0   set iSrcHelper [ GetProjSrcHelper $iProjHelper ]   if {$iSrcHelper == 0} { return 0 }   foreach filename $files {      INFO "Adding the file \"$filename\" to the project."      set result [$iSrcHelper AddSourceFile "$filename" iconflict]      OnFail $result {         if {$result == 6} {            INFO "The file \"$filename\" is already in the project."         } else {            ERR "A problem occurred adding the file \"$filename\" to the project."         }      }   }}# Helper to add files to the project and set their origination. # Valid origination values are:#   0 - User#   1 - Generated#   2 - Imported# Files of origination "User" are added through the facilitator, # otherwise they are added directly to the File Manager.proc AddImportedFiles { iProjHelper files origination } {   switch $origination {      0 { INFO "Adding User files." }      1 { INFO "Adding Generated files." }      2 { INFO "Adding Imported files." }      default {         ERR "Invalid parameter: origination was set to \"$origination\", but may only be 0, 1, or 2."         return 0      }   }   set iFileMgr [ GetFileManager $iProjHelper ]   if {$iFileMgr == 0} { return 0 }   foreach filename $files {      set file_type 0      set hdl_file 0      set result [$iFileMgr AddFile "$filename" $file_type hdl_file]      OnFail $result {         if {$result == 6} {            INFO "The file \"$filename\" is already in the project."         } elseif { $hdl_file == 0 } {            ERR "A problem occurred adding the file \"$filename\" to the project."         }      }      OnOkPtr hdl_file {         set ifile [ GetInterface $hdl_file $xilinx::Dpm::IFileID IFile ]         OnOkPtr ifile {            set result [ $ifile SetOrigination $origination ]            if {$result != 1} {               ERR "A problem occurred setting the origination of \"$filename\" to \"$origination\"."            }            Release $ifile         }      }   }   return 1}proc RestoreProjectSettings { iProjHelper project_settings } {   INFO "Restoring device settings"   set iScratch [GetScratchPropertyManager $iProjHelper]   set iPropIter 0   set iPropSet [ GetInterface $iScratch $xilinx::Dpm::IPropertyNodeSetID IPropertyNodeSet ]   OnOkPtr iPropSet {      $iPropSet GetIterator iPropIter   }   set index 0   set lastindex [llength $project_settings]   ForEachIterEle prop_node $iPropIter {      set prop_instance 0      $prop_node GetPropertyInstance prop_instance      if { $index < $lastindex } {         set argname [ lindex $project_settings $index ]         set argvalue [ lindex $project_settings [ expr $index + 1 ] ]      } else {         set argname {}         set argvalue {}      }      if { $prop_instance != 0 } {         set name {}         $prop_instance GetName name         if { [string equal $name $argname ] } {            $prop_instance SetStringValue $argvalue            incr index            incr index         }      }      Release $prop_instance   }   $iScratch Commit   # initialize   $iProjHelper Init}#  Helper to load a source control configuration from a stream#  and then store it back into an ise file.proc RestoreSourceControlOptions { prjfile istream } {   INFO "Restoring source control options"   set config_comp [::Xilinx::Cit::FactoryCreate $::xilinx::Dpm::SourceControlConfigurationCompID ]   OnOkPtr config_comp { set ipersist [ $config_comp GetInterface $xilinx::Prjrep::IPersistID ] }   OnOkPtr config_comp { set igetopts [ $config_comp GetInterface $xilinx::Dpm::SrcCtrl::IGetOptionsID ] }   set helper_comp [::Xilinx::Cit::FactoryCreate $::xilinx::Dpm::SourceControlHelpCompID ]   OnOkPtr helper_comp { set ihelper [ $config_comp GetInterface $xilinx::Dpm::SrcCtrl::IHelperID ] }   OnOkPtr ipersist { $ipersist Load istream }   OnOkPtr ihelper { OnOkPtr igetopts { $ihelper SaveOptions $prjfile $igetopts } }   Release $helper_comp $config_comp}# Call this proc to restore the ISE project.proc restore { { project_dir "" } } {   set script_file "DATA_Pilot_Insert.restore"   set project_file "DATA_Pilot_Insert.ise"   set backup_file "DATA_Pilot_Insert.fail"   set old_working_dir [pwd]   # Make sure a project isn't already open.   if {[IsProjectOpen]} {      ERR "The project must be closed before performing this operation."      cd $old_working_dir      return   }   # If a project directory was supplied, cd into it.   if {![IsBlank $project_dir]} {     cd $project_dir   }   # Make sure the project isn't locked.   set lock_file [GetProjectLockFile $project_file]   if { ![IsBlank "$lock_file" ] } {      ERR "Could not restore the project \"$project_name\" because it is locked."      INFO "Please remove the lock file \"$lock_file\" and try again."      cd $old_working_dir      return   }   # Backup this script because it will be overwritten the next time   # the project is saved, which happens right after it is created!   file copy -force "$script_file" "${script_file}.last"   # Back up the project.   set wasBackedUp [ BackUpProject "$project_file" "$backup_file" ]   # Remove the project file, so that it can be recreated, since the old.   # is presumably corrupted and can no longer be opened.   OnFail [ RemoveProject "$project_file" ] {      cd $old_working_dir      return   }   # Open the project.   HandleException {      set iProjHelper [ OpenFacilProject "$project_file"]   } "A problem occurred while creating the project \"$project_file\"."   if {$iProjHelper == 0} {      cd $old_working_dir      return   }   INFO "Recreating project \"$project_file\"."  set project_settings {      "PROP_DevFamily" "Spartan3E"     "PROP_DevDevice" "xc3s500e"     "PROP_DevPackage" "fg320"     "PROP_DevSpeed" "-4"     "PROP_Top_Level_Module_Type" "HDL"     "PROP_Synthesis_Tool" "XST (VHDL/Verilog)"     "PROP_Simulator" "Modelsim-XE Verilog"     "PROP_PreferredLanguage" "Verilog"     "PROP_Enable_Message_Capture" "true"     "PROP_Enable_Message_Filtering" "false"     "PROP_Enable_Incremental_Messaging" "false"     }  HandleException {    RestoreProjectSettings $iProjHelper $project_settings   } "A problem occured while restoring project settings."  set user_files {       "DATA_Pilot_Insert.v"}  HandleException {    AddUserFiles $iProjHelper $user_files  } "A problem occured while restoring user files."  set imported_files {}  set origination 2  HandleException {    AddImportedFiles $iProjHelper $imported_files $origination  } "A problem occured while restoring imported files."  set process_props {       "A" "" "" "" "PROPEXT_SynthMultStyle_virtex2" "Auto"       "A" "" "" "" "PROPEXT_xilxBitgCfg_Rate_spartan3e" "Default (1)"       "A" "" "" "" "PROPEXT_xilxMapGenInputK_virtex2" "4"       "A" "" "" "" "PROPEXT_xilxSynthAddBufg_spartan3e" "24"       "A" "" "" "" "PROPEXT_xilxSynthMaxFanout_virtex2" "500"       "A" "" "" "" "PROP_CPLDFitkeepio" "false"       "A" "" "" "" "PROP_CompxlibAbelLib" "true"       "A" "" "" "" "PROP_CompxlibCPLDDetLib" "true"       "A" "" "" "" "PROP_CompxlibOtherCompxlibOpts" ""       "A" "" "" "" "PROP_CompxlibOutputDir" "$XILINX/<language>/<simulator>"       "A" "" "" "" "PROP_CompxlibOverwriteLib" "Overwrite"       "A" "" "" "" "PROP_CompxlibSimPrimatives" "true"       "A" "" "" "" "PROP_CompxlibXlnxCoreLib" "true"       "A" "" "" "" "PROP_CurrentFloorplanFile" ""       "A" "" "" "" "PROP_DesignName" "DATA_Pilot_Insert"       "A" "" "" "" "PROP_Dummy" "dum1"       "A" "" "" "" "PROP_EnableWYSIWYG" "None"       "A" "" "" "" "PROP_Enable_Incremental_Messaging" "false"       "A" "" "" "" "PROP_Enable_Message_Capture" "true"       "A" "" "" "" "PROP_Enable_Message_Filtering" "false"       "A" "" "" "" "PROP_FitterReportFormat" "HTML"       "A" "" "" "" "PROP_FlowDebugLevel" "0"       "A" "" "" "" "PROP_FunctionBlockInputLimit" "38"       "A" "" "" "" "PROP_ImpactProjectFile" ""       "A" "" "" "" "PROP_MSimSDFTimingToBeRead" "Setup Time"       "A" "" "" "" "PROP_ModelSimUseConfigName" "false"       "A" "" "" "" "PROP_Parse_Target" "synthesis"       "A" "" "" "" "PROP_PartitionCreateDelete" ""       "A" "" "" "" "PROP_PartitionForcePlacement" ""       "A" "" "" "" "PROP_PartitionForceSynth" ""       "A" "" "" "" "PROP_PartitionForceTranslate" ""       "A" "" "" "" "PROP_PlsClockEnable" "true"       "A" "" "" "" "PROP_PostTrceFastPath" "false"       "A" "" "" "" "PROP_PreTrceFastPath" "false"       "A" "" "" "" "PROP_SimDo" "true"       "A" "" "" "" "PROP_SimModelGenerateTestbenchFile" "false"       "A" "" "" "" "PROP_SimModelInsertBuffersPulseSwallow" "false"       "A" "" "" "" "PROP_SimModelOtherNetgenOpts" ""       "A" "" "" "" "PROP_SimModelRetainHierarchy" "true"       "A" "" "" "" "PROP_SimUseCustom_behav" "false"       "A" "" "" "" "PROP_SimUseCustom_postMap" "false"       "A" "" "" "" "PROP_SimUseCustom_postPar" "false"       "A" "" "" "" "PROP_SimUseCustom_postXlate" "false"       "A" "" "" "" "PROP_SynthCaseImplStyle" "None"       "A" "" "" "" "PROP_SynthDecoderExtract" "true"       "A" "" "" "" "PROP_SynthEncoderExtract" "Yes"       "A" "" "" "" "PROP_SynthExtractMux" "Yes"       "A" "" "" "" "PROP_SynthExtractRAM" "true"       "A" "" "" "" "PROP_SynthExtractROM" "true"       "A" "" "" "" "PROP_SynthFsmEncode" "Auto"       "A" "" "" "" "PROP_SynthLogicalShifterExtract" "true"       "A" "" "" "" "PROP_SynthOpt" "Speed"       "A" "" "" "" "PROP_SynthOptEffort" "Normal"       "A" "" "" "" "PROP_SynthResSharing" "true"       "A" "" "" "" "PROP_SynthShiftRegExtract" "true"       "A" "" "" "" "PROP_SynthXORCollapse" "true"       "A" "" "" "" "PROP_Top_Level_Module_Type" "HDL"       "A" "" "" "" "PROP_UseDataGate" "true"       "A" "" "" "" "PROP_UserConstraintEditorPreference" "Constraints Editor"       "A" "" "" "" "PROP_UserEditorCustomSetting" ""       "A" "" "" "" "PROP_UserEditorPreference" "ISE Text Editor"       "A" "" "" "" "PROP_XPowerOptInputTclScript" ""       "A" "" "" "" "PROP_XPowerOptLoadPCFFile" "Default"       "A" "" "" "" "PROP_XPowerOptLoadVCDFile" "Default"       "A" "" "" "" "PROP_XPowerOptLoadXMLFile" "Default"       "A" "" "" "" "PROP_XPowerOptOutputFile" "Default"       "A" "" "" "" "PROP_XPowerOptVerboseRpt" "false"       "A" "" "" "" "PROP_XPowerOtherXPowerOpts" ""       "A" "" "" "" "PROP_XplorerMode" "Off"       "A" "" "" "" "PROP_bitgen_otherCmdLineOptions" ""       "A" "" "" "" "PROP_cpldBestFit" "false"       "A" "" "" "" "PROP_cpldfitHDLeqStyle" "Source"       "A" "" "" "" "PROP_cpldfit_otherCmdLineOptions" ""       "A" "" "" "" "PROP_fitGenSimModel" "false"       "A" "" "" "" "PROP_hprep6_autosig" "false"       "A" "" "" "" "PROP_hprep6_otherCmdLineOptions" ""       "A" "" "" "" "PROP_ibiswriterShowAllModels" "false"       "A" "" "" "" "PROP_impactConfigFileName_CPLD" ""       "A" "" "" "" "PROP_mapUseRLOCConstraints" "true"       "A" "" "" "" "PROP_map_otherCmdLineOptions" ""       "A" "" "" "" "PROP_mpprRsltToCopy" ""       "A" "" "" "" "PROP_ngdbuildUseLOCConstraints" "true"       "A" "" "" "" "PROP_ngdbuild_otherCmdLineOptions" ""       "A" "" "" "" "PROP_parUseTimingConstraints" "true"       "A" "" "" "" "PROP_par_otherCmdLineOptions" ""       "A" "" "" "" "PROP_primeCorrelateOutput" "false"       "A" "" "" "" "PROP_primeFlatternOutputNetlist" "false"       "A" "" "" "" "PROP_primeTopLevelModule" ""       "A" "" "" "" "PROP_primetimeBlockRamData" ""       "A" "" "" "" "PROP_taengine_otherCmdLineOptions" ""       "A" "" "" "" "PROP_xcpldFitDesInit" "Low"       "A" "" "" "" "PROP_xcpldFitDesInputLmt_xbr" "32"       "A" "" "" "" "PROP_xcpldFitDesMultiLogicOpt" "true"       "A" "" "" "" "PROP_xcpldFitDesSlew" "Fast"       "A" "" "" "" "PROP_xcpldFitDesTimingCst" "true"       "A" "" "" "" "PROP_xcpldFitDesTriMode" "Keeper"       "A" "" "" "" "PROP_xcpldFitDesUnused" "Keeper"       "A" "" "" "" "PROP_xcpldFitDesVolt" "LVCMOS18"       "A" "" "" "" "PROP_xcpldFitTemplate_xpla3" "Optimize Density"       "A" "" "" "" "PROP_xcpldFittimRptOption" "Summary"       "A" "" "" "" "PROP_xcpldUseGlobalClocks" "true"       "A" "" "" "" "PROP_xcpldUseGlobalOutputEnables" "true"       "A" "" "" "" "PROP_xcpldUseGlobalSetReset" "true"       "A" "" "" "" "PROP_xcpldUseLocConst" "Always"       "A" "" "" "" "PROP_xilxBitgCfg_Code" "0xFFFFFFFF"       "A" "" "" "" "PROP_xilxBitgCfg_DCMShutdown" "false"       "A" "" "" "" "PROP_xilxBitgCfg_Done" "Pull Up" 

⌨️ 快捷键说明

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