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

Subversion Repositories blue

[/] [blue/] [trunk/] [blue8/] [xblue.restore] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wd5gnr
# 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 "xblue.restore"
741
   set project_file "xblue.ise"
742
   set backup_file "xblue.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" "Spartan3"
822
     "PROP_DevDevice" "xc3s200"
823
     "PROP_DevPackage" "ft256"
824
     "PROP_DevSpeed" "-4"
825
     "PROP_Top_Level_Module_Type" "HDL"
826
     "PROP_Synthesis_Tool" "XST (VHDL/Verilog)"
827
     "PROP_Simulator" "Modelsim-XE Verilog"
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
      "FrontPanel.v"
840
      "UCF.xls"
841
      "alu.v"
842
      "asm2bin.awk"
843
      "blue-instructions.xls"
844
      "blue.pl"
845
      "control.v"
846
      "control1.v"
847
      "idecode.v"
848
      "io.v"
849
      "jkff.v"
850
      "maindcm.xaw"
851
      "misc.v"
852
      "rcvr.v"
853
      "switchsync.v"
854
      "tbuart.tbw"
855
      "todo.txt"
856
      "top.v"
857
      "topbox.ucf"
858
      "topbox.v"
859
      "txmit.v"
860
      "uart.v"}
861
 
862
  HandleException {
863
    AddUserFiles $iProjHelper $user_files
864
  } "A problem occured while restoring user files."
865
 
866
  set imported_files {
867
      "topbox_last_par.ncd"}
868
 
869
  set origination 2
870
 
871
  HandleException {
872
    AddImportedFiles $iProjHelper $imported_files $origination
873
  } "A problem occured while restoring imported files."
874
 
