OpenCores
URL https://opencores.org/ocsvn/myblaze/myblaze/trunk

Subversion Repositories myblaze

[/] [myblaze/] [trunk/] [system/] [uart_test_top/] [uart_test_top.restore] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 rockee
# version: 10.1.03
2
# Project Navigator Project Restoration Script
3
#
4
# WARNING: Do not modify this file. Any alteration of this file is not
5
# supported and will likely cause project restoration to fail. The
6
# format and the contents will be modified without further notice.
7
#
8
# This script can be used to recreate the associated project. To use this script,
9
# source it in a Xilinx Tcl shell, such as xtclsh or the Project Navigator Tcl
10
# Shell tab, and call the 'restore' proc. Restore takes the project directory as
11
# an optional argument. Pass in the project directory if it is different than the
12
# current working directory, otherwise don't pass in anything.
13
#
14
# Example:
15
# In this example the project is in the directory "./projects/m_project_dir".
16
#
17
#  source ./projects/m_project_dir/my_project.restore
18
#  restore ./projects/m_project_dir
19
#
20
# Example:
21
# In this example the project is in the current working directory.
22
#
23
#  source my_project.restore
24
#  restore
25
#
26
# Note that restoring a project this way has the following limitations:
27
# - Process status will not be restored.
28
# - A root-level source will be set as "Top", even if a lower-level source had
29
#   previously been set as "Top".
30
# - Sources with non-default Design View associations will revert to the default
31
#   association.
32
# - Snapshots will not be restored.
33
#
34
# The project which failed to load will be backed up as .fail.
35
# Please open a Technical Support WebCase at
36
# www.xilinx.com/support/clearexpress/websupport.htm and submit this file, along
37
# with the project source files, for evaluation.
38
#
39
# Copyright 2007, Xilinx, Inc.
40
 
41
 
42
proc ERR { msg } {
43
   puts "ERROR: $msg"
44
}
45
 
46
proc WARN { msg } {
47
   puts "WARNING: $msg"
48
}
49
 
50
proc INFO { msg } {
51
   puts "$msg"
52
}
53
 
54
# Helper that returns 1 if the string is blank, otherwise 0.
55
proc IsBlank { str } {
56
   if { [string length $str] == 0 } {
57
      return 1
58
   }
59
   return 0
60
}
61
 
62
# Helper for determining whether a value is 'NULL'.
63
# Returns 1 if the value is 0; returns 0 if the value is anything else.
64
proc IsNull { val } {
65
   if { $val == 0 } {
66
      return 1
67
   }
68
   return 0
69
}
70
 
71
proc HandleException { script { msg "" } } {
72
   set catch_result [catch {
73
      uplevel 1 $script
74
   } RESULT]
75
   if {$catch_result} {
76
      if {![IsBlank $msg]} {
77
         ERR $msg
78
      }
79
      INFO "$RESULT"
80
      INFO "$::errorInfo"
81
   }
82
}
83
 
84
# These two procs help to load shared libraries in a platform
85
# independent way.
86
proc _LoadLibrary {name} {
87
   set libExt [info sharedlibextension]
88
   set libFullName "$name$libExt"
89
   HandleException {
90
      load $libFullName
91
   } "A problem occured loading library $libFullName."
92
}
93
 
94
proc _LoadFactoryLibrary {Factory} {
95
   HandleException {
96
      Xilinx::Cit::FactoryLoad $Factory
97
   } "A problem occured loading library $Factory."
98
}
99
 
100
_LoadLibrary libCit_CoreStub
101
_LoadLibrary libPrjrep_CommonStub
102
_LoadFactoryLibrary libPrjrep_Common
103
_LoadLibrary libDpm_SupportStub
104
_LoadLibrary libDpm_PnfStub
105
_LoadLibrary libDpm_DefnDataStub
106
_LoadLibrary libDpm_DesignDataStub
107
_LoadLibrary libDpm_HdlStub
108
_LoadLibrary libPrjrep_RepositoryStub
109
_LoadLibrary libCitI_CoreStub
110
_LoadLibrary libHdcI_HdcHDProjectStub
111
_LoadLibrary libTcltaskI_TaskStub
112
_LoadLibrary libCommonI_CommonStub
113
_LoadFactoryLibrary libTcltask_Helpers
114
_LoadFactoryLibrary libHdcC_HDProject
115
_LoadLibrary libHdcI_HdcContainerStub
116
_LoadLibrary libGuiI_Stub
117
 
118
#  Helper to exectute code only when the (pointer) variable name is valid.
119
proc OnOkPtr { var_name script } {
120
   if { [ uplevel info exists $var_name ] } {
121
      upvar $var_name var
122
      if { $var != 0 } { return [ uplevel $script ] }
123
   }
124
}
125
 
126
#  Helper to exectute code only when the (pointer) variable name is 0.
127
proc OnNullPtr { var_name script } {
128
   if { [ uplevel info exists $var_name ] } {
129
      upvar $var_name var
130
      if { $var == 0 } { return [ uplevel $script ] }
131
   }
132
}
133
 
134
#  Helper to exectute code only when the value of variable name is 1.
135
proc OnSuccess { var_name script } {
136
   if { $val != 0 } { return [ uplevel $script ] }
137
}
138
 
139
#  Helper to exectute code only when the value of variable name is 0.
140
proc OnFail { val script } {
141
   if { $val != 1 } { return [ uplevel $script ] }
142
}
143
 
144
#  Helper to get a component interface.
145
proc GetInterface { iUnk id { name "" } } {
146
   if {$iUnk == 0} { return 0 }
147
   set iIface [ $iUnk GetInterface $id ]
148
   OnNullPtr iIface {
149
      if {![IsBlank $name]} {
150
         ERR " Could not get the \"$name\" interface."
151
      }
152
   }
153
   return $iIface
154
}
155
 
156
#  Helper to create a component and return one of its interfaces.
157
proc CreateComponent { compId ifaceId { name "" } } {
158
   set iUnk [ ::Xilinx::Cit::FactoryCreate $compId ]
159
   set iIface [ GetInterface $iUnk $ifaceId ]
160
   OnNullPtr iIface {
161
      if {![IsBlank $name]} { ERR "Could not create a \"$name\" component." }
162
   }
163
   return $iIface
164
}
165
 
166
#  Helper to release an object
167
proc Release { args } {
168
   foreach iUnk $args {
169
      set i_refcount [ GetInterface $iUnk $::xilinx::Prjrep::IRefCountID ]
170
      OnNullPtr i_refcount { set i_refcount [ GetInterface $iUnk $::xilinx::CommonI::IRefCountID ] }
171
      OnOkPtr i_refcount { $i_refcount Release }
172
   }
173
}
174
 
175
#  Helper to loop over IIterator based pointers.
176
proc ForEachIterEle { _ele_var_name _iter script } {
177
   if {$_iter == 0} { return 0 }
178
   upvar $_ele_var_name ele
179
   for { $_iter First } { ![ $_iter IsEnd ] } { $_iter Next }  {
180
      set ele [ $_iter CurrentItem ]
181
      set returned_val [ uplevel $script ]
182
   }
183
}
184
 
185
#  Helper to get the Tcl Project Manager, if possible.
186
proc GetTclProjectMgr { } {
187
   set TclProjectMgrId "{7d528480-1196-4635-aba9-639446e4aa59}"
188
   set iUnk [ Xilinx::CitP::CreateComponent $TclProjectMgrId ]
189
   if {$iUnk == 0} { return 0 }
190
   set iTclProjectMgr [ $iUnk GetInterface $::xilinx::TcltaskI::ITclProjectMgrID ]
191
   OnNullPtr iTclProjectMgr {
192
      ERR "Could not create a \"TclProjectMgr\" component."
193
   }
194
   return $iTclProjectMgr
195
}
196
 
197
#  Helper to get the current Tcl Project, if one is open.
198
proc GetCurrentTclProject { } {
199
   set iTclProject 0
200
   set iTclProjectMgr [GetTclProjectMgr]
201
   OnOkPtr iTclProjectMgr {
202
      set errmsg ""
203
      $iTclProjectMgr GetCurrentTclProject iTclProject errmsg
204
   }
205
   return $iTclProject
206
}
207
 
208
#  Helper to get the current HDProject, if one is open.
209
proc GetCurrentHDProject { } {
210
   set iHDProject 0
211
   set iTclProjectMgr [GetTclProjectMgr]
212
   set errmsg ""
213
   OnOkPtr iTclProjectMgr { $iTclProjectMgr GetCurrentHDProject iHDProject errmsg }
214
   OnNullPtr iHDProject {
215
      ERR "Could not get the current HDProject."
216
   }
217
   return $iHDProject
218
}
219
 
220
#  Helper to create a Project Helper.
221
proc GetProjectHelper { } {
222
   set ProjectHelperID "{0725c3d2-5e9b-4383-a7b6-a80c932eac21}"
223
   set iProjHelper [CreateComponent $ProjectHelperID $::xilinx::Dpm::IProjectHelperID "Project Helper"]
224
   return $iProjHelper
225
}
226
 
227
#  Helper to find out if a project is currently open.
228
#  Returns 1 if a project is open, otherwise 0.
229
proc IsProjectOpen { } {
230
   set iTclProject [GetCurrentTclProject]
231
   set isOpen [expr {$iTclProject != 0}]
232
   Release $iTclProject
233
   return $isOpen
234
}
235
 
236
#  Helper to return the lock file for the specified project if there is one.
237
#  Returns an empty string if there is no lock file on the specified project,
238
#  or there is no corresponding .ise file
239
#  This assumes that the project_file is in the current directory.
240
#  It also assumes project_file does not have a path.
241
proc GetProjectLockFile { project_file } {
242
   if { ![ file isfile "$project_file" ] } {
243
      return
244
   }
245
   INFO "Checking for a lock file for \"$project_file\"."
246
   set lock_file "__ISE_repository_${project_file}_.lock"
247
   if { [ file isfile "$lock_file" ] } {
248
      return $lock_file
249
   }
250
   return
251
}
252
 
253
#  Helper to back up the project file.
254
#  This assumes that the project_file is in the current directory.
255
proc BackUpProject { project_file backup_file } {
256
   if { ![ file isfile "$project_file" ] } {
257
      WARN "Could not find \"$project_file\"; the project will not be backed up."
258
   return 0
259
   } else {
260
      INFO "Backing up the project to \"$backup_file\"."
261
      file copy -force "$project_file" "$backup_file"
262
   }
263
   return 1
264
}
265
 
266
#  Helper to remove the project file so that a new project can be created
267
#  in its place. Presumably the old project is corrupted and can no longer
268
#  be opened.
269
proc RemoveProject { project_file } {
270
   file delete -force "$project_file"
271
   # Return failure if the project still exists.
272
   if { [ file isfile "$project_file" ] } {
273
      ERR "Could not remove \"$project_file\"; Unable to restore the project."
274
      return 0
275
   }
276
   return 1
277
}
278
 
279
#  Helper to open a project and return a project facilitator (pointer).
280
proc OpenFacilProject { project_name } {
281
   # first make sure the tcl project mgr singleton exists
282
   GetTclProjectMgr
283
   # get a Project Helper and open the project.
284
   set iProjHelper [GetProjectHelper]
285
   if {$iProjHelper == 0} { return 0 }
286
   set result [$iProjHelper Open $project_name]
287
   OnFail $result {
288
      if {$result == 576460769483292673} {
289
         ERR "Could not open the project \"$project_name\" because it is locked."
290
      } else {
291
         ERR "Could not open the \"$project_name\" project."
292
      }
293
      Release $iProjHelper
294
      set iProjHelper 0
295
   }
296
   return $iProjHelper
297
}
298
 
299
#  Helper to close and release a project.
300
proc CloseFacilProject { iProjHelper } {
301
   if {$iProjHelper == 0} { return }
302
   $iProjHelper Close
303
   Release $iProjHelper
304
}
305
 
306
#  Helper to get the Project from the Project Helper.
307
#  Clients must release this.
308
proc GetProject { iProjHelper } {
309
   if {$iProjHelper == 0} { return 0 }
310
   set dpm_project 0
311
   $iProjHelper GetDpmProject dpm_project
312
   set iProject [ GetInterface $dpm_project $xilinx::Dpm::IProjectID ]
313
   OnNullPtr iProject {
314
      ERR "Could not get the Project from the Project Helper."
315
   }
316
   return $iProject
317
}
318
 
319
#  Helper to get the File Manager from the Project Helper.
320
#  Clients must release this.
321
proc GetFileManager { iProjHelper } {
322
   set iProject [GetProject $iProjHelper]
323
   set iFileMgr [ GetInterface $iProject $xilinx::Dpm::IFileManagerID ]
324
   OnNullPtr iFileMgr {
325
      ERR "Could not get the File Manager from the Project Helper."
326
   }
327
   # Don't release the project here, clients will release it
328
   # when they release its IFileManager interface.
329
   return $iFileMgr
330
}
331
 
332
#  Helper to get the Source Library Manager from the Project Helper.
333
#  Clients must release this.
334
proc GetSourceLibraryManager { iProjHelper } {
335
   set iProject [GetProject $iProjHelper]
336
   set iSourceLibraryMgr [ GetInterface $iProject $xilinx::Dpm::ISourceLibraryManagerID ]
337
   OnNullPtr iSourceLibraryMgr {
338
      ERR "Could not get the Source Library Manager from the Project Helper."
339
   }
340
   # Don't release the project here, clients will release it
341
   # when they release its IFileManager interface.
342
   return $iSourceLibraryMgr
343
}
344
 
345
#  Helper to get the ProjSrcHelper from the Project Helper.
346
#  Clients must NOT release this.
347
proc GetProjSrcHelper { iProjHelper } {
348
   set iSrcHelper [ GetInterface $iProjHelper $::xilinx::Dpm::IProjSrcHelperID IProjSrcHelper ]
349
   OnNullPtr iSrcHelper {
350
      ERR "Could not get the ProjSrcHelper from the Project Helper."
351
   }
352
   return $iSrcHelper
353
}
354
 
355
#  Helper to get the ScratchPropertyManager from the Project Helper.
356
#  Clients must NOT release this.
357
proc GetScratchPropertyManager { iProjHelper } {
358
   set iPropTableFetch [ GetInterface $iProjHelper $xilinx::Dpm::IPropTableFetchID IPropTableFetch ]
359
   set prop_table_comp 0
360
   OnOkPtr iPropTableFetch {
361
      $iPropTableFetch GetPropTable prop_table_comp
362
   }
363
   set iScratch [ GetInterface $prop_table_comp $xilinx::Dpm::IScratchPropertyManagerID ]
364
   OnNullPtr iScratch {
365
      ERR "Could not get the Scratch Property Manager from the Project Helper."
366
   }
367
   return $iScratch
368
}
369
 
370
#  Helper to get the Design from the Project Helper.
371
#  Clients must release this.
372
proc GetDesign { iProjHelper } {
373
   set iProject [GetProject $iProjHelper]
374
   set iDesign 0
375
   OnOkPtr iProject { $iProject GetDesign iDesign }
376
   OnNullPtr iDesign {
377
      ERR "Could not get the Design from the Project Helper."
378
   }
379
   Release $iProject
380
   return $iDesign
381
}
382
 
383
#  Helper to get the Data Store from the Project Helper.
384
#  Clients must NOT release this.
385
proc GetDataStore { iProjHelper } {
386
   set iDesign [ GetDesign $iProjHelper]
387
   set iDataStore 0
388
   OnOkPtr iDesign { $iDesign GetDataStore iDataStore }
389
   OnNullPtr iDataStore {
390
      ERR "Could not get the Data Store from the Project Helper."
391
   }
392
   Release $iDesign
393
   return $iDataStore
394
}
395
 
396
#  Helper to get the View Manager from the Project Helper.
397
#  Clients must NOT release this.
398
proc GetViewManager { iProjHelper } {
399
   set iDesign [ GetDesign $iProjHelper]
400
   set iViewMgr [ GetInterface $iDesign $xilinx::Dpm::IViewManagerID ]
401
   OnNullPtr iViewMgr {
402
      ERR "Could not get the View Manager from the Project Helper."
403
   }
404
   # Don't release the design here, clients will release it
405
   # when they release its IViewManager interface.
406
   return $iViewMgr
407
}
408
 
409
#  Helper to get the Property Manager from the Project Helper.
410
#  Clients must release this.
411
proc GetPropertyManager { iProjHelper } {
412
   set iDesign [ GetDesign $iProjHelper]
413
   set iPropMgr 0
414
   OnOkPtr iDesign { $iDesign GetPropertyManager iPropMgr }
415
   OnNullPtr iPropMgr {
416
      ERR "Could not get the Property Manager from the Project Helper."
417
   }
418
   Release $iDesign
419
   return $iPropMgr
420
}
421
 
422
#  Helper to find a property template, based on prop_name
423
#  Clients must NOT release this.
424
proc GetPropertyTemplate { iProjHelper prop_name } {
425
   set iPropTempl 0
426
   set iUnk 0
427
   set iDefdataId 0
428
   set iPropTemplStore 0
429
   set iDataStore [GetDataStore $iProjHelper]
430
   OnOkPtr iDataStore { $iDataStore GetComponentByName $prop_name iUnk }
431
   OnOkPtr iUnk { set iDefdataId [ GetInterface $iUnk $xilinx::Dpm::IDefDataIdID IDefDataId ] }
432
   OnOkPtr iDefdataId {
433
      set iPropTemplStore [ GetInterface $iDataStore $xilinx::Dpm::IPropertyTemplateStoreID IPropertyTemplateStore ]
434
   }
435
   OnOkPtr iPropTemplStore { $iPropTemplStore GetPropertyTemplate $iDefdataId iPropTempl }
436
   OnNullPtr iPropTempl {
437
      WARN "Could not get the property template for \"$prop_name\"."
438
   }
439
   return $iPropTempl
440
}
441
 
442
#  Helper to get a component's name.
443
proc GetName { iUnk } {
444
   set name ""
445
   set iName [ GetInterface $iUnk $xilinx::Prjrep::INameID IName ]
446
   OnOkPtr iName { $iName GetName name }
447
   return $name
448
}
449
 
450
#  Helper to get the name of a view's type.
451
proc GetViewTypeName { iView } {
452
   set typeName ""
453
   set iType 0
454
   set iDefdataType 0
455
   OnOkPtr iView { $iView GetType iType }
456
   OnOkPtr iType {
457
      set iDefdataType [ GetInterface $iType $xilinx::Dpm::IDefDataIdID IDefDataId ]
458
   }
459
   OnOkPtr iDefdataType { $iDefdataType GetID typeName }
460
   return $typeName
461
}
462
 
463
#  Helper to find a view and return its context.
464
#  Must clients release this?
465
proc GetViewContext { iProjHelper view_id view_name } {
466
   # Simply return if the view_id or view_name is empty.
467
   if { [IsBlank $view_id] || [IsBlank $view_name] } { return 0 }
468
   set foundview 0
469
   set viewiter 0
470
   set iViewMgr [GetViewManager $iProjHelper]
471
   OnOkPtr iViewMgr { $iViewMgr GetViews viewiter }
472
   ForEachIterEle view $viewiter {
473
      set typeName [GetViewTypeName $view]
474
      set name [GetName $view]
475
      if { [ string equal $name $view_name ] && [ string equal $view_id $typeName ] } {
476
         set foundview $view
477
      }
478
   }
479
   set context [ GetInterface $foundview $xilinx::Dpm::IPropertyContextID ]
480
   OnNullPtr context {
481
      WARN "Could not get the context for view \"$view_id\":\"$view_name\"."
482
   }
483
   return $context
484
}
485
 
486
#  Helper to get a string property instance from the property manager.
487
proc GetStringPropertyInstance { iProjHelper simple_id } {
488
   set iPropMgr [GetPropertyManager $iProjHelper]
489
   if {$iPropMgr == 0} { return 0 }
490
   set iPropInst 0
491
   $iPropMgr GetStringProperty $simple_id iPropInst
492
   OnNullPtr iPropInst { WARN "Could not get the string property instance $simple_id." }
493
   Release $iPropMgr
494
   return $iPropInst
495
}
496
 
497
#  Helper to get a property instance from the property manager.
498
proc GetPropertyInstance { iProjHelper view_name view_id prop_name } {
499
   set iPropInst 0
500
   set iPropTempl [ GetPropertyTemplate $iProjHelper $prop_name ]
501
   if {$iPropTempl == 0} { return 0 }
502
   set context [ GetViewContext $iProjHelper $view_id $view_name ]
503
   set iPropMgr [GetPropertyManager $iProjHelper]
504
   if {$iPropMgr == 0} { return 0 }
505
   $iPropMgr GetPropertyInstance $iPropTempl $context iPropInst
506
   OnNullPtr iPropInst {
507
      if { ![IsBlank $view_id] && ![IsBlank $view_name] } {
508
         WARN "Could not get the context sensitive property instance $prop_name."
509
      } else {
510
         WARN "Could not get the property instance $prop_name."
511
      }
512
   }
513
   Release $iPropMgr
514
   return $iPropInst
515
}
516
 
517
#  Helper to store properties back into the property manager.
518
proc RestoreProcessProperties { iProjHelper process_props } {
519
   INFO "Restoring process properties"
520
   foreach { unused view_name view_id simple_id prop_name prop_val } $process_props {
521
      set iPropInst 0
522
      if {![IsBlank $simple_id]} {
523
         set iPropInst [ GetStringPropertyInstance $iProjHelper $simple_id ]
524
      } else {
525
         set iPropInst [ GetPropertyInstance $iProjHelper $view_name $view_id $prop_name ]
526
      }
527
      OnOkPtr iPropInst {
528
         OnFail [ $iPropInst SetStringValue "$prop_val" ] {
529
            WARN "Could not set the value of the $prop_name property to \"$prop_val\"."
530
         }
531
      }
532
      Release $iPropInst
533
   }
534
}
535
 
536
#  Helper to recreate partitions from the variable name with
537
#  a list of instance names.
538
proc RestorePartitions { namelist } {
539
   INFO "Restoring partitions."
540
   set iHDProject [ GetCurrentHDProject ]
541
   OnOkPtr iHDProject {
542
      foreach name $namelist {
543
         set iPartition [ $iHDProject CreatePartition "$name" ]
544
      }
545
   }
546
}
547
 
548
#  Helper to create and populate a library
549
#
550
proc CreateLibrary { iProjHelper libname filelist } {
551
 
552
   set iLibMgr [ GetSourceLibraryManager $iProjHelper ]
553
   set iFileMgr [ GetFileManager $iProjHelper ]
554
 
555
   if {$iLibMgr == 0} { return 0 }
556
   if {$iFileMgr == 0} { return 0 }
557
 
558
   $iLibMgr CreateSourceLibrary "libname" ilib
559
 
560
   OnOkPtr ilib {
561
      foreach filename $filelist {
562
         set argfile [ file normalize "$filename" ]
563
         set found 0
564
         set fileiter 0
565
         $iFileMgr GetFiles fileiter
566
         ForEachIterEle ifile $fileiter {
567
            set path ""
568
            set file ""
569
            $ifile getPath path file
570
            set currentfile [ file normalize [ file join "$path" "$file" ] ]
571
            if { $currentfile == $argfile } {
572
               set found 1
573
               $ilib AddFile ifile
574
               break
575
            }
576
         }
577
         OnNullPtr found {
578
            WARN "Could not add the file \"$filename\" to the library \"$libname\"."
579
         }
580
      }
581
   }
582
}
583
 
584
#  Helper to create source libraries and populate them.
585
proc RestoreSourceLibraries { iProjHelper libraries } {
586
   INFO "Restoring source libraries."
587
   foreach { libname filelist } $libraries {
588
      CreateLibrary $iProjHelper "$libname" $filelist
589
   }
590
}
591
 
592
# Helper to add user files to the project using the PnF.
593
proc AddUserFiles { iProjHelper files } {
594
   INFO "Adding User files."
595
   set iconflict 0
596
   set iSrcHelper [ GetProjSrcHelper $iProjHelper ]
597
   if {$iSrcHelper == 0} { return 0 }
598
   foreach filename $files {
599
      INFO "Adding the file \"$filename\" to the project."
600
      set result [$iSrcHelper AddSourceFile "$filename" iconflict]
601
      OnFail $result {
602
         if {$result == 6} {
603
            INFO "The file \"$filename\" is already in the project."
604
         } else {
605
            ERR "A problem occurred adding the file \"$filename\" to the project."
606
         }
607
      }
608
   }
609
}
610
 
611
# Helper to add files to the project and set their origination.
612
# Valid origination values are:
613
#   0 - User
614
#   1 - Generated
615
#   2 - Imported
616
# Files of origination "User" are added through the facilitator,
617
# otherwise they are added directly to the File Manager.
618
proc AddImportedFiles { iProjHelper files origination } {
619
   switch $origination {
620
 
621
      1 { INFO "Adding Generated files." }
622
      2 { INFO "Adding Imported files." }
623
      default {
624
         ERR "Invalid parameter: origination was set to \"$origination\", but may only be 0, 1, or 2."
625
         return 0
626
      }
627
   }
628
   set iFileMgr [ GetFileManager $iProjHelper ]
629
   if {$iFileMgr == 0} { return 0 }
630
   foreach filename $files {
631
      set file_type 0
632
      set hdl_file 0
633
      set result [$iFileMgr AddFile "$filename" $file_type hdl_file]
634
      OnFail $result {
635
         if {$result == 6} {
636
            INFO "The file \"$filename\" is already in the project."
637
         } elseif { $hdl_file == 0 } {
638
            ERR "A problem occurred adding the file \"$filename\" to the project."
639
         }
640
      }
641
      OnOkPtr hdl_file {
642
         set ifile [ GetInterface $hdl_file $xilinx::Dpm::IFileID IFile ]
643
         OnOkPtr ifile {
644
            set result [ $ifile SetOrigination $origination ]
645
            if {$result != 1} {
646
               ERR "A problem occurred setting the origination of \"$filename\" to \"$origination\"."
647
            }
648
            Release $ifile
649
         }
650
      }
651
   }
652
   return 1
653
}
654
 
