You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application where I want to use 16 bit symbol size and a 128 bit wide bus. This should in theory result in 8 symbols and thus a 3 bit empty signal. This is also what I assume is configured when configuring if I set ``dataBitsPerSymbol:16`.
So I believe that my empty signal is correctly sized to 3 bits. When trying to send packets of lets say 64 bits, so that would be 4 symbols, giving 4 empty, cocotb tries to set empty to 12.
INFO:cocotb: 20290.00ns INFO random_big_range_small_size_test failed
INFO:cocotb: Traceback (most recent call last):
INFO:cocotb: File "/home/eirikalb/GitHub/zivid-sdk/fpga/m017_image_compressor/tb/test_m017_image_compressor.py", line 94, in random_big_range_small_size_test
INFO:cocotb: await test_bench.send_packet(test_input)
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb/decorators.py", line 255, in __await__
INFO:cocotb: return (yield self)
INFO:cocotb: File "/home/eirikalb/GitHub/zivid-sdk/fpga/m017_image_compressor/tb/m017_image_compressor_testbench.py", line 45, in send_packet
INFO:cocotb: await self.stream_in._driver_send(self._array_to_binstr(pixels, 16)) # pylint: disable=protected-access
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb_bus/drivers/avalon.py", line 794, in _driver_send
INFO:cocotb: await self._send_string(pkt, sync=sync, channel=channel)
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb_bus/drivers/avalon.py", line 708, in _send_string
INFO:cocotb: self.bus.empty.value = bus_width - len(string)
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb/handle.py", line 196, in __setattr__
INFO:cocotb: return object.__setattr__(self, name, value)
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb/handle.py", line 458, in value
INFO:cocotb: self._set_value(value, cocotb.scheduler._schedule_write)
INFO:cocotb: File "/usr/local/lib/python3.9/dist-packages/cocotb/handle.py", line 767, in _set_value
INFO:cocotb: raise OverflowError(
INFO:cocotb: OverflowError: Int value (12) out of range for assignment of 3-bit signal ('streamin_empty')
INFO:cocotb: 20290.00ns INFO **********************************************************************************************
The error occurs on line 708, but it seems that the issue is that when sending, the symbol size is not fully taken into consideration giving a bus length of 128 / 8 bits =16 symbols rather than 128 / 16 bits = 8 symbols. Which would then obvisouly give 16-4 instead of 4.
I have an application where I want to use 16 bit symbol size and a 128 bit wide bus. This should in theory result in 8 symbols and thus a 3 bit empty signal. This is also what I assume is configured when configuring if I set ``dataBitsPerSymbol:16`.
So I believe that my empty signal is correctly sized to 3 bits. When trying to send packets of lets say 64 bits, so that would be 4 symbols, giving 4 empty, cocotb tries to set empty to 12.
The error occurs on line 708, but it seems that the issue is that when sending, the symbol size is not fully taken into consideration giving a bus length of 128 / 8 bits =16 symbols rather than 128 / 16 bits = 8 symbols. Which would then obvisouly give 16-4 instead of 4.
cocotb-bus/src/cocotb_bus/drivers/avalon.py
Line 645 in ac55515
The text was updated successfully, but these errors were encountered: