Describe the bug
I'm looking at an asap7 test where we get stuck quite a while because of EOL violations between M2 tracks connecting to two pins in a standard cell. Only M1 and M2 are visible here, and you can see the yellow box showing the DRC issue between the two pins. M2 has an EOLKEEPOUT rule:
PROPERTY LEF58_EOLKEEPOUT "EOLKEEPOUT 0.025 EXTENSION 0.0 0.0125 0.031 CORNERONLY ; " ;

I notice a number of things:
- Pin access could do a better job of picking the initial APs:

There is quite a lot of space, but we've clustered them all together, almost guaranteeing an EOL violation. I know we turn off some of the rules during pin access, eg gcWorker.setIgnoreLongSideEOL();, and maybe this is contributing to it.
- gc seems to consider the complete keepout area:
frCoord forward = constraint->getForwardExt();
frCoord backward = constraint->getBackwardExt();
frCoord side = constraint->getSideExt();
But rp (and so fixed cost/routing costs) only consider forward and side:
eolSpace = std::max(eolSpace, con->getForwardExt());
eolWithin = std::max(eolWithin, con->getSideExt());
Not an issue here, but might be nice to fix.
- Is there a better way to represent EOL
CORNERONLY rules in fixed/routing costs? We place a planar cost, but since it's a CORNERONLY rule, then only a wire terminating on that grid point should be penalized (assuming I understand the rule correctly). A wire passing through should not have the cost applied:

Expected Behavior
We don't get stuck for multiple iterations creating the same DRC issue.
Environment
os: Fedora Linux 37 (Workstation Edition)
cmake version 3.26.2
-- The CXX compiler identification is GNU 12.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenROAD version: v2.0-7708-g4b1ea0d24
-- System name: Linux
-- Compiler: GNU 12.2.1
-- Build type: RELEASE
-- Install prefix: /usr/local
-- C++ Standard: 17
-- C++ Standard Required: ON
-- C++ Extensions: OFF
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
-- The C compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /usr/bin/python3.11 (found version "3.11.2") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS__-Wall
-- Performing Test C_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall
-- Performing Test CXX_COMPILER_SUPPORTS__-Wall - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test C_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-array-bounds - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test C_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-nonnull - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test C_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-maybe-uninitialized - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format-overflow - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-variable - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-function - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test C_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-write-strings - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-sign-compare - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test C_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-deprecated - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test C_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-c++11-narrowing - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register
-- Performing Test C_COMPILER_SUPPORTS__-Wno-register - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-register - Success
--CMake Warning at src/CMakeLists.txt:226 (message):
spdlog: SPDLOG_FMT_EXTERNAL=ON
Performing Test C_COMPILER_SUPPORTS__-Wno-format
-- Performing Test C_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-format - Success
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test C_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-reserved-user-defined-literal - Failed
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive
-- Performing Test C_COMPILER_SUPPORTS__-fpermissive - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive
-- Performing Test CXX_COMPILER_SUPPORTS__-fpermissive - Success
-- Performing Test C_COMPILER_SUPPORTS__-x
-- Performing Test C_COMPILER_SUPPORTS__-x - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__-x
-- Performing Test CXX_COMPILER_SUPPORTS__-x - Failed
-- Performing Test C_COMPILER_SUPPORTS__c++
-- Performing Test C_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test CXX_COMPILER_SUPPORTS__c++
-- Performing Test CXX_COMPILER_SUPPORTS__c++ - Failed
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test C_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable
-- Performing Test CXX_COMPILER_SUPPORTS__-Wno-unused-but-set-variable - Success
-- TCL library: /usr/lib64/libtcl.so
-- TCL header: /usr/include/tcl.h
-- Found SWIG: /usr/bin/swig (found suitable version "4.0.2", minimum required is "3.0")
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0")
-- boost: 1.78.0
-- Found Python3: /usr/include/python3.11 (found version "3.11.2") found components: Development Development.Module Development.Embed
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.12")
-- spdlog: 1.10.0
-- Found BISON: /usr/bin/bison (found version "3.8.2")
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.5") found components: doxygen dot
-- STA version: 2.4.0
-- STA git sha: 8de844d9d85b1eaa1bdf78d9b0e1dc8008e5183c
-- System name: Linux
-- Compiler: GNU 12.2.1
-- Build type: RELEASE
-- Build CXX_FLAGS: -O3 -DNDEBUG
-- Install prefix: /usr/local
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- TCL library: /usr/lib64/libtcl.so
-- TCL header: /usr/include/tcl.h
-- SSTA: 0
-- STA executable: /home/anton_unencrypted/OpenROAD/src/sta/app/sta
-- GPU is not enabled
-- Found Protobuf: /usr/lib64/libprotobuf.so (found version "3.19.6")
-- Found re2: /usr/lib64/cmake/re2/re2Config.cmake (found version "9.0.0")
-- Found Clp: /usr/local/lib64/cmake/Clp/ClpConfig.cmake (found version "1.17.7")
-- Found Cbc: /usr/local/lib64/cmake/Cbc/CbcConfig.cmake (found version "2.10.7")
-- Found Eigen3: /usr/share/cmake/eigen3/Eigen3Config.cmake (found version "3.4.0")
-- Found SCIP: /usr/local/lib/cmake/scip/scip-config.cmake (found version "8.0.1")
-- GUI is enabled
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: serialization
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS)
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.78")
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0") found components: serialization system thread
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0")
-- TCL readline disabled
-- Tcl Extended disabled
-- Python3 enabled
-- Configuring done (4.0s)
-- Generating done (0.3s)
-- Build files have been written to: /tmp/tmp.6uWzk0lL6V
To Reproduce
Test case is at https://ozlabs.org/~anton/junk/astar-eol-drc.tar.gz
Relevant log output
No response
Screenshots
No response
Additional Context
No response
Describe the bug
I'm looking at an asap7 test where we get stuck quite a while because of EOL violations between M2 tracks connecting to two pins in a standard cell. Only M1 and M2 are visible here, and you can see the yellow box showing the DRC issue between the two pins. M2 has an
EOLKEEPOUTrule:I notice a number of things:
There is quite a lot of space, but we've clustered them all together, almost guaranteeing an EOL violation. I know we turn off some of the rules during pin access, eg
gcWorker.setIgnoreLongSideEOL();, and maybe this is contributing to it.But rp (and so fixed cost/routing costs) only consider forward and side:
Not an issue here, but might be nice to fix.
CORNERONLYrules in fixed/routing costs? We place a planar cost, but since it's aCORNERONLYrule, then only a wire terminating on that grid point should be penalized (assuming I understand the rule correctly). A wire passing through should not have the cost applied:Expected Behavior
We don't get stuck for multiple iterations creating the same DRC issue.
Environment
To Reproduce
Test case is at https://ozlabs.org/~anton/junk/astar-eol-drc.tar.gz
Relevant log output
No response
Screenshots
No response
Additional Context
No response