当前位置: 首页 > news >正文

DreamPlace 的下载安装与使用

DreamPlace 是一款芯片放置工具,用于宏单元(macro)和标准单元(Standard Cell)的放置以及布线,并计算 HPWL、Overlap 等用于衡量芯片性能的参数。


一、环境

1. 系统环境:Ubuntu 20.04

DreamPlace 只能在 Linux 环境使用

2. Python 环境:

  • Python 3.8
  • PyTorch 2.0.0
  • Cuda 11.8

二、安装 Dreamplace

1. 安装第三方 Dependency

  • Boost
    sudo apt-get update
    sudo apt-get install libboost-all-dev
    
  • Bison & flex
    sudo apt-get install flex bison
    

2. 下载 DreamPlace

git clone --recursive https://github.com/limbo018/DREAMPlace.git

3. 安装 Python Dependency

cd DREAMPlace
pip install -r requirements.txt

4. Build Dreamplace

build 之前需要先打开 DREAMPlace/dreamplace/ops/CMakeLists.txt 文件,把第 12 行的注释打开(不然无法安装这个包,我在运行 deepplace 的时候用到了这个包,其他情况下还没有用到)

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<installation directory> -DPython_EXECUTABLE=$(which python)
make
make install
  • -DCMAKE_INSTALL_PREFIX 是安装路径,默认是 DREAMPLACE/install
  • -DPython_EXECUTABLE 是 python 路径,如果有 anaconda 默认是 base 环境

5. Install Benchmarks

cd ../install
python benchmarks/ispd2005_2015.py

另外,benchmark 也可以自己下载并解压到正确的文件夹下,具体位置可参考下文目录树。DreamPlace 只支持 bookshelf 和 Lef/Def 格式的文件。

6. 测试是否安装成功

python dreamplace/Placer.py test/ispd2005/adaptec1.json
python unittest/ops/hpwl_unittest.py

安装完成后的目录结构如下,主要用到的东西都在 install 文件夹内:

