# Application C/C++ on Ultra96v2 Part 1

<figure><img src="/files/N8qGbybVtRCloMmIoJMo" alt=""><figcaption></figcaption></figure>

## Things used in this project

### Hardware component

| Figure                                                                                                                                                                                                 | Name                                                                                     | Amount |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | ------ |
| <img src="https://hackster.imgix.net/uploads/attachments/822865/avnet_ultra96v2-l_13qKH8wr06.jpg?auto=compress%2Cformat&#x26;w=48&#x26;h=48&#x26;fit=fill&#x26;bg=ffffff" alt="" data-size="original"> | [Avnet Ultra96-V2](https://www.hackster.io/avnet/products/ultra96-v2?ref=project-5ebc3f) | 1      |
| <p><br></p>                                                                                                                                                                                            | DisplayPort monitor                                                                      | 1      |
| <p><br></p>                                                                                                                                                                                            | Laptop                                                                                   | 1      |
| <p><br></p>                                                                                                                                                                                            | SDcard                                                                                   | 1      |
| <p><br></p>                                                                                                                                                                                            | SDcard reader                                                                            | 1      |

### Software component&#x20;

| Name            | Link                                                                                                                                                                                                                                                                               |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| WSL2            | <p><br></p>                                                                                                                                                                                                                                                                        |
| Ubuntu 18.04    | <p><br></p>                                                                                                                                                                                                                                                                        |
| Vitis-AI 1.4    | [Xilinx/Vitis-AI: Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.](https://github.com/Xilinx/Vitis-AI)[ ](https://github.com/Xilinx/Vitis-AI)[(github.com)](https://github.com/Xilinx/Vitis-AI) |
| Ultra96v2 image | <http://avnet.me/avnet-u96v2_sbc_base-vitis-ai-1.4-image>                                                                                                                                                                                                                          |

## Story

### Introduction

&#x20;    โดยในหัวข้อการทดลองนี้จะเป็นการนำ FPGA มาใช้งานจริงๆ โดยจะเน้นการใช้งานร่วมกับ Xilinx Vitis-AI 1.4 โดยจะเน้นไปที่สองเรื่องคือ การติดตั้ง environment ลงบนบอร์ดเพื่อทดสอบ AI ที่ใช้งานในโลกปัจจุบันบนบอร์ด Ultra96v2 ซึ่งเป็นบอร์ด FPGA โดยก่อนที่เราจะเริ่ม จะขอพาทุกท่านมาทำความเข้าใจตัวบอร์ด FPGA กันก่อนนะครับ     จริงๆ แล้วรอบๆตัวเรามีการใช้งาน Processor หรือชิพประมวลผลอยู่รอบตัวเราโดยที่บางครั้งหลายคนอาจหลงลืมไปว่ามันอยู่ในชีวิตประจำวันเราเป็นปกติ เช่น ในโทรศัพท์ คอมพิวเตอร์ gadget ต่างๆ อาจกล่าวได้ว่าสิ่งที่ใช้งานในระบบดิจิทัลในปัจจุบันนั้นล้วนมี Processor เป็นของตัวเอง ซึ่ง Processor บางคนก็เรียกว่าตัวประมวลผล หรือชิพประมวลผล ซึ่งไม่ต่างกับสมองของทุกสิ่งที่คอยคิด คำนวณ สื่อสารข้อมูลมาให้ผู้ใช้อย่างเราๆได้ใช้งานกัน โดยเจ้าชิพประมวลผล หรือ Processor นี้แบ่งได้หลายแบบ โดยแบบที่เราสามารถพบเจอได้ทั่วไปในปัจจุบันก็คือ CPU, GPU หรือ FPGA ทุกท่านที่เคยผ่านงาน Hardware มาอาจคุ้นเคยกับคำเหล่านี้มาบ้าง แต่ท่านที่ยังไม่เคยเจอ ไม่ต้องตกใจครับ เราจะมาเล่าให้คุณฟังเอง&#x20;

<figure><img src="/files/UQGREsfmXqb2Fn2DC85i" alt=""><figcaption></figcaption></figure>

* CPU (Central Processing Unit) เป็นชิพประมวลผลที่ใช้กันอย่างแพร่หลายในปัจจุบัน ซึ่งเปรียบเสมือนสมองที่คอยจัดการให้ทำงานสิ่งต่างๆ หลากหลายรูปแบบตามข้อมูลที่ได้รับ โดยภายในจะประกอบไปด้วย transistors จำนวนมากที่นำมาต่อกันเป็นวงจรในการประมวลผลโดยข้อมูลที่ใช้ในการประมวลผลจะเป็นแบบ bit หรือ 0 กับ 1 โดยจะสื่อสารกันด้วย address เพื่อไปติดต่อกับอุปกรณ์อื่นๆที่ทำงานร่วมกัน โดยถ้าอยากศึกษารายละเอียดเกี่ยวกับ CPU มากขึ้นสามารถ คลิกที่ \[[link](https://en.wikipedia.org/wiki/Central_processing_unit)]&#x20;
* GPU (Graphic processing unit) เป็นชิพที่นิยมในการใช้ในการประมวลผลเกี่ยวกับ parallel computing ซึ่งจะใช้ในการ render video เป็นหลักเราจะมักพบเห็นในการใช้งานในการเล่นเกมส์ แต่ในปัจจุบันในด้านการทำงานนอกจากใช้ในการออกแบบกราฟฟิค ก็มีการที่เริ่มนำมาใช้งาน AI แล้ว&#x20;
* FPGA (Field Programmable Gate Array) เป็นชิพประมวลผลประเภทหนึ่งที่ใช้งานเฉพาะด้านซึ่งจุดเด่นคือสามารถเปลี่ยนแปลงวงจรภายในตัวเองได้ต่างกับสองประเภทแรก โดยที่กินไฟน้อยกว่าและสามารถทำงานไปพร้อมๆกันได้ ซึ่งเป็นจุดเด่นของชิพประเภทนี้ แต่ข้อเสียคือมีข้อจำกัดในการทำงานตามที่เราตั้งค่าไว้  &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/fpga-design/c-c++-programming-on-ultra96v2-fpga-board/application-c-c++-on-ultra96v2-part-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
