安装使用开源EDA有关软件笔记(一)

本文详细介绍了如何在UbuntuLinux系统上安装iverilog,Verilator,GTKWave等工具,以及遇到的问题如软件包依赖、版本兼容性和Boost库的安装,包括MVSIS、yosys和oss-cad-suite-build的安装步骤。

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

Ubuntu Linux下iverilog Verilator GTKWave安装
$ sudo apt install iverilog
$ sudo apt install verilator
$ sudo apt install gtkwave

$ iverilog -v
Icarus Verilog version 11.0 (stable) ()
$ verilator --version
Verilator 4.038 2020-07-11 rev v4.036-114-g0cd4a57ad
$ gtkwave --version
GTKWave Analyzer v3.3.104 (w)1999-2020 BSI

安装alice
$ git clone https://github.com/msoeken/alice
$ cd alice
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake -DALICE_EXAMPLES=ON …
$ make
做make时,使用以下命令速度可以大幅提高:
$ make -j 8

运行实例

$ ./examples/demo
demo> help
Manipulation commands:
 upper

I/O commands:
 read_text        write_text

Generation commands:
 hello

General commands:
 alias            convert          current          help
 print            ps               quit             set
 show             store

demo> quit
$

安装mvsis
安装必要的软件包
$ sudo dpkg --add-architecture i386
$ sudo apt-get install -y git build-essential autoconf gcc-multilib libreadline-dev:i386
运行这个命令会出错,出现:
E: Unable to locate package libreadline-dev:i386
应该是先运行:
$ sudo apt-get install -y git build-essential autoconf gcc-multilib
再运行
$ sudo apt update
$ sudo apt-get install libreadline-dev:i386

安装mvsis
$ git clone https://github.com/sterin/mvsis.git
$ cd mvsis
$ autoconf
$ ./configure
$ make CFLAGS=‘-m32 -O3’ LDFLAGS=‘-m32 -O3’

运行mvsis
$ ./mvsis

UC Berkeley, MVSIS 2.0 (compiled 24-Apr-24 at 4:13 PM)
mvsis 01> help
                        Welcome to MVSIS!

Basic commands:
 alias           echo            empty           help
 history         quit            recall          set
 source          time            unalias         undo
 unset           usage

Combinational synthesis commands:
 add_buffers     balance         choice          club
 collapse        collapse2       decomp          dsd
 eliminate       encode          espresso        fd
 fraig           fraig_sweep     fullsimp        fxu
 lxu             merge           mfs             mfsn
 pair_decode     reset_default   resub           sat_sweep
 simplify        strash          sweep

Mapping commands:
 attach          fpga            map             print_lut
 read_library    read_lut        read_super      resf
 resm            super           super2

Naming commands:
 chng_name       rename          reset_name

Printing commands:
 npn             print           print_domi      print_dsd
 print_factor    print_io        print_latch     print_level
 print_map_stats print_nd        print_range     print_reconv
 print_spec      print_stats     print_value     show_network
 supp            sym             write_gml

Reading commands:
 read_bench      read_blif       read_blif_mv    read_blif_mvs
 read_kiss       read_pla        read_pla_mv

Retiming commands:
 fraig_retime    retime

STG-based sequential synthesis commands:
 binary          check           check_nd        complement
 complete        dcmin           determinize     dot
 minimize        moore           prefix          print_support
 product         progressive     psa             read_automaton
 remove_dc       show            support         test
 trim            volume          write_automaton

Sequential synthesis commands:
 extract_seq_dc  io_encode       latch_expose    latch_split
 net_product     solve           stg_extract

Synthesis from L language commands:
 dtest           dual            formula         synth

Various commands:
 1hotize         assert          default         dize
 frames          free            miter           reorder
 sis             split_outputs   window

Verification commands:
 fraig_verify    reach           sat_verify      verify

Writing commands:
 write_bench     write_blif      write_blif_mv   write_blif_mvs
 write_gate      write_pla       write_pla_mv
mvsis 01> read_blif ./examples/C880.blif
mvsis 02> quit

安装yosys
$ git clone https://github.com/YosysHQ/yosys
$ cd yosys
$ mkdir build; cd build
$ make -f …/Makefile
比起上述命令,以下命令会快许多:
$ make -f …/Makefile -j 8
出现make错误,abc包有关错误

