xls icon indicating copy to clipboard operation
xls copied to clipboard

Enable send/recv on Values in JitChannelQueue

Open RobSpringer opened this issue 2 years ago • 1 comments

Currently, the send and receive calls in JitChannelQueue operate on raw buffers + len, e.g. void JitChannelQueue::Send(const uint8_t* data, int64_t num_bytes);. It might make users' lives easier if they could send/receive Values instead or as well.

For internal proc communication, raw buffers are as useful as needed, but for users inserting values into and getting values out of queues (think proc network inputs & outputs), this is a pain, as they need to be aware of endianness, etc.

RobSpringer avatar Aug 16 '22 16:08 RobSpringer

Currently we have the JitChannelQueueWrapper to help with this. Only reason it wasn't incorporated into JitChannelQueueWrapper is the need to have access to the ProcJit object.

https://github.com/google/xls/blob/main/xls/flows/ir_wrapper.h#L38

hongted avatar Aug 16 '22 16:08 hongted

Channel queues in the jit and interpreter now all derive from the same base class and support this feature.

meheff avatar Jun 08 '23 17:06 meheff