655
proc RestoreProjectSettings { iProjHelper project_settings } {
656
   INFO "Restoring device settings"
657
   set iScratch [GetScratchPropertyManager $iProjHelper]
658
   set iPropIter 0
659
   set iPropSet [ GetInterface $iScratch $xilinx::Dpm::IPropertyNodeSetID IPropertyNodeSet ]
660
   OnOkPtr iPropSet {
661
      $iPropSet GetIterator iPropIter
662
   }
663
   set index 0
664
   set lastindex [llength $project_settings]
665
   ForEachIterEle prop_node $iPropIter {
666
      set prop_instance 0
667
      $prop_node GetPropertyInstance prop_instance
668
      if { $index < $lastindex } {
669
         set argname [ lindex $project_settings $index ]
670
         set argvalue [ lindex $project_settings [ expr $index + 1 ] ]
671
      } else {
672
         set argname {}
673
         set argvalue {}
674
      }
675
      if { $prop_instance != 0 } {
676
         set name {}
677
         $prop_instance GetName name
678
         if { [string equal $name $argname ] } {
679
            $prop_instance SetStringValue $argvalue
680
            incr index
681
            incr index
682
         }
683
      }
684
      Release $prop_instance
685
   }
686
   $iScratch Commit
687
   # initialize
688
   $iProjHelper Init
689
}
690
 
691
#  Helper to load a source control configuration from a stream
692
#  and then store it back into an ise file.
693
proc RestoreSourceControlOptions { prjfile istream } {
694
   INFO "Restoring source control options"
695
   set config_comp [::Xilinx::Cit::FactoryCreate $::xilinx::Dpm::SourceControlConfigurationCompID ]
696
   OnOkPtr config_comp { set ipersist [ $config_comp GetInterface $xilinx::Prjrep::IPersistID ] }
697
   OnOkPtr config_comp { set igetopts [ $config_comp GetInterface $xilinx::Dpm::SrcCtrl::IGetOptionsID ] }
698
   set helper_comp [::Xilinx::Cit::FactoryCreate $::xilinx::Dpm::SourceControlHelpCompID ]
699
   OnOkPtr helper_comp { set ihelper [ $config_comp GetInterface $xilinx::Dpm::SrcCtrl::IHelperID ] }
700
   OnOkPtr ipersist { $ipersist Load istream }
701
   OnOkPtr ihelper { OnOkPtr igetopts { $ihelper SaveOptions $prjfile $igetopts } }
702
   Release $helper_comp $config_comp
703
}
704
 
705
# put a string message in a GUI popup message dialog (if possible),
706
# Get a user Yes/No response. If the GUI isn't active just 'puts'
707
# the message to stdout and return the default value.
708
#               sMessageGUI - string, the message to display in GUI environment
709
#               sMessageCmdLine - string, the message to display in CMdLine environment
710
#               defaultValue - integer, the response to return on a timeout
711
#               hasCancel - integer, defaulting to 0. If 1, show Yes/No/Cancel buttons
712
proc dpm_DisplayQuestionDialog { sMessageGUI sMessageCmdLine defaultValue { hasCancel 0} } {
713
   set iMessageDisplay 0
714
   if {[catch {
715
           set iInterface [Xilinx::CitP::GetInstance $::xilinx::GuiI::IMessageDlgID]
716
           set iMessageDisplay [$iInterface GetInterface $::xilinx::GuiI::IMessageDlgID]
717
   }]} {
718
           # if we cannot get the IMessageDlgID interface then we are most likely
719
           # running from command line and not in the GUI.
720
           puts $sMessageCmdLine
721
   } else {
722
           # got a good dialog singleton
723
           set nTimeout 999999
724
           set buttonValue [$iMessageDisplay Question "Project Navigator" $sMessageGUI $hasCancel $nTimeout]
725
           if { $buttonValue == 2 } { ; # cancel
726
                   return 3
727
           } elseif { $buttonValue == 3 } { ; # yes
728
                   return 1
729
           } elseif { $buttonValue == 4 } { ; # no
730
                   return 2
731
           } else { # probably timeout
732
                   return $defaultValue
733
           }
734
   }
735
   return $defaultValue
736
}
737
 
