-
Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Windows:
-
Install Arm GNU GCC compiler. Download the
tar.xvarchive from: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Define the environmet variable$ARM_GCC_ROOTto point to the location where you extract this archive. This guide was tested witharm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi -
Update your
$PATHand$LD_LIBRARY_PATHas follows:setenv PATH $ARM_GCC_ROOT/bin:$PATH
setenv LD_LIBRARY_PATH $ARM_GCC_ROOT/lib:$LD_LIBRARY_PATH
This guide explains the steps needed to build the compiler and simulator toolchain for RISC-V ISA. It assumes RV32GC instruction extension.
- GNU GCC Compiler: https://github.com/riscv/riscv-gnu-toolchain
- LLVM Compiler: https://github.com/llvm/llvm-project.git
- Proxy Kernel (to map syscalls from binary to OS): https://github.com/riscv-software-src/riscv-pk
| # Run with make SIM=verilator | |
| TOPLEVEL_LANG = verilog | |
| VERILOG_SOURCES = $(shell pwd)/skid_buffer.sv | |
| TOPLEVEL = skid_buffer | |
| MODULE = skid_buffer_tb | |
| EXTRA_ARGS += --coverage --trace-fst --trace-structs | |
| include $(shell cocotb-config --makefiles)/Makefile.sim |
| """ | |
| Tarjan's strongly connected components algorithm + Topological sort | |
| Taken from: http://www.logarithmic.net/pfh/blog/01208083168 | |
| Public domain. Use it as you will | |
| """ | |
| def strongly_connected_components(graph): | |
| """ | |
| Tarjan's Algorithm (named for its discoverer, Robert Tarjan) is a graph |
| import pyaudio | |
| import matplotlib.pyplot as plt | |
| import numpy | |
| import wave | |
| FORMAT = pyaudio.paInt16 # We use 16bit format per sample | |
| CHANNELS = 1 | |
| RATE = 44100 | |
| CHUNK = 1024 # 1024bytes of data red from a buffer |
| #!/usr/bin/env bash | |
| # journal.sh | |
| # ========== | |
| # | |
| # One daily text file to rule them all. | |
| # | |
| # Copyright: 2022 Tyler Cipriani <[email protected] | |
| # License: GPLv3 | |
| set -euo pipefail |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of