Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/vivado_vitis/xilinx_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AMD Vivado + Vitis Workflow for cmod_s7

## Folder Structure

```
firmware/devices/cmod_s7/
├── src/
│ ├── uart.vhd ← UART communication (shared)
│ └── ...
├── vivado_impl/
│ ├── cnn_inference/
│ │ ├── cnn_inference.xpr ← CNN Vivado project
│ │ ├── src/
│ │ │ ├── top_cnn.vhd ← CNN top entity
│ │ │ └── ...
│ │ └── ...
│ └── tcn_inference/
│ ├── tcn_inference.xpr ← TCN Vivado project
│ ├── src/
│ │ ├── top_tcn.vhd ← TCN top entity
│ │ └── ...
│ └── ...
└── vitis_impl/
├── cnn_inference/
│ ├── .wsdata/
│ ├── src/
│ │ ├── top_cnn_hls.cpp ← CNN HLS kernel
│ │ └── ...
│ └── ...
└── tcn_inference/
├── .wsdata/
├── src/
│ ├── top_tcn_hls.cpp ← TCN HLS kernel
│ └── ...
└── ...
```
## Build Workflow

### CNN Implementation (Vivado + Vitis)

#### Vivado Flow
1. Open `vivado_impl/cnn_inference/cnn_inference.xpr` in Vivado
2. Run synthesis, implementation, and generate bitstream
3. Export the bitstream to `firmware/devices/cmod_s7/vivado_impl/cnn_inference/...`

#### Vitis HLS Flow
1. Open `vitis_impl/cnn_inference` workspace in Vitis HLS
2. Synthesize and generate IP for `top_cnn_hls.cpp`
3. Export RTL to `firmware/devices/cmod_s7/vitis_impl/cnn_inference/...`

### TCN Implementation (Vivado + Vitis)

#### Vivado Flow
1. Open `vivado_impl/tcn_inference/tcn_inference.xpr` in Vivado
2. Run synthesis, implementation, and generate bitstream
3. Export the bitstream to `firmware/devices/cmod_s7/vivado_impl/tcn_inference/...`

#### Vitis HLS Flow
1. Open `vitis_impl/tcn_inference` workspace in Vitis HLS
2. Synthesize and generate IP for `top_tcn_hls.cpp`
3. Export RTL to `firmware/devices/cmod_s7/vitis_impl/tcn_inference/...`

## Shared Components

- **uart.vhd**: UART communication module (used by both CNN and TCN)
66 changes: 66 additions & 0 deletions firmware/devices/cmod_s7/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# EDA generated files
*.jou
*.log
*.str
*.pb
*.wdb
*.tr
*.rpt
*.pwr
*.pnr
*.lock
*.lck
*.db
*.db9

# EDA build folders
impl/
syn/
sim/
simulation/
.ipcache/

# HLS build folders
solution*/
csim/
cosim/

# IP Core generated output
# Keep .ipc config files but ignore generated HDL
src/ipcore/
ip/*/

# Bitstreams — KEEP for flashing without synthesis
# .fs files are committed so team can flash
# directly without running full synthesis
# Uncomment the line below to ignore them instead
# *.fs

# OS / Editor Junk
.DS_Store
Thumbs.db
.vscode/
*.swp

# Temporary Files
*.tmp
*.bak

# User-specific Gowin project settings (like Vivado .xpr.user)
*.gprj.user
*.xpr.user

# Bambu generated Verilog output
src/generated/

# Vivado/Vitis generated files
*.xsa
*.sdk
*.hw
*.cache
*.run
*.export
*.ip_user_files/

sim/*.vcd
sim/*.ghw
20 changes: 20 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ignore build output directory
/build
/export

# Ignore object files and dependent files
.o
.d

#Ignore logs folder and log files
/logs
.log

#Ignore lock files
.lock

.bin
.pdi
.peers.ini
.repo.yaml
.vitisWorkspace.json
9 changes: 9 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/.theia/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"clangd.fallbackFlags": [
"-IC:\\Xilinx\\Vitis_HLS\\2024.1\\include",
"-IC:\\Xilinx\\Vitis_HLS\\2024.1\\include\\etc",
"-IC:\\Xilinx\\Vitis_HLS\\2024.1\\include\\ap_sysc",
"-IC:\\Xilinx\\Vitis_HLS\\2024.1\\win64\\tools\\auto_cc\\include",
"-IC:\\Xilinx\\Vitis_HLS\\2024.1\\win64\\tools\\systemc\\include"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"workspaceRoot": "C:\\GitRepos\\Capstone\\ASL_Gloves_RV1\\firmware\\devices\\cmod_s7\\vitis_impl",
"mapping": {}
}
20 changes: 20 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/cnn_inference/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ignore build output directory
/build
/export

# Ignore object files and dependent files
.o
.d

#Ignore logs folder and log files
/logs
.log

#Ignore lock files
.lock

.bin
.pdi
.peers.ini
.repo.yaml
.vitisWorkspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
part=xc7s25csga225-1

[hls]
flow_target=vivado
package.output.format=ip_catalog
package.output.syn=false
syn.top=cnn_inference
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
11 changes: 11 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/cnn_inference/vitis-comp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "cnn_inference",
"type": "HLS",
"configuration": {
"componentType": "HLS",
"configFiles": [
"cnn_inference.cfg"
],
"work_dir": "cnn_inference"
}
}
20 changes: 20 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/tcn_inference/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ignore build output directory
/build
/export

# Ignore object files and dependent files
.o
.d

#Ignore logs folder and log files
/logs
.log

#Ignore lock files
.lock

.bin
.pdi
.peers.ini
.repo.yaml
.vitisWorkspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
part=xc7s25csga225-1

[hls]
flow_target=vivado
package.output.format=ip_catalog
package.output.syn=false
syn.top=tcn_inference
11 changes: 11 additions & 0 deletions firmware/devices/cmod_s7/vitis_impl/tcn_inference/vitis-comp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "tcn_inference",
"type": "HLS",
"configuration": {
"componentType": "HLS",
"configFiles": [
"tcn_inference.cfg"
],
"work_dir": "tcn_inference"
}
}
Loading