Hello:
If p_in is an input buffered port, does a "p_in :> x;" statement inside a while(1) loop block the loop execution until the next time the buffered port is full?
If not, what happens each time the statement is encountered?
Thanks,
Bill
are ports blocking?
Thanks for the response. Reading the linked material prompted another question.
The summary states that "An input removes data from a port’s FIFO. The processor waits only if the FIFO is empty." What happens if I use a buffered port that is larger than the size of the input pin specification, for example "in buffered port :32 p_in = XS1_PORT_8A ;"?
Can the "p_in :> x;" statement pull partial data from the FIFO in a non-blocking manner, or will the processor wait until all 4 8-bit portions are in the FIFO?
Thanks,
Bill
The summary states that "An input removes data from a port’s FIFO. The processor waits only if the FIFO is empty." What happens if I use a buffered port that is larger than the size of the input pin specification, for example "in buffered port :32 p_in = XS1_PORT_8A ;"?
Can the "p_in :> x;" statement pull partial data from the FIFO in a non-blocking manner, or will the processor wait until all 4 8-bit portions are in the FIFO?
Thanks,
Bill
There's the partin, partout and some related library functions to do that.
https://www.xmos.com/download/private/I ... 283%29.pdf
Should be valid too for XS2.
https://www.xmos.com/download/private/I ... 283%29.pdf
Should be valid too for XS2.
Thanks for the further references. I'm wondering, what is the default value? That is, what happens if I use a buffered port that is larger than the size of the input pin specification, for example "in buffered port :32 p_in = XS1_PORT_8A ;"? Will "p_in :> x;" block or pull out partial results or something else?
What should I do if I want the "p_in :> x;" statement to wait until the FIFO is full?
What should I do if I want the "p_in :> x;" statement to wait until the FIFO is full?
By default the full buffer width is used
Does that mean that for "in buffered port :32 p_in = XS1_PORT_8A ;" the default mode for "p_in :> x;" is to block?
Yes it will block until 32 bits have been clocked in.
Thanks for the help!
sincerely,
Bill
sincerely,
Bill