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

Subversion Repositories socgen

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 119 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 119 jt_eaton
 
32
 
33 135 jt_eaton
 
34 119 jt_eaton
############################################################################
35
# General PERL config
36
############################################################################
37
use Getopt::Long;
38
use English;
39
use File::Basename;
40
use Cwd;
41 131 jt_eaton
use Scalar::Util qw(looks_like_number);
42 119 jt_eaton
use XML::LibXML;
43
use lib './tools';
44
use sys::lib;
45
use yp::lib;
46 131 jt_eaton
use BerkeleyDB;
47 119 jt_eaton
 
48 131 jt_eaton
 
49 119 jt_eaton
$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 134 jt_eaton
           "envidentifier=s"  => \$envidentifier,
58
           "prefix=s"         => \$prefix,
59
           "vendor=s"         => \$vendor,
60
           "library=s"        => \$library,
61
           "version=s"        => \$version,
62
           "component=s"      => \$component,
63
           "destination=s"    => \$destination,
64
           "local_parameters"
65 119 jt_eaton
) || die "(use '$program_name -h' for help)";
66
 
67
 
68
##############################################################################
69
## Help option
70
##############################################################################
71
if ( $opt_h  or $opt_help  )
72 134 jt_eaton
  { print "\n gen_verilog -envidentifier :*Simulation:*  -prefix /work/children -vendor vendor_name -library library_name  -component component_name  -version version_name -destination destination -configuration configuration -local_parameters  \n";
73 119 jt_eaton
    exit 1;
74
  }
75
 
76
 
77 133 jt_eaton
 
78 119 jt_eaton
#############################################################################
79
##
80
##
81
#############################################################################
82
 
83
$home = cwd();
84 130 jt_eaton
 
85 134 jt_eaton
unless( $destination) {$destination = "${component}_${version}";}
86 131 jt_eaton
 
87 134 jt_eaton
print "\n ---GEN_verilog    -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version   -destination  $destination ";
88 128 jt_eaton
 
89
 
90 119 jt_eaton
 
91 134 jt_eaton
my $cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination   ";
92 133 jt_eaton
 
93 134 jt_eaton
my $cmd;
94 133 jt_eaton
 
95 134 jt_eaton
if($opt_local_parameters)
96
{
97
$cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination -local_parameters   \n";
98
}
99
else
100
{
101
$cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination  \n";
102
}
103 120 jt_eaton
 
104
 
105 125 jt_eaton
 
106 134 jt_eaton
if(system($cmd)){}
107 125 jt_eaton
 
108 128 jt_eaton
 
109 134 jt_eaton
print "Getting get_component_configs($vendor,$library,$component,$version \n";
110 130 jt_eaton
 
111 134 jt_eaton
my @configs  = yp::lib::get_component_configs($vendor,$library,$component,$version);
112 130 jt_eaton
 
113 134 jt_eaton
foreach my $config (@configs)
114 133 jt_eaton
 
115
{
116 134 jt_eaton
print "GEN_verilog  $vendor $library $component $version $config\n";
117
 
118
$cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination -configuration $config  -local_parameters \n";
119
if(system($cmd)){}
120 133 jt_eaton
}
121 121 jt_eaton
 
122
 
123
 
124 124 jt_eaton
 
125 121 jt_eaton
 
126
 
127 119 jt_eaton
1
128
 

powered by: WebSVN 2.1.0

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