error: RPC failed; curl 16 Error in the HTTP2 framing layer
fatal: expected flush after ref listing
+ cd abc
/bin/sh: 7: cd: can't cd to abc
make: *** [../Makefile:797: abc/abc-03da96f] Error 2

重新运行
$ make -f …/Makefile
最后安装成功

运行yosys

$ ./yosys

 /----------------------------------------------------------------------------\
 |  yosys -- Yosys Open SYnthesis Suite                                       |
 |  Copyright (C) 2012 - 2024  Claire Xenia Wolf <claire@yosyshq.com>         |
 |  Distributed under an ISC-like license, type "license" to see terms        |
 \----------------------------------------------------------------------------/
 Yosys 0.40+33 (git sha1 cf02f86c2, g++ 11.4.0-1ubuntu1~22.04 -fPIC -Os)

yosys>  exit

End of script. Logfile hash: da39a3ee5e, CPU: user 0.01s system 0.00s, MEM: 11.52 MB peak
Yosys 0.40+33 (git sha1 cf02f86c2, g++ 11.4.0-1ubuntu1~22.04 -fPIC -Os)
Time spent: no commands executed
$

软件依赖关系
alice
pybind11
yosys
abc
oss-cad-suite-build
xdot
pycairo
PyGObject

安装oss-cad-suite-build
$ git clone https://github.com/YosysHQ/oss-cad-suite-build
$ cd oss-cad-suite-build
$ ./builder.py build
运行错误

Traceback (most recent call last):
  File "/home/lin/openeda/oss-cad-suite-build/./builder.py", line 3, in <module>
    import click, signal, os, sys, shutil
ModuleNotFoundError: No module named 'click'

先做以下安装
$ sudo apt-get install python3-pip
$ sudo pip3 install click
再运行
$ ./builder.py build
出错
==> ERROR : Error while cloning repository https://github.com/CVC4/CVC4.git.
重新运行使用以下命令,不需要覆盖已经克隆的软件包:
$ sudo ./builder.py build --no-update
出现编译错误:
FileNotFoundError: [Errno 2] No such file or directory: ‘docker’
先安装:
$ sudo apt-get install docker
$ sudo apt install docker-compose
$ sudo pip3 install docker
再运行:
$ sudo ./builder.py build --no-update
部分安装可以使用以下命令
$ sudo ./builder.py build --target=yosys --arch=linux-x64 --no-update

出错:
Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
处理如下:
$ python3 -m pip install --upgrade pip
然后
$ pip install --upgrade setuptools

$ python3 -m pip install --upgrade setuptools

即使打了以上补丁,还是出现编译错误。

CMake Error at CMakeLists.txt:136 (add_executable):
  Cannot find source file:

    /work/_builds/linux-x64/prjtrellis-bba/prjtrellis/libtrellis/generated/version.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:136 (add_executable):
  No SOURCES given to target: ecpbram

对于prjtrellis,进行单独安装编译,出现以下错误:

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options thread) (found version
  "1.74.0")

说明缺少Boost

安装lstools-showcase
$ git clone https://github.com/lsils/lstools-showcase
$ cd lstools-showcase
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake …
$ make -j 14

安装prjtrellis
$ git clone --recursive https://github.com/YosysHQ/prjtrellis
$ cd prjtrellis
$ cd libtrellis
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
$ make
$ sudo make install
出现错误

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: program_options thread) (found version  "1.74.0")

应该是缺少Boost。

安装Boost
下载软件网址:https://www.boost.org/users/download/
下载 boost_1_85_0.tar.gz
$ tar -zxvf boost_1_85_0.tar.gz
$ cd boost_1_85_0
$ ./bootstrap.sh
$ sudo ./b2 install
安装完毕之后,头文件默认在/usr/local/include目录中,.a与.so文件在/usr/local/lib目录下。

安装gtkwave必要的准备
$ sudo apt-get install gtk-doc-tools
$ sudo apt install -y gobject-introspection
$ sudo apt install -y libgirepository1.0-dev
要求meson版本是1.0以上
$ meson --version
0.61.2
更新 meson
$ pip install --upgrade meson
$ meson --version
1.4.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值