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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [verilog/] [gen_instance_roots] - Blame information for rev 135

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 134 jt_eaton
eval 'exec `which perl` -S $0 ${1+"$@"}'
2
   if 0;
3 135 jt_eaton
#/****************************************************************************/
4
#/*                                                                          */
5
#/*   SOCGEN Design for Reuse toolset                                        */
6
#/*                                                                          */
7
#/*   Version 1.0.0                                                          */
8
#/*                                                                          */
9
#/*   Author(s):                                                             */
10
#/*      - John Eaton, z3qmtr45@gmail.com                                    */
11
#/*                                                                          */
12
#/****************************************************************************/
13
#/*                                                                          */
14
#/*                                                                          */
15
#/*             Copyright 2016 John T Eaton                                  */
16
#/*                                                                          */
17
#/* Licensed under the Apache License, Version 2.0 (the "License");          */
18
#/* you may not use this file except in compliance with the License.         */
19
#/* You may obtain a copy of the License at                                  */
20
#/*                                                                          */
21
#/*    http://www.apache.org/licenses/LICENSE-2.0                            */
22
#/*                                                                          */
23
#/* Unless required by applicable law or agreed to in writing, software      */
24
#/* distributed under the License is distributed on an "AS IS" BASIS,        */
25
#/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
26
#/* See the License for the specific language governing permissions and      */
27
#/* limitations under the License.                                           */
28
#/*                                                                          */
29
#/*                                                                          */
30
#/****************************************************************************/
31 134 jt_eaton
 
32
 
33 135 jt_eaton
 
34 134 jt_eaton
############################################################################
35
# General PERL config
36
############################################################################
37
use Getopt::Long;
38
use English;
39
use File::Basename;
40
use Cwd;
41
use Scalar::Util qw(looks_like_number);
42
use XML::LibXML;
43
use lib './tools';
44
use sys::lib;
45
use yp::lib;
46
use BerkeleyDB;
47
 
48
 
49
$OUTPUT_AUTOFLUSH = 1; # set autoflush of stdout to TRUE.
50
 
51
 
52
############################################################################
53
### Process the options
54
############################################################################
55
Getopt::Long::config("require_order", "prefix=-");
56
GetOptions("h","help"
57
) || die "(use '$program_name -h' for help)";
58
 
59
 
60
 
61
##############################################################################
62
## Help option
63
##############################################################################
64
if ( $opt_h  or $opt_help  )
65
  { print "\n gen_instance_roots \n";
66
    exit 1;
67
  }
68
 
69
 
70
 
71
#############################################################################
72
##
73
##
74
#############################################################################
75
 
76
$home = cwd();
77
@gen_root_cmds = ();
78
 
79
$design_db_file  = yp::lib::get_design_db_file;
80
my $design_db  = new BerkeleyDB::Hash( -Filename => "$design_db_file", -Flags => DB_CREATE ) or die "Cannot open $design_db_file: $!";
81
 
82
my $key;
83
my $value;
84
 
85
my $cursor = $design_db ->db_cursor() ;
86
while ($cursor->c_get($key, $value, DB_NEXT) == 0)
87
   {
88
 
89
   $_ = $key;
90
   if(/instance_/)
91
    {
92
 
93
    push @gen_root_cmds, $value;
94
    }
95
   }
96
my $status = $cursor->c_close() ;
97
 
98
$design_db->db_close();
99
 
100
@gen_root_cmds      = sys::lib::trim_sort(@gen_root_cmds);
101
 
102
foreach my $cmd (@gen_root_cmds)
103
{
104
 ( ${ven},${lib},${cmp},${ver},${config}) = split( /\:/ , $cmd);
105
 
106
$cmd ="./tools/verilog/gen_root -vendor ${ven} -library ${lib}    -component ${cmp}  -version ${ver}  -name ${config} -configuration ${config} \n";
107
print "$cmd";
108
if(system($cmd)){}
109
}
110
 
111
 
112
1

powered by: WebSVN 2.1.0

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