DREAMPlace
|-- CMakeLists.txt
|-- Dockerfile
|-- LICENSE
|-- README.md
|-- benchmarks
|-- build
|-- cmake
|-- dreamplace
|-- images
|-- install
|   |-- benchmarks
|   |   |-- ispd2005
|   |   |   |-- adaptec1
|   |   |   |   |-- adaptec1.aux
|   |   |   |   |-- adaptec1.dp.aux
|   |   |   |   |-- adaptec1.eplace-ip.pl
|   |   |   |   |-- adaptec1.eplace.aux
|   |   |   |   |-- adaptec1.lg.pl
|   |   |   |   |-- adaptec1.nets
|   |   |   |   |-- adaptec1.nodes
|   |   |   |   |-- adaptec1.pl
|   |   |   |   |-- adaptec1.scl
|   |   |   |   `-- adaptec1.wts
|   |   |   |-- adaptec2
|   |   |   |-- adaptec3
|   |   |   |-- adaptec4
|   |   |   |-- bigblue1
|   |   |   |-- bigblue2
|   |   |   |-- bigblue3
|   |   |   `-- bigblue4
|   |   |-- ispd2005_2015.py
|   |   `-- ispd2019.py
|   |-- bin
|   |-- dreamplace
|   |   |-- BasicPlace.py
|   |   |-- EvalMetrics.py
|   |   |-- NesterovAcceleratedGradientOptimizer.py
|   |   |-- NonLinearPlace.py
|   |   |-- Params.py
|   |   |-- PlaceDB.py
|   |   |-- PlaceObj.py
|   |   |-- Placer.py
|   |   |-- Timer.py
|   |   |-- __init__.py
|   |   |-- configure.py
|   |   |-- ops
|   |   `-- params.json
|   |-- include
|   |-- lib
|   |-- test
|   |   |-- dac2012
|   |   |-- iccad2014
|   |   |-- iccad2015.ot
|   |   |-- ispd2005
|   |   |-- ispd2015
|   |   `-- ispd2019
|   |-- thirdparty
|   `-- unittest
|-- requirements.txt
|-- test
|-- thirdparty
`-- unittest

三、测试脚本

回到根目录根目录创建新文件夹,并创建测试脚本

cd ~
mkdir test_dreamplace
cd test_dreamplace
vim main.py

脚本内容如下,其中 params 用来加载配置参数,我们需要提供关于 bechmark 的配置文件,配置文件格式可以参考 test 文件夹内的文件:

import Params, Placerparams = Params.Params()# load parameters
add = "./test/ispd2005/adaptec3.json"
params.load(add)
r = Placer.place(params)
r = r[-3][0]
wl = float(r[0].hpwl.data)
overf = float(r[0].overflow.data)print(wl)
print(overf)

将 DreamPlace 移植到该目录下:

cd ~
cp -r DREAMPlace/install/* test_dreamplace/

然后将 test_dreamplace/dreamplace 文件夹下的除 ops、init.py、configure.py 之外的其他文件移动到 test_dreamplace/ 目录下。
之后运行脚本跑通即可:

python main.py

目前该文件夹结构为:

test_dreamplace
|-- BasicPlace.py
|-- EvalMetrics.py
|-- NesterovAcceleratedGradientOptimizer.py
|-- NonLinearPlace.py
|-- Params.py
|-- PlaceDB.py
|-- PlaceObj.py
|-- Placer.py
|-- Timer.py
|-- __pycache__
|-- benchmarks
|   |-- ispd2005
|   |-- ispd2005_2015.py
|   `-- ispd2019.py
|-- bin
|-- dreamplace
|   |-- __init__.py
|   |-- __pycache__
|   |-- configure.py
|   `-- ops
|-- include
|-- lib
|-- main.py
|-- params.json
|-- results
|   `-- adaptec3
|-- test
|-- thirdparty
`-- unittest
http://www.lryc.cn/news/255868.html

相关文章:

  • FPGA模块——SPI协议(读写FLASH)
  • SQL自学通之表达式条件语句与运算
  • 公网域名如何解析到内网IP服务器——快解析域名映射外网访问
  • 线程安全与并发区别
  • SEO优化是什么,如何进行SEO优化
  • nodejs发起http或https请求
  • 举例C#使用特性排除某些类成员不参与XML序列化和反序列化
  • PHP基础 - 输入输出
  • 大创项目推荐 交通目标检测-行人车辆检测流量计数 - 大创项目推荐
  • 利用R语言heatmap.2函数进行聚类并画热图
  • 伦茨科技宣布ST17H6x芯片已通过Apple Find My「查找」认证
  • nodejs微信小程序+python+PHP的游戏测评网站设计与实现-计算机毕业设计推荐
  • 在 JavaScript 中导入和导出 Excel XLSX 文件:SpreadJS
  • 【Pytorch】Fizz Buzz
  • C++ Primer Plus第十四章笔记
  • CentOS 7 mini 运行环境搭建与测试——CentOS Mini 安装ifconfig工具【云原生开发部署实践笔记】
  • 案例061:基于微信小程序的互助学习系统
  • 【ELK03】ES 索引的Mapping映射详解、数据类型和settings属性设置
  • 线性代数入门与学习笔记
  • Linux安全学习路标
  • 常见的中间件--消息队列中间件测试点
  • 【USRP】5G / 6G OAI 系统 5g / 6G OAI system
  • ubuntu20.04设置开机自启动jar(依赖其他服务)
  • 【GEE笔记】在线分类流程,标注样本点、分类和精度评价
  • MATLAB基础运算
  • Linux DAC权限的简单应用
  • JVS低代码表单引擎:数据校验与处理的先锋
  • clickhouse删除partition分区数据
  • 持续集成交付CICD:CentOS 7 安装 Nexus 3.63
  • Apache Flink(十):Flink集群基础环境搭建-JDK及MySQL搭建