Mon Jan 27 08:59:03 EST 2020
Some interesting cases pop up for a generic synchronizer: uart memory
reader. Basically, DMA.
So let's continue down this path.
Create a channel compositor.
The synchronization mechanism is easy enough: and together sender and
receiver signal, but expressing it in an expression language requires
some awkward shuffling. It's the old read/write problem: a read is
the input of a function, and a write is the output. Composition is
then done on the outside.
The mem->UART DMA is a nice example.
Mem read can continue once UART has acknowledged it has sampled the
channel. Then mem read can obtain the next byte and block until UART
is ready sending. Express that as a channel operation
Can this be expressed as a select?
The important part is the handshake.
SM1: raises write ready flag
SM2: raises read ready flag
Optimization: if it is known that the reader is fast enough such that
it will sit there waiting, it's ok to just pulse. This is what I did
before in the DTI sequencer.