Skip to content

Commit

Permalink
Fixes for stream overlay notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Richmond committed May 5, 2018
1 parent 0faa2d6 commit 71f43bf
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 28 deletions.
22 changes: 10 additions & 12 deletions pynqhls/stream/notebooks/HLS-In-PYNQ.ipynb

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions tutorial/notebooks/stream/4-Using-an-HLS-core-in-PYNQ.ipynb
Expand Up @@ -51,7 +51,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!ls /home/xilinx/PYNQ-HLS/tutorial/pynqhls/stream/stream.tcl"
Expand All @@ -60,7 +62,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!ls /home/xilinx/PYNQ-HLS/tutorial/pynqhls/stream/stream.bit"
Expand Down Expand Up @@ -374,7 +378,9 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from pynqhls.stream import streamOverlay\n",
Expand Down Expand Up @@ -475,9 +481,7 @@
"source": [
"coeffs = [0, 0, -1, -2, 0, 2, 1, 0, 0]\n",
"sig = list(bw.getdata())\n",
"output = []\n",
"for i in range(0, len(sig), 1000):\n",
" output += overlay.run(coeffs, sig[i : i + 1000])\n",
"output = overlay.run(coeffs, sig)\n",
"\n",
"out = Image.new(bw.mode, bw.size)\n",
"out.putdata(output)\n",
Expand Down Expand Up @@ -510,7 +514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.6.0"
}
},
"nbformat": 4,
Expand Down
34 changes: 25 additions & 9 deletions tutorial/notebooks/stream/5-Packaging-an-Overlay.ipynb
Expand Up @@ -40,7 +40,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!ls /home/xilinx/PYNQ-HLS/tutorial/pynqhls/stream/stream.tcl\n",
Expand All @@ -63,7 +65,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!mkdir /home/xilinx/PYNQ-HLS/tutorial/pynqhls/stream/notebooks\n",
Expand All @@ -80,7 +84,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!cp -r /home/xilinx/PYNQ-HLS/pynqhls/stream/notebooks/*.ipynb /home/xilinx/PYNQ-HLS/tutorial/pynqhls/stream/notebooks"
Expand Down Expand Up @@ -115,7 +121,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from setuptools import setup\n",
Expand Down Expand Up @@ -179,7 +187,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!pip3.6 install /home/xilinx/PYNQ-HLS/tutorial/"
Expand All @@ -195,7 +205,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from pynqhls_tutorial.stream import streamOverlay\n",
Expand All @@ -213,7 +225,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"signal = range(0, 1000)\n",
Expand Down Expand Up @@ -244,7 +258,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from setuptools import setup\n",
Expand Down Expand Up @@ -314,7 +330,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
"version": "3.6.0"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 71f43bf

Please sign in to comment.