I am using the SPI block for a project and have an issue during recompilation in ModelSim.
My word length has a size of 40 bits and I changed this value in the transaction_pkg.vhd
constant C_VVC_CMD_DATA_MAX_LENGTH : natural := 40;
I use the example code of the quick sheet and try to “fetch the data”:
spi_slave_receive_only (SPI_VVCT, 1, "Receiving from Peripheral 1", 2, START_TRANSFER_IMMEDIATE, C_SCOPE); v_cmd_idx := get_last_received_cmd_idx(SPI_VVCT, 1); await_completion(SPI_VVCT,1, v_cmd_idx, 100 us, "Wait for receive to finish"); fetch_result(SPI_VVCT,1, v_cmd_idx, v_data, "Fetching result from receive operation");
But it is ending with this note in ModelSim:
**###### ../../../ fetch_result(SPI_VVCT,1, v_cmd_idx, v_data, "Fetching result from receive operation");** **#** **# ** Error (suppressible): ../../../(2512): (vcom-1272) Length of formal "result" is 40; length of actual is 8.** **###### ../../../(2739): end architecture tb;**
It seems that there is still somewhere the older value stuck or I have to change somewhere else a constant as well.
Ideas are welcome!