Ray Salemi
Ray Salemi
I've extended `cocotb.queues.Queue` to add peek functionality (for TLM). I'd like to test it in my current `nosetest` suite. ``` async def data_transfer(self): await self.put_data(self. data_list) await self.get_data() def test_data_transfer(self):...
I'll be building from here to test `tlm_fifo`, etc.
I've now got testing running by using the @cocotb.test() decorator.
> Can you give an example of an application where `peek` would be useful? I assume you're thinking of a single-consumer queue, since `peek` is somewhere between useless and dangerous...
> It's quite straightforward to build what you're asking for as a standalone component > > ```python > class InspectableQueueConsumer: > """ This object is not safe to use from...
> Your `peek_nowait` operation has a critical bug, as it consumes the data from the underlying queue making it no different to `get_nowait`. Funny. I just read this after I...