Skip to content

cpehle/NyuziProcessor

 
 

Repository files navigation

Nyuzi Processor

Build Status Codacy Badge Chat at https://gitter.im/jbush001/NyuziProcessor

Nyuzi is an experimental GPGPU processor hardware design focused on compute intensive tasks. It is optimized for use cases like deep learning and image processing.

This project includes a synthesizable hardware design written in System Verilog, an instruction set emulator, an LLVM based C/C++ compiler, software libraries, and tests. It can be used to experiment with microarchitectural and instruction set design tradeoffs.

Documentation: https://github.com/jbush001/NyuziProcessor/wiki
Mailing list: https://groups.google.com/forum/#!forum/nyuzi-processor-dev
License: Apache 2.0

The following instructions explain how to set up the Nyuzi development environment. This includes an emulator and cycle-accurate hardware simulator, which allow hardware and software development without an FPGA, as well as scripts and components to run on FPGA.

Install Prerequisites

Linux (Ubuntu)

This requires Ubuntu 16 (Xenial Xeres) or later to get the proper package versions. It should work for other distributions, but you will probably need to change some package names. From a terminal, execute the following:

sudo apt-get -y install autoconf cmake make gcc g++ bison flex python \
    python3 perl emacs openjdk-8-jdk swig zlib1g-dev python-dev \
    libxml2-dev libedit-dev libncurses5-dev libsdl2-dev gtkwave imagemagick

Emacs is used for verilog-mode AUTO macros. The makefile executes this operation in batch mode

MacOS

These instruction assume OSX Mavericks or later.

Install XCode from the AppStore application (Click Here). Then install the command line compiler tools by opening Terminal and typing the following:

xcode-select --install

Install MacPorts from https://www.macports.org/install.php, then use it to install the remaining packages from the terminal:

sudo port install cmake bison swig swig-python imagemagick libsdl2 curl emacs

You may optionally install GTKWave for analyzing waveform files.

Many LLVM tools will fail to build if their dependent packages are too old. If you haven't updated MacPorts in a while, you may need to update to get newer packages:

sudo port selfupdate
sudo port upgrade outdated

Windows

I have not tested this on Windows. Many of the libraries are cross platform, so it should be possible to port it. But the easiest route is probably to run Linux under a virtual machine like VirtualBox.

Build (Linux & MacOS)

The following script will download and install the Nyuzi toolchain and Verilator Verilog simulator. Although some Linux package managers have Verilator, they have old versions. It will ask for your root password a few times to install stuff.

scripts/setup_tools.sh

Build everything else:

cmake .
make

Run tests:

make tests

If you are on a Linux distribution that defaults to python3, you may run into build problems with the compiler. In tools/NyuziToolchain/tools/CMakeLists.txt, comment out the following line:

add_llvm_external_project(lldb)

Occasionally a change will require a new version of the compiler. To rebuild:

git submodule update
cd tools/NyuziToolchain/build
make
sudo make install

Next Steps

Sample applications are available in software/apps. You can run these in the emulator by typing 'make run' (some need 3rd party data files, details are in the READMEs in those directories).

For example, this will render a 3D model in the emulator:

cd software/apps/sceneview
./run_emulator

To run on FPGA, see instructions in hardware/fpga/de2-115/README.md

About

GPGPU processor architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 45.4%
  • C++ 27.5%
  • SystemVerilog 16.1%
  • Objective-C 3.6%
  • Assembly 3.5%
  • Python 2.7%
  • Other 1.2%