Skip to content

Instantly share code, notes, and snippets.

@hansemro
hansemro / ml50x_xc95144xl.jed
Created November 16, 2025 14:24
[ML509][JED] XC95144XL CPLD backup
JEDEC Programming File for ml50x/xc95144xl.jed
Date: Fri Dec 6 01:45:24 2024
QF93312*
QP0*
F0*
X0*
N DEVICE xc95144xl-XXXXX*
L0000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000*
L0000064 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000*
@hansemro
hansemro / bsc_utils.cfg
Created November 2, 2025 14:33
[OpenOCD][DLC10] Boundary Scan Utilities + DLC10 LED Blinking via EXTEST
# Copyright (C) 2025 Hansem Ro <[email protected]>
# SPDX-License-Identifier: 0BSD
# Version: 1.0
# Required TAP-specific parameters
#set g_tap xc3s.tap
#set g_boundary_length 637
#set g_extest_instr 0b001111
#set g_sample_instr 0b000001
@hansemro
hansemro / atx_power_on.sh
Created June 27, 2025 00:03
[JetKVM][ATX Power Extension] shell script to power on PC
#!/usr/bin/env sh
# ATX Power Control Extension Board Peripheral
SERIAL_DEV=/dev/ttyS3
# Since the extension board provides power to the jetkvm,
# we can assume the extension is connected over serial.
check_atx_status() {
ATX_STATUS=$((2#$(head -n1 $SERIAL_DEV)))
@hansemro
hansemro / sample.tex
Last active September 29, 2025 22:44
[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