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>; |
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' |
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); |
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
/VARI xi, yi, zi, e2; | |
/VARJ xj, yj, zj, mj; | |
/VARF ax, ay, az, ap; | |
dx = xj - xi; | |
dy = yj - yi; | |
dz = zj - zi; | |
r2 = dx*dx + dy*dy + dz*dz + e2; | |
r1i = powm12(r2); | |
r2i = r1i*r1i; | |
r1im = mj*r1i; |
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
/VARI xi, yi, zi, vxi, vyi, vzi, hi; | |
/VARJ xj, yj, zj, vxj, vyj, vzj, hj, mj; | |
/VARF rho, rox, roy, roz, dd; | |
dx = xi - xj; | |
dy = yi - yj; | |
dz = zi - zj; | |
r2 = dx*dx + dy*dy + dz*dz; | |
r1 = sqrt(r2); |
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 math as math | |
import numpy as np | |
from chainer import Function, FunctionSet, gradient_check, Variable, optimizers | |
import chainer.functions as F | |
model = FunctionSet( | |
l1 = F.Linear(1, 10), | |
l3 = F.Linear(10, 1), | |
) |
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
/* timings-mpfr - program to measure the efficiency of GNU MPFR | |
Copyright 2001, 2010, 2011 Free Software Foundation, Inc. | |
Copyright 2001 Norbert Mueller (Univ. Trier, Germany). | |
Contributed by the Arenaire and Caramel projects, INRIA. | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU Lesser General Public License as published by | |
the Free Software Foundation; either version 3 of the License, or (at your | |
option) any later version. |
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
Number of platforms: 1 | |
Platform Profile: FULL_PROFILE | |
Platform Version: OpenCL 1.2 beignet 1.0 (git-23497c6) | |
Platform Name: Intel Gen OCL Driver | |
Platform Vendor: Intel | |
Platform Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_icd | |
Platform Name: Intel Gen OCL Driver | |
Number of devices: 1 |
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
SBT ?= sbt | |
SBT_FLAGS ?= -Dsbt.log.noformat=true | |
.SHELLFLAGS := -e -o pipefail | |
# If a chiselVersion is defined, use that. | |
ifneq (,$(chiselVersion)) | |
CHISEL_SMOKE_VERSION := $(chiselVersion) | |
CHISEL_CHECK_VERSION := $(chiselVersion) | |
CHISEL_DEFAULT_VERSION := $(chiselVersion) |
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
scalaVersion := "2.10.2" | |
resolvers ++= Seq( | |
"scct-github-repository" at "http://mtkopone.github.com/scct/maven-repo" | |
) | |
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-language:reflectiveCalls") | |
val chiselVersion_h = System.getProperty("chiselVersion", "latest.release") |