Skip to content

Instantly share code, notes, and snippets.

View sergev's full-sized avatar

Serge Vakulenko sergev

View GitHub Profile
@sergev
sergev / all-minifloat8.txt
Created November 2, 2023 00:07
List of all minifloat8 values
0 0000 000 = 0.000
0 0000 001 = 0.001953
0 0000 010 = 0.003906
0 0000 011 = 0.005859
0 0000 100 = 0.007812
0 0000 101 = 0.009766
0 0000 110 = 0.01172
0 0000 111 = 0.01367
0 0001 000 = 0.01562
0 0001 001 = 0.01758
@sergev
sergev / rp2040-hello-uart-quick.trace
Created October 3, 2023 07:36
Run 'hello world' on RP2040 simulator, skip ROM
RP2040 Simulator, Version 0.1
Code 0x10000000-0x10001e23 size 7716 bytes
Code 0x10001e24-0x10001fa3 size 384 bytes
(0) Read ROM [0] = 20041f00
(1) msp = 20041f00
(2) 100001f6: 481f ldr r0, [pc, #124]
(2) Read Flash [10000274] = d0000000
(3) r0 = d0000000
(4) 100001f8: 6800 ldr r0, [r0, #0]
(4) Read CPUID = 00000000
@sergev
sergev / rp2040-hello-uart-full.trace
Created October 3, 2023 07:27
Run 'hello world' on RP2040 simulator, with full tracing
This file has been truncated, but you can view the full file.
RP2040 Simulator, Version 0.1
Code 0x10000000-0x10001e23 size 7716 bytes
Code 0x10001e24-0x10001fa3 size 384 bytes
(0) Read ROM [0] = 20041f00
(1) msp = 20041f00
(1) Read ROM [4] = 000000eb
(3) 000000ea: 487d ldr r0, [pc, #500]
(3) Read ROM [2e0] = d0000000
(4) r0 = d0000000
(5) 000000ec: 6801 ldr r1, [r0, #0]
@sergev
sergev / all-positive-bfloat16.txt
Created March 2, 2023 01:23
List of all bfloat16 values, non-negative
This file has been truncated, but you can view the full file.
0 00000000 0000000 = 0.0
0 00000001 0000000 = 1.175e-38
0 00000001 0000001 = 1.185e-38
0 00000001 0000010 = 1.194e-38
0 00000001 0000011 = 1.203e-38
0 00000001 0000100 = 1.212e-38
0 00000001 0000101 = 1.221e-38
0 00000001 0000110 = 1.231e-38
0 00000001 0000111 = 1.24e-38
0 00000001 0001000 = 1.249e-38
@sergev
sergev / dispak-copy-paste-detector.txt
Created August 26, 2022 23:31
Find code duplications in besm6/dispak sources.
$ cd dispak
$ pmd cpd --minimum-tokens 100 --language cpp --files .
Found a 21 line (327 tokens) duplication in the following files:
Starting at line 583 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
Starting at line 1093 of /Users/vak/Project/Besm-6/dispak/dispak/./encoding.c
static unsigned char tab0 [256] = {
/* 00 - 07 */ 0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
/* 08 - 0f */ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
/* 10 - 17 */ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
@sergev
sergev / mac-m1-mini-system-info.txt
Created February 3, 2022 02:34
Configuration of Mac M1 mini as reported by system_profiler
$ system_profiler -detailLevel mini
Apple Pay:
Apple Pay Information:
Platform ID: N5B2M002C3A50000
SEID: 040F305B636480021015133413308606BDD1D899F7E660AE
Device: 0xd2
Production Signed: Yes
Restricted Mode: No
Hardware: 0x00000007
@sergev
sergev / language-tutorial-compute.v
Created January 13, 2022 01:40
Calyx example: result of compiling language-tutorial-compute.futil into Verilog
/**
* Core primitives for Calyx.
* Implements core primitives used by the compiler.
*
* Conventions:
* - All parameter names must be SNAKE_CASE and all caps.
* - Port names must be snake_case, no caps.
*/
`default_nettype none
@sergev
sergev / boot-cbl-mariner-virtualbox.log
Created July 20, 2021 19:46
Start Microsoft CBL-Mariner Linux on VirtualBox
[ 0.000000] Linux version 5.10.42.1-3.cm1 (root@CBL-Mariner) (gcc (GCC) 9.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP Mon Jun 28 13:00:04 UTC 2021
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.10.42.1-3.cm1 rd.auto=1 root=PARTUUID=9997a588-8f45-4df6-ae96-372f3fbd883d init=/lib/systemd/systemd ro loglevel=3 quiet no-vmw-sta crashkernel=128M lockdown=integrity net.ifnames=0 plymouth.enable=0 systemd.legacy_systemd_cgroup_controller=yes
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009
@sergev
sergev / esp32c3_rev3_rom.dis
Created July 1, 2021 06:50
Disassembled ROM from Espressif ESP32-C3 microcontroller
This file has been truncated, but you can view the full file.
esp32c3_rev3_rom.elf: file format elf32-littleriscv
Disassembly of section .fixed.text:
40000000 <_start>:
40000000: 6910106f j 40001e90 <_init>
...
@sergev
sergev / boot-debian-nezha-riscv64.log
Created June 14, 2021 04:32
Start Debian Linux on Nezha board with RISC-V processor
Connecting to /dev/tty.usbserial-A50285BI, speed 115200
Escape character: Ctrl-^ (ASCII 30, RS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
[125]HELLO! BOOT0 is starting!
[128]BOOT0 commit : 27369ab
[130]set pll start
[132]periph0 has been enabled
[135]set pll end