View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
# | |
RUN \ | |
apt-get update && \ | |
apt-get -y upgrade && \ | |
apt-get install -y build-essential && \ | |
apt-get install -y software-properties-common && \ | |
apt-get install -y curl git man unzip vim wget sudo zsh locales && \ | |
apt-get install -y net-tools iputils-ping emacs | |
# |
View run-aocl-docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ./home/shared | |
shared=$(realpath ./home/shared) | |
sudo docker run \ | |
-l fpga-docker --name fpga -h aoclfpga \ | |
--rm --network host -v $shared:/home/$(whoami)/shared \ | |
-v /usr/local/intelFPGA_pro:/usr/local/intelFPGA_pro \ | |
-d -P aocl:devel |
View proxy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host) { | |
return "SOCKS localhost:8000"; | |
} |
View main_grav2.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern float base0; | |
float sqrtf(float); | |
void grav_kernel(float *x, float *y, float *z, float *m, | |
float *ax, float *ay, float *az, float *pt, float *res, | |
int n); | |
int main(int argc, char * argv[]) | |
{ |
View FPMUL.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FPMUL( // @[:@3.2] | |
input clock, // @[:@4.4] | |
input reset, // @[:@5.4] | |
input [31:0] io_x, // @[:@6.4] | |
input [31:0] io_y, // @[:@6.4] | |
output [31:0] io_z // @[:@6.4] | |
); | |
wire [7:0] _T_12; // @[FPBASE.scala 16:27:@9.4] | |
wire _T_14; // @[FPBASE.scala 27:17:@10.4] | |
wire [31:0] _T_18; // @[FPBASE.scala 13:33:@15.6] |
View yuv2png.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from __future__ import print_function | |
import cv2 | |
import numpy as np | |
import sys | |
import os.path | |
def c255(x): | |
return min(max(int(x),0),255) |
View gist:2f8b4b49a72c1a2762f975811cbba449
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ def config_sync(self, size, direc): | |
+ with open(self.class_path + '/sync_size', mode='w') as f: | |
+ f.write(str(size)) | |
+ with open(self.class_path + '/sync_direction', mode='w') as f: | |
+ f.write(str(direc)) | |
+ | |
+ def sync_for_cpu(self): | |
+ with open(self.class_path + '/sync_for_cpu', mode='w') as f: | |
+ f.write(str(1)) | |
+ |
View lfc-pynq.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/ { | |
fragment@0 { | |
target-path = "/amba/fpga-region0"; | |
#address-cells = <0x1>; | |
#size-cells = <0x1>; | |
__overlay__ { | |
#address-cells = <0x1>; | |
#size-cells = <0x1>; |
View bnn_pynq.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from udmabuf import Udmabuf | |
from uio import Uio | |
import os | |
import struct | |
import math | |
# set path to the BNN-PYQN repo. | |
BNN_PYNQ_ROOT = '.' | |
PARAM = 'bnn/params/mnist' |
View pipeline_top.vhd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------- | |
------------------------------------------------------------------------------- | |
library ieee; | |
use ieee.std_logic_1164.all; | |
use ieee.std_logic_unsigned.all; | |
entity pipeline_top is | |
port ( | |
xi : in std_logic_vector(31 downto 0); | |
yi : in std_logic_vector(31 downto 0); |
NewerOlder