Skip to content

Commit

Permalink
Merge pull request #4 from dnorthcote/main
Browse files Browse the repository at this point in the history
Add ZCU208 and ZCU216 development boards
  • Loading branch information
dnorthcote authored May 25, 2023
2 parents 87f635f + 8046ffb commit 08dd4a6
Show file tree
Hide file tree
Showing 41 changed files with 2,358 additions and 114 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ To begin installing the Jupyter Notebooks on your system, click-on one of the op
* [Notebook Installation](#notebook-installation)

## RFSoC Setup
This repository is currently only compatible with [RFSoC-PYNQ v2.7](https://github.com/Xilinx/PYNQ/releases). Follow the steps below to setup the RFSoC platform for installing the companion Jupyter Notebooks.
This repository is currently only compatible with [RFSoC-PYNQ v2.7](https://github.com/Xilinx/PYNQ/releases) and greater. Follow the steps below to setup the RFSoC platform for installing the companion Jupyter Notebooks.

1. Currently, there are only 3 compatible RFSoC platforms. These are the [RFSoC4x2](http://rfsoc-pynq.io/), [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html), and [RFSoC2x2](http://rfsoc-pynq.io/).
1. Currently, there are 5 compatible RFSoC platforms. These are listed as follows:
* [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html),
* [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html),
* [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html),
* [RFSoC4x2](http://rfsoc-pynq.io/),
* [RFSoC2x2](http://rfsoc-pynq.io/).

2. Install PYNQ v2.7 onto an SD card and plug it in to your RFSoC platform.
2. Install PYNQ v2.7 or greater onto an SD card and plug it in to your RFSoC platform.

3. Your RFSoC platform requires internet access to install the companion Jupyter Notebooks. Follow the instructions [here](https://pynq.readthedocs.io/en/v3.0.0/getting_started/network_connection.html?highlight=internet) that assist with internet access.

Expand All @@ -42,7 +47,7 @@ The companion Jupyter Notebooks can be installed on a computer or RFSoC platform
3. Install the RFSoC Book notebooks through PIP by executing the following command in the terminal.

```sh
pip install https://github.com/strath-sdr/RFSoC-Book/archive/v1.0.1.tar.gz
pip install https://github.com/strath-sdr/RFSoC-Book/archive/v1.1.0.tar.gz
```

4. Run the following command in the Jupyter terminal window to install the notebooks and dependencies.
Expand Down
23 changes: 17 additions & 6 deletions rfsoc_book/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# variables
package_name = 'rfsoc_book'
board_list = ['ZCU111', 'RFSoC2x2', 'RFSoC4x2']
board_list = ['ZCU111', 'RFSoC2x2', 'RFSoC4x2', 'ZCU208', 'ZCU216']

# dialogue
help_dialogue = ''.join(['\r\nThe rfsoc_book module accepts one of the following arguments:', '\r\n',
Expand Down Expand Up @@ -43,18 +43,22 @@ def install_notebooks():
f.write(dst)

def install_packages():
board = os.environ['BOARD']
dst = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', 'package_list.txt'))
if not os.path.exists(dst):
raise RuntimeError(error_dialogue)
with open(dst, 'r') as f:
package_list = f.readlines()
for package in package_list:
package_name, package_src = package.split(' ')
print(''.join(['***** Installing ', package_name, ' *****\r\n']))
status = subprocess.check_call(["pip3", "install", package_src])
print('\r\n') # Pip is not playing nice
if status != 0:
raise RuntimeError(''.join(['Package ', package_src, ' failed to install.\r\n']))
if package_name == 'rfsoc_sam' and board == 'ZCU216':
pass
else:
print(''.join(['***** Installing ', package_name, ' *****\r\n']))
status = subprocess.check_call(["pip3", "install", package_src])
print('\r\n') # Pip is not playing nice
if status != 0:
raise RuntimeError(''.join(['Package ', package_src, ' failed to install.\r\n']))

def uninstall_notebooks():
print('\r\n***** Uninstalling Notebooks *****\r\n')
Expand Down Expand Up @@ -103,6 +107,13 @@ def unpackage_notebooks():
src = os.path.join(notebookdir, file)
dst = os.path.join(notebookdir, '..', file_name)
shutil.copy(src, dst)
break
elif 'RFSoC4x2' in file_split:
file_split.remove('RFSoC4x2')
file_name = '_'.join(file_split)
src = os.path.join(notebookdir, file)
dst = os.path.join(notebookdir, '..', file_name)
shutil.copy(src, dst)

def clean_notebooks():
print('\r\n***** Cleaning Notebooks *****\r\n')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"../common/rfsoc_book_banner.jpg\" alt=\"University of Strathclyde\" align=\"left\">"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -40,6 +42,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -56,6 +59,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -80,6 +84,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -97,6 +102,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -116,6 +122,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -130,11 +137,14 @@
"metadata": {},
"outputs": [],
"source": [
"import pynq.lib\n",
"\n",
"for name, handle in getmembers(pynq.lib, isclass):\n",
" print(name)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -156,6 +166,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -172,13 +183,15 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"The base overlay design has a huge amount of content that you can access directly from your RFSoC board. From the Jupyter Workspace, navigate to the folder named base. You will be able to see other folders named board, pmod, and rfdc that contain Jupyter Notebooks for you to explore. To get you started, here is a notebook on [buttons, leds, and switches](../../base/board/buttons_leds_switches.ipynb) that you can run. When you are ready, return here to conclude this notebook and move on to the next one."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -189,6 +202,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"../common/rfsoc_book_banner.jpg\" alt=\"University of Strathclyde\" align=\"left\">"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -40,6 +42,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -56,6 +59,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -80,6 +84,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -97,6 +102,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -116,6 +122,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -130,11 +137,14 @@
"metadata": {},
"outputs": [],
"source": [
"import pynq.lib\n",
"\n",
"for name, handle in getmembers(pynq.lib, isclass):\n",
" print(name)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -156,6 +166,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -172,6 +183,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -182,6 +194,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down
Loading

0 comments on commit 08dd4a6

Please sign in to comment.