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

Subversion Repositories socgen

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

Go to most recent revision | 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
#/**********************************************************************/
4
#/*                                                                    */
5
#/*             -------                                                */
6
#/*            /   SOC  \                                              */
7
#/*           /    GEN   \                                             */
8
#/*          /    TOOL    \                                            */
9
#/*          ==============                                            */
10
#/*          |            |                                            */
11
#/*          |____________|                                            */
12
#/*                                                                    */
13
#/*                                                                    */
14
#/*                                                                    */
15
#/*                                                                    */
16
#/*  Author(s):                                                        */
17
#/*      - John Eaton, jt_eaton@opencores.org                          */
18
#/*                                                                    */
19
#/**********************************************************************/
20
#/*                                                                    */
21
#/*    Copyright (C) <2010-2011>                */
22
#/*                                                                    */
23
#/*  This source file may be used and distributed without              */
24
#/*  restriction provided that this copyright statement is not         */
25
#/*  removed from the file and that any derivative work contains       */
26
#/*  the original copyright notice and the associated disclaimer.      */
27
#/*                                                                    */
28
#/*  This source file is free software; you can redistribute it        */
29
#/*  and/or modify it under the terms of the GNU Lesser General        */
30
#/*  Public License as published by the Free Software Foundation;      */
31
#/*  either version 2.1 of the License, or (at your option) any        */
32
#/*  later version.                                                    */
33
#/*                                                                    */
34
#/*  This source is distributed in the hope that it will be            */
35
#/*  useful, but WITHOUT ANY WARRANTY; without even the implied        */
36
#/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR           */
37
#/*  PURPOSE.  See the GNU Lesser General Public License for more      */
38
#/*  details.                                                          */
39
#/*                                                                    */
40
#/*  You should have received a copy of the GNU Lesser General         */
41
#/*  Public License along with this source; if not, download it        */
42
#/*  from http://www.opencores.org/lgpl.shtml                          */
43
#/*                                                                    */
44
#/**********************************************************************/
45
 
46
 
47
############################################################################
48
# General PERL config
49
############################################################################
50
use Getopt::Long;
51
use English;
52
use File::Basename;
53
use Cwd;
54 131 jt_eaton
use Scalar::Util qw(looks_like_number);
55 119 jt_eaton
use XML::LibXML;
56
use lib './tools';
57
use sys::lib;
58
use yp::lib;
59 131 jt_eaton
use BerkeleyDB;
60 119 jt_eaton
 
61 131 jt_eaton
 
62 119 jt_eaton
$OUTPUT_AUTOFLUSH = 1; # set autoflush of stdout to TRUE.
63
 
64
 
65
############################################################################
66
### Process the options
67
############################################################################
68
Getopt::Long::config("require_order", "prefix=-");
69
GetOptions("h","help",
70 134 jt_eaton
           "envidentifier=s"  => \$envidentifier,
71
           "prefix=s"         => \$prefix,
72
           "vendor=s"         => \$vendor,
73
           "library=s"        => \$library,
74
           "version=s"        => \$version,
75
           "component=s"      => \$component,
76
           "destination=s"    => \$destination,
77
           "local_parameters"
78 119 jt_eaton
) || die "(use '$program_name -h' for help)";
79
 
80
 
81
##############################################################################
82
## Help option
83
##############################################################################
84
if ( $opt_h  or $opt_help  )
85 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";
86 119 jt_eaton
    exit 1;
87
  }
88
 
89
 
90 133 jt_eaton
 
91 119 jt_eaton
#############################################################################
92
##
93
##
94
#############################################################################
95
 
96
$home = cwd();
97 130 jt_eaton
 
98 134 jt_eaton
unless( $destination) {$destination = "${component}_${version}";}
99 131 jt_eaton
 
100 134 jt_eaton
print "\n ---GEN_verilog    -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version   -destination  $destination ";
101 128 jt_eaton
 
102
 
103 119 jt_eaton
 
104 134 jt_eaton
my $cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination   ";
105 133 jt_eaton
 
106 134 jt_eaton
my $cmd;
107 133 jt_eaton
 
108 134 jt_eaton
if($opt_local_parameters)
109
{
110
$cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination -local_parameters   \n";
111
}
112
else
113
{
114
$cmd = "./tools/verilog/gen_elab_verilog -envidentifier $envidentifier -prefix  $prefix -vendor $vendor -library $library -component $component -version $version -destination  $destination  \n";
115
}
116 120 jt_eaton
 
117
 
118 125 jt_eaton
 
119 134 jt_eaton
if(system($cmd)){}
120 125 jt_eaton
 
121 128 jt_eaton
 
122 134 jt_eaton
print "Getting get_component_configs($vendor,$library,$component,$version \n";
123 130 jt_eaton
 
124 134 jt_eaton
my @configs  = yp::lib::get_component_configs($vendor,$library,$component,$version);
125 130 jt_eaton
 
126 134 jt_eaton
foreach my $config (@configs)
127 133 jt_eaton
 
128
{
129 134 jt_eaton
print "GEN_verilog  $vendor $library $component $version $config\n";
130
 
131
$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";
132
if(system($cmd)){}
133 133 jt_eaton
}
134 121 jt_eaton
 
135
 
136
 
137 124 jt_eaton
 
138 121 jt_eaton
 
139
 
140 119 jt_eaton
1
141
 

powered by: WebSVN 2.1.0

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