Reads a PIO program from a hex file (as generated by 'pioasm -o hex'), and runs a simulated execution.
Supports an alternative workflow to the original work it is adapted from.
Adapted from: https://github.com/sumio-morioka/rpipico_simple_PIO_emulator
* Full credit to Sumio Morioka for doing the hard work. *
Simulation input is read from an input csv file, & output written to an output csv file.
PIO configuration is specified via command line args.
- Program is assumed to be loaded at address 0.
- Labels in the pioasm source are replaced in the output with addresses in the form '@addr' (e.g. @0x03)
- Avoid blank lines in the hex file, they will likely cause confusion.
- Input & output files default to 'in.csv' and 'out.csv', but the program hex file must be specified explicitly.