OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [Integration_test/] [synthetic_sim/] [verify.perl] - Blame information for rev 54

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

Line No. Rev Author Line
1 54 alirezamon
#!/usr/bin/perl -w
2
package ProNOC;
3
 
4
use Getopt::Std;
5
 
6
 
7
# perl verify.pl [model-name] p min max step
8
 
9
 
10
use File::Copy::Recursive qw(dircopy);
11
use File::Basename;
12
use File::Copy;
13
use Data::Dumper;
14
use File::Find::Rule;
15
 
16
#add home dir in perl 5.6
17
use FindBin;
18
use lib $FindBin::Bin;
19
use constant::boolean;
20
 
21
 
22
 
23
 
24
use strict;
25
use warnings;
26
 
27
use base 'Class::Accessor::Fast';
28
 
29
 
30
 
31
# declare the perl command line flags/options we want to allow
32
my %options=();
33
getopts("hp:u:l:s:m:d:", \%options);
34
 
35
# test for the existence of the options on the command line.
36
# in a normal program you'd do more than just print these.
37
 
38
 
39
 
40
# other things found on the command line
41
print "Other things found on the command line:\n" if $ARGV[0];
42
foreach (@ARGV)
43
{
44
  print "$_\n";
45
}
46
 
47
 
48
if (defined $options{h} ) {
49
print " Usage: perl verify.pl [options]
50
      -h show this help
51
      -p   : Enter the number of parallel simulations or
52
                         compilations. The default value is 4.
53
      -u   : Enter the maximum injection ratio in %. Default is 80
54
      -l   : Enter the minimum injection ratio in %. Default is 5
55
      -s   : Enter the injection step increase ratio in %.
56
                         Default value is 25.
57
      -d     : The dir name where the simulation models configuration
58
                                         files are located in. The default dir is \"models\"
59
      -m  : Enter the
60
                         simulation model name in simulation dir. If the simulation model name
61
                         is not provided, it runs the simulation for all
62
                         existing models.
63
";
64
exit;
65
}
66
 
67
my $paralel_run= 4;
68
#defne minimum , maximum and increasing step of injection ratio
69
my ($MIN,$MAX,$STEP)= (5,80,25);
70
my $model_dir="models";
71
 
72
my @models;
73
 
74
 
75
 
76
$paralel_run=$options{p} if defined $options{p};
77
$MAX = $options{u} if defined $options{u};
78
$MIN = $options{l} if defined $options{l};
79
$STEP = $options{s} if defined $options{s};
80
$model_dir = $options{d} if defined $options{d};
81
 
82
if (defined $options{m}){
83
        @models = split(",",$options{m});
84
}
85
 
86
 
87
 
88
 
89
 
90
 
91
 
92
 
93
__PACKAGE__->mk_accessors(qw{
94
        models
95
});
96
 
97
my $app = __PACKAGE__->new();
98
 
99
 
100
 
101
my $dirname = dirname(__FILE__);
102
require "$dirname/src/src.pl";
103
 
104
 
105
my @inputs =($paralel_run,$MIN,$MAX,$STEP,$model_dir);
106
 
107
 
108
print "Maximum number of parallel simulation is $paralel_run.\n The injection ratio is set as MIN=$MIN,MAX=$MAX,STEP=$STEP.\n";
109
print "\t The simulation models are taken from $model_dir\n";
110
if (defined $options{m}){
111
        foreach my $p (@models ){ print "\t\t$p\n";}
112
}
113
 
114
my @log_report_match =("Error","Warning" );
115
 
116
 
117
 
118
save_file ("$dirname/report","Verification Results:\n");
119
 
120
recompile_synful();
121
 
122
copy_src_files();
123
 
124
gen_models(\@models,\@inputs);
125
 
126
compile_models($app,\@inputs,\@models);
127
 
128
check_compilation($app,\@log_report_match,\@inputs,\@models);
129
 
130
run_all_models($app,\@inputs,\@models);
131
 
132
 
133
 
134
print "done!\n"
135
 
136
 
137
 
138
 

powered by: WebSVN 2.1.0

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