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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [tools/] [simulation/] [run_icarus] - 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
#/*             -------                                                */
7
#/*            /   SOC  \                                              */
8
#/*           /    GEN   \                                             */
9
#/*          /    TOOL    \                                            */
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 XML::LibXML;
55
use lib './tools';
56
use sys::lib;
57
use yp::lib;
58
 
59
$OUTPUT_AUTOFLUSH = 1; # set autoflush of stdout to TRUE.
60
 
61
 
62
############################################################################
63
### Process the options
64
############################################################################
65
Getopt::Long::config("require_order", "prefix=-");
66
GetOptions("h","help",
67
) || die "(use '$program_name -h' for help)";
68
 
69
 
70
 
71
 
72
##############################################################################
73
## Help option
74
##############################################################################
75
if ( $opt_h or $opt_help  )
76
  { print "\n run_icarus vendor   library sim_library_path sim_name     sim_variant";
77
    print "\n";
78
    exit 1;
79
  }
80
 
81
my $home              = cwd();
82
my $prefix            = yp::lib::get_workspace();
83
my $vendor            = $ARGV[0];
84
my $library           = $ARGV[1];
85
my $sim_library_path  = $ARGV[2];
86
my $sim_name          = $ARGV[3];
87
my $sim_variant       = $ARGV[4];
88
 
89
 
90
chdir  "./${prefix}/${vendor}__${library}${sim_library_path}/icarus/${sim_name}";
91
 
92
$cmd ="iverilog   -f ../../testbenches/filelists/${sim_variant}.sim -D VCD  2>   ./${sim_name}_elab.log  | tee >> ./${$sim_name}_elab.log \n";
93
if (system($cmd)) {}
94
$cmd ="./a.out 2>    ./${sim_name}_sim.log     | tee >> ./${sim_name}_sim.log  \n";
95
print "  SIM Icarus     $sim_name        $sim_configuration   $sim_variant  \n ";
96
if (system($cmd)) {}
97
$cmd ="grep PASSED  ./${sim_name}_sim.log \n";
98
if (system($cmd)) {}
99
$cmd ="rm a.out \n";
100
if (system($cmd)) {}
101
 
102
chdir $home;
103
 
104
 
105
 
106
 
107
 
108
 
109
 
110
 
111
 
112
 

powered by: WebSVN 2.1.0

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