Build, Deploy, Run
This page shows you how to quickly build, deploy, and run your first hardware image in Sabana
In Sabana, the way we share and deploy hardware is by means of
images. As the name suggest, images are artifacts that were built from hardware source code, either Verilog or C++. These images can be deployed as instances using our platform.
We can use the Sabana CLI to quickly setup a new project and create your very own first hardware image. Let's get started with:
sabana new hello_world
The tool will ask you a set of questions to generate a starting project for you. Let's select
Verilogas a language,
Ezas the target shell, and
Add two numpy arrays (three registers)as the starting point. In the end, you should have the following:
Welcome to sabana, let's create a project
✔ Select a language · Verilog
✔ Select shell type · Ez (a highly productive shell)
✔ Select a starting point · Add two numpy arrays (three registers)
If you inspect the project, it should have the following structure:
│ └── sabana.v
First, we have the
sabana.jsonfile which stores information about the project.
Next, we have the
sabana.vfile that contains the top module of the project. This file contains the implementation of a 32-bit integer adder. Finally, we have a python file that will test our hardware:
test_hello_world.py. We will use this after the project is built.
Go into the project directory and use the CLI tool to build the image:
After a few minutes the tool will create an image from your source code, and it will display a command that can be used to test your image.
🎉 Deploy your new image with ➡ python3 tests/test_hello_world.py
After successfully creating an image, you can test your hardware with the following command:
After running the test, you should get:
🎉 user/hello_world:0.1.0 is ready ➡ https://fish.sabana.dev
🚀 executing program
✔ https://fish.sabana.dev is down
Added two numpy arrays successfully
test_hello_worlduses our Python SDK to deploy and test the image you created with numpy arrays!