Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ucb-ee290c/ucb-ee290c.github.io
Browse files Browse the repository at this point in the history
merge in
  • Loading branch information
doihead committed Nov 14, 2024
2 parents 004e489 + 987a917 commit a366acf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tutorials/baremetal-ide/Baremetal IDE Lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ nav_order: 11
> This lab is due Monday, 11/18 at 11:59PM. Please upload your final lab report to gradescope by then.
# Baremetal IDE Lab
Baremetal IDE is an SDK developed and maintained by the SLICE lab at Berkeley which allows you to quickly develop C/C++ for chips developed in Chipyard. As implied by the name, Baremetal IDE focuses on providing a bunch of libraries, scripts and device drivers to build “baremetal” programs which run without an operating system like Linux or Zephyr. Programming for bare metal means that you don’t have a bunch of operating system services that you may be used to like multithreading, device drivers, dynamic linking, etc, but in return, you have full control of your code and can extract the maximum amount of performance out of your chips. Baremetla IDE provides a thin layer of drivers and libraries that handles things like malloc or print. This lets you focus on building your workloads to test your chips instead of spending your time messing with linker scripts, stdlib versions, and device drivers.
Baremetal IDE is an SDK developed and maintained by the SLICE lab at Berkeley which allows you to quickly develop C/C++ for chips developed in Chipyard. As implied by the name, Baremetal IDE focuses on providing a bunch of libraries, scripts and device drivers to build “baremetal” programs which run without an operating system like Linux or Zephyr. Programming for bare metal means that you don’t have a bunch of operating system services that you may be used to like multithreading, device drivers, dynamic linking, etc, but in return, you have full control of your code and can extract the maximum amount of performance out of your chips. Baremetal IDE provides a thin layer of drivers and libraries that handles things like malloc or print. This lets you focus on building your workloads to test your chips instead of spending your time messing with linker scripts, stdlib versions, and device drivers.
Since the actual HeatherLake setups are a bit fragile and require lots of external support equipment, we’ll be running all of these labs on an emulated chip on a Datastorm FPGA. This lab will bring you through the whole process of getting started with a new chip, building a Board Support Package, writing some basic drivers, and benchmarking a simple accelerator.

## The Trenz Datastorm Board
Expand Down Expand Up @@ -174,6 +174,7 @@ ERROR: Must use +tty=/dev/ttyxx to specify a tty
Let's break down the arguments here
`+tty=<tty>` specifies what serial port the chip's UART-TSI port is on.
{: .note }
Unfortunately, due to the way Unix handles serial devices, the exact device ID changes every time you unplug and replug your device. The best way of figuring out which serial port is which is unplug the device you are trying to find the id of, run the command `ls /dev/ttyUSB*` to lists out all remaining USB serial ports, plug the device in again, and run the command one last time to find the new serial port. For the lab, UART-TSI is on the usb port hooked directly up to the FPGA, not the one plugged into the FT-LINK.
Expand Down Expand Up @@ -581,4 +582,4 @@ Finally, upload `hello.elf` using your method of choice in another terminal wind
> **Task 6**: Modify this hello world program to first ask for a name, wait for an input, and repeatedly print the string "Hello <NAME>!". If you aren't familliar with how C's stdio works, it may be worth trying to write this program first for linux before trying to run this on the chip. Copy and paste your code in an appendix code block and include a screenshot of the program waiting for input and while it's printing
# Deliverables
Please upload a pdf containing your writeups for each task and include all code you wrote in an appendix separate from your main answers by Monday, 11/18, 11:59 PM.
Please upload a pdf containing your writeups for each task and include all code you wrote in an appendix separate from your main answers by Monday, 11/18, 11:59 PM.

0 comments on commit a366acf

Please sign in to comment.