I am working with the bitvis_vip_spi , and is trying to send more than 8 words (each 1 byte) with the spi_master_transmit_and_receive (or the transmit_only variant).
The GC_DATA_WIDTH and GC_DATA_ARRAY_WIDTH have both default values (8 and 32 respectively), which should allow me to send up to 32 words/bytes (as far as I understand). Less than 8 words works as it should.
When trying to send more than 8 words using the spi_master _transmit_and_receive I get the error messages
# ** Fatal: (vsim-3421) Value 8 is out of range 0 to 7. and
# Fatal error in ForLoop loop at ../UVVM/bitvis_vip_spi/script/../src/spi_vvc.vhd line 356
When using the transmit_only it simply cuts out after the first 8 words.
After some code digging it seems to me that the limitation originates from line 51 in transaction_pkg.vhd:
constant C_VVC_CMD_MAX_WORDS : natural := 8;
So, my question (given I have understood the code right): is there a way to circumvent this limit without changing the constant in the transaction_pkg? I would preferable be able to use my testbench with a clean UVVM download.
And if not, what function does the GC_DATA_ARRAY_WIDTH generic have outside the potential of narrowing the maximum number of words sent to less than 8 (and actually ?
I could of course be missing something obvious and would appreciate someone pointing me in the correct direction.
We will have to check if there is a good solution to this problem. The VVC depends on the transaction package, which defines the transaction info using a constant that has to de defined and used prior to reading the VVC source code. I will make a ticket so that we will have look at how to solve this, but in the meanwhile you will have to change C_VVC_CMD_MAX_WORDS to match GC_DATA_ARRAY_WIDTH for things to play along.
Then I understood it correctly. Thank you for looking into it.
Looking at the code is seems there was a slight mix-up that caused the max values for word size to be 32 in transaction_pkg and 8 in the spi_vvc, while the max number of words is 8 in the transaction_pkg and 32 in the spi_vvc.
The quickest solution would be to realign them, but I would recommend increasing the max value set in the transaction_pkg to at least the double (16 for word length and 64 for number of words) as would allow more flexible use without requiring the user to change the bitvis_vip_spi code.
An alternative approach would be to try using generic packages to chain the generic values set in the spi_vvc upstream (So each package has generics that give values to the generics of the packages they are using). I can however think of several ways this could fail, so I am by no means certain it would even compile. It would also deviate slightly from the current UVVM structure, so there is that.
Anyway, I wish you good luck figuring out a good solution.
same problem here. I’m using SPI with packages up to 212 bytes long in a project currently. I guess that the default value of 32 in the adaptions_pkg.vhd is rather short in many cases. Perhaps you could change that constant C_SPI_VVC_DATA_ARRAY_WIDTH to 256 for default?