FPGA開発日記

カテゴリ別記事インデックス https://msyksphinz.github.io/github_pages , English Version https://fpgadevdiary.hatenadiary.com/

NVDLAv2のインストール試行

http://nvdla.org/_images/ig_system_interfaces1.png

いまさらながら、NVDLAv2のインストールを試行した。

開発環境はUbuntu 18.04LTSだ。使用したリビジョンは7cf6ad5a6e75f01aac1b0041288612e63a5999acを使用した。

github.com

commit 7cf6ad5a6e75f01aac1b0041288612e63a5999ac (HEAD -> master, origin/master)
Author: Dan Smith <dsmith@nvidia.com>
Date:   Thu Jul 26 14:05:20 2018 -0700

    Add RAM model

環境設定

NVDLAv1と比較して、いくつかPythonのインストールする必要があった。

$ sudo apt install libyaml-tiny-perl
$ sudo apt install -y libcapture-tiny-perl

ビルド作業

テストベンチはnv_smallしかサポートしていないので、nv_smallを使用する。 いろいろ環境設定をしなければならないのだが、systemcなど入れていないし、VCSなんて持っていないのでどうすればよいのか...

$ cd nvdla/hw/
$ make
Creating tree.make to setup your working environment and projects
Enter project names      (Press ENTER if use: nv_small nv_small_256 nv_small_256_full nv_medium_512 nv_medium_1024_full nv_large):nv_small
Using designware or not [1 for use/0 for not use] (Press ENTER if use: 1):0
Enter design ware path (Press ENTER if use: /home/tools/synopsys/syn_2011.09/dw/sim_ver):
Enter c pre-processor path (Press ENTER if use: /home/utils/gcc-4.8.2/bin/cpp):/usr/bin/cpp
Enter gcc path             (Press ENTER if use: /home/utils/gcc-4.8.2/bin/gcc):/usr/bin/gcc
Enter g++ path             (Press ENTER if use: /home/utils/gcc-4.8.2/bin/g++):/usr/bin/g++
Enter perl path            (Press ENTER if use: /home/utils/perl-5.10/5.10.0-threads-64/bin/perl):/usr/bin/perl
Enter java path            (Press ENTER if use: /home/utils/java/jdk1.8.0_131/bin/java):/usr/bin/java
Enter systemc path         (Press ENTER if use: /home/ip/shared/inf/SystemC/1.0/20151112/systemc-2.3.0/GCC472_64_DBG):
Enter python path          (Press ENTER if use: /home/tools/continuum/Anaconda3-5.0.1/bin/python):/usr/bin/python
Enter vcs_home path        (Press ENTER if use: /home/tools/vcs/mx-2016.06-SP2-4):
Enter novas_home path      (Press ENTER if use: /home/tools/debussy/verdi3_2016.06-SP2-9):
Enter verdi_home path      (Press ENTER if use: /home/tools/debussy/verdi3_2016.06-SP2-9):
OPTIONAL: Enter verilator path (Press ENTER to use: verilator):/usr/bin/verilator
OPTIONAL: Enter clang path     (Press ENTER to use: /home/utils/llvm-4.0.1/bin/clang):/home/msyksphinz/llvm/bin//clang
=====================================================================
tree.make is created successfully, and you can edit tree.make manually if necessary
=====================================================================

ビルドを実行する。

$ ./tools/bin/tmake -build vmod
[TMAKE]: building nv_small in spec/defs
[TMAKE]: building nv_small in spec/manual
[TMAKE]: building nv_small in spec/odif
[TMAKE]: building nv_small in vmod/vlibs
[TMAKE]: building nv_small in vmod/include
[TMAKE]: building nv_small in vmod/rams/model
[TMAKE]: building nv_small in vmod/rams/synth
[TMAKE]: building nv_small in vmod/rams/fpga/model
[TMAKE]: building nv_small in vmod/fifos
[TMAKE]: building nv_small in vmod/nvdla/apb2csb
[TMAKE]: building nv_small in vmod/nvdla/cdma
[TMAKE]: building nv_small in vmod/nvdla/cbuf
[TMAKE]: building nv_small in vmod/nvdla/csc
[TMAKE]: building nv_small in vmod/nvdla/cmac
[TMAKE]: building nv_small in vmod/nvdla/cacc
[TMAKE]: building nv_small in vmod/nvdla/sdp
[TMAKE]: building nv_small in vmod/nvdla/pdp
[TMAKE]: building nv_small in vmod/nvdla/cfgrom
[TMAKE]: building nv_small in vmod/nvdla/cdp
[TMAKE]: building nv_small in vmod/nvdla/bdma
[TMAKE]: building nv_small in vmod/nvdla/rubik
[TMAKE]: building nv_small in vmod/nvdla/car
[TMAKE]: building nv_small in vmod/nvdla/glb
[TMAKE]: building nv_small in vmod/nvdla/csb_master
[TMAKE]: building nv_small in vmod/nvdla/nocif
[TMAKE]: building nv_small in vmod/nvdla/retiming
[TMAKE]: building nv_small in vmod/nvdla/top
[TMAKE]: Done nv_small
[TMAKE]: nv_small: PASS

