Can you change the GPIO data width?

Hi,

Is it possible to change the data width of the GPIO interface?
I need to trace a signal that is larger then 32 bits, and that throws an error in QuestaSim.

Rgds,
Eric

Hi Eric,

There is a dependency issue with the data width usage in the VVC packages vs VVC entity. I think you have to increase the C_VVC_CMD_DATA_MAX_LENGTH from 32 to a preferred size in the transaction_pkg. In the VVC entity the GC_DATA_WIDTH, which you are trying to set to above 32, is constrained to C_VVC_CMD_DATA_MAX_LENGTH, thus increasing it in the transaction_pkg should work.

Br,
Marius

Hi Marius,

Yes this works.

Rgds,
Eric

1 Like

Hi Marius,

Trying to apply this fix, as I moved to the may release of this year (v2 2022.05.25).
I set it to 40
Which is 28 hex
But now I get errors in the gpio_vvc.vhd
line 75, 76, 77, 79, 80, 127 and 144 give all (vopt-1152) error.
“Index value 28 is out of index range 0 to 7…”

How can I fix this

Hi Eric,
Do you set the correct data width (GC_DATA_WIDTH) when you instantiate the VVC as well?

E.g.

  i1_gpio_vvc : entity work.gpio_vvc
    generic map(
      GC_DATA_WIDTH         => 40,
      GC_INSTANCE_IDX       => 1,
      GC_DEFAULT_LINE_VALUE => x"ZZ"
      )
    port map (...

And not that GC_DATA_WIDTH and C_VVC_CMD_DATA_MAX_LENGTH are naturals.

Br,
Marius

What I did:

  • test old situation with old uvvm ver: all fine

  • test old situation with new uvvm ver: gpio with exceeding 32 error: => apply fix of this thread

  • test again: now gpio.vvc gives errors.

So I didn’t change any old code. What was working is now broken.

To my knowledge your reply in December was all that was required, but I’m not 100% sure.

Rgds,
Eric

Hi Eric,
Can you paste the instantiation of the VVC and also the changes you did in the code?

Br,
Marius

Step 1: replace uvvm folder latest uvvm version
Result 1:
th_dut complains:
Value 34 is out of range 1 to 32

Step 2: In uvvm\bitvis_gpio\src\transaction_pkg.vhd

constant C_VVC_CMD_DATA_MAX_LENGTH : natural := 40; 

(this is default 32)

Result 2:

...
gpio_vvc(75): (vopt-1152) Index value 28 (my insertion => 40 decimal) is out of index range 0 to 7 of bitvis_vip_gpio.vvc_methods_pkg.t_vvc_config_array
gpio_vvc(76): -- idem -- .... vvc_methods_pkg.t_vvc_status_array
gpio_vvc(77): -- idem -- ... vvc_methods_pkg.t_transaction_inforarray
gpio_vvc(79) -- idem -- ... transaction_pkg.t_gpio_transaction_trigger_array
gpio_vvc(80) -- idem -- ... transaction_pkg.t_gpio_transaction_group_array
gpio_vvc(127) -- idem -- ... 0 to 7 of sub-array #1 of bitvis_vip_gpio.vvc_cmd_pkg.t_last_received_cmd_idx.
gpio_vvc(144) -- idem -- ... 0 to 7 of sub-array #1 of bitvis_vip_gpio.vvc_cmd_pkg.t_last_received_cmd_idx.
Error (vopt-2064) Compiler back-end code generation process terminated with code 2.
...

And as requested, this is the instantiation:

i_vvc: entity bitvis_vip_gpio.gpio_vvc
generic map(
 GC_INSTANCE_IDX => 10,
 GC_DATA_WIDTH => 34,
 GC_DEFAULT_LINE_VALUE => (others => '1')
)
port map (
  gpio_vvc_if => s_gpio
);

So I only changed the 32 into 40 in the transaction_pkg file of the gpio