Skip to content

Instantly share code, notes, and snippets.

View cathalmccabe's full-sized avatar

Cathal McCabe cathalmccabe

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cathalmccabe
cathalmccabe / script.tcl
Created December 4, 2017 16:05
Vivado HLS script to build vec_add.cpp
# Script to build vec_add.cpp
open_project vec_add
set_top vec_add
add_files vec_add.cpp
open_solution "solution1"
set_part {xc7z020clg400-1} -tool vivado
create_clock -period 7 -name default
csynth_design
export_design -format ip_catalog -description "vec_add" -display_name "vec_add"
exit
@cathalmccabe
cathalmccabe / vec_add.cpp
Last active December 4, 2017 16:10
HLS example of vector add with AXI stream interfaces for data, and AXI lite interface for control
#include <iostream>
#include <hls_stream.h>
#include <ap_axi_sdata.h>
using namespace std;
typedef ap_axis <32,1,1,1> AXI_T;
typedef hls::stream<AXI_T> STREAM_T;
void vec_add(STREAM_T &A, STREAM_T &B, STREAM_T &C, int LEN){
# Script to build vec_add.cpp HLS IP
open_project vec_add
set_top vec_add
add_files vec_add.cpp
open_solution "solution1"
set_part {xc7z020clg400-1} -tool vivado
create_clock -period 7 -name default
csynth_design
export_design -format ip_catalog -description "vec_add" -display_name "vec_add"
exit
@cathalmccabe
cathalmccabe / my_notebook.ipynb
Created March 9, 2018 11:05
My test notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cathalmccabe
cathalmccabe / cifar10.ipynb
Created April 5, 2018 15:05
Example my notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cathalmccabe
cathalmccabe / leds.ipynb
Created July 8, 2018 10:49
LED example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cathalmccabe
cathalmccabe / pynq_app_install.txt
Created July 31, 2018 08:28
Installing apps and packages to a PYNQ board
If the board is connected to the internet, a Python package can be installed with pip:
pip install <github repo web address>
You can also download a zip of the repo to a computer (there is an option on the GitHub repo to download a zip).
Extract the repo and copy to the board. You can then run a local pip install:
pip install ./path_to_repo
If the board is connected to the internet, you can run:
sudo apt-get install <package>
If the board is not connected to the internet, apt-get will usually fail when trying to access the .deb file for the package.
@cathalmccabe
cathalmccabe / pynq_ethernet_performance.md
Created July 31, 2018 10:08
Run network performance analysis on PYNQ board

Connect two boards directly via ethernet. Set appropriate static IP addresses.

Install iperf

On both boards install iperf: sudo apt-get install iperf

Setup server

On one board (server):

@cathalmccabe
cathalmccabe / pynq_boolean_generator_basic_gui.ipynb
Created August 14, 2018 10:17
Basic GUI consisting of select boxes for the PYNQ boolean generator in the logic tools overlay (v2.2) (PYNQ-Z1, PYNQ-Z2)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.