Mon May 21 11:05:55 EDT 2018
I need a PRU emulator
Will need to write some "threaded" PRU code, but I want to make sure I
have a little framework where I can evaluate the code before actually
running it on the machine. Debugging is minimal.
This coincides with some staapl idea to do the same for the PIC.
I need some general approach. Implement it as a monad, but the monad
should be programmable.
I have two main tricks:
- "tagless final"
- free monads to separate code and data structure
EDIT: The meaning of a program is a function that produces an infinite
timing diagram. So the meaning of an instruction is to modify the
value of a signal at a particular time. The program counter is just
Now, specify the assembly language as a class that is parameterized by
a monad that satisfies certain constraints.