Skip to content

Commit dd16d70

Browse files
committed
contributing and fpga docs
1 parent ff9d52c commit dd16d70

File tree

3 files changed

+150
-2
lines changed

3 files changed

+150
-2
lines changed

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ However, contributions are strongly encouraged and keep the project moving forwa
4141

4242

4343
## Creating and Adding Tests
44-
see `testing.md`
44+
The CI pipeline the vortex tests. If you are contributing code changes, then review `testing.md` to learn how to integrate your own tests

docs/fpga_setup.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,153 @@
11
# FPGA Startup and Configuration Guide
22

3+
## Gaining Access to FPGA's with CRNCH
4+
If you are associated with Georgia Tech and need remote access to the FPGA's, you can utilize CRNCH's server.
5+
6+
## What is CRNCH?
7+
8+
**C**enter for **R**esearch into **N**ovel **C**omputing **H**ierarchies
9+
10+
## What does CRNCH Offer?
11+
12+
**The Rogues Gallery (RG)**: new concept focused on developing our understanding of next-generation hardware with a focus on unorthodox and uncommon technologies. **RG** will acquire new and unique hardware (ie, the aforementioned “*rogues*”) from vendors, research labs, and startups and make this hardware available to students, faculty, and industry collaborators within a managed data center environment
13+
14+
## Why are the Rouges Important?
15+
16+
By exposing students and researchers to this set of unique hardware, we hope to foster cross-cutting discussions about hardware designs that will drive future *performance improvements in computing long after the Moore’s Law era of “cheap transistors” ends*.
17+
18+
## How is the Rouges Gallery Funded?
19+
20+
Rogues Gallery testbed is primarily supported by the National Science Foundation (NSF) under NSF Award Number [#2016701](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2016701&HistoricalAwards=false)
21+
22+
## Rouges Gallery Documentation
23+
24+
You can read about RG in more detail on its official documentation [page](https://gt-crnch-rg.readthedocs.io/en/main/index.html#).
25+
26+
You can listen to a talk about RG [here](https://mediaspace.gatech.edu/media/Jeff%20Young%20-%20Rogues%20Gallery%20-%20CRNCH%20Summit%202021/1_lqlgr0jj)
27+
28+
[CRNCH Summit 2023](https://github.com/gt-crnch/crnch-summit-2023/tree/main)
29+
30+
## Request Access for Rouges Gallery
31+
32+
You should use [this form](https://crnch-rg.cc.gatech.edu/request-rogues-gallery-access/) to request access to RG’s reconfigurable computing (vortex fpga) resources. You should receive an email with your ticket item being created. Once it gets processed, you should get an email confirmed your access has been granted. It might take some time to get processed.
33+
34+
## How to Access Rouges Gallery?
35+
36+
CRNCH resources do not require any VPN access for GT members so you can head to the web url for open on-demand: [rg-ood.crnch.gatech.edu](http://rg-ood.crnch.gatech.edu/)
37+
38+
Alternatively, you can `ssh` into rg with: `ssh <your-gt-acctname>@rg-login.crnch.gatech.edu`
39+
40+
41+
42+
Once you’ve logged in, you can use Slurm to request other nodes within the testbed. See more information on Slurm at [this page](https://gt-crnch-rg.readthedocs.io/en/main/general/using-slurm.html).
43+
44+
Note that you can also use VSCode to log into the Rogues Gallery via its terminal functionality. See [this page for more details](https://gt-crnch-rg.readthedocs.io/en/main/general/visual-studio-code.html).
45+
46+
## **What Machines are Available in the Rogues Gallery?**
47+
48+
Complete list of machines can be found [here](https://gt-crnch-rg.readthedocs.io/en/main/general/rg-hardware.html).
49+
50+
## Which Machine do we Need from RG?
51+
52+
There are three primary nodes you might use. The table below summarizes:
53+
54+
| Name | Device | Description |
55+
| --- | --- | --- |
56+
| flubber1 | u50 | can synthesize vortex |
57+
| flubber4 | u250 | missing HBM |
58+
| flubber5 | u280 | can synthesize vortex |
59+
60+
61+
*Note*: The `USERSCRATCH` folder is synchronized between all RG nodes. That means you can upload your files to `rg-login` and have them available on `flubber[1,4-5`. Changes on one node will be reflected across all nodes.
62+
63+
## How to Access flubber for Synthesis?
64+
65+
Now that you have the files prepared and available on the FPGA node, you can start the synthesis. To run on hardware we need a rg-xilinx-fpga-hw cluster which includes **flubber[1,4-5]**. First `ssh` into the rouges gallery:
66+
67+
```bash
68+
ssh <username>[@rg-login.crnch.gatech.edu](mailto:[email protected])
69+
```
70+
71+
Then, to access the hardware node you need to `ssh` into flubber:
72+
73+
```bash
74+
ssh flubber1
75+
```
76+
77+
## Synthesis for Xillinx Boards
78+
79+
XRT Environment Setup
80+
----------------------
81+
82+
$ source /opt/xilinx/Vitis/2023.1/settings64.sh
83+
$ source /opt/xilinx/xrt/setup.sh
84+
85+
86+
Check Installed FPGA Platforms
87+
------------------------------
88+
89+
$ platforminfo -l
90+
91+
92+
Build FPGA image
93+
----------------
94+
95+
$ cd hw/syn/xilinx/xrt
96+
$ PREFIX=test1 PLATFORM=xilinx_u50_gen3x16_xdma_5_202210_1 TARGET=hw NUM_CORES=4 make
97+
98+
Will run the synthesis under new build directory: BUILD_DIR := "\<PREFIX>\_\<PLATFORM>\_\<TARGET>"
99+
100+
The generated bitstream will be located under <BUILD_DIR>/bin/vortex_afu.xclbin
101+
102+
Sample FPGA Run Test
103+
--------------------
104+
105+
Ensure you have the correct opae runtime for the FPGA target
106+
107+
$ make -C runtime/xrt clean
108+
$ TARGET=hw make -C runtime/xrt
109+
110+
Run the following from your Vortex build directory
111+
112+
$ TARGET=hw FPGA_BIN_DIR=<BUILD_DIR>/bin ./ci/blackbox.sh --driver=xrt --app=sgemm --args="-n128"
113+
114+
---
115+
116+
The directory `hw/syn/xilinx/xrt` contains the makefile used to synthesize Vortex.
117+
118+
For long-running jobs, invocation of this makefile can be made of the following form:
119+
120+
`[CONFIGS=<vortex macros>] [PREFIX=<prefix directory name>] [NUM_CORES=<#>] TARGET=hw|hw_emu PLATFORM=<platform baseName> nohup make > <log filename> 2>&1 &`
121+
122+
For example:
123+
124+
```bash
125+
CONFIGS="-DL2_ENABLE -DDCACHE_SIZE=8192" PREFIX=build_4c_u280 NUM_CORES=4 TARGET=hw PLATFORM=xilinx_u280_gen3x16_xdma_1_202211_1 nohup make > build_u280_hw_4c.log 2>&1 &
126+
```
127+
128+
The build is complete when the bitstream file `vortex_afu.xclbin` exists in `<prefix directory name><platform baseName>hw|hw_emu/bin`.
129+
130+
## Running a Program on FPGA
131+
132+
The blackbox.sh script in `ci` can be used to run a test with Vortex’s xrt driver using the following command:
133+
134+
`FPGA_BIN_DIR=<path to bitstream directory> TARGET=hw|hw_emu PLATFORM=<platform baseName> ./ci/blackbox.sh --driver=xrt --app=<test name>`
135+
136+
For example:
137+
138+
`FPGA_BIN_DIR=`realpath hw/syn/xilinx/xrt/build_4c_u280_xilinx_u280_gen3x16_xdma_1_202211_1_hw/bin` TARGET=hw PLATFORM=xilinx_u280_gen3x16_xdma_1_202211_1 ./ci/blackbox.sh --driver=xrt --app=demo`
139+
140+
## Synthesis for Intel (Altera) Boards
141+
142+
To set up the environment, source the XRT setup.sh and other Xilinx scripts. For example:
143+
144+
```
145+
source /opt/xilinx/xrt/setup.sh
146+
source /tools/reconfig/xilinx/Vivado/2022.1/settings64.sh
147+
source /tools/reconfig/xilinx/Vitis/2022.1/settings64.sh
148+
149+
```
150+
3151
OPAE Environment Setup
4152
----------------------
5153

docs/simulation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SimX is a C++ cycle-level in-house simulator developed for Vortex. The relevant
1010

1111
### FGPA Simulation
1212

13-
The current target FPGA for simulation is the Arria10 Intel Accelerator Card v1.0. The guide to build the fpga with specific configurations is located [here.](fpga_setup.md)
13+
The guide to build the fpga with specific configurations is located [here.](fpga_setup.md) You can find instructions for both Xilinx and Intel (Altera) based FPGAs.
1414

1515
### How to Test
1616

0 commit comments

Comments
 (0)