Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
from collections import namedtuple
import socket
import struct
usbip_user_op_common = namedtuple('usbip_user_op_common', 'version code status')
usbip_usb_device = namedtuple('usbip_usb_device', 'path busid busnum devnum speed idVendor idProduct bcdDevice bDeviceClass bDeviceSubClass bDeviceProtocol bConfigurationValue bNumConfigurations bNumInterfaces')
usbip_header_basic = namedtuple('usbip_header_basic', 'command seqnum devid direction ep')
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@buttercutter
buttercutter / ddr3_memory_controller.sby
Last active February 12, 2022 03:15
A simple DDR3 memory controller
[tasks]
proof
cover
[options]
proof: mode prove
proof: depth 10
cover: mode cover
cover: depth 40
@newhouseb
newhouseb / gray_code.py
Last active August 7, 2021 23:16
2GHz Gray Code Oscillator/Counter
# This is Gray Code oscillator that can be used on Lattice ECP5 devices to measure time down to around 500ps of
# precision (with no manual placement!) using only two (!) slices.
#
# In essence how this works is that we create a self-clocking counter that runs as fast as the FPGA fabric will
# allow. If we were to do this with a traditional counter, we would have to worry about propagation delay because
# multiple bits change at a time. If you use gray-codes, however, only one bit is changing at any given time so
# there are no issues with racing signals.
#
# If you drop this in a design and wire out the highest bit of the async_gray_count signal into a spectrum
# analyzer, you will see a dominant frequency of about 125Mhz. In other words, we cycle through all 16 gray codes
@cbalint13
cbalint13 / OpenLANE.md
Last active April 1, 2023 16:50
OpenLANE steps
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index c512a9e..e9d6f58 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -221,7 +221,7 @@ superdom.c
#endif /* LCD_DEPTH > 1 */
-
+test_disk.c
@LegalizeAdulthood
LegalizeAdulthood / PortingFromMFCToWxWidgets.md
Last active January 26, 2025 12:41
Porting from MFC to wxWidgets