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

Subversion Repositories zet86

[/] [zet86/] [tags/] [INITIAL/] [impl/] [spartan3an-sk/] [ise/] [zet_soc_import.tcl] - Blame information for rev 49

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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