Skip to content

Commit 85f141d

Browse files
Add RFSoC-PYNQ Page
1 parent 6ece515 commit 85f141d

File tree

6 files changed

+126
-59
lines changed

6 files changed

+126
-59
lines changed

boards/index.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,58 +8,3 @@ has_children: true
88

99
# Boards
1010
{: .no_toc }
11-
12-
---
13-
## Table of Contents
14-
{: .no_toc .text-delta }
15-
1. TOC
16-
{:toc}
17-
---
18-
19-
## Setting up PYNQ in RFSoC FPGA
20-
21-
## Using VS Code for Jupyter Notebook
22-
23-
The following procedures are tested by the author on ZCU208 with PYNQ image v3.0.1.
24-
25-
### Setting up SSH
26-
27-
First connect to SSH `root@192.168.2.99` with password `xilinx`,
28-
and then run the following command: [^for-vscode-ssh-config]
29-
30-
```bash
31-
sudo chmod u+w /etc/ssh/sshd_config
32-
sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
33-
sudo service sshd restart
34-
```
35-
36-
In VS Code, connect to remote SSH:
37-
38-
Username
39-
: `root@192.168.2.99`
40-
41-
Password
42-
: `xilinx`
43-
44-
Install the required extensions as needed.
45-
For Jupyter Notebook, select the kernel from existing kernels named `pynq-venv`.
46-
47-
### Using GitHub Copilot
48-
GitHub Copilot may show the log-in failed error message.
49-
Use the following settings in `.vscode/settings.json`: [^vscode-github-copilot-fix]
50-
51-
```json
52-
{
53-
"remote.extensionKind": {
54-
"GitHub.copilot": [
55-
"ui",
56-
],
57-
"GitHub.copilot-chat": [
58-
"ui",
59-
],
60-
}
61-
}
62-
```
63-
64-
[^for-vscode-ssh-config]: Reference: [this discussion on PYNQ forum](https://discuss.pynq.io/t/microsofts-vs-code-for-c-c-python-development-on-xilinx-platforms/2031#example-1-vitis-ai-c-debug-4)
65-
[^vscode-github-copilot-fix]: Reference: [this discussion on GitHub](https://github.com/orgs/community/discussions/50328#discussioncomment-8238634)

ip/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: IP Cores
33
permalink: /ip
44
layout: default
5-
nav_order: 2
5+
nav_order: 3
66
---
77

88
# IP Cores

my-practices/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: My Practices
33
permalink: /my-practices
44
layout: default
5-
nav_order: 5
5+
nav_order: 6
66
---
77

88
# My Practices

publications/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Publications
33
permalink: /publications
44
layout: default
5-
nav_order: 6
5+
nav_order: 7
66
---
77

88
# Publications

rf-analyzer/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: RF Analyzer
33
permalink: /rf-analyzer
44
layout: default
5-
nav_order: 4
5+
nav_order: 5
66
---
77

88
# RF Analyzer

rfsoc-pynq/index.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: RFSoC-PYNQ
3+
permalink: /rfsoc-pynq
4+
layout: default
5+
nav_order: 2
6+
---
7+
8+
# RFSoC-PYNQ
9+
{: .no_toc }
10+
11+
---
12+
## Table of Contents
13+
{: .no_toc .text-delta }
14+
1. TOC
15+
{:toc}
16+
---
17+
18+
## Setting up PYNQ in RFSoC FPGA
19+
20+
See the official [PYNQ documentation](https://www.rfsoc-pynq.io/) for detailed instructions and image download.
21+
22+
## Internet Access on PYNQ
23+
Usually when connected using Ethernet, the PYNQ board will not have internet access.
24+
However, for package installation including [`RFSoC-MTS`](https://github.com/Xilinx/RFSoC-MTS), internet access is required.
25+
26+
Here is a working method to enable internet access on PYNQ used by me.
27+
28+
{: .callout .callout-warning }
29+
> Use at your own risk. Different systems and network environments may require different settings.
30+
31+
### Prerequisites
32+
- A computer with internet access (Wi-Fi in this case) using Linux (tested on Ubuntu 20.04)
33+
- Ethernet connection to the PYNQ board
34+
- PYNQ board IP assumes to be `192.168.2.99`, the default for PYNQ boards
35+
36+
### Step 1: Configuration at Computer
37+
Set the computer Ethernet IP to be in the same subnet as the PYNQ board.
38+
We set the IPv4 to be the manual mode.
39+
In this case, we also want it to be the gateway for the PYNQ board, so it is `192.168.2.1`.
40+
The subnet mask is `255.255.255.0`, and the gateway is left blank.
41+
IPv6 will be disabled.
42+
43+
Then, in a terminal, we setup the WiFi sharing.
44+
```bash
45+
sudo sysctl -w net.ipv4.ip_forward=1
46+
```
47+
48+
Use `ip link` or `ifconfig` to find the WiFi and Ethernet interface names.
49+
Then run
50+
51+
```bash
52+
# Define your interface names here
53+
export WAN=wlan0 # Your WiFi interface (Internet source)
54+
export LAN=eth0 # Your Ethernet interface (Connected to RFSoC)
55+
56+
# Enable Network Address Translation (Masquerading)
57+
sudo iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE
58+
59+
# Allow traffic forwarding between interfaces
60+
sudo iptables -A FORWARD -i $WAN -o $LAN -m state --state RELATED,ESTABLISHED -j ACCEPT
61+
sudo iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT
62+
```
63+
64+
### Step 2: Configuration at PYNQ Board
65+
66+
Configure the RFSoC gateway to the computer
67+
```bash
68+
sudo ip route add default via 192.168.2.1
69+
```
70+
71+
Set DNS
72+
```bash
73+
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
74+
```
75+
76+
Now it should work.
77+
78+
## Using VS Code for Jupyter Notebook
79+
80+
The following procedures are tested by the author on ZCU208 with PYNQ image v3.0.1.
81+
82+
### Setting up SSH
83+
84+
First connect to SSH `root@192.168.2.99` with password `xilinx`,
85+
and then run the following command: [^for-vscode-ssh-config]
86+
87+
```bash
88+
sudo chmod u+w /etc/ssh/sshd_config
89+
sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
90+
sudo service sshd restart
91+
```
92+
93+
In VS Code, connect to remote SSH:
94+
95+
Username
96+
: `root@192.168.2.99`
97+
98+
Password
99+
: `xilinx`
100+
101+
Install the required extensions as needed.
102+
For Jupyter Notebook, select the kernel from existing kernels named `pynq-venv`.
103+
104+
### Using GitHub Copilot
105+
GitHub Copilot may show the log-in failed error message.
106+
Use the following settings in `.vscode/settings.json`: [^vscode-github-copilot-fix]
107+
108+
```json
109+
{
110+
"remote.extensionKind": {
111+
"GitHub.copilot": [
112+
"ui",
113+
],
114+
"GitHub.copilot-chat": [
115+
"ui",
116+
],
117+
}
118+
}
119+
```
120+
121+
[^for-vscode-ssh-config]: Reference: [this discussion on PYNQ forum](https://discuss.pynq.io/t/microsofts-vs-code-for-c-c-python-development-on-xilinx-platforms/2031#example-1-vitis-ai-c-debug-4)
122+
[^vscode-github-copilot-fix]: Reference: [this discussion on GitHub](https://github.com/orgs/community/discussions/50328#discussioncomment-8238634)

0 commit comments

Comments
 (0)