Skip to content

Instantly share code, notes, and snippets.

@parastuffs
Last active February 10, 2022 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parastuffs/bfcbf73d21c832e9be731982301a35c6 to your computer and use it in GitHub Desktop.
Save parastuffs/bfcbf73d21c832e9be731982301a35c6 to your computer and use it in GitHub Desktop.
Tips and tricks to install and use OpenROAD

Tips regarding the installation on Debian (Bullseye)

  • DependencyInstaller.sh should be run before anything else. Problem is, it only recognizes Ubuntu and CentOS. The content can be applied in a Debiane environment almost seamlessly, though. On the BEAMS server, the following needed to be installed: libboost1.74-dev libeigen3-dev libspdlog-dev swig
  • lemon is not suitable in the official repo, so it needs to be installed manually:
    wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz
    tar -xf lemon-1.3.1.tar.gz
    cd lemon-1.3.1
    cmake -B build .
    sudo cmake --build build -j $(nproc) --target install
  • If you want the gui to be supported, you need to install Qt packages before building the flow: qtbase5-dev qtchooser qtbase5-dev-tools qt5-image-formats-plugins
  • You need to add a few lines in tools/OpenROAD/src/psm/src/ir_solver.cpp:289 to avoid a maybe-uninitialized error:
    second = 0;
    size = 0;
    This does not change anything as it will be changed in the following loop. The compiler is simply too cautious to let it pass.
  • In tools/OpenROAD/src/gui/src/layoutViewer.cpp, you need to change drawRoundRect (deprecated) into drawRoundedRect.
  • Make sure the bash shebang is present in all .sh scripts: #!/usr/bin/env bash. Otherwise, the default sh is used, which simlinks to dash, which will throw errors.
  • You can change the install path using ./build_openroad.sh --local --install-path /opt/OpenROAD.

Using the flow

  • Once installed, add the executable to your PATH:
    export PATH=/opt/OpenROAD/OpenROAD/bin:$PATH;
    export PATH=/opt/OpenROAD/yosys/bin:$PATH;
  • Clone the repo locally: git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts
  • Build the design: make DESIGN_CONFIG=./designs/asap7/ibex/config.mk from the flow directory.
  • To use the GUI: make DESIGN_CONFIG=./designs/asap7/ibex/config.mk gui_final from the flow directory.
  • Follow the official doc.

Result

Check it out: gui demo here

Add a new design -- openMSP430 with sky130hd

  • Put all the Verilog files in flow/designs/src/openmsp430/
  • Create a folder flow/designs/sky130hd/openmsp430/ In this folder, put two files:
    • config.mk:
    export PLATFORM               = sky130hd
    
    export DESIGN_NAME            = openMSP430
    export DESIGN_NICKNAME        = openmsp430
    
    export VERILOG_FILES = $(sort $(wildcard ./designs/src/$(DESIGN_NICKNAME)/*.v))
    export SDC_FILE      = ./designs/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc
    
    export ABC_AREA               = 1
    
    export CORE_UTILIZATION       = 30
    export CORE_ASPECT_RATIO      = 1
    export CORE_MARGIN            = 2
    export PLACE_DENSITY          = 0.60
    
    • constraint.sdc:
    set clk_name  clk
    set clk_port_name clk
    set clk_period 540 
    set clk_io_pct 0.2
    
    set clk_port [get_ports $clk_port_name]
    
    create_clock -name $clk_name -period $clk_period $clk_port
    
    set non_clock_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]
    
    set_input_delay  [expr $clk_period * $clk_io_pct] -clock $clk_name $non_clock_inputs 
    set_output_delay [expr $clk_period * $clk_io_pct] -clock $clk_name [all_outputs]
    
    Both are basically a copy/paste from example designs. Json files can be generated later.
  • Go back to the flow directory and build the design: make DESIGN_CONFIG=./designs/sky130hd/openmsp430/config.mk

Resources

The official documentation is amazing:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment