0.10.0+dev-00865-g04ebb43f
openocd -f interface/YOUR_INTERFACE_CONFIG -f raspi4.cfg
#!/bin/bash -x | |
# make_arm64_rpi_kernel_debs.sh | |
# Builds arm64 debian packages from the CURRENT rpi firmware repository kernel which is installed by: | |
# sudo rpi-update | |
# This runs on an arm64 host with arm64 compilation tools... | |
# or with some sort of cross-compilation setup. | |
# Debs are put in $workdir/build | |
# | |
# This will NOT work in Raspbian unless you have an arm64 compilation | |
# environment setup. Appears to work on |
This document was originally written several years ago. At the time I was working as an execution core verification engineer at Arm. The following points are coloured heavily by working in and around the execution cores of various processors. Apply a pinch of salt; points contain varying degrees of opinion.
It is still my opinion that RISC-V could be much better designed; though I will also say that if I was building a 32 or 64-bit CPU today I'd likely implement the architecture to benefit from the existing tooling.
Mostly based upon the RISC-V ISA spec v2.0. Some updates have been made for v2.2
The RISC-V ISA has pursued minimalism to a fault. There is a large emphasis on minimizing instruction count, normalizing encoding, etc. This pursuit of minimalism has resulted in false orthogonalities (such as reusing the same instruction for branches, calls and returns) and a requirement for superfluous instructions which impacts code density both in terms of size and
#!/usr/bin/env python3 | |
import numpy as np | |
# Assume that P = N * N. | |
N = 4 | |
A = np.arange(0, 2 * N * N, 2).reshape(N, N) | |
B = np.arange(1, 2 * N * N, 2).reshape(N, N) | |
C_gt = A.dot(B) |
/* | |
* clzero の後にstoreするとmemsetよりはるかに悪くなる | |
* | |
* * clzeroのみ :30[GB/s] | |
* * clzero + ストア :3[GB/s] | |
* * memset :12.5[GB/s] | |
*/ | |
void *amd_clzero(void *dst, const void *src, size_t sz) | |
{ | |
size_t line_size = 64; |
SDK = xcrun -sdk macosx | |
all: compute.metallib compute | |
compute.metallib: Compute.metal | |
# Metal intermediate representation (.air) | |
$(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^ | |
# Metal library (.metallib) | |
$(SDK) metallib -o $@ /tmp/Compute.air |
#!/usr/bin/env sh | |
############################################# | |
# WARNING # | |
# No more commits are going to be made to # | |
# this gist. Please get the latest script # | |
# from the new repository: # | |
# https://github.com/pixelomer/macos-mkjail # | |
############################################# |
# Copyright (c) 2017: Rich Wareham, Simon Byrne | |
# Available under the MIT "Expat" license. | |
using Colors | |
using SenseHat | |
const LED = led_matrix() | |
function julia(z, c) | |
maxit = 50 |
// public domain | |
// | |
// benchmark @ 3.5 GHz (i5-4690) Intel Core i5: | |
// | |
// 1,709,401,709 points/sec w/AVX2 + FMA | |
// 1,373,390,557 points/sec w/AVX2 | |
// 382,043,935 points/sec w/o AVX2 | |
// | |
#include <cstdio> | |
#include <cstdint> |