Files
chipyard/tests/spiflash.py
2022-12-21 15:59:46 -08:00

11 lines
240 B
Python
Executable File

#!/usr/bin/env python3
# Generates a binary file that the SPI test uses
outfile = "spiflash.img"
with open(outfile, 'wb') as f:
for i in range(0,0x100000,4):
check = 0xdeadbeef - i
f.write(check.to_bytes(4,'little'))