875
  set process_props {
876
      "A" "" "" "" "PROPEXT_SynthMultStyle_virtex2" "Auto"
877
      "A" "" "" "" "PROPEXT_xilxBitgCfg_DCIUpdateMode_spartan3" "As Required"
878
      "A" "" "" "" "PROPEXT_xilxBitgCfg_Rate_spartan3" "Default (6)"
879
      "A" "" "" "" "PROPEXT_xilxMapGenInputK_virtex2" "4"
880
      "A" "" "" "" "PROPEXT_xilxSynthAddBufg_spartan3" "8"
881
      "A" "" "" "" "PROPEXT_xilxSynthMaxFanout_virtex2" "500"
882
      "A" "" "" "" "PROP_AutoGenFile" "false"
883
      "A" "" "" "" "PROP_BehavioralSimTop" "Module|topbox"
884
      "A" "" "" "" "PROP_CPLDFitkeepio" "false"
885
      "A" "" "" "" "PROP_CompxlibAbelLib" "true"
886
      "A" "" "" "" "PROP_CompxlibCPLDDetLib" "true"
887
      "A" "" "" "" "PROP_CompxlibOtherCompxlibOpts" ""
888
      "A" "" "" "" "PROP_CompxlibOutputDir" "$XILINX//"
889
      "A" "" "" "" "PROP_CompxlibOverwriteLib" "Overwrite"
890
      "A" "" "" "" "PROP_CompxlibSimPrimatives" "true"
891
      "A" "" "" "" "PROP_CompxlibXlnxCoreLib" "true"
892
      "A" "" "" "" "PROP_CurrentFloorplanFile" ""
893
      "A" "" "" "" "PROP_DesignName" "xblue"
894
      "A" "" "" "" "PROP_Dummy" "dum1"
895
      "A" "" "" "" "PROP_EnableWYSIWYG" "None"
896
      "A" "" "" "" "PROP_Enable_Incremental_Messaging" "false"
897
      "A" "" "" "" "PROP_Enable_Message_Capture" "true"
898
      "A" "" "" "" "PROP_Enable_Message_Filtering" "false"
899
      "A" "" "" "" "PROP_FitterReportFormat" "HTML"
900
      "A" "" "" "" "PROP_FlowDebugLevel" "0"
901
      "A" "" "" "" "PROP_FunctionBlockInputLimit" "38"
902
      "A" "" "" "" "PROP_ImpactProjectFile" "Default"
903
      "A" "" "" "" "PROP_LastAppliedGoal" "Balanced"
904
      "A" "" "" "" "PROP_LastAppliedStrategy" "Xilinx Default (unlocked)"
905
      "A" "" "" "" "PROP_LastUnlockStatus" "false"
906
      "A" "" "" "" "PROP_MSimSDFTimingToBeRead" "Setup Time"
907
      "A" "" "" "" "PROP_ModelSimUseConfigName" "false"
908
      "A" "" "" "" "PROP_Parse_Target" "synthesis"
909
      "A" "" "" "" "PROP_PartitionCreateDelete" ""
910
      "A" "" "" "" "PROP_PartitionForcePlacement" ""
911
      "A" "" "" "" "PROP_PartitionForceSynth" ""
912
      "A" "" "" "" "PROP_PartitionForceTranslate" ""
913
      "A" "" "" "" "PROP_PlsClockEnable" "true"
914
      "A" "" "" "" "PROP_PostMapSimTop" "Module|tbuart"
915
      "A" "" "" "" "PROP_PostParSimTop" "Module|tbuart"
916
      "A" "" "" "" "PROP_PostSynthSimTop" "Module|tbuart"
917
      "A" "" "" "" "PROP_PostTrceFastPath" "false"
918
      "A" "" "" "" "PROP_PostTrceGenDatasheet" "true"
919
      "A" "" "" "" "PROP_PostTrceGenTimegroups" "false"
920
      "A" "" "" "" "PROP_PostXlateSimTop" "Module|tbuart"
921
      "A" "" "" "" "PROP_PreTrceFastPath" "false"
922
      "A" "" "" "" "PROP_PreTrceGenDatasheet" "true"
923
      "A" "" "" "" "PROP_PreTrceGenTimegroups" "false"
924
      "A" "" "" "" "PROP_PreTrceTSIFile" ""
925
      "A" "" "" "" "PROP_SimDo" "true"
926
      "A" "" "" "" "PROP_SimModelGenerateTestbenchFile" "false"
927
      "A" "" "" "" "PROP_SimModelInsertBuffersPulseSwallow" "false"
928
      "A" "" "" "" "PROP_SimModelOtherNetgenOpts" ""
929
      "A" "" "" "" "PROP_SimModelRetainHierarchy" "true"
930
      "A" "" "" "" "PROP_SimUseCustom_behav" "true"
931
      "A" "" "" "" "PROP_SimUseCustom_postMap" "false"
932
      "A" "" "" "" "PROP_SimUseCustom_postPar" "false"
933
      "A" "" "" "" "PROP_SimUseCustom_postXlate" "false"
934
      "A" "" "" "" "PROP_SynthCaseImplStyle" "Full"
935
      "A" "" "" "" "PROP_SynthDecoderExtract" "true"
936
      "A" "" "" "" "PROP_SynthEncoderExtract" "Yes"
937
      "A" "" "" "" "PROP_SynthExtractMux" "Yes"
938
      "A" "" "" "" "PROP_SynthExtractRAM" "true"
939
      "A" "" "" "" "PROP_SynthExtractROM" "true"
940
      "A" "" "" "" "PROP_SynthFsmEncode" "Auto"
941
      "A" "" "" "" "PROP_SynthLogicalShifterExtract" "true"
942
      "A" "" "" "" "PROP_SynthOpt" "Speed"
943
      "A" "" "" "" "PROP_SynthOptEffort" "High"
944
      "A" "" "" "" "PROP_SynthResSharing" "true"
945
      "A" "" "" "" "PROP_SynthShiftRegExtract" "true"
946
      "A" "" "" "" "PROP_SynthTop" "Module|topbox"
947
      "A" "" "" "" "PROP_SynthXORCollapse" "true"
948
      "A" "" "" "" "PROP_Top_Level_Module_Type" "HDL"
949
      "A" "" "" "" "PROP_UseDataGate" "true"
950
      "A" "" "" "" "PROP_UseSmartGuide" "false"
951
      "A" "" "" "" "PROP_UserConstraintEditorPreference" "Constraints Editor"
952
      "A" "" "" "" "PROP_UserEditorCustomSetting" ""
953
      "A" "" "" "" "PROP_UserEditorPreference" "ISE Text Editor"
954
      "A" "" "" "" "PROP_XPowerOptInputTclScript" ""
955
      "A" "" "" "" "PROP_XPowerOptLoadPCFFile" "Default"
956
      "A" "" "" "" "PROP_XPowerOptLoadVCDFile" "Default"
957
      "A" "" "" "" "PROP_XPowerOptLoadXMLFile" "Default"
958
      "A" "" "" "" "PROP_XPowerOptOutputFile" "Default"
959
      "A" "" "" "" "PROP_XPowerOptVerboseRpt" "false"
960
      "A" "" "" "" "PROP_XPowerOtherXPowerOpts" ""
961
      "A" "" "" "" "PROP_XplorerMode" "Off"
962
      "A" "" "" "" "PROP_bitgen_otherCmdLineOptions" ""
963
      "A" "" "" "" "PROP_cpldBestFit" "false"
964
      "A" "" "" "" "PROP_cpldfitHDLeqStyle" "Source"
965
      "A" "" "" "" "PROP_cpldfit_otherCmdLineOptions" ""
966
      "A" "" "" "" "PROP_fitGenSimModel" "false"
967
      "A" "" "" "" "PROP_hprep6_autosig" "false"
968
      "A" "" "" "" "PROP_hprep6_otherCmdLineOptions" ""
969
      "A" "" "" "" "PROP_ibiswriterShowAllModels" "false"
970
      "A" "" "" "" "PROP_lockPinsUcfFile" ""
971
      "A" "" "" "" "PROP_mapIgnoreTimingConstraints" "false"
972
      "A" "" "" "" "PROP_mapTimingAnalyzerLoadDesign" "true"
973
      "A" "" "" "" "PROP_mapUseRLOCConstraints" "true"
974
      "A" "" "" "" "PROP_map_otherCmdLineOptions" ""
975
      "A" "" "" "" "PROP_mpprRsltToCopy" ""
976
      "A" "" "" "" "PROP_mpprViewPadRptsForAllRslt" "true"
977
      "A" "" "" "" "PROP_mpprViewParRptsForAllRslt" "true"
978
      "A" "" "" "" "PROP_ngdbuildUseLOCConstraints" "true"
979
      "A" "" "" "" "PROP_ngdbuild_otherCmdLineOptions" ""
980
      "A" "" "" "" "PROP_parIgnoreTimingConstraints" "false"
981
      "A" "" "" "" "PROP_parTimingAnalyzerLoadDesign" "true"
982
      "A" "" "" "" "PROP_par_otherCmdLineOptions" ""
983
      "A" "" "" "" "PROP_primeCorrelateOutput" "false"
984
      "A" "" "" "" "PROP_primeFlatternOutputNetlist" "false"
985
      "A" "" "" "" "PROP_primeTopLevelModule" ""
986
      "A" "" "" "" "PROP_primetimeBlockRamData" ""
987
      "A" "" "" "" "PROP_taengine_otherCmdLineOptions" ""
988
      "A" "" "" "" "PROP_xcpldFitDesInit" "Low"
989
      "A" "" "" "" "PROP_xcpldFitDesInputLmt_xbr" "32"
990
      "A" "" "" "" "PROP_xcpldFitDesMultiLogicOpt" "true"
991
      "A" "" "" "" "PROP_xcpldFitDesSlew" "Fast"
992
      "A" "" "" "" "PROP_xcpldFitDesTimingCst" "true"
993
      "A" "" "" "" "PROP_xcpldFitDesTriMode" "Keeper"
994
      "A" "" "" "" "PROP_xcpldFitDesUnused" "Keeper"
995
      "A" "" "" "" "PROP_xcpldFitDesVolt" "LVCMOS18"
996
      "A" "" "" "" "PROP_xcpldFitTemplate_xpla3" "Optimize Density"
997
      "A" "" "" "" "PROP_xcpldFittimRptOption" "Summary"
998
      "A" "" "" "" "PROP_xcpldUseGlobalClocks" "true"
999
      "A" "" "" "" "PROP_xcpldUseGlobalOutputEnables" "true"
1000
      "A" "" "" "" "PROP_xcpldUseGlobalSetReset" "true"
1001
      "A" "" "" "" "PROP_xcpldUseLocConst" "Always"
1002
      "A" "" "" "" "PROP_xilxBitgCfg_Clk" "Pull Up"
1003
      "A" "" "" "" "PROP_xilxBitgCfg_Code" "0xFFFFFFFF"
1004
      "A" "" "" "" "PROP_xilxBitgCfg_DCMShutdown" "false"
1005
      "A" "" "" "" "PROP_xilxBitgCfg_Done" "Pull Up"
1006
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_ASCIIFile" "false"
1007
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_BinaryFile" "false"
1008
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_BitFile" "true"
1009
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_Compress" "false"
1010
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_DRC" "true"
1011
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_EnableCRC" "true"
1012
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_IEEE1532File" "false"
1013
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_IEEE1532File_xbr" "false"
1014
      "A" "" "" "" "PROP_xilxBitgCfg_GenOpt_ReadBack" "false"
1015
      "A" "" "" "" "PROP_xilxBitgCfg_M0" "Pull Up"
1016
      "A" "" "" "" "PROP_xilxBitgCfg_M1" "Pull Up"
1017
      "A" "" "" "" "PROP_xilxBitgCfg_M2" "Pull Up"
1018
      "A" "" "" "" "PROP_xilxBitgCfg_Pgm" "Pull Up"
1019
      "A" "" "" "" "PROP_xilxBitgCfg_TCK" "Pull Up"
1020
      "A" "" "" "" "PROP_xilxBitgCfg_TDI" "Pull Up"
1021
      "A" "" "" "" "PROP_xilxBitgCfg_TDO" "Pull Up"
1022
      "A" "" "" "" "PROP_xilxBitgCfg_TMS" "Pull Up"
1023
      "A" "" "" "" "PROP_xilxBitgCfg_Unused" "Pull Down"
1024
      "A" "" "" "" "PROP_xilxBitgReadBk_Sec" "Enable Readback and Reconfiguration"
1025
      "A" "" "" "" "PROP_xilxBitgStart_Clk" "CCLK"
1026
      "A" "" "" "" "PROP_xilxBitgStart_Clk_Done" "6"
1027
      "A" "" "" "" "PROP_xilxBitgStart_Clk_DriveDone" "false"
1028
      "A" "" "" "" "PROP_xilxBitgStart_Clk_EnOut" "3"
1029
      "A" "" "" "" "PROP_xilxBitgStart_Clk_MatchCycle" "NoWait"
1030
      "A" "" "" "" "PROP_xilxBitgStart_Clk_RelDLL" "4"
1031
      "A" "" "" "" "PROP_xilxBitgStart_Clk_WrtEn" "5"
1032
      "A" "" "" "" "PROP_xilxBitgStart_IntDone" "false"
1033
      "A" "" "" "" "PROP_xilxMapAllowLogicOpt" "false"
1034
      "A" "" "" "" "PROP_xilxMapCoverMode" "Area"
1035
      "A" "" "" "" "PROP_xilxMapDisableRegOrdering" "false"
1036
      "A" "" "" "" "PROP_xilxMapPackRegInto" "Off"
1037
      "A" "" "" "" "PROP_xilxMapReplicateLogic" "true"
1038
      "A" "" "" "" "PROP_xilxMapReportDetail" "false"
1039
      "A" "" "" "" "PROP_xilxMapSliceLogicInUnusedBRAMs" "false"
1040
      "A" "" "" "" "PROP_xilxMapTimingDrivenPacking" "true"
1041
      "A" "" "" "" "PROP_xilxMapTrimUnconnSig" "true"
1042
      "A" "" "" "" "PROP_xilxNgdbldIOPads" "false"
1043
      "A" "" "" "" "PROP_xilxNgdbldMacro" ""
1044
      "A" "" "" "" "PROP_xilxNgdbldNTType" "Timestamp"
1045
      "A" "" "" "" "PROP_xilxNgdbldUR" ""
1046
      "A" "" "" "" "PROP_xilxNgdbldUnexpBlks" "false"
1047
      "A" "" "" "" "PROP_xilxNgdbld_AUL" "false"
1048
      "A" "" "" "" "PROP_xilxPARplacerCostTable" "1"
1049
      "A" "" "" "" "PROP_xilxPARplacerEffortLevel" "None"
1050
      "A" "" "" "" "PROP_xilxPARrouterEffortLevel" "None"
1051
      "A" "" "" "" "PROP_xilxPARstrat" "Normal Place and Route"
1052
      "A" "" "" "" "PROP_xilxPARuseBondedIO" "false"
1053
      "A" "" "" "" "PROP_xilxPostTrceAdvAna" "false"
1054
      "A" "" "" "" "PROP_xilxPostTrceEndpointPath" ""
1055
      "A" "" "" "" "PROP_xilxPostTrceRpt" "Verbose Report"
1056
      "A" "" "" "" "PROP_xilxPostTrceRptLimit" "3"
1057
      "A" "" "" "" "PROP_xilxPostTrceStamp" ""
1058
      "A" "" "" "" "PROP_xilxPostTrceTSIFile" ""
1059
      "A" "" "" "" "PROP_xilxPostTrceUncovPath" ""
1060
      "A" "" "" "" "PROP_xilxPreTrceAdvAna" "false"
1061
      "A" "" "" "" "PROP_xilxPreTrceEndpointPath" ""
1062
      "A" "" "" "" "PROP_xilxPreTrceRpt" "Verbose Report"
1063
      "A" "" "" "" "PROP_xilxPreTrceRptLimit" "3"
1064
      "A" "" "" "" "PROP_xilxPreTrceUncovPath" ""
1065
      "A" "" "" "" "PROP_xilxSynthAddIObuf" "true"
1066
      "A" "" "" "" "PROP_xilxSynthGlobOpt" "AllClockNets"
1067
      "A" "" "" "" "PROP_xilxSynthKeepHierarchy" "No"
1068
      "A" "" "" "" "PROP_xilxSynthKeepHierarchy_CPLD" "Yes"
1069
      "A" "" "" "" "PROP_xilxSynthMacroPreserve" "true"
1070
      "A" "" "" "" "PROP_xilxSynthRegBalancing" "Yes"
1071
      "A" "" "" "" "PROP_xilxSynthRegDuplication" "true"
1072
      "A" "" "" "" "PROP_xilxSynthXORPreserve" "true"
1073
      "A" "" "" "" "PROP_xstAsynToSync" "false"
1074
      "A" "" "" "" "PROP_xstAutoBRAMPacking" "false"
1075
      "A" "" "" "" "PROP_xstBRAMUtilRatio" "100"
1076
      "A" "" "" "" "PROP_xstBusDelimiter" "<>"
1077
      "A" "" "" "" "PROP_xstCase" "Maintain"
1078
      "A" "" "" "" "PROP_xstCoresSearchDir" ""
1079
      "A" "" "" "" "PROP_xstCrossClockAnalysis" "true"
1080
      "A" "" "" "" "PROP_xstEquivRegRemoval" "true"
1081
      "A" "" "" "" "PROP_xstFsmStyle" "LUT"
1082
      "A" "" "" "" "PROP_xstGenerateRTLNetlist" "Yes"
1083
      "A" "" "" "" "PROP_xstGenericsParameters" ""
1084
      "A" "" "" "" "PROP_xstHierarchySeparator" "/"
1085
      "A" "" "" "" "PROP_xstIniFile" ""
1086
      "A" "" "" "" "PROP_xstLibSearchOrder" ""
1087
      "A" "" "" "" "PROP_xstNetlistHierarchy" "As Optimized"
1088
      "A" "" "" "" "PROP_xstOptimizeInsPrimtives" "true"
1089
      "A" "" "" "" "PROP_xstPackIORegister" "Auto"
1090
      "A" "" "" "" "PROP_xstReadCores" "true"
1091
      "A" "" "" "" "PROP_xstSlicePacking" "true"
1092
      "A" "" "" "" "PROP_xstSliceUtilRatio" "100"
1093
      "A" "" "" "" "PROP_xstUseClockEnable" "Yes"
1094
      "A" "" "" "" "PROP_xstUseSyncReset" "Yes"
1095
      "A" "" "" "" "PROP_xstUseSyncSet" "Yes"
1096
      "A" "" "" "" "PROP_xstUseSynthConstFile" "true"
1097
      "A" "" "" "" "PROP_xstUserCompileList" ""
1098
      "A" "" "" "" "PROP_xstVeriIncludeDir_Global" ""
1099
      "A" "" "" "" "PROP_xstVerilog2001" "true"
1100
      "A" "" "" "" "PROP_xstVerilogMacros" ""
1101
      "A" "" "" "" "PROP_xstWorkDir" "./xst"
1102
      "A" "" "" "" "PROP_xstWriteTimingConstraints" "false"
1103
      "A" "" "" "" "PROP_xst_otherCmdLineOptions" ""
1104
      "B" "" "" "" "PROP_DevFamily" "Spartan3"
1105
      "B" "" "" "" "PROP_FitterOptimization_xpla3" "Density"
1106
      "B" "" "" "" "PROP_MapEffortLevel" "High"
1107
      "B" "" "" "" "PROP_MapLogicOptimization" "false"
1108
      "B" "" "" "" "PROP_MapPlacerCostTable" "1"
1109
      "B" "" "" "" "PROP_MapPowerReduction" "false"
1110
      "B" "" "" "" "PROP_MapRegDuplication" "false"
1111
      "B" "" "" "" "PROP_ModelSimConfigName" "Default"
1112
      "B" "" "" "" "PROP_ModelSimDataWin" "false"
1113
      "B" "" "" "" "PROP_ModelSimListWin" "false"
1114
      "B" "" "" "" "PROP_ModelSimProcWin" "false"
1115
      "B" "" "" "" "PROP_ModelSimSignalWin" "true"
1116
      "B" "" "" "" "PROP_ModelSimSimRes" "Default (1 ps)"
1117
      "B" "" "" "" "PROP_ModelSimSimRunTime_tb" "1000ns"
1118
      "B" "" "" "" "PROP_ModelSimSimRunTime_tbw" ""
1119
      "B" "" "" "" "PROP_ModelSimSourceWin" "false"
1120
      "B" "" "" "" "PROP_ModelSimStructWin" "true"
1121
      "B" "" "" "" "PROP_ModelSimUutInstName_postFit" "UUT"
1122
      "B" "" "" "" "PROP_ModelSimUutInstName_postMap" "UUT"
1123
      "B" "" "" "" "PROP_ModelSimUutInstName_postPar" "UUT"
1124
      "B" "" "" "" "PROP_ModelSimVarsWin" "false"
1125
      "B" "" "" "" "PROP_ModelSimWaveWin" "true"
1126
      "B" "" "" "" "PROP_SimCustom_behav" "control-wave.do"
1127
      "B" "" "" "" "PROP_SimCustom_postMap" ""
1128
      "B" "" "" "" "PROP_SimCustom_postPar" ""
1129
      "B" "" "" "" "PROP_SimCustom_postXlate" ""
1130
      "B" "" "" "" "PROP_SimGenVcdFile" "false"
1131
      "B" "" "" "" "PROP_SimModelRenTopLevInstTo" "UUT"
1132
      "B" "" "" "" "PROP_SimSyntax" "93"
1133
      "B" "" "" "" "PROP_SimUseExpDeclOnly" "true"
1134
      "B" "" "" "" "PROP_SimUserCompileList_behav" ""
1135
      "B" "" "" "" "PROP_Simulator" "Modelsim-XE Verilog"
1136
      "B" "" "" "" "PROP_SmartGuideFileName" "topbox_guide.ncd"
1137
      "B" "" "" "" "PROP_SynthConstraintsFile" ""
1138
      "B" "" "" "" "PROP_SynthMuxStyle" "Auto"
1139
      "B" "" "" "" "PROP_SynthRAMStyle" "Auto"
1140
      "B" "" "" "" "PROP_XPowerOptAdvancedVerboseRpt" "false"
1141
      "B" "" "" "" "PROP_XPowerOptMaxNumberLines" "1000"
1142
      "B" "" "" "" "PROP_XplorerEnableRetiming" "true"
1143
      "B" "" "" "" "PROP_XplorerNumIterations" "7"
1144
      "B" "" "" "" "PROP_XplorerOtherCmdLineOptions" ""
1145
      "B" "" "" "" "PROP_XplorerRunType" "Yes"
1146
      "B" "" "" "" "PROP_impactBaud" "Auto"
1147
      "B" "" "" "" "PROP_impactPort" "Auto - default"
1148
      "B" "" "" "" "PROP_mapTimingMode" "Non Timing Driven"
1149
      "B" "" "" "" "PROP_mpprViewPadRptForSelRslt" ""
1150
      "B" "" "" "" "PROP_mpprViewParRptForSelRslt" ""
1151
      "B" "" "" "" "PROP_parGenAsyDlyRpt" "false"
1152
      "B" "" "" "" "PROP_parGenClkRegionRpt" "false"
1153
      "B" "" "" "" "PROP_parGenSimModel" "false"
1154
      "B" "" "" "" "PROP_parGenTimingRpt" "true"
1155
      "B" "" "" "" "PROP_parMpprNodelistFile" ""
1156
      "B" "" "" "" "PROP_parMpprParIterations" "3"
1157
      "B" "" "" "" "PROP_parMpprResultsDirectory" ""
1158
      "B" "" "" "" "PROP_parMpprResultsToSave" ""
1159
      "B" "" "" "" "PROP_parPowerReduction" "false"
1160
      "B" "" "" "" "PROP_parTimingMode" "Performance Evaluation"
1161
      "B" "" "" "" "PROP_vcom_otherCmdLineOptions" ""
1162
      "B" "" "" "" "PROP_vlog_otherCmdLineOptions" ""
1163
      "B" "" "" "" "PROP_vsim_otherCmdLineOptions" ""
1164
      "B" "" "" "" "PROP_xcpldFitDesInReg_xbr" "true"
1165
      "B" "" "" "" "PROP_xcpldFitDesPtermLmt_xbr" "28"
1166
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_DbgBitStr" "false"
1167
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_LogicAllocFile" "false"
1168
      "B" "" "" "" "PROP_xilxBitgCfg_GenOpt_MaskFile" "false"
1169
      "B" "" "" "" "PROP_xilxBitgReadBk_GenBitStr" "false"
1170
      "B" "" "" "" "PROP_xilxMapPackfactor" "100"
1171
      "B" "" "" "" "PROP_xilxPAReffortLevel" "High"
1172
      "B" "" "" "" "PROP_xstMoveFirstFfStage" "true"
1173
      "B" "" "" "" "PROP_xstMoveLastFfStage" "true"
1174
      "B" "" "" "" "PROP_xstROMStyle" "Auto"
1175
      "B" "" "" "" "PROP_xstSafeImplement" "Yes"
1176
      "C" "" "" "" "PROP_CompxlibLang" "Verilog"
1177
      "C" "" "" "" "PROP_CompxlibSimPath" "/usr/local/gnuarm-4.0.2/bin"
1178
      "C" "" "" "" "PROP_DevDevice" "xc3s200"
1179
      "C" "" "" "" "PROP_DevFamilyPMName" "spartan3"
1180
      "C" "" "" "" "PROP_MapExtraEffort" "Normal"
1181
      "C" "" "" "" "PROP_MapPowerActivityFile" ""
1182
      "C" "" "" "" "PROP_SimModelGenMultiHierFile" "false"
1183
      "C" "" "" "" "PROP_parPowerActivityFile" ""
1184
      "C" "" "" "" "PROP_xilxPARextraEffortLevel" "Normal"
1185
      "D" "" "" "" "PROP_CompxlibUni9000Lib" "true"
1186
      "D" "" "" "" "PROP_CompxlibUniSimLib" "true"
1187
      "D" "" "" "" "PROP_DevPackage" "ft256"
1188
      "D" "" "" "" "PROP_Synthesis_Tool" "XST (VHDL/Verilog)"
1189
      "E" "" "" "" "PROP_DevSpeed" "-4"
1190
      "E" "" "" "" "PROP_PreferredLanguage" "Verilog"
1191
      "F" "" "" "" "PROP_ChangeDevSpeed" "-4"
1192
      "F" "" "" "" "PROP_SimModelTarget" "Verilog"
1193
      "F" "" "" "" "PROP_coregenFuncModelTargetLang" "Verilog"
1194
      "F" "" "" "" "PROP_hdlInstTempTargetLang" "Verilog"
1195
      "F" "" "" "" "PROP_schFuncModelTargetLang" "Verilog"
1196
      "F" "" "" "" "PROP_schInstTempTargetLang" "Verilog"
1197
      "F" "" "" "" "PROP_tbwTestbenchTargetLang" "Verilog"
1198
      "F" "" "" "" "PROP_xawHdlSourceTargetLang" "Verilog"
1199
      "F" "" "" "" "PROP_xawInstTempTargetLang" "Verilog"
1200
      "F" "" "" "" "PROP_xilxPostTrceSpeed" "-4"
1201
      "F" "" "" "" "PROP_xilxPreTrceSpeed" "-4"
1202
      "F" "" "" "" "PROP_xmpInstTempTargetLang" "Verilog"
1203
      "G" "" "" "" "PROP_SimModelAutoInsertGlblModuleInNetlist" "true"
1204
      "G" "" "" "" "PROP_SimModelGenArchOnly" "false"
1205
      "G" "" "" "" "PROP_SimModelIncSdfAnnInVerilogFile" "true"
1206
      "G" "" "" "" "PROP_SimModelIncSimprimInVerilogFile" "false"
1207
      "G" "" "" "" "PROP_SimModelIncUnisimInVerilogFile" "false"
1208
      "G" "" "" "" "PROP_SimModelIncUselibDirInVerilogFile" "false"
1209
      "G" "" "" "" "PROP_SimModelNoEscapeSignal" "false"
1210
      "G" "" "" "" "PROP_SimModelOutputExtIdent" "false"
1211
      "G" "" "" "" "PROP_SimModelRenTopLevArchTo" "Structure"
1212
      "G" "" "" "" "PROP_SimModelRenTopLevMod" ""
1213
      "G" "" "" "" "PROP_bencherPostMapTestbenchName" "tbuart.map_tfw"
1214
      "G" "" "" "" "PROP_bencherPostParTestbenchName" "tbuart.timesim_tfw"
1215
      "G" "" "" "" "PROP_bencherPostXlateTestbenchName" "tbuart.translate_tfw"
1216
      "G" "" "" "" "PROP_netgenPostMapSimModelName" "topbox_map.v"
1217
      "G" "" "" "" "PROP_netgenPostParSimModelName" "topbox_timesim.v"
1218
      "G" "" "" "" "PROP_netgenPostSynthesisSimModelName" "topbox_synthesis.v"
1219
      "G" "" "" "" "PROP_netgenPostXlateSimModelName" "topbox_translate.v"
1220
      "H" "" "" "" "PROP_SimModelBringOutGsrNetAsAPort" "false"
1221
      "H" "" "" "" "PROP_SimModelBringOutGtsNetAsAPort" "false"
1222
      "H" "" "" "" "PROP_SimModelPathUsedInSdfAnn" "Default"
1223
      "H" "" "" "" "PROP_netgenRenameTopLevEntTo" ""
1224
      "I" "" "" "" "PROP_SimModelGsrPortName" "GSR_PORT"
1225
      "I" "" "" "" "PROP_SimModelGtsPortName" "GTS_PORT"
1226
      "I" "" "" "" "PROP_SimModelRocPulseWidth" "100"
1227
      "I" "" "" "" "PROP_SimModelTocPulseWidth" "0"}
