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 56

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

powered by: WebSVN 2.1.0

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