738
# Call this proc to restore the ISE project.
739
proc restore { { project_dir "" } } {
740
   set script_file "uart_test_top.restore"
741
   set project_file "uart_test_top.ise"
742
   set backup_file "uart_test_top.fail"
743
   set old_working_dir [pwd]
744
   # Make sure a project isn't already open.
745
   if {[IsProjectOpen]} {
746
      ERR "The project must be closed before performing this operation."
747
      cd $old_working_dir
748
      return
749
   }
750
   # If a project directory was supplied, cd into it.
751
   if {![IsBlank $project_dir]} {
752
     cd $project_dir
753
   }
754
   # capture the project directory ... it should be CWD at this point
755
   set project_dir [pwd]
756
 
757
   # before proceeding detect if lock files exist and if so ask the user what to do
758
   set proj_rootname [file rootname $project_file]
759
   set intermediate_proj_dir [file join $project_dir ${proj_rootname}_xdb]
760
   set proj_temp_dir [file join $intermediate_proj_dir "projtemp"]
761
   set repo_temp_dir [file join $proj_temp_dir $project_file]
762
   set new_lock_file [file join $proj_temp_dir ${project_file}.lock]
763
   set old_lock_file [GetProjectLockFile $project_file]
764
   set bLockFilesExist 0
765
   # see if any lock files are there
766
   if {[file exists $new_lock_file] || ![IsBlank "$old_lock_file" ] } {
767
      set bLockFilesExist 1
768
   }
769
 
770
   # if lock file(s) are found ask the user what to do
771
   if { $bLockFilesExist == 1 } {
772
      set lockFileMsgGUI "The project to be restored appears to be locked. Remove Lock and continue the restore project process ?"
773
      set lockFileMsgCmdLine "The project to be restored appears to be locked. Please remove the lock file \"$new_lock_file\" and try the restore process again."
774
      set answer [dpm_DisplayQuestionDialog $lockFileMsgGUI $lockFileMsgCmdLine 2]
775
      if { $answer == 1 } {
776
         # remove the lock file(s) and the repo temo dir, if present
777
         # remove the new style lock file if it exists
778
         if {[file exists $new_lock_file]} {
779
            INFO "Removing lock file \"$new_lock_file\"."
780
            file delete -force $new_lock_file
781
         }
782
         # remove the old style lock file if it exists
783
         if {[file exists $old_lock_file]} {
784
            INFO "Removing lock file \"$old_lock_file\"."
785
            file delete -force $old_lock_file
786
         }
787
         # remove the temp proj dir if it exists
788
         if {[file exists $repo_temp_dir]} {
789
            INFO "Removing old temporary project directory \"$repo_temp_dir\"."
790
            file delete -force $repo_temp_dir
791
         }
792
      } else {
793
         # the user answered 'no' so exist without doing anything
794
         INFO "Exiting without restoring project."
795
         return
796
      }
797
   }
798
 
799
   # Backup this script because it will be overwritten the next time
800
   # the project is saved, which happens right after it is created!
801
   file copy -force "$script_file" "${script_file}.last"
802
   # Back up the project.
803
   set wasBackedUp [ BackUpProject "$project_file" "$backup_file" ]
804
   # Remove the project file, so that it can be recreated, since the old.
805
   # is presumably corrupted and can no longer be opened.
806
   OnFail [ RemoveProject "$project_file" ] {
807
      cd $old_working_dir
808
      return
809
   }
810
 
811
   # Open the project.
812
   HandleException {
813
      set iProjHelper [ OpenFacilProject "$project_file"]
814
   } "A problem occurred while creating the project \"$project_file\"."
815
   if {$iProjHelper == 0} {
816
      cd $old_working_dir
817
      return
818
   }
819
   INFO "Recreating project \"$project_file\"."
820
  set project_settings {
821
     "PROP_DevFamily" "Spartan3E"
822
     "PROP_DevDevice" "xc3s500e"
823
     "PROP_DevPackage" "fg320"
824
     "PROP_DevSpeed" "-4"
825
     "PROP_Top_Level_Module_Type" "HDL"
826
     "PROP_Synthesis_Tool" "XST (VHDL/Verilog)"
827
     "PROP_Simulator" "Modelsim-SE Mixed"
828
     "PROP_PreferredLanguage" "Verilog"
829
     "PROP_Enable_Message_Capture" "true"
830
     "PROP_Enable_Message_Filtering" "false"
831
     "PROP_Enable_Incremental_Messaging" "false"
832
     }
833
 
834
  HandleException {
835
    RestoreProjectSettings $iProjHelper $project_settings
836
  } "A problem occured while restoring project settings."
837
 
838
  set user_files {
839
      "../../rtl/SysTop.v"
840
      "../../rtl/uart_test_top.ucf"}
841
 
842
  HandleException {
843
    AddUserFiles $iProjHelper $user_files
844
  } "A problem occured while restoring user files."
845
 
846
  set imported_files {
847
      "SysTop_guide.ncd"}
848
 
849
  set origination 2
850
 
851
  HandleException {
852
    AddImportedFiles $iProjHelper $imported_files $origination
853
  } "A problem occured while restoring imported files."
854
 
855
  set process_props {
856
      "A" "" "" "" "PROPEXT_SynthMultStyle_virtex2" "Auto"
857
      "A" "" "" "" "PROPEXT_xilxBitgCfg_Rate_spartan3e" "Default (1)"
858
      "A" "" "" "" "PROPEXT_xilxMapGenInputK_virtex2" "4"
859
      "A" "" "" "" "PROPEXT_xilxSynthAddBufg_spartan3e" "24"
860
      "A" "" "" "" "PROPEXT_xilxSynthMaxFanout_virtex2" "500"
861
      "A" "" "" "" "PROP_AutoGenFile" "false"
862
      "A" "" "" "" "PROP_BehavioralSimTop" "Module|SysTop"
863
      "A" "" "" "" "PROP_CPLDFitkeepio" "false"
864
      "A" "" "" "" "PROP_CompxlibAbelLib" "true"
865
      "A" "" "" "" "PROP_CompxlibCPLDDetLib" "true"
866
      "A" "" "" "" "PROP_CompxlibOtherCompxlibOpts" ""
867
      "A" "" "" "" "PROP_CompxlibOutputDir" "$XILINX//"
868
      "A" "" "" "" "PROP_CompxlibOverwriteLib" "Overwrite"
869
      "A" "" "" "" "PROP_CompxlibSimPrimatives" "true"
870
      "A" "" "" "" "PROP_CompxlibXlnxCoreLib" "true"
871
      "A" "" "" "" "PROP_CurrentFloorplanFile" ""
872
      "A" "" "" "" "PROP_DesignName" "uart_test_top"
873
      "A" "" "" "" "PROP_Dummy" "dum1"
874
      "A" "" "" "" "PROP_EnableWYSIWYG" "None"
875
      "A" "" "" "" "PROP_Enable_Incremental_Messaging" "false"
876
      "A" "" "" "" "PROP_Enable_Message_Capture" "true"
877
      "A" "" "" "" "PROP_Enable_Message_Filtering" "false"
878
      "A" "" "" "" "PROP_FitterReportFormat" "HTML"
879
      "A" "" "" "" "PROP_FlowDebugLevel" "0"
880
      "A" "" "" "" "PROP_FunctionBlockInputLimit" "38"
881
      "A" "" "" "" "PROP_ImpactProjectFile" "Default"
882
      "A" "" "" "" "PROP_LastAppliedGoal" "Balanced"
883
      "A" "" "" "" "PROP_LastAppliedStrategy" "Xilinx Default (unlocked)"
884
      "A" "" "" "" "PROP_LastUnlockStatus" "false"
885
      "A" "" "" "" "PROP_MSimSDFTimingToBeRead" "Setup Time"
886
      "A" "" "" "" "PROP_ModelSimUseConfigName" "false"
887
      "A" "" "" "" "PROP_Parse_Target" "synthesis"
888
      "A" "" "" "" "PROP_PartitionCreateDelete" ""
889
      "A" "" "" "" "PROP_PartitionForcePlacement" ""
890
      "A" "" "" "" "PROP_PartitionForceSynth" ""
891
      "A" "" "" "" "PROP_PartitionForceTranslate" ""
892
      "A" "" "" "" "PROP_PlsClockEnable" "true"
893
      "A" "" "" "" "PROP_PostFitSimTop" ""
894
      "A" "" "" "" "PROP_PostMapSimTop" ""
895
      "A" "" "" "" "PROP_PostParSimTop" ""
896
      "A" "" "" "" "PROP_PostSynthSimTop" ""
897
      "A" "" "" "" "PROP_PostTrceFastPath" "false"
898
      "A" "" "" "" "PROP_PostTrceGenDatasheet" "true"
899
      "A" "" "" "" "PROP_PostTrceGenTimegroups" "false"
900
      "A" "" "" "" "PROP_PostXlateSimTop" ""
901
      "A" "" "" "" "PROP_PreTrceFastPath" "false"
902
      "A" "" "" "" "PROP_PreTrceGenDatasheet" "true"
903
      "A" "" "" "" "PROP_PreTrceGenTimegroups" "false"
904
      "A" "" "" "" "PROP_PreTrceTSIFile" ""
905
      "A" "" "" "" "PROP_SimDo" "true"
906
      "A" "" "" "" "PROP_SimModelGenerateTestbenchFile" "false"
907
      "A" "" "" "" "PROP_SimModelInsertBuffersPulseSwallow" "false"
908
      "A" "" "" "" "PROP_SimModelOtherNetgenOpts" ""
909
      "A" "" "" "" "PROP_SimModelRetainHierarchy" "true"
910
      "A" "" "" "" "PROP_SimUseCustom_behav" "false"
911
      "A" "" "" "" "PROP_SimUseCustom_postMap" "false"
912
      "A" "" "" "" "PROP_SimUseCustom_postPar" "false"
913
      "A" "" "" "" "PROP_SimUseCustom_postXlate" "false"
914
      "A" "" "" "" "PROP_SynthCaseImplStyle" "None"
915
      "A" "" "" "" "PROP_SynthDecoderExtract" "true"
916
      "A" "" "" "" "PROP_SynthEncoderExtract" "Yes"
917
      "A" "" "" "" "PROP_SynthExtractMux" "Yes"
918
      "A" "" "" "" "PROP_SynthExtractRAM" "true"
919
      "A" "" "" "" "PROP_SynthExtractROM" "true"
920
      "A" "" "" "" "PROP_SynthFsmEncode" "Auto"
921
      "A" "" "" "" "PROP_SynthLogicalShifterExtract" "true"
922
      "A" "" "" "" "PROP_SynthOpt" "Speed"
923
      "A" "" "" "" "PROP_SynthOptEffort" "Normal"
924
      "A" "" "" "" "PROP_SynthResSharing" "true"
925
      "A" "" "" "" "PROP_SynthShiftRegExtract" "true"
926
      "A" "" "" "" "PROP_SynthTop" "Module|SysTop"
927
      "A" "" "" "" "PROP_SynthXORCollapse" "true"
928
      "A" "" "" "" "PROP_Top_Level_Module_Type" "HDL"
929
      "A" "" "" "" "PROP_UseDataGate" "true"
930
      "A" "" "" "" "PROP_UseSmartGuide" "false"
931
      "A" "" "" "" "PROP_UserBrowsedStrategyFiles" ""
932
      "A" "" "" "" "PROP_UserConstraintEditorPreference" "Constraints Editor"
933
      "A" "" "" "" "PROP_UserEditorCustomSetting" ""
934
      "A" "" "" "" "PROP_UserEditorPreference" "ISE Text Editor"
935
      "A" "" "" "" "PROP_XPowerOptInputTclScript" ""
936
      "A" "" "" "" "PROP_XPowerOptLoadPCFFile" "Default"
937
      "A" "" "" "" "PROP_XPowerOptLoadVCDFile" "Default"
938
      "A" "" "" "" "PROP_XPowerOptLoadXMLFile" "Default"
939
      "A" "" "" "" "PROP_XPowerOptOutputFile" "Default"
940
      "A" "" "" "" "PROP_XPowerOptVerboseRpt" "false"
941
      "A" "" "" "" "PROP_XPowerOtherXPowerOpts" ""
942
      "A" "" "" "" "PROP_XplorerMode" "Off"
943
      "A" "" "" "" "PROP_bitgen_otherCmdLineOptions" ""
944
      "A" "" "" "" "PROP_cpldBestFit" "false"
945
      "A" "" "" "" "PROP_cpldfitHDLeqStyle" "Source"
946
      "A" "" "" "" "PROP_cpldfit_otherCmdLineOptions" ""
947
      "A" "" "" "" "PROP_fitGenSimModel" "false"
948
      "A" "" "" "" "PROP_hprep6_autosig" "false"
949
      "A" "" "" "" "PROP_hprep6_otherCmdLineOptions" ""
950
      "A" "" "" "" "PROP_ibiswriterShowAllModels" "false"
951
      "A" "" "" "" "PROP_lockPinsUcfFile" ""
952
      "A" "" "" "" "PROP_mapIgnoreTimingConstraints" "false"
953
      "A" "" "" "" "PROP_mapUseRLOCConstraints" "true"
954
      "A" "" "" "" "PROP_map_otherCmdLineOptions" ""
955
      "A" "" "" "" "PROP_mpprRsltToCopy" ""
956
      "A" "" "" "" "PROP_mpprViewPadRptsForAllRslt" "true"
957
      "A" "" "" "" "PROP_mpprViewParRptsForAllRslt" "true"
958
      "A" "" "" "" "PROP_ngdbuildUseLOCConstraints" "true"
959
      "A" "" "" "" "PROP_ngdbuild_otherCmdLineOptions" ""
960
      "A" "" "" "" "PROP_parIgnoreTimingConstraints" "false"
961
      "A" "" "" "" "PROP_parUseTimingConstraints" "true"
962
      "A" "" "" "" "PROP_par_otherCmdLineOptions" ""
963
      "A" "" "" "" "PROP_primeCorrelateOutput" "false"
964
      "A" "" "" "" "PROP_primeFlatternOutputNetlist" "false"
965
      "A" "" "" "" "PROP_primeTopLevelModule" ""
966
      "A" "" "" "" "PROP_primetimeBlockRamData" ""
967
      "A" "" "" "" "PROP_taengine_otherCmdLineOptions" ""
968
      "A" "" "" "" "PROP_xcpldFitDesInit" "Low"
969
      "A" "" "" "" "PROP_xcpldFitDesInputLmt_xbr" "32"
970
      "A" "" "" "" "PROP_xcpldFitDesMultiLogicOpt" "true"
971
      "A" "" "" "" "PROP_xcpldFitDesSlew" "Fast"
972
      "A" "" "" "" "PROP_xcpldFitDesTimingCst" "true"
973
      "A" "" "" "" "PROP_xcpldFitDesTriMode" "Keeper"
974
      "A" "" "" "" "PROP_xcpldFitDesUnused" "Keeper"
975
      "A" "" "" "" "PROP_xcpldFitDesVolt" "LVCMOS18"
976
      "A" "" "" "" "PROP_xcpldFitTemplate_xpla3" "Optimize Density"
977
      "A" "" "" "" "PROP_xcpldFittimRptOption" "Summary"
978
      "A" "" "" "" "PROP_xcpldUseGlobalClocks" "true"
979
      "A" "" "" "" "PROP_xcpldUseGlobalOutputEnables" "true"
980
      "A" "" "" "" "PROP_xcpldUseGlobalSetReset" "true"
981
      "A" "" "" "" "PROP_xcpldUseLocConst" "Always"
982
      "A" "" "" "" "PROP_xilxBitgCfg_Code" "0xFFFFFFFF"
983
      "A" "" "" "" "PROP_xilxBitgCfg_DCMShutdown" "false"
984
      "A" "" "" "" "PROP_xilxBitgCfg_Done" "Pull Up"
985
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_ASCIIFile" "false"
986
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_BinaryFile" "false"
987
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_BitFile" "true"
988
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_Compress" "false"
989
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_DRC" "true"
990
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_EnableCRC" "true"
991
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_IEEE1532File" "false"
992
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_IEEE1532File_xbr" "false"
993
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_ReadBack" "false"
994
      "A" "" "" "" "PROP_xilxBitgCfg_Pgm" "Pull Up"
995
      "A" "" "" "" "PROP_xilxBitgCfg_TCK" "Pull Up"
996
      "A" "" "" "" "PROP_xilxBitgCfg_TDI" "Pull Up"
997
      "A" "" "" "" "PROP_xilxBitgCfg_TDO" "Pull Up"
998
      "A" "" "" "" "PROP_xilxBitgCfg_TMS" "Pull Up"
999
      "A" "" "" "" "PROP_xilxBitgCfg_Unused" "Pull Down"
1000
      "A" "" "" "" "PROP_xilxBitgReadBk_Sec" "Enable Readback and Reconfiguration"
1001
      "A" "" "" "" "PROP_xilxBitgStart_Clk" "CCLK"
1002
      "A" "" "" "" "PROP_xilxBitgStart_Clk_Done" "Default (4)"
1003
      "A" "" "" "" "PROP_xilxBitgStart_Clk_DriveDone" "false"
1004
      "A" "" "" "" "PROP_xilxBitgStart_Clk_EnOut" "Default (5)"
1005
      "A" "" "" "" "PROP_xilxBitgStart_Clk_RelDLL" "Default (NoWait)"
1006
      "A" "" "" "" "PROP_xilxBitgStart_Clk_WrtEn" "Default (6)"
1007
      "A" "" "" "" "PROP_xilxBitgStart_IntDone" "false"
1008
      "A" "" "" "" "PROP_xilxMapAllowLogicOpt" "false"
1009
      "A" "" "" "" "PROP_xilxMapCoverMode" "Area"
1010
      "A" "" "" "" "PROP_xilxMapDisableRegOrdering" "false"
1011
      "A" "" "" "" "PROP_xilxMapPackRegInto" "Off"
1012
      "A" "" "" "" "PROP_xilxMapReplicateLogic" "true"
1013
      "A" "" "" "" "PROP_xilxMapReportDetail" "false"
1014
      "A" "" "" "" "PROP_xilxMapSliceLogicInUnusedBRAMs" "false"
1015
      "A" "" "" "" "PROP_xilxMapTimingDrivenPacking" "false"
1016
      "A" "" "" "" "PROP_xilxMapTrimUnconnSig" "true"
1017
      "A" "" "" "" "PROP_xilxNgdbldIOPads" "false"
1018
      "A" "" "" "" "PROP_xilxNgdbldMacro" ""
1019
      "A" "" "" "" "PROP_xilxNgdbldNTType" "Timestamp"
1020
      "A" "" "" "" "PROP_xilxNgdbldUR" ""
1021
      "A" "" "" "" "PROP_xilxNgdbldUnexpBlks" "false"
1022
      "A" "" "" "" "PROP_xilxNgdbld_AUL" "false"
1023
      "A" "" "" "" "PROP_xilxPARplacerCostTable" "1"
1024
      "A" "" "" "" "PROP_xilxPARplacerEffortLevel" "None"
1025
      "A" "" "" "" "PROP_xilxPARrouterEffortLevel" "None"
1026
      "A" "" "" "" "PROP_xilxPARstrat" "Normal Place and Route"
1027
      "A" "" "" "" "PROP_xilxPARuseBondedIO" "false"
1028
      "A" "" "" "" "PROP_xilxPostTrceAdvAna" "false"
1029
      "A" "" "" "" "PROP_xilxPostTrceEndpointPath" ""
1030
      "A" "" "" "" "PROP_xilxPostTrceRpt" "Verbose Report"
1031
      "A" "" "" "" "PROP_xilxPostTrceRptLimit" "3"
1032
      "A" "" "" "" "PROP_xilxPostTrceStamp" ""
1033
      "A" "" "" "" "PROP_xilxPostTrceTSIFile" ""
1034
      "A" "" "" "" "PROP_xilxPostTrceUncovPath" ""
1035
      "A" "" "" "" "PROP_xilxPreTrceAdvAna" "false"
1036
      "A" "" "" "" "PROP_xilxPreTrceEndpointPath" ""
1037
      "A" "" "" "" "PROP_xilxPreTrceRpt" "Verbose Report"
1038
      "A" "" "" "" "PROP_xilxPreTrceRptLimit" "3"
1039
      "A" "" "" "" "PROP_xilxPreTrceUncovPath" ""
1040
      "A" "" "" "" "PROP_xilxSynthAddIObuf" "true"
1041
      "A" "" "" "" "PROP_xilxSynthGlobOpt" "AllClockNets"
1042
      "A" "" "" "" "PROP_xilxSynthKeepHierarchy" "No"
1043
      "A" "" "" "" "PROP_xilxSynthKeepHierarchy_CPLD" "Yes"
1044
      "A" "" "" "" "PROP_xilxSynthMacroPreserve" "true"
1045
      "A" "" "" "" "PROP_xilxSynthRegBalancing" "No"
1046
      "A" "" "" "" "PROP_xilxSynthRegDuplication" "true"
1047
      "A" "" "" "" "PROP_xilxSynthXORPreserve" "true"
1048
      "A" "" "" "" "PROP_xstAsynToSync" "false"
1049
      "A" "" "" "" "PROP_xstAutoBRAMPacking" "false"
1050
      "A" "" "" "" "PROP_xstBRAMUtilRatio" "100"
1051
      "A" "" "" "" "PROP_xstBusDelimiter" "<>"
1052
      "A" "" "" "" "PROP_xstCase" "Maintain"
1053
      "A" "" "" "" "PROP_xstCoresSearchDir" ""
1054
      "A" "" "" "" "PROP_xstCrossClockAnalysis" "false"
1055
      "A" "" "" "" "PROP_xstEquivRegRemoval" "true"
1056
      "A" "" "" "" "PROP_xstFsmStyle" "LUT"
1057
      "A" "" "" "" "PROP_xstGenerateRTLNetlist" "Yes"
1058
      "A" "" "" "" "PROP_xstGenericsParameters" ""
1059
      "A" "" "" "" "PROP_xstHierarchySeparator" "/"
1060
      "A" "" "" "" "PROP_xstIniFile" ""
1061
      "A" "" "" "" "PROP_xstLibSearchOrder" ""
1062
      "A" "" "" "" "PROP_xstNetlistHierarchy" "As Optimized"
1063
      "A" "" "" "" "PROP_xstOptimizeInsPrimtives" "false"
1064
      "A" "" "" "" "PROP_xstPackIORegister" "Auto"
1065
      "A" "" "" "" "PROP_xstReadCores" "true"
1066
      "A" "" "" "" "PROP_xstSlicePacking" "true"
1067
      "A" "" "" "" "PROP_xstSliceUtilRatio" "100"
1068
      "A" "" "" "" "PROP_xstUseClockEnable" "Yes"
1069
      "A" "" "" "" "PROP_xstUseSyncReset" "Yes"
1070
      "A" "" "" "" "PROP_xstUseSyncSet" "Yes"
1071
      "A" "" "" "" "PROP_xstUseSynthConstFile" "true"
1072
      "A" "" "" "" "PROP_xstUserCompileList" ""
1073
      "A" "" "" "" "PROP_xstVeriIncludeDir_Global" ""
1074
      "A" "" "" "" "PROP_xstVerilog2001" "true"
1075
      "A" "" "" "" "PROP_xstVerilogMacros" ""
1076
      "A" "" "" "" "PROP_xstWorkDir" "./xst"
1077
      "A" "" "" "" "PROP_xstWriteTimingConstraints" "false"
1078
      "A" "" "" "" "PROP_xst_otherCmdLineOptions" ""
1079
      "A" "" "" "PROP_SteCreatedBy" "PROP_SteCreatedBy" ""
1080
      "A" "AutoGeneratedView" "VIEW_Post-MapPreSimulation" "" "PROP_TopDesignUnit" ""
1081
      "A" "AutoGeneratedView" "VIEW_Post-ParPreSimulation" "" "PROP_TopDesignUnit" ""
1082
      "A" "AutoGeneratedView" "VIEW_Post-TranslatePreSimulation" "" "PROP_TopDesignUnit" ""
1083
      "A" "AutoGeneratedView" "VIEW_PostAbstractSimulation" "" "PROP_TopDesignUnit" ""
1084
      "A" "AutoGeneratedView" "VIEW_TBWPost-MapPreSimulation" "" "PROP_TopDesignUnit" ""
1085
      "A" "AutoGeneratedView" "VIEW_TBWPost-ParPreSimulation" "" "PROP_TopDesignUnit" ""
1086
      "A" "AutoGeneratedView" "VIEW_TBWPost-TranslatePreSimulation" "" "PROP_TopDesignUnit" ""
1087
      "A" "AutoGeneratedView" "VIEW_XSTPreSynthesis" "" "PROP_TopDesignUnit" ""
1088
      "A" "AutoGeneratedView" "VIEW_XSTPreSynthesis" "" "PROP_xstVeriIncludeDir" ""
1089
      "B" "" "" "" "PROP_DevFamily" "Spartan3E"
1090
      "B" "" "" "" "PROP_FitterOptimization_xpla3" "Density"
1091
      "B" "" "" "" "PROP_MapEffortLevel" "Medium"
1092
      "B" "" "" "" "PROP_MapLogicOptimization" "false"
1093
      "B" "" "" "" "PROP_MapPlacerCostTable" "1"
1094
      "B" "" "" "" "PROP_MapPowerReduction" "false"
1095
      "B" "" "" "" "PROP_MapRegDuplication" "false"
1096
      "B" "" "" "" "PROP_ModelSimConfigName" "Default"
1097
      "B" "" "" "" "PROP_ModelSimDataWin" "false"
1098
      "B" "" "" "" "PROP_ModelSimListWin" "false"
1099
      "B" "" "" "" "PROP_ModelSimProcWin" "false"
1100
      "B" "" "" "" "PROP_ModelSimSignalWin" "true"
1101
      "B" "" "" "" "PROP_ModelSimSimRes" "Default (1 ps)"
1102
      "B" "" "" "" "PROP_ModelSimSimRunTime_tb" "1000ns"
1103
      "B" "" "" "" "PROP_ModelSimSimRunTime_tbw" "1000ns"
1104
      "B" "" "" "" "PROP_ModelSimSourceWin" "false"
1105
      "B" "" "" "" "PROP_ModelSimStructWin" "true"
1106
      "B" "" "" "" "PROP_ModelSimUutInstName_postFit" "UUT"
1107
      "B" "" "" "" "PROP_ModelSimUutInstName_postMap" "UUT"
1108
      "B" "" "" "" "PROP_ModelSimUutInstName_postPar" "UUT"
1109
      "B" "" "" "" "PROP_ModelSimVarsWin" "false"
1110
      "B" "" "" "" "PROP_ModelSimWaveWin" "true"
1111
      "B" "" "" "" "PROP_SimCustom_behav" ""
1112
      "B" "" "" "" "PROP_SimCustom_postMap" ""
1113
      "B" "" "" "" "PROP_SimCustom_postPar" ""
1114
      "B" "" "" "" "PROP_SimCustom_postXlate" ""
1115
      "B" "" "" "" "PROP_SimGenVcdFile" "false"
1116
      "B" "" "" "" "PROP_SimModelRenTopLevInstTo" "UUT"
1117
      "B" "" "" "" "PROP_SimSyntax" "93"
1118
      "B" "" "" "" "PROP_SimUseExpDeclOnly" "true"
1119
      "B" "" "" "" "PROP_SimUserCompileList_behav" ""
1120
      "B" "" "" "" "PROP_Simulator" "Modelsim-SE Mixed"
1121
      "B" "" "" "" "PROP_SmartGuideFileName" "SysTop_guide.ncd"
1122
      "B" "" "" "" "PROP_SynthConstraintsFile" ""
1123
      "B" "" "" "" "PROP_SynthMuxStyle" "Auto"
1124
      "B" "" "" "" "PROP_SynthRAMStyle" "Auto"
1125
      "B" "" "" "" "PROP_XPowerOptAdvancedVerboseRpt" "false"
1126
      "B" "" "" "" "PROP_XPowerOptMaxNumberLines" "1000"
1127
      "B" "" "" "" "PROP_impactPort" "Auto - default"
1128
      "B" "" "" "" "PROP_mapTimingMode" "Non Timing Driven"
1129
      "B" "" "" "" "PROP_mpprViewPadRptForSelRslt" ""
1130
      "B" "" "" "" "PROP_mpprViewParRptForSelRslt" ""
1131
      "B" "" "" "" "PROP_parGenAsyDlyRpt" "false"
1132
      "B" "" "" "" "PROP_parGenClkRegionRpt" "false"
1133
      "B" "" "" "" "PROP_parGenSimModel" "false"
1134
      "B" "" "" "" "PROP_parGenTimingRpt" "true"
1135
      "B" "" "" "" "PROP_parMpprNodelistFile" ""
1136
      "B" "" "" "" "PROP_parMpprParIterations" "3"
1137
      "B" "" "" "" "PROP_parMpprResultsDirectory" ""
1138
      "B" "" "" "" "PROP_parMpprResultsToSave" ""
1139
      "B" "" "" "" "PROP_parPowerReduction" "false"
1140
      "B" "" "" "" "PROP_parTimingMode" "Performance Evaluation"
1141
      "B" "" "" "" "PROP_vcom_otherCmdLineOptions" ""
1142
      "B" "" "" "" "PROP_vlog_otherCmdLineOptions" ""
1143
      "B" "" "" "" "PROP_vsim_otherCmdLineOptions" ""
1144
      "B" "" "" "" "PROP_xcpldFitDesInReg_xbr" "true"
1145
      "B" "" "" "" "PROP_xcpldFitDesPtermLmt_xbr" "28"
1146
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_DbgBitStr" "false"
1147
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_LogicAllocFile" "false"
1148
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_MaskFile" "false"
1149
      "B" "" "" "" "PROP_xilxBitgReadBk_GenBitStr" "false"
1150
      "B" "" "" "" "PROP_xilxMapPackfactor" "100"
1151
      "B" "" "" "" "PROP_xilxPAReffortLevel" "Standard"
1152
      "B" "" "" "" "PROP_xstMoveFirstFfStage" "true"
1153
      "B" "" "" "" "PROP_xstMoveLastFfStage" "true"
1154
      "B" "" "" "" "PROP_xstROMStyle" "Auto"
1155
      "B" "" "" "" "PROP_xstSafeImplement" "No"
1156
      "B" "AutoGeneratedView" "VIEW_Map" "" "PROP_ParSmartGuideFileName" "SysTop_guide.ncd"
1157
      "B" "AutoGeneratedView" "VIEW_Translation" "" "PROP_MapSmartGuideFileName" "SysTop_guide.ncd"
1158
      "C" "" "" "" "PROP_CompxlibLang" "All"
1159
      "C" "" "" "" "PROP_CompxlibSimPath" "/home/daniel/Applications/modelsim6.5e_1/modeltech/linux"
1160
      "C" "" "" "" "PROP_DevDevice" "xc3s500e"
1161
      "C" "" "" "" "PROP_DevFamilyPMName" "spartan3e"
1162
      "C" "" "" "" "PROP_MapExtraEffort" "None"
1163
      "C" "" "" "" "PROP_MapPowerActivityFile" ""
1164
      "C" "" "" "" "PROP_SimModelGenMultiHierFile" "false"
1165
      "C" "" "" "" "PROP_parPowerActivityFile" ""
1166
      "C" "" "" "" "PROP_xilxPARextraEffortLevel" "None"
1167
      "D" "" "" "" "PROP_CompxlibUni9000Lib" "true"
1168
      "D" "" "" "" "PROP_CompxlibUniSimLib" "true"
1169
      "D" "" "" "" "PROP_DevPackage" "fg320"
1170
      "D" "" "" "" "PROP_Synthesis_Tool" "XST (VHDL/Verilog)"
1171
      "E" "" "" "" "PROP_DevSpeed" "-4"
1172
      "E" "" "" "" "PROP_PreferredLanguage" "Verilog"
1173
      "F" "" "" "" "PROP_ChangeDevSpeed" "-4"
1174
      "F" "" "" "" "PROP_SimModelTarget" "Verilog"
1175
      "F" "" "" "" "PROP_tbwTestbenchTargetLang" "Verilog"
1176
      "F" "" "" "" "PROP_xilxPostTrceSpeed" "-4"
1177
      "F" "" "" "" "PROP_xilxPreTrceSpeed" "-4"
1178
      "G" "" "" "" "PROP_SimModelAutoInsertGlblModuleInNetlist" "true"
1179
      "G" "" "" "" "PROP_SimModelGenArchOnly" "false"
1180
      "G" "" "" "" "PROP_SimModelIncSdfAnnInVerilogFile" "true"
1181
      "G" "" "" "" "PROP_SimModelIncSimprimInVerilogFile" "false"
1182
      "G" "" "" "" "PROP_SimModelIncUnisimInVerilogFile" "false"
1183
      "G" "" "" "" "PROP_SimModelIncUselibDirInVerilogFile" "false"
1184
      "G" "" "" "" "PROP_SimModelNoEscapeSignal" "false"
1185
      "G" "" "" "" "PROP_SimModelOutputExtIdent" "false"
1186
      "G" "" "" "" "PROP_SimModelRenTopLevArchTo" "Structure"
1187
      "G" "" "" "" "PROP_SimModelRenTopLevMod" ""
1188
      "G" "" "" "" "PROP_bencherPostMapTestbenchName" ""
1189
      "G" "" "" "" "PROP_bencherPostParTestbenchName" ""
1190
      "G" "" "" "" "PROP_bencherPostXlateTestbenchName" ""
1191
      "G" "" "" "" "PROP_netgenPostMapSimModelName" "SysTop_map.v"
1192
      "G" "" "" "" "PROP_netgenPostParSimModelName" "SysTop_timesim.v"
1193
      "G" "" "" "" "PROP_netgenPostSynthesisSimModelName" "SysTop_synthesis.v"
1194
      "G" "" "" "" "PROP_netgenPostXlateSimModelName" "SysTop_translate.v"
1195
      "G" "AutoGeneratedView" "VIEW_Map" "" "PROP_PostMapSimModelName" "SysTop_map.v"
1196
      "G" "AutoGeneratedView" "VIEW_Par" "" "PROP_PostParSimModelName" "SysTop_timesim.v"
1197
      "G" "AutoGeneratedView" "VIEW_Post-MapAbstractSimulation" "" "PROP_tbwPostMapTestbenchName" ""
1198
      "G" "AutoGeneratedView" "VIEW_Post-ParAbstractSimulation" "" "PROP_tbwPostParTestbenchName" ""
1199
      "G" "AutoGeneratedView" "VIEW_Post-TranslateAbstractSimulation" "" "PROP_tbwPostXlateTestbenchName" ""
1200
      "G" "AutoGeneratedView" "VIEW_Structural" "" "PROP_PostSynthesisSimModelName" "SysTop_synthesis.v"
1201
      "G" "AutoGeneratedView" "VIEW_TBWPost-MapPreSimulation" "" "PROP_tbwPostMapTestbenchName" ""
1202
      "G" "AutoGeneratedView" "VIEW_TBWPost-ParPreSimulation" "" "PROP_tbwPostParTestbenchName" ""
1203
      "G" "AutoGeneratedView" "VIEW_TBWPost-TranslatePreSimulation" "" "PROP_tbwPostXlateTestbenchName" ""
1204
      "G" "AutoGeneratedView" "VIEW_Translation" "" "PROP_PostXlateSimModelName" "SysTop_translate.v"
1205
      "H" "" "" "" "PROP_SimModelBringOutGsrNetAsAPort" "false"
1206
      "H" "" "" "" "PROP_SimModelBringOutGtsNetAsAPort" "false"
1207
      "H" "" "" "" "PROP_SimModelPathUsedInSdfAnn" "Default"
1208
      "H" "" "" "" "PROP_netgenRenameTopLevEntTo" ""
1209
      "I" "" "" "" "PROP_SimModelGsrPortName" "GSR_PORT"
1210
      "I" "" "" "" "PROP_SimModelGtsPortName" "GTS_PORT"
1211
      "I" "" "" "" "PROP_SimModelRocPulseWidth" "100"
1212
      "I" "" "" "" "PROP_SimModelTocPulseWidth" "0"}
1213
 
1214
  HandleException {
1215
    RestoreProcessProperties $iProjHelper $process_props
1216
  } "A problem occured while restoring process properties."
1217
 
1218
   # library names and their members
1219
   set libraries {
1220
   }
1221
 
1222
  HandleException {
1223
    RestoreSourceLibraries $iProjHelper $libraries
1224
  } "A problem occured while restoring source libraries."
1225
 
1226
   # partition names for recreation
1227
   set partition_names {
1228
   }
1229
 
1230
  HandleException {
1231
    RestorePartitions $partition_names
1232
  } "A problem occured while restoring partitions."
1233
 
1234
   # Close the facilitator project.
1235
   CloseFacilProject $iProjHelper
1236
 
1237
   # cd into the project directory before trying to open thr project
1238
   cd $project_dir
1239
 
1240
   set proj_file_full_path [file join $project_dir $project_file]
1241
   INFO "Opening restored project file \"$proj_file_full_path\" ..."
1242
 
1243
   # Open the restored project in the user's client application,
1244
   # which will either be the Projnav GUI or xtclsh.
1245
   project open $project_file
1246
 
1247
   # Let the user know about the backed up project file.
1248
   INFO "The project \"$project_file\" was successfully recovered and opened."
1249
   if {$wasBackedUp} {
1250
      INFO ""
1251
      INFO "The original project was renamed as \"$backup_file\"."
1252
      INFO "Please open a Technical Support WebCase at"
1253
      INFO "www.xilinx.com/support/clearexpress/websupport.htm"
1254
      INFO "and submit this file, along with the project source files, for evaluation."
1255
   }
1256
}
1257
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.