Fix csp_port shape hack
Currently a csp_port has a fixed shape to send data. Sometimes though, a "header" is additional needed, which is likely to have a different shape as the data.
Example:
Originally posted by @awintel in https://github.com/lava-nc/lava/pull/46#discussion_r748447199
+1
We are running into similar issues.
We could transmit header information via the token queue or flatten the arrays? Other suggestions?
What are the requirements for Loihi with respect to channels? Would it be more efficient to internally create a second channel for the header information only, to keep the amount of data sent per read/write constant?
For Loihi the Channel implementation will be different. We won't use PyPyChannels in this case but the lower level "Andrew"-CSP package as you know in which everything just gets serialized into flat bytes.
We could have a separate CSP channel increasing the number to 3 different things we have to transact information over. We might just use the Queue for that, which we already use to transact the synchronization tokes.
We should probably pull Harry into this discussion because we have to keep performance in mind.