The-OpenROAD-Project / OpenROAD-flow-scripts

OpenROAD's scripts implementing an RTL-to-GDS Flow. Documentation at https://openroad-flow-scripts.readthedocs.io/en/latest/
https://theopenroadproject.org/
Other
331 stars 288 forks source link

Flow crash when trying to place macro using mpl2 placement.tcl file #2242

Closed nchiolino closed 2 months ago

nchiolino commented 2 months ago

Subject

Describe the bug

Trying to place two macros in specific locations using a placement.tcl file. When the macro placement step occurs, it receives a signal 8 and crashes. image

Expected Behavior

I expect mpl2 to place the macros with no errors. I have been able to place the macros using the mpl tool and a .cfg macro placement file, however, the netlist is not correct compared to the synthesized one so I am getting incorrect routing nets for grt. I want to utilize the hierarchical synthesis and macro placement but keep receiving this signal 8 issue.

Environment

[WARNING] Your current OpenROAD version is outdated.

It is recommened to pull the latest changes.

If problem persists, file a github issue with the re-producible test case.

kernel: Linux 6.5.0-44-generic

os: Ubuntu 22.04.4 LTS (Jammy Jellyfish)

cmake version 3.24.2

-- The CXX compiler identification is GNU 11.4.0

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++ - skipped

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- OpenROAD version: v2.0-13893-gf0cc0ee1a

-- System name: Linux

-- Compiler: GNU 11.4.0

-- Build type: RELEASE

-- Install prefix: /usr/local

-- C++ Standard: 17

-- C++ Standard Required: ON

-- C++ Extensions: OFF

-- The C compiler identification is GNU 11.4.0

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working C compiler: /usr/bin/cc - skipped

-- Detecting C compile features

-- Detecting C compile features - done

-- Found Python: /usr/bin/python3.10 (found version "3.10.12") 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

-- 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__-std=c++17

-- Performing Test C_COMPILER_SUPPORTS__-std=c++17 - Failed

-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17

-- Performing Test CXX_COMPILER_SUPPORTS__-std=c++17 - Success

-- 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/lib/x86_64-linux-gnu/libtcl.so

-- TCL header: /usr/include/tcl/tcl.h

-- TCL readline library: /usr/lib/x86_64-linux-gnu/libtclreadline.so

-- TCL readline header: /usr/include/x86_64-linux-gnu

-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "4.0")  

-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0")  

-- boost: 1.80.0

-- Found Python3: /usr/include/python3.10 (found version "3.10.12") found components: Development Development.Module Development.Embed 

-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 

-- spdlog: 1.8.1

-- Found BISON: /usr/bin/bison (found version "3.8.2") 

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 

-- STA version: 2.5.0

-- STA git sha: b71b48ad16590ea7fa144790a2f7ab2ab3d24640

-- System name: Linux

-- Compiler: GNU 11.4.0

-- 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/lib/x86_64-linux-gnu/libtcl.so

-- TCL header: /usr/include/tcl/tcl.h

-- SSTA: 0

-- Found SWIG: /usr/bin/swig4.0 (found suitable version "4.0.2", minimum required is "3.0")  

-- STA executable: /home/nchiolino/OpenROAD-flow-scripts/tools/OpenROAD/src/sta/app/sta

-- Found re2: /opt/or-tools/lib/cmake/re2/re2Config.cmake (found version "9.0.0") 

-- Found Clp: /opt/or-tools/lib/cmake/Clp/ClpConfig.cmake (found version "1.17.7") 

-- Found Cbc: /opt/or-tools/lib/cmake/Cbc/CbcConfig.cmake (found version "2.10.7") 

-- Found SCIP: /opt/or-tools/lib/cmake/scip/scip-config.cmake (found version "8.0.1") 

-- Found OpenMP_CXX: -fopenmp (found version "4.5") 

-- Found OpenMP: TRUE (found version "4.5")  

-- GPU is not enabled

-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so

-- TCL header: /usr/include/tcl/tcl.h

-- GUI is enabled

