Skip to content

xiaosinju/DAC25-ReMaP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[DAC'25] ReMaP: Towards Expert-Quality Macro Placement by Recursively Prototyping and Relocating

This repository contains the code for ReMaP, a macro placement framework that generates expert-quality macro layout recursively with novel and well-designed flow of prototyping and relocating. Compared to state-of-the-art macro placers, ReMaP achieves the best WNS and TNS metrics across the eight test cases from the popular OpenROAD-flow-scripts (ORFS) infrastructure, with improvements of up to 34.15% in WNS and 65.39% in TNS.

We provide both implementation of our ReMaP framework, and the full scripts including evaluation metadata to replicate the main table in our paper.

Quick Access to Our Meta-data and Results

Get the code and put it in folder DAC25-ReMaP.

Two line of code to replicate the main table:

cd DAC25-ReMaP
python OpenROAD-PPA-evaluation/get_metrics.py

The results is presented at DAC25-ReMaP/main_table.csv.

Dataset Method Wirelength WNS TNS Power #overflow
bp_quad RTLMP 55350882 -1.403 -22767.7 1.80286 161655
bp_quad Hier-RTLMP 44684974 -0.99448 -16445.8 1.80491 11330
bp_quad DREAMPlace 51924038 -1.30537 -21669.8 1.82423 28822
bp_quad ReMaP 54296360 -0.92684 -14139.2 1.81184 4629
... ... ... ... ... ... ...

You can also access our evaluation meta-data of all baselines at DAC25-ReMaP/OpenROAD-PPA-evaluation/eval_metadata.

Run ReMaP Algorithm

Below we provide detailed scripts to run the proposed ReMaP algorithm.

Build with Docker

We highly recommend the use of Docker to enable a smooth environment configuration.

The following steps are borrowed from DREAMPlace repository. We make minor revisions to make it more clear.

  1. To ReMaP directory:

    cd ReMaP
    
  2. Get the container:

  • Option 1: pull from the cloud limbo018/dreamplace.

    docker pull limbo018/dreamplace:cuda
    
  • Option 2: build the container.

    docker build . --file Dockerfile --tag your_name/dreamplace:cuda
    
  1. Make sure you are in root directory of ReMaP (e.g. /path/to/DAC25-ReMaP/ReMaP). Enter bash environment of the container. Replace limbo018 with your name if option 2 is chosen in the previous step.

    sudo docker run --gpus=all -it -v $(pwd):/workspace limbo018/dreamplace:cuda bash
    
  2. Build.

    mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=../install
    make
    
  3. We don't run make install here since we have to get benchmarks first. make install is included in our following bash scripts.

  4. If option 1 is chosen in step 2, there are some necessary Python packages to be installed. Run the command below in the container:

    pip install -r requirements.txt
    

    Then exit from the container, and execute

    sudo docker commit $(sudo docker ps -a | head -2 | grep -Po "^[a-z0-9]+\s+limbo018/dreamplace:cuda" | awk '{print $1}') limbo018/dreamplace:cuda
    

Get Benchmarks

In our experiments, we test our framework on cases from OpenROAD-flow-scripts (ORFS) [Ajayi et al., DAC'19], containing

  • ariane133
  • ariane136
  • black_parrot
  • bp_be
  • bp_fe
  • bp_multi
  • bp_quad
  • swerv_wrapper

We run ORFS to generate the synthesized netlist and dump DEFs for our placement task. You can download the cases here.

Then unzip the package and put it under following the directory:

DAC25-ReMaP/ReMaP/benchmarks/

Run Macro Placement Task

You can run our experiment on all 8 cases with shell script:

bash run.sh

Or, you can run single case by (ariane133 for example):

bash single_case.sh ariane133

The macro placement results are stored at the following directory:

DAC25-ReMaP/ReMaP/install/results/${date}/${design_name}/${time}

Run OpenROAD-flow-scripts for PPA Evaluation

To evaluate PPA of the macro placement results, we provide all the scripts needed for replication.

Installation

The installation of OpenROAD is required. We recommend use the pre-built binary.

Dataset Preparation

Assuming OpenROAD has been properly installed and the environment has been enabled, we should first prepare the synthesized netlist. Download the package here and unzip it under the following directory:

DAC25-ReMaP/OpenROAD-PPA-evaluation/

Then we put the previous generated macro placement result into the directory accordingly.

Macro placement result directory:

DAC25-ReMaP/ReMaP/install/results/${date}/${design_name}/${time}/mp_out

Target directory:

DAC25-ReMaP/OpenROAD-PPA-evaluation/results/nangate45/${design_name}/ReMaP/mp_out

If you failed to generate macro placement results, while wishing to run the evaluation scripts, we provide ours (which are exactly generated by the ReMaP code) under the following directory:

DAC25-ReMaP/ReMaP/benchmarks/or_cases/${design_name}/mp_out

You can put it under the Target directory.

Run test

Run the evaluation script through the following bash script:

cd DAC25-ReMaP/OpenROAD-PPA-evaluation
bash run-or.sh

To run specified cases, just modify the run-or.sh file.

Results and logs can be found at following directory:

DAC25-ReMaP/OpenROAD-PPA-evaluation/results/nangate45/${design_name}/ReMaP
DAC25-ReMaP/OpenROAD-PPA-evaluation/logs/nangate45/${design_name}/ReMaP

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •