Skip to content
Snippets Groups Projects
Commit 4374f162 authored by Jorge Peña Queralta's avatar Jorge Peña Queralta
Browse files

Add PYNQ Intro

parent c8d5a9da
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Exploring the board
----
## Contents
* [ARM A9 Processor Subsystem](#ARM-A9-Processor-Subsystem)
* [Network Status](#Network-Status)
* [Operating System](#Operating-System)
* [Python Details](#Python-Details)
----
## Goal
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.
## ARM A9 Processor Subsystem
#### Note:
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 id: tags:
``` python
!cat /proc/cpuinfo
```
%% Cell type:markdown id: tags:
#### Available DRAM ...
%% Cell type:code id: tags:
``` python
!cat /proc/meminfo | grep 'Mem*'
```
%% Cell type:markdown id: tags:
### Network Status
%% Cell type:markdown id: tags:
#### Wired Ethernet connection
%% Cell type:code id: tags:
``` python
!ifconfig eth0
```
%% Cell type:markdown id: tags:
#### Confirm local hostname
%% Cell type:code id: tags:
``` python
!hostname
```
%% Cell type:markdown id: tags:
### Operating System
#### Verify Linux version ...
%% Cell type:code id: tags:
``` python
!cat /etc/os-release | grep VERSION
```
%% Cell type:markdown id: tags:
### Python Details
#### Note
Here we are executing a Python script rather than shell commands
%% Cell type:code id: tags:
``` python
import sys
print('\nPython Version:\n {} \n\nPython Platform:\n{}\n'.format(sys.version, sys.platform))
```
%% Cell type:code id: tags:
``` python
print ('Python path settings:')
for path_entry in sys.path:
print(path_entry)
```
%% Cell type:code id: tags:
``` python
# List of all Python packages currently installed
!pip3 list --format=columns
```
%% Cell type:code id: tags:
``` python
# On being 'Pythonic'
import this
```
%% Cell type:code id: tags:
``` python
print("This was the intro to the FPGA course PYNQ Lab")
```
%% Output
This was the intro to the FPGA course PYNQ Lab
%% Cell type:markdown id: tags:
## Task 2 (FPGA LAb 3)
#### Exercise 2.1
1) Print the current directory (find the corresponding linux command)
2) Write a short python code that asks for your name and outputs "Hello XXXX, how are you today?"
3) Write a short python code that prints all the files in the 'bitstream' and 'images' folders.
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment