Skip to content

Commit

Permalink
resurrect regression
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Sep 20, 2022
1 parent 049d039 commit 74b5e32
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 16 deletions.
10 changes: 5 additions & 5 deletions test/example2.ok
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Path Type: max
0.00 0.00 clock network delay (ideal)
0.00 0.00 ^ r2/CK (DFF_X1)
0.23 0.23 v r2/Q (DFF_X1)
0.08 0.32 v u1/Z (BUF_X1)
0.10 0.42 v u2/ZN (AND2_X1)
0.00 0.42 v r3/D (DFF_X1)
0.42 data arrival time
0.08 0.31 v u1/Z (BUF_X1)
0.10 0.41 v u2/ZN (AND2_X1)
0.00 0.41 v r3/D (DFF_X1)
0.41 data arrival time

10.00 10.00 clock clk (rise edge)
0.00 10.00 clock network delay (ideal)
Expand All @@ -22,7 +22,7 @@ Path Type: max
9.84 data required time
---------------------------------------------------------
9.84 data required time
-0.42 data arrival time
-0.41 data arrival time
---------------------------------------------------------
9.43 slack (MET)

Expand Down
10 changes: 5 additions & 5 deletions test/example3.ok
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Path Type: max
0.00 0.00 clock network delay (ideal)
0.00 0.00 ^ r2/CK (DFF_X1)
0.23 0.23 v r2/Q (DFF_X1)
0.08 0.32 v u1/Z (BUF_X1)
0.10 0.42 v u2/ZN (AND2_X1)
0.00 0.42 v r3/D (DFF_X1)
0.42 data arrival time
0.08 0.31 v u1/Z (BUF_X1)
0.10 0.41 v u2/ZN (AND2_X1)
0.00 0.41 v r3/D (DFF_X1)
0.41 data arrival time

10.00 10.00 clock clk (rise edge)
0.00 10.00 clock network delay (ideal)
Expand All @@ -49,7 +49,7 @@ Path Type: max
9.84 data required time
---------------------------------------------------------
9.84 data required time
-0.42 data arrival time
-0.41 data arrival time
---------------------------------------------------------
9.43 slack (MET)

Expand Down
12 changes: 6 additions & 6 deletions test/example5.ok
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Corner: ss
0.00 0.00 ^ r2/CK (DFF_X1)
0.26 0.26 v r2/Q (DFF_X1)
0.09 0.35 v u1/Z (BUF_X1)
0.11 0.46 v u2/ZN (AND2_X1)
0.00 0.46 v r3/D (DFF_X1)
0.46 data arrival time
0.11 0.45 v u2/ZN (AND2_X1)
0.00 0.45 v r3/D (DFF_X1)
0.45 data arrival time

10.00 10.00 clock clk (rise edge)
0.00 10.00 clock network delay (ideal)
Expand All @@ -51,9 +51,9 @@ Corner: ss
9.84 data required time
---------------------------------------------------------
9.84 data required time
-0.46 data arrival time
-0.45 data arrival time
---------------------------------------------------------
9.38 slack (MET)
9.39 slack (MET)


Startpoint: r2 (rising edge-triggered flip-flop clocked by clk)
Expand All @@ -67,7 +67,7 @@ Corner: tt
0.00 0.00 clock clk (rise edge)
0.00 0.00 clock network delay (ideal)
0.00 0.00 ^ r2/CK (DFF_X1)
0.09 0.09 v r2/Q (DFF_X1)
0.08 0.08 v r2/Q (DFF_X1)
0.03 0.11 v u1/Z (BUF_X1)
0.03 0.14 v u2/ZN (AND2_X1)
0.00 0.14 v r3/D (DFF_X1)
Expand Down
111 changes: 111 additions & 0 deletions test/regression_vars.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# OpenSTA, Static Timing Analyzer
# Copyright (c) 2022, Parallax Software, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# Regression variables.

# Application program to run tests on.
set app "sta"
set sta_dir [file dirname $test_dir]
set app_path [file join $sta_dir "app" $app]
# Application options.
set app_options "-no_init -no_splash -exit"
# Log files for each test are placed in result_dir.
set result_dir [file join $test_dir "results"]
# Collective diffs.
set diff_file [file join $result_dir "diffs"]
# File containing list of failed tests.
set failure_file [file join $result_dir "failures"]
# Use the DIFF_OPTIONS envar to change the diff options
# (Solaris diff doesn't support this envar)
set diff_options "-c"
if [info exists env(DIFF_OPTIONS)] {
set diff_options $env(DIFF_OPTIONS)
}

set valgrind_suppress [file join $test_dir valgrind.suppress]
set valgrind_options "--num-callers=20 --leak-check=full --freelist-vol=100000000 --leak-resolution=high --suppressions=$valgrind_suppress"
if { [exec "uname"] == "Darwin" } {
append valgrind_options " --dsymutil=yes"
}

proc cleanse_logfile { test log_file } {
# Nothing to be done here.
}

################################################################

# Record a test in the regression suite.
proc record_test { test cmd_dir } {
global cmd_dirs test_groups
set cmd_dirs($test) $cmd_dir
lappend test_groups(all) $test
return $test
}

# Record a test in the $STA/examples directory.
proc record_example_tests { tests } {
global test_dir test_groups
set example_dir [file join $test_dir ".." "examples"]
foreach test $tests {
# Prune commented tests from the list.
if { [string index $test 0] != "#" } {
record_test $test $example_dir
}
}
}

################################################################

proc define_test_group { name tests } {
global test_groups
set test_groups($name) $tests
}

proc group_tests { name } {
global test_groups
return $test_groups($name)
}

# Clear the test lists.
proc clear_tests {} {
global test_groups
unset test_groups
}

proc list_delete { list delete } {
set result {}
foreach item $list {
if { [lsearch $delete $item] == -1 } {
lappend result $item
}
}
return $result
}

################################################################

# Regression test lists.

# Record tests in sta/examples
record_example_tests {
example1
example2
example3
example4
example5
}

define_test_group fast [group_tests all]

0 comments on commit 74b5e32

Please sign in to comment.