I have just started evaluating the propeller to become a programmable peripheral co-processor for the 'next generation' version of one of my products.
So on a edge condition of one of the pins I want to capture a port of 8 bits which can be assigned to any pins ie 8 from any of the pins in no specific order so its probably easiest to just capture them all.
How fast this can be done determines how many ways I will be able to use the propeller.
Naturally this will all be assembler. I am an expert in PicMicro assembly but this is my first 2 hours with the propeller so bare with the pseudo-code.
MOV (InputRegister) to Main Memory at HUB_FIFO_WRITE_POINTER
If HUB_FIFO_WRITE_POINTER = HUB_FIFO_WRITE_POINTER_END then HUB_FIFO_WRITE_POINTER = HUB_FIFO_WRITE_POINTER_START
So I am guessing about 30 instructions to achieve that and I will implement that as a first pass.
While I am doing that what I am interested in is suggestions in doing this even faster. Has anyone done this already?
The bottle neck is the HUB access so I can imagine a scheme where the COGS take it in turns to capture a value or even push to a local cache before passing control to another COG while pushing their captured data to the main memory but its not clear yet how to synchronize so delicately or even if that's possible.
Sorry for not researching more beforehand but I thought would see if others have done this before or point to example of something like this.