Clean up test suite per 3-way code review findings
- Remove temp files: network_gcd_traversal.log, util_report_redirect.log - Delete 19 comment-only C++ test stubs (dead code for removed APIs) - Remove redundant graph_make_verify test (covered by graph_advanced) - Centralize assert_file_nonempty/assert_file_contains into test/helpers.tcl and remove inline copies from 17 verilog test files - Fix Build.sh stray quotes in heredoc output - Fix regression.sh unquoted variable expansions - Update .gitignore: add */test/*.log and Testing/ All 6087 tests pass. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
This commit is contained in:
parent
29cea73c3d
commit
a1c1685c04
|
|
@ -30,3 +30,7 @@ doc/messages.txt
|
|||
|
||||
# clangd turds
|
||||
.cache/
|
||||
|
||||
# test artifacts
|
||||
*/test/*.log
|
||||
Testing/
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|||
numThreads=$(sysctl -n hw.ncpu)
|
||||
else
|
||||
cat << EOF
|
||||
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs"
|
||||
Defaulting to 2 threads. Use -threads=N to use N threads"
|
||||
WARNING: Unsupported OSTYPE: cannot determine number of host CPUs
|
||||
Defaulting to 2 threads. Use -threads=N to use N threads
|
||||
EOF
|
||||
numThreads=2
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ sta_module_tests("graph"
|
|||
delay_corners
|
||||
delete_modify
|
||||
incremental
|
||||
make_verify
|
||||
modify
|
||||
operations
|
||||
timing_edges
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
No paths found.
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# Read liberty and design, make graph, verify
|
||||
read_liberty ../../test/nangate45/Nangate45_typ.lib
|
||||
read_verilog graph_test1.v
|
||||
link_design graph_test1
|
||||
|
||||
# Creating the timing graph implicitly tests graph construction
|
||||
create_clock -name clk -period 10 [get_ports clk]
|
||||
|
||||
# report_checks exercises the graph
|
||||
report_checks -from [get_ports d] -to [get_ports q]
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2139,14 +2139,6 @@ TEST_F(StaDesignTest, EndpointPins) {
|
|||
EXPECT_GT(eps.size(), 0u);
|
||||
}
|
||||
|
||||
// --- Sta: startpointPins ---
|
||||
|
||||
TEST_F(StaDesignTest, StartpointPins) {
|
||||
// startpointPins() is declared in Sta.hh but not defined - skip
|
||||
// PinSet sps = sta_->startpointPins();
|
||||
// EXPECT_GT(sps.size(), 0u);
|
||||
}
|
||||
|
||||
// --- Search: arrivalsValid ---
|
||||
|
||||
TEST_F(StaDesignTest, SearchArrivalsValidDesign) {
|
||||
|
|
|
|||
|
|
@ -401,10 +401,6 @@ TEST_F(StaDesignTest, StaPins) {
|
|||
EXPECT_NE(pins, nullptr);
|
||||
}
|
||||
|
||||
TEST_F(StaDesignTest, StaStartpointPins) {
|
||||
// startpointPins() is declared in Sta.hh but not defined - skip
|
||||
}
|
||||
|
||||
TEST_F(StaDesignTest, StaEndpointPins) {
|
||||
PinSet endpoints = sta_->endpointPins();
|
||||
EXPECT_GE(endpoints.size(), 1u);
|
||||
|
|
|
|||
|
|
@ -747,12 +747,6 @@ TEST_F(StaInitTest, SetArcDelayCalc) {
|
|||
ASSERT_NO_THROW(sta_->setArcDelayCalc("lumped_cap"));
|
||||
}
|
||||
|
||||
// Parasitic analysis pts
|
||||
TEST_F(StaInitTest, SetParasiticAnalysisPts) {
|
||||
// setParasiticAnalysisPts removed from API
|
||||
// setParasiticAnalysisPts removed from API
|
||||
}
|
||||
|
||||
// RemoveClockGroupsNull removed — nullptr now throws std::logic_error
|
||||
|
||||
// FindReportPathField
|
||||
|
|
@ -1891,12 +1885,6 @@ TEST_F(StaInitTest, CornersBeginEnd) {
|
|||
EXPECT_EQ(static_cast<size_t>(count), corners.size());
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, CornersOperatingConditionsChanged) {
|
||||
// operatingConditionsChanged removed from SceneSeq
|
||||
// No crash
|
||||
|
||||
}
|
||||
|
||||
// Levelize.cc uncovered functions
|
||||
TEST_F(StaInitTest, LevelizeNotLevelized) {
|
||||
Levelize *levelize = sta_->levelize();
|
||||
|
|
@ -2118,13 +2106,6 @@ TEST_F(StaInitTest, ClkSkewPaths) {
|
|||
EXPECT_EQ(skew.tgtPath(), nullptr);
|
||||
}
|
||||
|
||||
// ClkSkews class
|
||||
TEST_F(StaInitTest, ClkSkewsExists) {
|
||||
// ClkSkews is a component of Sta
|
||||
// Access through sta_ members
|
||||
|
||||
}
|
||||
|
||||
// CheckMaxSkews
|
||||
TEST_F(StaInitTest, CheckMaxSkewsExists) {
|
||||
// maxSkewSlack/maxSkewViolations removed from Sta API
|
||||
|
|
@ -2280,13 +2261,6 @@ TEST_F(StaInitTest, ReportPathFormatValues) {
|
|||
static_cast<int>(ReportPathFormat::slack_only));
|
||||
}
|
||||
|
||||
// Variables - additional variables
|
||||
TEST_F(StaInitTest, VariablesSearchPreamble) {
|
||||
// Search preamble requires network but we can test it won't crash
|
||||
// when there's no linked design
|
||||
|
||||
}
|
||||
|
||||
// Sta::clear on empty
|
||||
TEST_F(StaInitTest, StaClearEmpty) {
|
||||
sta_->clear();
|
||||
|
|
@ -2298,12 +2272,6 @@ TEST_F(StaInitTest, StaClearEmpty) {
|
|||
// (skipping because requires linked design)
|
||||
|
||||
// Additional Sta functions that exercise uncovered code paths
|
||||
TEST_F(StaInitTest, StaSearchPreambleNoDesign) {
|
||||
// searchPreamble requires ensureLinked which needs a network
|
||||
// We can verify the pre-conditions
|
||||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaTagCount) {
|
||||
TagIndex count = sta_->tagCount();
|
||||
EXPECT_GE(count, 0u);
|
||||
|
|
@ -2334,11 +2302,6 @@ TEST_F(StaInitTest, StaMaxPathCountVertex) {
|
|||
}
|
||||
|
||||
// More Sta.cc function coverage
|
||||
TEST_F(StaInitTest, StaSetSlewLimitClock) {
|
||||
// Without a clock this is a no-op - just exercise code path
|
||||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaOperatingConditions) {
|
||||
const OperatingConditions *op = sta_->operatingConditions(MinMax::min(), sta_->cmdSdc());
|
||||
// May be null without a liberty lib
|
||||
|
|
@ -2351,11 +2314,6 @@ TEST_F(StaInitTest, StaDelaysInvalidEmpty) {
|
|||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaFindRequiredsEmpty) {
|
||||
// Without timing, this should be a no-op
|
||||
// findRequireds removed from public Sta API
|
||||
}
|
||||
|
||||
// Additional Property types coverage
|
||||
TEST_F(StaInitTest, PropertyValuePwrActivity) {
|
||||
PwrActivity activity;
|
||||
|
|
@ -2451,18 +2409,6 @@ TEST_F(StaInitTest, StaClearLogicConstants) {
|
|||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaSetParasiticAnalysisPtsNotPerCorner) {
|
||||
// setParasiticAnalysisPts removed from API
|
||||
// No crash
|
||||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaSetParasiticAnalysisPtsPerCorner) {
|
||||
// setParasiticAnalysisPts removed from API
|
||||
// No crash
|
||||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaDeleteParasitics) {
|
||||
sta_->deleteParasitics();
|
||||
// No crash on empty
|
||||
|
|
@ -2490,14 +2436,6 @@ TEST_F(StaInitTest, WnsSlackLessConstructor) {
|
|||
|
||||
}
|
||||
|
||||
// Additional Sta.cc report functions
|
||||
TEST_F(StaInitTest, StaReportPathEndHeaderFooter) {
|
||||
// reportPathEndHeader removed from API
|
||||
// reportPathEndFooter removed from API
|
||||
// Just exercise without crash
|
||||
|
||||
}
|
||||
|
||||
// Sta.cc - make functions already called by makeComponents,
|
||||
// but exercising the public API on the Sta
|
||||
|
||||
|
|
@ -2618,24 +2556,6 @@ TEST_F(StaInitTest, StaMakeExceptionTo) {
|
|||
EXPECT_EQ(to, nullptr);
|
||||
}
|
||||
|
||||
// Sta.cc - checkTiming
|
||||
TEST_F(StaInitTest, StaCheckTimingNoDesign) {
|
||||
// checkTiming requires a linked network - just verify the method exists
|
||||
|
||||
}
|
||||
|
||||
// Exercise Sta.cc setPvt without instance
|
||||
TEST_F(StaInitTest, StaSetPvtMinMax) {
|
||||
// Can't call without instance/design, but verify the API exists
|
||||
// setPvt removed from public Sta API
|
||||
}
|
||||
|
||||
// Sta.cc - endpoint-related functions
|
||||
TEST_F(StaInitTest, StaEndpointViolationCountNoDesign) {
|
||||
// Requires graph, skip
|
||||
// endpointViolationCount removed from public Sta API
|
||||
}
|
||||
|
||||
// Additional coverage for SceneSeq iteration
|
||||
TEST_F(StaInitTest, CornersRangeForIteration) {
|
||||
const SceneSeq &corners = sta_->scenes();
|
||||
|
|
@ -3035,11 +2955,6 @@ TEST_F(StaInitTest, StaEnsureClkArrivals) {
|
|||
EXPECT_THROW(sta_->ensureClkArrivals(), std::exception);
|
||||
}
|
||||
|
||||
// startpointPins() is declared in Sta.hh but not defined - skip
|
||||
TEST_F(StaInitTest, StaStartpointPins) {
|
||||
// startpointPins not implemented
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaEndpoints2) {
|
||||
EXPECT_THROW(sta_->endpoints(), std::exception);
|
||||
}
|
||||
|
|
@ -3087,18 +3002,6 @@ TEST_F(StaInitTest, StaSetReportPathFormat2) {
|
|||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaReportPathEndHeader) {
|
||||
// reportPathEndHeader removed from API
|
||||
// No crash
|
||||
|
||||
}
|
||||
|
||||
TEST_F(StaInitTest, StaReportPathEndFooter) {
|
||||
// reportPathEndFooter removed from API
|
||||
// No crash
|
||||
|
||||
}
|
||||
|
||||
// --- Sta.cc: operating conditions ---
|
||||
TEST_F(StaInitTest, StaSetOperatingConditions) {
|
||||
sta_->setOperatingConditions(nullptr, MinMaxAll::all(), sta_->cmdSdc());
|
||||
|
|
@ -3280,11 +3183,6 @@ TEST_F(StaInitTest, StaRemoveDelaySlewAnnotations) {
|
|||
|
||||
}
|
||||
|
||||
// --- Sta.cc: minPeriodViolations and maxSkewViolations (throw) ---
|
||||
TEST_F(StaInitTest, StaMinPeriodViolationsThrows) {
|
||||
// minPeriodViolations removed from API;
|
||||
}
|
||||
|
||||
// minPeriodSlack removed from API
|
||||
TEST_F(StaInitTest, StaMinPeriodReportThrows) {
|
||||
EXPECT_THROW(sta_->reportMinPeriodChecks(nullptr, 10, false, false, sta_->scenes()), std::exception);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,21 @@ proc diff_files_sorted { file1 file2 } {
|
|||
}
|
||||
}
|
||||
|
||||
proc assert_file_nonempty { path } {
|
||||
if { ![file exists $path] || [file size $path] <= 0 } {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains { path token } {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if { [string first $token $text] < 0 } {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc diff_files { file1 file2 { ignore "" } } {
|
||||
set stream1 [open $file1 r]
|
||||
set stream2 [open $file2 r]
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ DIFF_FILE="${RESULT_DIR}/${TEST_NAME}.diff"
|
|||
mkdir -p "${RESULT_DIR}"
|
||||
|
||||
# Run test, merge stderr into stdout, capture to log.
|
||||
${STA_EXE} -no_init -no_splash -exit ${TEST_NAME}.tcl > ${LOG_FILE} 2>&1
|
||||
"${STA_EXE}" -no_init -no_splash -exit "${TEST_NAME}.tcl" > "${LOG_FILE}" 2>&1
|
||||
sta_exit=$?
|
||||
|
||||
if [ $sta_exit -ne 0 ]; then
|
||||
echo "Error: sta exited with code ${sta_exit}"
|
||||
cat ${LOG_FILE}
|
||||
cat "${LOG_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -28,10 +28,10 @@ if [ ! -f "${TEST_NAME}.ok" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if diff ${TEST_NAME}.ok ${LOG_FILE} > ${DIFF_FILE} 2>&1; then
|
||||
if diff "${TEST_NAME}.ok" "${LOG_FILE}" > "${DIFF_FILE}" 2>&1; then
|
||||
exit 0
|
||||
else
|
||||
echo "FAIL: output differs from ${TEST_NAME}.ok"
|
||||
cat ${DIFF_FILE}
|
||||
cat "${DIFF_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
--- processor_count ---
|
||||
Error: util_report_redirect.tcl, 11 invalid command name "processor_count"
|
||||
|
|
@ -3,21 +3,6 @@
|
|||
source ../../test/helpers.tcl
|
||||
suppress_msg 1140
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 6: Write constant/concat design
|
||||
# Exercises: writeChildren with constant pin connections
|
||||
|
|
|
|||
|
|
@ -2,21 +2,6 @@
|
|||
# Exercises: verilogPortDir for tristate/supply, writePortDcls
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 5: Write supply/tristate design (special port directions)
|
||||
# Exercises: verilogPortDir for tristate/supply, writePortDcls
|
||||
|
|
|
|||
|
|
@ -2,27 +2,6 @@
|
|||
source ../../test/helpers.tcl
|
||||
suppress_msg 1140
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_not_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
|
|
|
|||
|
|
@ -3,27 +3,6 @@
|
|||
source ../../test/helpers.tcl
|
||||
suppress_msg 1140
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_not_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
|
|
|
|||
|
|
@ -2,27 +2,6 @@
|
|||
source ../../test/helpers.tcl
|
||||
suppress_msg 1140
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_not_has_cell {path cell_name} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
|
|
|
|||
|
|
@ -2,27 +2,6 @@
|
|||
source ../../test/helpers.tcl
|
||||
suppress_msg 1140
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_not_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
|
|
|
|||
|
|
@ -5,21 +5,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test: Read verilog with specify blocks and parameters
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -2,27 +2,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
read_liberty ../../test/asap7/asap7sc7p5t_SEQ_RVT_FF_nldm_220123.lib
|
||||
read_liberty ../../test/asap7/asap7sc7p5t_INVBUF_RVT_FF_nldm_220122.lib.gz
|
||||
read_liberty ../../test/asap7/asap7sc7p5t_SIMPLE_RVT_FF_nldm_211120.lib.gz
|
||||
|
|
|
|||
|
|
@ -2,21 +2,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
read_liberty ../../test/nangate45/Nangate45_typ.lib
|
||||
read_verilog verilog_assign_test.v
|
||||
link_design verilog_assign_test
|
||||
|
|
|
|||
|
|
@ -2,21 +2,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_files_equal {path_a path_b} {
|
||||
set in_a [open $path_a r]
|
||||
set text_a [read $in_a]
|
||||
|
|
|
|||
|
|
@ -2,21 +2,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_files_equal {path_a path_b} {
|
||||
set in_a [open $path_a r]
|
||||
set text_a [read $in_a]
|
||||
|
|
|
|||
|
|
@ -1,27 +1,6 @@
|
|||
# Test verilog writer options
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
read_liberty ../../test/nangate45/Nangate45_typ.lib
|
||||
read_verilog verilog_test1.v
|
||||
link_design verilog_test1
|
||||
|
|
|
|||
|
|
@ -2,21 +2,6 @@
|
|||
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path] || [file size $path] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
read_liberty ../../test/sky130hd/sky130_fd_sc_hd__tt_025C_1v80.lib
|
||||
read_verilog ../../test/verilog_attribute.v
|
||||
link_design counter
|
||||
|
|
|
|||
|
|
@ -1,27 +1,6 @@
|
|||
# Test advanced verilog writer options - ASAP7 design
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 1: Write verilog from ASAP7 design (has more complexity)
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,27 +1,6 @@
|
|||
# Test advanced verilog writer options - Write after modification
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 2: Write after network modification
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,27 +1,6 @@
|
|||
# Test advanced verilog writer options - Nangate45 write
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 4: Write verilog for Nangate45 design
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,27 +1,6 @@
|
|||
# Test advanced verilog writer options - Sky130 with attributes
|
||||
source ../../test/helpers.tcl
|
||||
|
||||
proc assert_file_nonempty {path} {
|
||||
if {![file exists $path]} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string length $text] <= 0} {
|
||||
error "expected non-empty file: $path"
|
||||
}
|
||||
}
|
||||
|
||||
proc assert_file_contains {path token} {
|
||||
set in [open $path r]
|
||||
set text [read $in]
|
||||
close $in
|
||||
if {[string first $token $text] < 0} {
|
||||
error "expected '$token' in $path"
|
||||
}
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Test 3: Write verilog for sky130 design with attributes
|
||||
#---------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue