The target device for the lab sessions is the multi-core PULP platform. The PULP Virtual Platform simulator GVSOC, which is included within the PULP SDK, will be used during the class.
- Subject(s): hello-world, vector sum, matrix-vector mul, profiling code execution;
- Programming Language: C;
- Lab duration: 3h
- Objective: Embedded programming & profiling. You will learn basics of embedded programming, the pulp architecture, basic operations (sum & matmul), and how to profile your code execution (MAC, cycles) !
- AI policy: You may use AI tools, but the lab is meant to be a hands-on learning experience. The AGENTS.md file instructs AI agents to guide you towards the solution rather than give it to you directly.
- Călin Diaconu – calin.diaconu2@unibo.it
- Ahmad Mirsalari – seyedahmad.mirsalar2@unibo.it
- Angelo Anzalone – angelo.anzalone4@unibo.it
- Ihor Sachok – ihor.sachok@unibo.it
- Luca Parigi – luca.parigi2@unibo.it
- Marco Labarbera – marco.labarbera2@unibo.it
Use Virtuale, upload only the assignment file named as follows: LAB#_APAI_yourname.pdf
Assignment DEADLINE: Sunday, 25/10/2026 (at 23:59)
The steps differ depending on whether you work on your personal machine (Docker container) or on a lab machine (pre-configured virtual machine). See the "Prerequisites" section of the slides for detailed instructions.
- (Windows only) Install WSL 2.
- Install Docker Desktop (on Windows, choose the Windows version even if you work with WSL).
- Install VS Code and the Dev Containers extension.
- Open a terminal in the location where you wish to work (on Windows, a WSL terminal).
- Clone this repository:
git clone https://github.com/EEESlab/APAI26-LAB01-PULP-Embedded-Programming.git
- Enter the cloned directory:
cd APAI26-LAB01-PULP-Embedded-Programming/
- Open the directory in VS Code:
code .
- Reopen the project inside the Docker container: press
CTRL + Shift + P, typeDev Containers: Reopen in Containerand press Enter. The bottom-left corner of VS Code confirms that you are inside the container. - Open a terminal inside VS Code (
Terminal -> New Terminal). This terminal runs inside the container, with the PULP SDK already set up. - Now you're ready to start!
Troubleshooting (Windows + WSL): if VS Code reports a Docker error when reopening in the container, open Docker Desktop, go to Settings -> Resources -> WSL integration, enable the integration for your installed distros (or all of them), then click Apply & Restart. If needed, close and reopen VS Code.
The lab computers provide an Ubuntu-based virtual machine that already contains the PULP SDK and VS Code (used only for code editing and the terminal), so the Docker container is not needed.
- From a browser outside the virtual machine, download the lab resources from Virtuale as a zip file and extract it (right-click -> Extract).
- Go to
C:/VM_APAIand double-clickPULP-box.ova. When VirtualBox opens, click on "Finish"/"Fine". - Once the VM is imported, start it by clicking on "Start"/"Avvia".
- Log in with username
pulp-boxand passwordpulp. - From the top-bar menu, open
Machine -> File Manager(left panel: files on the PC, right panel: files in the VM; enter the login credentials at the bottom of the right panel). Drag and drop the lab files into a subdirectory of the VM home directory (required for write permissions). - Inside the VM, open a terminal and set up the PULP SDK:
source setup_pulp_sdk.sh
- Use
cdto go to the location where you put the lab files.
Enter one of the exercise folders (00_pulp_hello_world, 01_vector_sum, 02_matrix_vector) and run:
make clean all run
For example, to check that everything works:
cd 00_pulp_hello_world/
make clean all run
You should see the Hello, world! -from PULP message in the terminal.