Skip to content

Instantly share code, notes, and snippets.

View urish's full-sized avatar

Uri Shaked urish

View GitHub Profile
@urish
urish / README.md
Last active September 10, 2025 11:33
Tiny Tapeout Analog Projects - All Shuttles
@urish
urish / gds_compare.py
Created September 8, 2025 12:54
gds_compare.py
# Usage:
# klayout -b -r gds_compare.py -rd gds1=file1.gds -rd gds2=file2.gds
import sys
import pya
def compare_gds(file1, file2):
diff = pya.LayoutDiff()
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2025, Uri Shaked
import struct
from ttboard.mode import RPMode
import ttboard.util.platform as platform
UI_START = 1 << 0
UI_LOAD_CR = 1 << 1
UI_LOAD_CI = 1 << 2
@urish
urish / boot.py
Last active June 21, 2025 13:50
gamepad_pmod_circuitpython_pio
import usb_hid
from joystick_xl.hid import create_joystick
# enable default CircuitPython USB HID devices as well as JoystickXL
usb_hid.enable(
(
usb_hid.Device.KEYBOARD,
usb_hid.Device.MOUSE,
usb_hid.Device.CONSUMER_CONTROL,
create_joystick(axes=2, buttons=8, hats=1),
@urish
urish / rendervid.py
Created January 22, 2025 09:43
tt06-urish-charge-pump-flythrough.py
import mitsuba as mi
import argparse
from datetime import datetime
import time
import subprocess
import os
RENDER_WIDTH = 1920
RENDER_HEIGHT = 1080
RENDER_SPP = 256
from ttboard.demoboard import DemoBoard
from ttboard.mode import RPMode
import ttboard.cocotb.dut
REG_PC = 0
REG_SP = 1
REG_EXEC = 2
REG_STACK_TOP = 3
@urish
urish / skull_bones_fill.py
Created November 9, 2024 16:09
Generates skull fill for sg13g2 IHP
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 Uri Shaked
import gdspy
LAYER = 134 # TopMetal2
DATATYPE = 22 # filler
PIXEL_SIZE = 0.28 # um
skull = [
{
"version": 1,
"author": "Uri Shaked",
"editor": "wokwi",
"parts": [
{
"type": "board-esp32-s3-box-3",
"id": "esp32",
"top": -24.91,
"left": -388.54,
@urish
urish / tt05_dffram_test.py
Last active August 2, 2024 16:04
tt05_dffram_test.py
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2024, Uri Shaked
from ttboard.demoboard import DemoBoard
from ttboard.mode import RPMode
import random
from machine import Pin
WRITE_EN = 0x80
import time
import machine
from ttboard.demoboard import DemoBoard
from ttboard.mode import RPMode
from ttboard.pins.pins import Pins
import rp2
# We use the PIO as we need to generate a tx_valid pulse of a single clock cycle