Line 2... |
Line 2... |
#
|
#
|
##############################################################################
|
##############################################################################
|
#
|
#
|
# run_regression.pl
|
# run_regression.pl
|
#
|
#
|
# $Id: run_regression.pl,v 1.1 2006-05-25 15:58:01 arniml Exp $
|
# $Id: run_regression.pl,v 1.2 2006-05-27 22:48:52 arniml Exp $
|
#
|
#
|
# Copyright (c) 2006, Arnim Laeuger (arniml@opencores.org)
|
# Copyright (c) 2006, Arnim Laeuger (arniml@opencores.org)
|
#
|
#
|
# All rights reserved
|
# All rights reserved
|
#
|
#
|
Line 29... |
Line 29... |
my $verif_dir = $project_dir.'/sw/verif';
|
my $verif_dir = $project_dir.'/sw/verif';
|
my $sim_dir = $project_dir.'/sim/rtl_sim';
|
my $sim_dir = $project_dir.'/sim/rtl_sim';
|
|
|
# the testbenches and their identifiers
|
# the testbenches and their identifiers
|
my %testbenches = ('t41x' => './tb_t411_behav_c0',
|
my %testbenches = ('t41x' => './tb_t411_behav_c0',
|
't42x' => './tb_t420_behav_c0');
|
't42x' => './tb_t420_behav_c0',
|
|
'int' => './tb_int_behav_c0');
|
my ($tb_name, $tb_exec);
|
my ($tb_name, $tb_exec);
|
|
|
# identify the directories below $verif_dir containing test classes
|
# identify the directories below $verif_dir containing test classes
|
my @classes_dirs = ('black_box');
|
my @classes_dirs = ('black_box', 'int');
|
|
|
my $dir;
|
my $dir;
|
my %testdirs;
|
my %testdirs;
|
|
|
# common GHDL options
|
# common GHDL options
|
Line 50... |
Line 51... |
foreach $dir (@classes_dirs) {
|
foreach $dir (@classes_dirs) {
|
$dir = $verif_dir.'/'.$dir;
|
$dir = $verif_dir.'/'.$dir;
|
|
|
while (($tb_name, $tb_exec) = each(%testbenches)) {
|
while (($tb_name, $tb_exec) = each(%testbenches)) {
|
my $elem;
|
my $elem;
|
my @dirs = `find $dir -name $tb_name`;
|
my @dirs = `find $dir -type f -name $tb_name`;
|
|
|
foreach $elem (@dirs) {
|
foreach $elem (@dirs) {
|
$elem =~ s/\/[^\/]+$//;
|
$elem =~ s/\/[^\/]+$//;
|
$testdirs{$elem} = 1;
|
$testdirs{$elem} = 1;
|
}
|
}
|
Line 75... |
Line 76... |
if (system('make all clean') == 0) {
|
if (system('make all clean') == 0) {
|
my @execute_tbs;
|
my @execute_tbs;
|
|
|
# collect the testbenches to be executed
|
# collect the testbenches to be executed
|
while (($tb_name, $tb_exec) = each(%testbenches)) {
|
while (($tb_name, $tb_exec) = each(%testbenches)) {
|
if (-e $tb_name) {
|
if (-f $tb_name) {
|
push(@execute_tbs, $tb_name);
|
push(@execute_tbs, $tb_name);
|
}
|
}
|
}
|
}
|
|
|
# and finally execute them
|
# and finally execute them
|