# V\_cmd.data Length Limitation in SPI VVC Prevents Sending More Than 31 Bytes

**URL:** <https://forum.uvvm.org/t/v-cmd-data-length-limitation-in-spi-vvc-prevents-sending-more-than-31-bytes/502>\
**Category:** Bitvis VIP SPI\
**Created:** [July 2, 2025, 1:36pm UTC](https://forum.uvvm.org/t/v-cmd-data-length-limitation-in-spi-vvc-prevents-sending-more-than-31-bytes/502 "2025-07-02T13:36:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stsecen](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@stsecen](https://forum.uvvm.org/u/stsecen)\
**Post date:** [July 2, 2025, 1:36pm UTC](https://forum.uvvm.org/t/v-cmd-data-length-limitation-in-spi-vvc-prevents-sending-more-than-31-bytes/502/1 "2025-07-02T13:36:51Z")

</div>

Hi,

I’m currently using the UVVM SPI VVC in my verification environment.

In my testbench, I configured the VVC with the following generics:

GC\_DATA\_ARRAY\_WIDTH =\> 1523

However, when I try to send 229 bytes of data using the v\_cmd.data field in the test case, only 31 bytes are actually transmitted. The remaining bytes are replaced with ‘X’.

After debugging the issue, I realized that the root cause is the following constant defined in the adaptations\_pkg:

constant C\_SPI\_VVC\_DATA\_ARRAY\_WIDTH : natural := 31;

This constant appears to limit the usable width of v\_cmd.data, even though I configured a higher width via the generic.

My question is: Is the only way to fix this problem by manually modifying the `adaptation_pkg` and increasing the value of `C_SPI_VVC_DATA_ARRAY_WIDTH`?  
Or is there a better way to propagate the value from the VVC generic to avoid this mismatch?

Thanks in advance.

SPI VVC Instantiation:

 ![12ce2a34-bdd9-432c-bbda-b95f9a005d83](https://europe1.discourse-cdn.com/flex017/uploads/uvvm/original/1X/2e7cfdc09f921c172ac723ff3de03e0648cec435.png)

Debuging points on spi\_vvc.vhd

 ![104d6864-0925-46af-87b4-a70057a42c7e](https://europe1.discourse-cdn.com/flex017/uploads/uvvm/original/1X/f831cbcc30e1172ecf2e300f07d3022ae0ecc99a.png)

Waveform Screenshoot:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/uvvm/original/1X/68bcc18e6f6fa14a0808e971267a4af64c332794.png)

---

<div class="post-metadata">

**Author:** ![Erick](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@Erick](https://forum.uvvm.org/u/Erick)\
**Post date:** [August 27, 2025, 7:52am UTC](https://forum.uvvm.org/t/v-cmd-data-length-limitation-in-spi-vvc-prevents-sending-more-than-31-bytes/502/2 "2025-08-27T07:52:22Z")

</div>

> [@stsecen](#):
>
> usable width of v\_cmd.data, even though I configured a higher width via the generic.
> 
> My question is: Is the only way to fix this problem by manually modifying the `adaptation_pkg` and increasing the value of `C_SPI_VVC_DATA_ARRAY_WIDTH`

Hi,

Yes, the only way to fix this is to modify the constant in adaptations\_pkg, which is meant for user modifications. The VVC generic value cannot be propagated to the v\_cmd.data since the vvc\_cmd\_pkg is compiled before the spi\_vvc.

However, it would be a good idea to add a warning when setting GC\_DATA\_ARRAY\_WIDTH with a higher value than the maximum supported by C\_SPI\_VVC\_DATA\_ARRAY\_WIDTH to avoid confusion.
