Skip to content

Instantly share code, notes, and snippets.

@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 <hansemro@outlook.com>
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 <hansemro@outlook.com>
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]
@hansemro
hansemro / gen_filter_checklist.py
Created November 21, 2023 09:36
Generate scopehal Filter Docs Checklist
#!/usr/bin/env python3
import sys
class Section:
def __init__(self, name:str):
self.name = name
self.has_description = False
self.has_image = False
self.has_inputs = False
@hansemro
hansemro / dsconvert.cpp
Last active October 28, 2023 21:11
[Benchmark] Convert 1-bit digital samples to bool array via AVX2
// SPDX-License-Identifier: MIT
// Copyright (c) 2023 Hansem Ro
// Benchmark to compare AVX2 and generic implementations of converting 1-bit
// array to bool array.
// Build on x86_64 machine with AVX2 with:
// g++ -mavx2 -o ./dsconvert dsconvert.cpp
// Usage: ./dsconvert [-n <NUM_SAMPLES>] [-m <0|1|2|3|4>]
@hansemro
hansemro / siglent_bin_viewer.py
Last active August 9, 2023 04:26
[WIP] Siglent BIN waveform viewer
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2023 Hansem Ro
# Siglent BIN waveform viewer
# Tasks:
# - [ ] Support v0/v1 waveform
# - [ ] Process analog waveform
# - [ ] Process digital waveform
@hansemro
hansemro / sds2000xp_read_waveforms.py
Last active August 14, 2023 01:22
[WIP][SDS2000X Plus] Python script to read all waveforms
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2023 Hansem Ro
# Read all waveforms from Siglent SDS2000X Plus
# - Segmented captures will be combined to form a larger capture.
# - 8/10-bit ADC supported with any :WAV:WIDTH
# Usage:
# 0. pip install socketscpi matplotlib