Skip to content

Commit

Permalink
Merge branch 'master' into mpl2-property
Browse files Browse the repository at this point in the history
  • Loading branch information
AcKoucher committed Mar 18, 2024
2 parents 4b79c31 + 50753a4 commit 35468d4
Show file tree
Hide file tree
Showing 93 changed files with 1,500 additions and 454 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ configure_file(
# Ask CMake to output a compile_commands.json file for use with things like clang-tidy
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)



add_subdirectory(third-party)

if(ENABLE_TESTS)
find_program (BASH_PROGRAM bash REQUIRED)

enable_testing()
add_custom_target(build_and_test ${CMAKE_CTEST_COMMAND} --parallel --output-on-failure -LE IntegrationTest)
include(GoogleTest)
Expand Down
1 change: 1 addition & 0 deletions src/ant/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
# POSSIBILITY OF SUCH DAMAGE.

add_subdirectory(src)
add_subdirectory(test)
13 changes: 13 additions & 0 deletions src/ant/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include("openroad")

set(TEST_NAMES
check_api1
check_drt1
check_grt1
ant_check
ant_report
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("ant" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()
1 change: 1 addition & 0 deletions src/cmake/openroad.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include("swig_lib")
include("messages")
include("testing")
19 changes: 19 additions & 0 deletions src/cmake/testing.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function(or_integration_test tool_name test_name regression_binary)
add_test (
NAME ${tool_name}.${test_name}
COMMAND ${BASH_PROGRAM} ${regression_binary} ${test_name}
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
)

string(CONCAT ENV
"TEST_TYPE=compare_logfile;"
"CTEST_TESTNAME=${test_name};"
"DIFF_LOCATION=${CMAKE_CURRENT_LIST_DIR}/results/${test_name}.diff"
)

set_property(TEST ${tool_name}.${test_name}
PROPERTY ENVIRONMENT ${ENV})

set_tests_properties(${tool_name}.${test_name}
PROPERTIES LABELS "IntegrationTest")
endfunction()
26 changes: 26 additions & 0 deletions src/cts/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@

include("openroad")

set(TEST_NAMES
check_buffers
check_buffers_blockages
check_charBuf
find_clock
find_clock_pad
no_clocks
no_sinks
simple_test
simple_test_clustered
simple_test_clustered_max_cap
check_wire_rc_cts
post_cts_opt
balance_levels
max_cap
array
array_no_blockages
array_ins_delay
insertion_delay
dummy_load
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("cts" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()

add_executable(cts_unittest cts_unittest.cc)
target_include_directories(cts_unittest
PUBLIC
Expand Down
1 change: 1 addition & 0 deletions src/dbSta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
###############################################################################

add_subdirectory(src)
add_subdirectory(test)
45 changes: 45 additions & 0 deletions src/dbSta/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
include("openroad")

set(TEST_NAMES
constant1
make_port
network_edit1
sdc_names1
sdc_names2
sdc_get1
sta1
sta2
sta3
sta4
sta5
block_sta1
find_clks1
find_clks2
report_json1
power1
read_liberty1
read_verilog1
read_verilog2
read_verilog3
read_verilog4
read_verilog5
read_verilog6
read_verilog7
read_verilog8
read_verilog9
read_verilog10
report_cell_usage
write_verilog1
write_verilog2
write_verilog3
write_verilog4
write_verilog5
write_verilog6
write_verilog7
write_verilog8
write_sdc1
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("ant" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()
2 changes: 1 addition & 1 deletion src/dft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ add_subdirectory(src/replace)
add_subdirectory(src/stitch)
add_subdirectory(src/utils)
if(ENABLE_TESTS)
add_subdirectory(test/cpp)
add_subdirectory(test)
endif()

messages(
Expand Down
15 changes: 14 additions & 1 deletion src/dft/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Tests
include("openroad")

find_package(Boost)
set(TEST_NAMES
one_cell_sky130
one_cell_nangate45
sub_modules_sky130
scan_architect_no_mix_sky130
scan_architect_clock_mix_sky130
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("dft" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()

find_package(Boost)
add_subdirectory(cpp)
68 changes: 68 additions & 0 deletions src/dpl/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,74 @@

include("openroad")

set(TEST_NAMES
aes
cell_on_block1
cell_on_block2
check1
check2
check3
check4
check5
check6
check7
check8
check9
fence01
fence02
fence03
fillers1
fillers2
fillers3
fillers4
fillers5
fillers6
fillers7
fillers8
fragmented_row01
fragmented_row02
fragmented_row03
fragmented_row04
gcd
hybrid_cells
hybrid_cells2
ibex
max_disp1
mirror1
mirror2
mirror3
multi_height_one_site_gap_disallow
multi_height_rows
obstruction1
obstruction2
one_site_gap_disallow
pad01
pad02
pad03
pad04
pad05
pad06
pad07
pad08
regions1
regions2
regions3
report_failures
simple01
simple02
simple03
simple04
simple05
simple07
simple08
simple09
simple10
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("dpl" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()

add_executable(dpl_test dpl_test.cc)

target_link_libraries(dpl_test
Expand Down
2 changes: 2 additions & 0 deletions src/dpo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ if (Python3_FOUND AND BUILD_PYTHON)
)

endif()

add_subdirectory(test)
15 changes: 15 additions & 0 deletions src/dpo/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
include("openroad")

set(TEST_NAMES
aes
gcd
ibex
multi_height1
gcd_no_one_site_gaps
regions1
regions2
)

foreach(TEST_NAME IN LISTS TEST_NAMES)
or_integration_test("dpo" ${TEST_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/regression)
endforeach()
2 changes: 2 additions & 0 deletions src/drt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,5 @@ if (Python3_FOUND AND BUILD_PYTHON)
)

endif()

add_subdirectory(test)
6 changes: 6 additions & 0 deletions src/drt/src/db/tech/frConstraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class frLef58MinStepConstraint : public frConstraint
frCoord getMinAdjacentLength() const { return minAdjLength_; }
bool hasEolWidth() const { return (eolWidth_ != -1); }
frCoord getEolWidth() const { return eolWidth_; }
frCoord getNoAdjEol() const { return noAdjEol_; }
bool isExceptRectangle() const { return exceptRectangle_; }

// setter
void setMinStepLength(frCoord in) { minStepLength_ = in; }
Expand All @@ -220,6 +222,8 @@ class frLef58MinStepConstraint : public frConstraint
return frConstraintTypeEnum::frcLef58MinStepConstraint;
}
void report(utl::Logger* logger) const override;
void setNoAdjEol(frCoord value) { noAdjEol_ = value; }
void setExceptRectangle(bool value) { exceptRectangle_ = value; }

protected:
frCoord minStepLength_{-1};
Expand All @@ -239,6 +243,8 @@ class frLef58MinStepConstraint : public frConstraint
bool exceptSameCorners_{false};
frCoord eolWidth_{-1};
bool concaveCorners_{false};
frCoord noAdjEol_{-1};
bool exceptRectangle_{false};
};

// minStep
Expand Down
2 changes: 2 additions & 0 deletions src/drt/src/gc/FlexGC_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ class FlexGCWorker::Impl
void checkMetalShape_lef58MinStep(gcPin* pin);
void checkMetalShape_lef58MinStep_noBetweenEol(gcPin* pin,
frLef58MinStepConstraint* con);
void checkMetalShape_lef58MinStep_minAdjLength(gcPin* pin,
frLef58MinStepConstraint* con);
void checkMetalSpacingTableInfluence();
void checkPinMetSpcTblInf(gcPin*);
void checkRectMetSpcTblInf(gcRect*, frSpacingTableInfluenceConstraint*);
Expand Down
Loading

0 comments on commit 35468d4

Please sign in to comment.