# Configure VVC GPIO as input or as output

**URL:** <https://forum.uvvm.org/t/configure-vvc-gpio-as-input-or-as-output/83>\
**Category:** Bitvis VIP GPIO\
**Tags:** uvvm, gpio\
**Created:** [July 31, 2020, 2:21pm UTC](https://forum.uvvm.org/t/configure-vvc-gpio-as-input-or-as-output/83 "2020-07-31T14:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Eric](https://forum.uvvm.org/u/Eric)\
**Post date:** [July 31, 2020, 2:21pm UTC](https://forum.uvvm.org/t/configure-vvc-gpio-as-input-or-as-output/83/1 "2020-07-31T14:21:08Z")

</div>

Hi,

We are experimenting with the GPIO VVC.  
We can’t find in the documentation how to configure it as

- input
- output
- input/output

Can you show me where this is specified in the documenation?

We found that apparently in 2018 it should be done like shown on line 75 to 97 in

> <https://github.com/UVVM/UVVM/blob/v2018.04.09/bitvis_vip_gpio/tb/gpio_vip_tb.vhd>

as shown at the ened here as well.

Is this still the way to do it in this year 2020?  
And if so, how would a biderectional then work?  
And if this is not yet in the documentation, can this be updated?

Rgds,  
Eric

line 75 to 97:  
i\_ti\_uvvm\_engine : entity uvvm\_vvc\_framework.ti\_uvvm\_engine;

– GPIO as input  
i1\_gpio\_vvc : entity work.gpio\_vvc  
generic map(  
GC\_DATA\_WIDTH =\> C\_GPIO\_WIDTH,  
GC\_INSTANCE\_IDX =\> 1,  
GC\_DEFAULT\_LINE\_VALUE =\> x"ZZ"  
)  
port map (  
gpio\_vvc\_if =\> gpio\_1\_input  
);

– GPIO as output  
i2\_gpio\_vvc : entity work.gpio\_vvc  
generic map(  
GC\_DATA\_WIDTH =\> C\_GPIO\_WIDTH,  
GC\_INSTANCE\_IDX =\> 2,  
GC\_DEFAULT\_LINE\_VALUE =\> x"00"  
)  
port map (  
gpio\_vvc\_if =\> gpio\_2\_output  
);

---

<div class="post-metadata">

**Author:** ![Marius](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.uvvm.org/marius/32/43_2.png) [@Marius](https://forum.uvvm.org/u/Marius)\
**Post date:** [August 3, 2020, 12:30pm UTC](https://forum.uvvm.org/t/configure-vvc-gpio-as-input-or-as-output/83/2 "2020-08-03T12:30:25Z")

</div>

Hi Erick,  
That is the correct way of setting up the VVCs. As of now there is no bidirectional support in the GPIO VIP. I will create a ticket and check if we can provide you with a solution.

Best regards,  
Marius

---

<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:** [January 25, 2021, 8:37am UTC](https://forum.uvvm.org/t/configure-vvc-gpio-as-input-or-as-output/83/3 "2021-01-25T08:37:17Z")

</div>

Hi,

This information will be added in the documentation of the GPIO VVC in the next release.

> The gpio\_vvc\_if can be used as input, output or inout. If the GC\_DEFAULT\_LINE\_VALUE is set to ‘Z’, ‘H’ or ‘L’, the interface can be used as an input, output or inout. If the default is set to ‘1’, ‘0’ or ‘U’, the interface must be used as an output.  
> When using the interface as inout, the process currently driving the signal (DUT or VVC) must set it to ‘Z’ after it is finished in order to release the interface so that the other process can drive it.

Also an example will be provided in the GPIO VIP testbench.
