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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [firmware/] [gen_crasm] - Blame information for rev 131

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 131 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
use Scalar::Util qw(looks_like_number);
55
use XML::LibXML;
56
use lib './tools';
57
use sys::lib;
58
use yp::lib;
59
use BerkeleyDB;
60
 
61
 
62
$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
           "envidentifier=s" => \$envidentifier,
71
           "prefix=s" => \$prefix,
72
           "vendor=s" => \$vendor,
73
           "library=s" => \$library,
74
           "version=s" => \$version,
75
           "component=s" => \$component,
76
           "dest_dir=s" => \$dest_dir,
77
           "output=s" => \$output,
78
           "destination=s" => \$destination,
79
) || die "(use '$program_name -h' for help)";
80
 
81
 
82
##############################################################################
83
## Help option
84
##############################################################################
85
if ( $opt_h  or $opt_help  )
86
  { print "\n gen_crasm -envidentifier {sim/syn}  -prefix /work -vendor vendor_name -library library_name  -component component_name  -version version_name -destination destination  -dest_dir  ../verilog \n";
87
    exit 1;
88
  }
89
 
90
 
91
 
92
 
93
#############################################################################
94
##
95
##
96
#############################################################################
97
 
98
$home = cwd();
99
 
100
my $source =              $ARGV[0];
101
 
102
 
103
 
104
print "GEN_crasm -envidentifier $envidentifier  -prefix $prefix -vendor $vendor -library $library  -component $component  -version $version -destination $destination     -output $output  $source  \n";
105
 
106
 
107
 
108
my $lib_comp_sep    = yp::lib::find_lib_comp_sep($vendor,$library,$component);
109
my $comp_xml_sep    = yp::lib::find_comp_xml_sep($vendor,$library,$component,$version);
110
 
111
#my $parser = XML::LibXML->new();
112
 
113
 
114
#my $spirit_component_file    = $parser->parse_file(yp::lib::find_ipxact_component($vendor,$library,$component,$version));
115
 
116
 
117
#print ".${prefix}/${vendor}__${library}/${lib_comp_sep}/${component}/  \n";
118
 
119
 
120
 
121
$cmd ="cd .${prefix}/${vendor}__${library}/${lib_comp_sep}/${component}/; crasm  $source -o $output   >${component}.lst ;${home}/tools/bin/hex2abs16 $component ; ${home}/tools/bin/hex2abs $component ; ${home}/tools/bin/hex2abs_split $component ;  \n";
122
if (system($cmd)) {}
123
 
124
 
125
 
126
 
127
 
128
 
129
 
130
 
131
 
132
 
133
 
134
1
135
 

powered by: WebSVN 2.1.0

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