Prerequisites

Software prerequisites and system setup

Follow the steps below to prepare to develop hardware or software with the Coral NPU.

These instructions assume you are working in the Google Coral NPU repository on GitHub.

  1. Get the code with this command:

    git clone https://github.com/google-coral/coralnpu
  2. Install the following software on your computer (if not already present):

    • Bazel 6.2.1 (https://bazel.build/install)
    • Python 3.9 - 3.12 (from system package manager)
  3. To make sure it all works correctly, run this test suite:

    bazel run //tests/cocotb:core_mini_axi_sim_cocotb
  4. Build this example program using a single binary:

    bazel build //examples:coralnpu_v2_hello_world_add_floats
  5. Build the behavioral simulator for Coral NPU:

    bazel build //tests/verilator_sim:core_mini_axi_sim
  6. Run a simple program that adds two floating-point numbers in the simulator:

    bazel-bin/tests/verilator_sim/core_mini_axi_sim --binary bazel-out/k8-fastbuild-ST-dd8dc713f32d/bin/examples/coralnpu_v2_hello_world_add_floats.elf

For more information, see this page in the repository: ./doc/tutorials/writing_coralnpu_programs.md