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

Subversion Repositories diogenes

[/] [diogenes/] [trunk/] [vhdl/] [rs232.restore] - Blame information for rev 236

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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