[J-core] Fun with nvc.

Rob Landley rob at landley.net
Thu Jun 2 17:25:32 EDT 2016


I sat down to reproduce the nvc build Jeff and Nick were talking about
last month. The README.md file in https://github.com/nickg/nvc says
building from a git clone involves:

    ./autogen.sh
    ./tools/fetch-ieee.sh
    mkdir build && cd build
    ../configure
    make
    make install

In practice, first nvc wanted me to install flex and tclx8.4-dev
(_not_ tcl8.6-dev, it needs some sort of library that's only in tclx).
Then it needed llvm, which I decided to build from source so I could
use the latest version:

  wget http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz
  tar xvJf llvm-3.8.0.src.tar.xz
  mkdir llvm-build
  cd llvm-build
  ../llvm-3.8.0.src/configure --enable-languages=c,c++ --prefix=/usr/local
  make -j 2
  sudo make install

At that point, Jeff's ./nvc.sh build script found in the tarball attached
to http://lists.j-core.org/pipermail/j-core/2016-May/000164.html worked
for me,  and then to run it, "nvc -r cpu_pure_tb".
Those instructions were in Jeff's first message at:
http://lists.j-core.org/pipermail/j-core/2016-May/000179.html

Now that it more or less works (there are a bunch of asserts and
the timing is weird, but it passes its internal diagnostics and
runs the gdb stub), the next question is how to attach it to
yosys? (Again, discussed in the above message, but since Nick's been
traveling and Jeff's been busy with other stuff, I'm poking a bit
to see what the next steps would be.)

Alas, I don't have the Lattice board the resulting bitstream
would run on. I should probably try to get the xilinx toolchain
to build that source blob for a numato board and see what would
be involved in porting the arduino tools to it.

Rob


More information about the J-core mailing list