From 4374f162657a1b8b1a35e35c0a6d35321d3827ea Mon Sep 17 00:00:00 2001
From: Jorge <jopequ@utu.fi>
Date: Tue, 4 Feb 2020 12:37:46 +0000
Subject: [PATCH] Add PYNQ Intro

---
 Exploring_PYNQ.ipynb | 256 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 256 insertions(+)
 create mode 100644 Exploring_PYNQ.ipynb

diff --git a/Exploring_PYNQ.ipynb b/Exploring_PYNQ.ipynb
new file mode 100644
index 0000000..2890a24
--- /dev/null
+++ b/Exploring_PYNQ.ipynb
@@ -0,0 +1,256 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Exploring the board\n",
+    "\n",
+    "----\n",
+    "\n",
+    "## Contents\n",
+    "\n",
+    "* [ARM A9 Processor Subsystem](#ARM-A9-Processor-Subsystem)\n",
+    "\n",
+    "* [Network Status](#Network-Status)\n",
+    "\n",
+    "* [Operating System](#Operating-System)\n",
+    "\n",
+    "* [Python Details](#Python-Details)\n",
+    "\n",
+    "\n",
+    "----\n",
+    "\n",
+    "## Goal\n",
+    "\n",
+    "The aim of this notebook is to help you familiarize yourself with the Zynq Processing System, and the underlying OS. You will see how to run shell commands and Python commands to query the underlying hardware and software and find out the packages that are included in the PYNQ image. \n",
+    "\n",
+    "## ARM A9 Processor Subsystem\n",
+    "\n",
+    "#### Note:\n",
+    "\n",
+    "Starting a code cell with a bang character, eg `!`, instructs the IPython REPL to treat the code on that line as an OS shell command"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "scrolled": true
+   },
+   "outputs": [],
+   "source": [
+    "!cat /proc/cpuinfo"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "#### Available DRAM ..."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "!cat /proc/meminfo | grep 'Mem*'"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Network Status"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "#### Wired Ethernet connection"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "scrolled": true
+   },
+   "outputs": [],
+   "source": [
+    "!ifconfig eth0"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "#### Confirm local hostname"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "!hostname"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Operating System\n",
+    "\n",
+    "#### Verify Linux version ..."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "!cat /etc/os-release | grep VERSION"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Python Details\n",
+    "\n",
+    "#### Note\n",
+    "\n",
+    "Here we are executing a Python script rather than shell commands"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import sys\n",
+    "\n",
+    "print('\\nPython Version:\\n {} \\n\\nPython Platform:\\n{}\\n'.format(sys.version, sys.platform))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "print ('Python path settings:')\n",
+    "for path_entry in sys.path:\n",
+    "    print(path_entry)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "scrolled": false
+   },
+   "outputs": [],
+   "source": [
+    "# List of all Python packages currently installed\n",
+    "!pip3 list --format=columns"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# On being 'Pythonic' \n",
+    "import this"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "This was the intro to the FPGA course PYNQ Lab\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"This was the intro to the FPGA course PYNQ Lab\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Task 2 (FPGA LAb 3)\n",
+    "\n",
+    "#### Exercise 2.1\n",
+    "\n",
+    "1) Print the current directory (find the corresponding linux command)\n",
+    "2) Write a short python code that asks for your name and outputs \"Hello XXXX, how are you today?\"\n",
+    "3) Write a short python code that prints all the files in the 'bitstream' and 'images' folders."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.5"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}
-- 
GitLab