Skip to content

Commit

Permalink
Display QoR results update.
Browse files Browse the repository at this point in the history
git-svn-id: https://vtr-verilog-to-routing.googlecode.com/svn/trunk@628 8e3573b8-cf2c-4f14-ef6d-137439e28b8b
  • Loading branch information
nrootn committed Jul 24, 2012
1 parent c8cf2dd commit 2939dbc
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions run_reg_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -235,30 +235,41 @@ sub check_override {

open( QOR_FILE, "$test_dir/qor_geomean.txt" );
my $output = <QOR_FILE>;

my @first_line = split( /\t/, trim($output) );
my $last_line;
while(<QOR_FILE>) {
$last_line = $_ if eof;
}
my @last_line = split( /\t/, trim($last_line) );
my @new_last_line;

foreach my $param (@data) {
my $index = List::Util::first { @first_line[$_] eq $param } 0 .. $#first_line;
push( @new_last_line, sprintf( $precision{$param}, @last_line[$index] ) . $units{$param} );
}

format STDOUT =
format STDOUT_TOP =
| @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| |
@data;
--------------------------------------------------------------------------------------------------------------------
.
write;

while(<QOR_FILE>) {
my @last_line = split( /\t/, trim($_) );
my @new_last_line;

foreach my $param (@data) {
my $index = List::Util::first { @first_line[$_] eq $param } 0 .. $#first_line;
push( @new_last_line, sprintf( $precision{$param}, @last_line[$index] ) . $units{$param} );
}

format STDOUT =
| @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| | @||||||||||||||||||| |
@new_last_line;
.
.
write;
}
exit "QoR results displayed";
}

# my @last_line = split( /\t/, trim($last_line) );
# my @new_last_line;

# foreach my $param (@data) {
# my $index = List::Util::first { @first_line[$_] eq $param } 0 .. $#first_line;
# push( @new_last_line, sprintf( $precision{$param}, @last_line[$index] ) . $units{$param} );
# }

}
}

Expand Down

0 comments on commit 2939dbc

Please sign in to comment.