-- Charts widget is enabled

-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization 

-- Could NOT find VTune (missing: VTune_LIBRARIES VTune_INCLUDE_DIRS) 

-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.78")  

-- TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so

-- TCL header: /usr/include/tcl/tcl.h

-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0") found components: serialization system thread 

-- Found Boost: /usr/local/lib/Number of processor cores: 4

cmake/Boost-1.80.0/BoostConfig.cmake (found version "1.80.0")  

-- Found Eigen3: /usr/local/share/eigen3/cmake/Eigen3Config.cmake (found version "3.4.1") 

-- TCL readline enabled

-- Tcl Extended disabled

-- Python3 enabled

-- Configuring done

-- Generating done

-- Build files have been written to: /tmp/tmp.Qh4kMbv7LM

To Reproduce

I am running a proprietary pdk and cannot provide a working example at the moment.

Relevant log output

No response

Screenshots

No response

Additional Context

No response

maliberty commented 2 months ago

Are you using MACRO_PLACEMENT_TCL or MACRO_PLACEMENT to place the macros? If so the macro placer should be skipped.

nchiolino commented 2 months ago

I am using MACRO_PLACEMENT_TCL. That is what it is crashing on when called. I am assuming.

nchiolino commented 2 months ago

Its demonstrating to me that it might be a resource problem. I am working on increasing my resources.

nchiolino commented 2 months ago

@maliberty , when you say that the macro placer can be skipped if I use a placement file with exact locations, do you mean that I don't need to set the RTLMP_FLOW variable?

maliberty commented 2 months ago

RTLMP_FLOW will be ignored if MACRO_PLACEMENT_TCL is set and the macro placer won't be run either. It makes me think there is something wrong in how you are setting it. You can see the logic in https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/ee899c351818915c3aa721ff4c29fe9f7fce6df0/flow/scripts/macro_place_util.tcl#L47 . Do you see the "Using manual macro placement file" message?

nchiolino commented 2 months ago

To provide more clarification, I have had success placing macros setting SYNTH_HIERARCHICAL = 0 and using a macro_placement.cfg file. Since my top level RTL is assembled in a hierarchical fashion AND mpl2 is a better tool, I was hoping to get macro placement using SYNTH_HIERARCHICAL = 1. Also, I was getting some very strange results with PAD net names wanting to route to internal core gates during grt. I assumed it was a failure with not using the hierarchical method. Therefore, I am trying to blaze a trail using the hierarchical synth and macro placement. For the question you asked just now. Here is a screenshot of my terminal just after floorplan and when it calls the macro placement and it does look that its not even getting to the line of code you mentioned before. I have only seen that line of code when doing the non-hierarchical method mentioned above. Does that help clarify my journey thus far? (note: I have blacked out a couple of lines of code for protection of sensitive information) image

nchiolino commented 2 months ago

After some code debug with print statements, I was able to find out that the crash is occurring on the first line of my macro placement tcl file. Here is a screenshot of my file. Its very simple and the two memory macros are hierarchecly under the top level soc chip. Is there an issue with my syntax perhaps? image

maliberty commented 2 months ago

We are getting closer. Since you can't share you test case, would you build for debug and get exact line info? Does you design have routing tracks?

nchiolino commented 2 months ago

Yes, the design has routing tracks and the X Y locations, of the macros listed above, are whole numbers of the site location. During the exercise for building the test case with a "dummy" macro, for some reason, it worked. This is even with the proprietary technology. So now I am wondering if its an issue with the macro itself or with the RTL its inserted into. I will attempt to insert the memory macro into the test case RTL first to isolate that variable. If it works then I will insert the dummy macro in the original RTL to isolate that variable. Stay tuned.

maliberty commented 2 months ago

That's a good clue. Is it possible you macro has pins without any physical geometry?

nchiolino commented 2 months ago

Due to deadline issues, I am moving back to flat synthesis and utilizing mpl for macro placement. I will have to pick this up if I have spare time.

maliberty commented 2 months ago

Ok, reopen if you decide to pick it up.