Skip to content

Commit 3b8e813

Browse files
committed
Merge branch 'master' into sta_latest_from_parallaxsw_0407
2 parents 98835d8 + 12bbfed commit 3b8e813

94 files changed

Lines changed: 241 additions & 2393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ doc/messages.txt
3030

3131
# clangd turds
3232
.cache/
33+
34+
# test artifacts
35+
*/test/*.log
36+
Testing/

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ cc_binary(
272272
"app/Main.cc",
273273
":StaApp",
274274
":StaTclInitVar",
275-
"//bazel:runfiles",
276275
],
277276
copts = [
278277
"-Wno-error",
@@ -297,6 +296,7 @@ cc_binary(
297296
visibility = ["//visibility:public"],
298297
deps = [
299298
":opensta_lib",
299+
"//bazel:tcl_library_init",
300300
"@rules_cc//cc/runfiles",
301301
"@tcl_lang//:tcl",
302302
],

app/Main.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#include <filesystem>
3131
#include <string_view>
3232
#include <tcl.h>
33+
34+
#ifdef BAZEL_CURRENT_REPOSITORY
35+
#include "bazel/tcl_library_init.h"
36+
#endif
37+
3338
#if TCL_READLINE
3439
#include <tclreadline.h>
3540
#endif
@@ -109,6 +114,12 @@ staTclAppInit(int argc,
109114
std::string_view init_filename,
110115
Tcl_Interp *interp)
111116
{
117+
#ifdef BAZEL_CURRENT_REPOSITORY
118+
if (in_bazel::SetupTclEnvironment(interp) == TCL_ERROR) {
119+
return TCL_ERROR;
120+
}
121+
#endif
122+
112123
// source init.tcl
113124
if (Tcl_Init(interp) == TCL_ERROR)
114125
return TCL_ERROR;

dcalc/test/cpp/TestDcalc.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,15 +1459,14 @@ TEST_F(ArcDcalcResultTest, CopyResult) {
14591459
EXPECT_FLOAT_EQ(delayAsFloat(copy.loadSlew(1)), 6e-12f);
14601460
}
14611461

1462-
// Test ArcDcalcArg assignment
1463-
TEST_F(ArcDcalcArgTest, Assignment) {
1462+
// Test ArcDcalcArg copy construction with alternate values
1463+
TEST_F(ArcDcalcArgTest, CopyConstructionAltValues) {
14641464
ArcDcalcArg arg;
14651465
arg.setLoadCap(3.5e-12f);
14661466
arg.setInputDelay(1.5e-9f);
14671467
arg.setInSlew(200e-12f);
14681468

1469-
ArcDcalcArg other;
1470-
other = arg;
1469+
ArcDcalcArg other(arg);
14711470
EXPECT_FLOAT_EQ(other.loadCap(), 3.5e-12f);
14721471
EXPECT_FLOAT_EQ(other.inputDelay(), 1.5e-9f);
14731472
EXPECT_FLOAT_EQ(other.inSlewFlt(), 200e-12f);
@@ -2804,14 +2803,13 @@ TEST_F(ArcDcalcArgTest, InputDelayConstructorZero) {
28042803
EXPECT_FLOAT_EQ(arg.inputDelay(), 0.0f);
28052804
}
28062805

2807-
TEST_F(ArcDcalcArgTest, CopyAssignment) {
2806+
TEST_F(ArcDcalcArgTest, CopyConstructionAltValues2) {
28082807
ArcDcalcArg arg;
28092808
arg.setLoadCap(3.0e-12f);
28102809
arg.setInputDelay(2.0e-9f);
28112810
arg.setInSlew(75e-12f);
28122811

2813-
ArcDcalcArg copy;
2814-
copy = arg;
2812+
ArcDcalcArg copy(arg);
28152813
EXPECT_FLOAT_EQ(copy.loadCap(), 3.0e-12f);
28162814
EXPECT_FLOAT_EQ(copy.inputDelay(), 2.0e-9f);
28172815
EXPECT_FLOAT_EQ(copy.inSlewFlt(), 75e-12f);

etc/Build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
1616
numThreads=$(sysctl -n hw.ncpu)
1717
else
1818
cat << EOF
19-
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs"
20-
Defaulting to 2 threads. Use -threads=N to use N threads"
19+
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs
20+
Defaulting to 2 threads. Use -threads=N to use N threads
2121
EOF
2222
numThreads=2
2323
fi

graph/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ sta_module_tests("graph"
55
delay_corners
66
delete_modify
77
incremental
8-
make_verify
98
modify
109
operations
1110
timing_edges

graph/test/graph_bidirect.ok

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ No paths found.
6868
No paths found.
6969
No paths found.
7070
--- Test 3: report with fields ---
71-
Warning 168: graph_bidirect.tcl line 1, unknown field nets.
7271
Startpoint: d1 (input port clocked by clk)
7372
Endpoint: reg2 (rising edge-triggered flip-flop clocked by clk)
7473
Path Group: clk
@@ -80,12 +79,16 @@ Fanout Cap Slew Delay Time Description
8079
0.00 0.00 clock network delay (ideal)
8180
0.00 0.00 v input external delay
8281
1 0.88 0.10 0.00 0.00 v d1 (in)
82+
d1 (net)
8383
0.10 0.00 0.00 v buf1/A (BUF_X1)
8484
2 1.67 0.01 0.06 0.06 v buf1/Z (BUF_X1)
85+
n1 (net)
8586
0.01 0.00 0.06 v or1/A1 (OR2_X1)
8687
2 1.96 0.01 0.05 0.10 v or1/ZN (OR2_X1)
88+
n6 (net)
8789
0.01 0.00 0.10 v and2/A2 (AND2_X1)
8890
1 1.06 0.01 0.03 0.13 v and2/ZN (AND2_X1)
91+
n9 (net)
8992
0.01 0.00 0.13 v reg2/D (DFF_X1)
9093
0.13 data arrival time
9194

graph/test/graph_bidirect.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ report_checks -from [get_ports d3] -to [get_ports q4]
4141
# Test 3: Fields that exercise graph delay/slew queries
4242
#---------------------------------------------------------------
4343
puts "--- Test 3: report with fields ---"
44-
report_checks -fields {slew cap input_pins nets fanout}
44+
report_checks -fields {slew cap input_pins net fanout}
4545

4646
report_checks -format full_clock
4747

graph/test/graph_delete_modify.ok

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Path Type: min
5858
1.03 slack (MET)
5959

6060

61-
Warning 168: graph_delete_modify.tcl line 1, unknown field nets.
6261
Startpoint: d2 (input port clocked by clk)
6362
Endpoint: reg2 (rising edge-triggered flip-flop clocked by clk)
6463
Path Group: clk
@@ -70,12 +69,16 @@ Fanout Cap Slew Delay Time Description
7069
0.00 0.00 clock network delay (ideal)
7170
1.00 1.00 v input external delay
7271
1 0.88 0.10 0.00 1.00 v d2 (in)
72+
d2 (net)
7373
0.10 0.00 1.00 v buf2/A (BUF_X1)
7474
2 1.69 0.01 0.06 1.06 v buf2/Z (BUF_X1)
75+
n2 (net)
7576
0.01 0.00 1.06 v or1/A1 (OR2_X1)
7677
2 2.56 0.01 0.05 1.11 v or1/ZN (OR2_X1)
78+
n6 (net)
7779
0.01 0.00 1.11 v nand1/A2 (NAND2_X1)
7880
1 1.14 0.01 0.02 1.12 ^ nand1/ZN (NAND2_X1)
81+
n7 (net)
7982
0.01 0.00 1.12 ^ reg2/D (DFF_X1)
8083
1.12 data arrival time
8184

graph/test/graph_delete_modify.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ report_checks
2626

2727
report_checks -path_delay min
2828

29-
report_checks -fields {slew cap input_pins nets fanout}
29+
report_checks -fields {slew cap input_pins net fanout}
3030

3131
#---------------------------------------------------------------
3232
# Test 2: Add multiple instances and nets, then delete

0 commit comments

Comments
 (0)