テストの準備を実行する。なぜかFailしてしまった。

$ ./tools/bin/tmake -build ready_for_test
[TMAKE]: building nv_small in spec/defs
[TMAKE]: building nv_small in spec/manual
[TMAKE]: building nv_small in verif/testbench/trace_generator
Traceback (most recent call last):
  File "../../../tools/bin/epython", line 162, in <module>
    process_file.exe_input()
  File "../../../tools/bin/epython", line 117, in exe_input
    self.codes_gen(tmp_file_hdl, scripts)
  File "../../../tools/bin/epython", line 146, in codes_gen
    codes = self.exe_python(scripts)
  File "../../../tools/bin/epython", line 154, in exe_python
    exec(scripts)
  File "<string>", line 4, in <module>
  File "../../.././verif/tools/spec2constrain.py", line 103, in enum_gen
    print('%-50s = \'h%0x' % (str0,keys[idx]))
TypeError: unicode argument expected, got 'str'
make: *** [../../../outdir/nv_small/verif/testbench/trace_generator/resources/nvdla_cdp_resource.sv] Error 1
[TMAKE]: DIE when building nv_small verif/testbench/trace_generator at ./tools/

上記の設定でPythonのPATHをPython3にするとうまく動作した。が、VCSなんて入ってないよう!

$ ./tools/bin/tmake -build ready_for_test
[TMAKE]: building nv_small in spec/defs
[TMAKE]: building nv_small in spec/manual
[TMAKE]: building nv_small in verif/testbench/trace_generator
make: /home/tools/vcs/mx-2016.06-SP2-4/bin/vcs: Command not found
make: *** [vcs_build] Error 127
[TMAKE]: DIE when building nv_small verif/testbench/trace_generator at ./tools/bin/tmake line 278.
[TMAKE]: nv_small: FAIL

Verilatorで実行できるかしら。

$ ./tools/bin/tmake -build verilator
...
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365: Cannot find file containing module: RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365: Looked in:
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/bdma/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/bdma/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/bdma/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cacc/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cacc/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cacc/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/car/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/car/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/car/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cbuf/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cbuf/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cbuf/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdma/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdma/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdma/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdp/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdp/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cdp/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cmac/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cmac/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/cmac/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csc/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csc/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csc/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/glb/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/glb/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/glb/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/nocif/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/nocif/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/nocif/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/pdp/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/pdp/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/pdp/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/retiming/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/retiming/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/retiming/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/rubik/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/rubik/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/rubik/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/sdp/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/sdp/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/sdp/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/top/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/top/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/top/RAMPDP_80X17_GL_M2_D2.sv
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csb_master/RAMPDP_80X17_GL_M2_D2
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csb_master/RAMPDP_80X17_GL_M2_D2.v
%Error: ../../outdir/nv_small/vmod/rams/synth/nv_ram_rwsthp_80x17_logic.v:365:       ../../outdir/nv_small/vmod/nvdla/csb_master/RAMPDP_80X17_GL_M2_D2.sv
%Error: Exiting due to too many errors encountered; --error-limit=50
%Error: Command Failed /usr/bin/verilator_bin --compiler clang --output-split 250000000 --cc --exe -f verilator_nv_small.f --Mdir ../../outdir/nv_small/verilator/ nvdla.cpp --compiler clang --output-split 250000000
make: *** [../../outdir/nv_small/verilator/VNV_nvdla.mk] Error 10
[TMAKE]: DIE when building nv_small verif/verilator at ./tools/bin/tmake line 278.
[TMAKE]: nv_small: FAIL

うーんだめだ。Synopsysのツールが入ってないと使えないっぽい?