Skip to content

Instantly share code, notes, and snippets.

@hansemro
hansemro / sample.tex
Last active December 27, 2024 09:18
[WIP] scopehal-docs LaTeX (*.tex) to reStructuredText (*.rst) converter
\chapter{Legal Notices}
\label{ch:legal}
\section{Introduction}
ngscopeclient, libscopehal, and the remainder of the project are all released under the 3-clause BSD license
(reproduced below). This is a permissive license, explicitly chosen to encourage integration with third-party open
source and commercial projects.
\section{License Agreement}
@hansemro
hansemro / top.route.json
Created November 7, 2024 21:46
[openXC7] clb jtag test post-route netlist with some bogus PIPs
{
"creator": "Next Generation Place and Route (Version 4436e38)",
"modules": {
"top": {
"settings": {
"route": "00000000000000000000000000000001",
"router1/useEstimate": "1 ",
"router1/fullCleanupReroute": "1 ",
"router1/cleanupReroute": "1 ",
"router1/maxIterCnt": "200",
@hansemro
hansemro / series7_ibufds_test.py
Created November 7, 2024 20:23
[RapidWright] Series 7 HP/HR IOB IBUFDS Experiment
import rapidwright
from com.xilinx.rapidwright.design import Cell, Design, Net, NetType, PinType, SiteInst, SitePinInst, Unisim
from com.xilinx.rapidwright.device import Node, PIP, Series, Site, Wire
from com.xilinx.rapidwright.edif import EDIFDirection, EDIFHierNet, EDIFNet, EDIFNetlist, EDIFPortInst, EDIFTools
from com.xilinx.rapidwright.router import Router
# Uncomment one part or the other to test IBUFDS placement at HP IOB or HR IOB site.
part = "xc7k325tffg900-2" # HP IOB
# part = "xc7a200tfbg484-3" # HR IOB
des = Design("top", part)
@hansemro
hansemro / tex2adoc.sh
Last active July 6, 2024 18:34
[WIP] scopehal-docs LaTeX (*.tex) to AsciiDoc (*.adoc) converter
#!/usr/bin/env bash
# scopehal-docs LaTeX (*.tex) to AsciiDoc (*.adoc) converter
# TODO: learn awk
set -euo pipefail
TEX=$(basename $1)
ADOC=modules/ROOT/pages/${TEX%.tex}.adoc
@hansemro
hansemro / Makefile
Last active June 19, 2024 09:09
[openXC7] RAMB36E Init Test 2
PROJECT = top
TOP = top
TOP_VERILOG = top.v
ADDITIONAL_SOURCES =
# Target Platform
FAMILY = kintex7
PART = xc7k325tffg900-2
BOARD = kc705
XDC ?= kc705.xdc
@hansemro
hansemro / Makefile
Last active June 19, 2024 09:09
[openXC7] RAMB36E1 INIT test
PROJECT = top
TOP = top
TOP_VERILOG = top.v
ADDITIONAL_SOURCES =
# Target Platform
FAMILY = kintex7
PART = xc7k325tffg900-2
BOARD = kc705
XDC ?= kc705.xdc
@hansemro
hansemro / kc705-litex-linux-vexriscv.log
Last active December 21, 2023 07:09
Booting Linux on KC705 with LiteX-VexRiscvSMP
$ litex_term --images=images/boot.json /dev/ttyUSB2
__ _ __ _ __
/ / (_) /____ | |/_/
/ /__/ / __/ -_)> <
/____/_/\__/\__/_/|_|
Build your hardware, easily!
(c) Copyright 2012-2023 Enjoy-Digital
(c) Copyright 2007-2015 M-Labs
@hansemro
hansemro / 0001-Define-__THROW-for-musl-libc.patch
Last active December 6, 2023 10:22
APKBUILD for scopehal-apps
From b1ed9c840cdb2a08d8239d6423141892a9f210cd Mon Sep 17 00:00:00 2001
From: Hansem Ro <[email protected]>
Date: Tue, 5 Dec 2023 15:43:53 -0800
Subject: [PATCH] Define __THROW for musl libc
---
UART.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/UART.cpp b/UART.cpp
@hansemro
hansemro / APKBUILD
Created December 6, 2023 01:56
APKBUILD for libffts 0.9.0
# Maintainer: Hansem Ro <[email protected]>
pkgname=ffts
_pkgver=0.9.0
pkgver="$_pkgver"_git
pkgrel=0
arch="all"
url="https://github.com/anthonix/ffts"
pkgdesc="libffts"
license="BSD"
makedepends="
@hansemro
hansemro / ngscopeclient.man
Last active December 5, 2023 09:57
[WIP] Man page for ngscopeclient
.TH NGSCOPECLIENT 1 "December 1, 2023" "scopehal-apps 0.0.252ddc2"
.SH NAME
ngscopeclient \- Advanced Test & Measurement remote control and analysis suite
.SH SYNOPSIS
.B ngscopeclient
[\fB\-\-quiet\fR]