CHIPYARD环境安装与编译指南

本文详细指导了如何在Ubuntu20.04系统上安装必要的软件包,如CMake3.20.0、Circt、Scalasbt、Verilator4.218,并配置用于编译和运行UCBBar的Chipyard项目,特别强调了MLIR和RocketChip相关组件的安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

======== setup basic environment =========
ubuntu20.04-LTS
sudo apt install jq device-tree-compiler  ninja-build clang

===== install cmake version above 3.20 =====

download cmake-3.20.0-linux-x86_64.tar.gz from http://cmake.org/download
cd /opt & sudo -i
tar zxvf cmake-3.20.0-linux-x86_64.tar.gz to /opt/cmake-3.20
export PATH=/opt/cmake-3.20/bin:$PATH

========== install circt firtool ============
git clone https://github.com/llvm/circt
cd circt
git submodule init
git submodule update

git checkout -b firtool-1.50.0
cd circt/llvm/build
cmake -G Ninja ../llvm \
    -DLLVM_ENABLE_PROJECTS="mlir" \
    -DLLVM_TARGETS_TO_BUILD="host" \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ninja
ninja check-mlir

cd circt
mkdir build
cd build
cmake -G Ninja .. \
    -DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
    -DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ninja
ninja check-circt
ninja check-circt-integration 

export PATH=/home/hemin/cad/circt/build/bin:$PATH


========= install scala-sbt ==============
refer to http://www.scala-sbt.org/download.html

echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt

sbt --version
sbt version in this project: 1.9.3
sbt script version: 1.9.3

========= install verilator v4.218 ==========
git clone https://gitee.com/weihemin/verilator
git checkout -b v4.218
git branch
autoconf
./configure
make 
sudo make install

======== compile and run chipyard ========
git clone https://github.com/ucb-bar/chipyard
cd chipyard
git submodule update --init

cd chipyard/generator/rocket-chip
git submodule update --init

cd chipyard/sims/vcs
make CONFIG=TinyRocketConfig

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值