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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_0_6_1_beta/] [sw/] [run_regression.pl] - Blame information for rev 48

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

Line No. Rev Author Line
1 35 arniml
#!/usr/bin/perl -w
2
#
3 48 arniml
# ############################################################################
4 35 arniml
#
5
# run_regression.pl
6
#
7 48 arniml
# $Id: run_regression.pl,v 1.2 2004-04-09 19:17:09 arniml Exp $
8 35 arniml
#
9
# Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
10
#
11
# All rights reserved
12
#
13 48 arniml
# ############################################################################
14 35 arniml
#
15 48 arniml
# Purpose:
16
# ========
17
#
18 35 arniml
# Runs regression suite over all testcells found in $VERIF_DIR.
19
#
20
# The testcells are identified by searching for the .asm file(s).
21
# Each testcell is built by calling the central Makefile.cell.
22
# The resulting hex-file is then copied to $SIM_DIR where the VHDL simulator
23
# is started.
24
#
25
 
26 48 arniml
 
27 35 arniml
use strict;
28
 
29
my (@asm_files, $asm_file);
30
my (%cells, $cell, $cell_dir, $tag);
31
my $pwd;
32
 
33
 
34
##############################################################################
35
# Commands to call the different VHDL simulators.
36
# 
37
# GHDL
38
my $ghdl_simulator = './tb_behav_c0';
39
#
40
# Choose simulator:
41
my $vhdl_simulator = $ghdl_simulator;
42
#
43
##############################################################################
44
 
45
 
46
$pwd = `pwd`;
47
chomp($pwd);
48
 
49
 
50
@asm_files = `find \$VERIF_DIR -name '*.asm'`;
51
 
52
 
53
foreach $asm_file (@asm_files) {
54
    chomp($asm_file);
55
    # strip off assembler file names
56
    $asm_file =~ s/\/[^\/]+\.asm//;
57
    # strip off verification directory
58
    $asm_file =~ s/$ENV{'VERIF_DIR'}\///;
59
    $cells{$asm_file} = 1;
60
}
61
 
62
while (($cell, $tag) = each(%cells)) {
63
    $cell_dir = "$ENV{'VERIF_DIR'}/$cell";
64
 
65
    if (chdir($cell_dir)) {
66
        print("Processing $cell\n");
67
 
68
        system('sh', '-c', 'rm -f $SIM_DIR/t48_rom.hex');
69
        system('sh', '-c', 'make -f $VERIF_DIR/include/Makefile.cell simu clean');
70
        if ($? == 0) {
71
            chdir($ENV{'SIM_DIR'});
72
            system('sh', '-c', 'ls -l t48_rom.hex');
73
            system('sh', '-c', $vhdl_simulator);
74
        } else {
75
            print("Error: Cannot make cell $cell!\n");
76
        }
77
    } else {
78
        print("Error: Cannot change to directory $cell_dir!\n");
79
    }
80
}
81
 
82
chdir($pwd);

powered by: WebSVN 2.1.0

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