cscg is loooong

This commit is contained in:
2026-03-18 05:59:37 +01:00
parent 0c1e63fb3a
commit 7ac813dc0c
1109 changed files with 14511 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import struct
with open("digital-0.bin", "rb") as f:
data = f.read()
num_transitions = (len(data) - 44) // 8
# Read integers as little-endian (normal), but doubles as big-endian
initial_state = struct.unpack_from('<I', data, 16)[0]
begin_time = struct.unpack_from('>d', data, 20)[0] # big-endian
end_time = struct.unpack_from('>d', data, 28)[0] # big-endian
print(f"initial_state={initial_state}, begin={begin_time:.9f}, end={end_time:.9f}")
transitions = []
for i in range(num_transitions):
t = struct.unpack_from('>d', data, 44 + i * 8)[0]
transitions.append(t)
for i, t in enumerate(transitions[:20]):
print(f" [{i}] {t:.9f}s")