1228
 
1229
  HandleException {
1230
    RestoreProcessProperties $iProjHelper $process_props
1231
  } "A problem occured while restoring process properties."
1232
 
1233
   # library names and their members
1234
   set libraries {
1235
   }
1236
 
1237
  HandleException {
1238
    RestoreSourceLibraries $iProjHelper $libraries
1239
  } "A problem occured while restoring source libraries."
1240
 
1241
   # partition names for recreation
1242
   set partition_names {
1243
   }
1244
 
1245
  HandleException {
1246
    RestorePartitions $partition_names
1247
  } "A problem occured while restoring partitions."
1248
 
1249
   # Close the facilitator project.
1250
   CloseFacilProject $iProjHelper
1251
 
1252
   # cd into the project directory before trying to open thr project
1253
   cd $project_dir
1254
 
1255
   set proj_file_full_path [file join $project_dir $project_file]
1256
   INFO "Opening restored project file \"$proj_file_full_path\" ..."
1257
 
1258
   # Open the restored project in the user's client application,
1259
   # which will either be the Projnav GUI or xtclsh.
1260
   project open $project_file
1261
 
1262
   # Let the user know about the backed up project file.
1263
   INFO "The project \"$project_file\" was successfully recovered and opened."
1264
   if {$wasBackedUp} {
1265
      INFO ""
1266
      INFO "The original project was renamed as \"$backup_file\"."
1267
      INFO "Please open a Technical Support WebCase at"
1268
      INFO "www.xilinx.com/support/clearexpress/websupport.htm"
1269
      INFO "and submit this file, along with the project source files, for evaluation."
1270
   }
1271
}
1272
 

powered by: WebSVN 2.1.0

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