UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 16636

3.1 EDK OPB_GPIO - How do I use an OPB_GPIO peripheral as a GP-IN or GP-OUT device instead of a bidirectional device?

Description

General Description: 

Although I set an OPB_GPIO peripheral with C_ALL_INPUTS = 1, Platform Generator creates a port of type INOUT.  

How do I use OPB_GPIO as a GP-IN (or GP-OUT) device, rather than as a bidirectional device?

Solution

The Data Sheet states that if you set C_ALL_INPUTS =1, the I/O ports are configured as inputs, which results in lower resource utilization. However, in the top-level port declaration, the port is retained as INOUT, which causes Platform Generator to insert 3-state buffers.  

 

To work around this issue, follow these steps: 

1. Make a local copy of OPB_GPIO as a user-defined "myip" directory. 

2. Copy the folder from <EDK Install>\hw\coregen\ip\xilinx\pcores\com\xilinx\ip2\processor\opb_gpio_v1_00_a.  

3. Create a new folder in your EDK project directory called "myip", and save the entire opb_gpio_v1_00_a folder into "myip".  

4. Go into opb_gpio_v1_00_a and open the data directory. 

5. Make the following changes to the opb_gpio_v2_0_0.mpd file: 

a) Comment out the line: 

PORT GPIO_IO = "", DIR=INOUT, VEC=[0:C_GPIO_WIDTH-1], ENABLE=MULTI  

b) Add the following new lines: 

 # gpio signals 

PORT GPIO_IO_I = "", DIR=IN, VEC=[0:C_GPIO_WIDTH-1] 

PORT GPIO_IO_O = "", DIR=OUT, VEC=[0:C_GPIO_WIDTH-1] 

PORT GPIO_IO_T = "", DIR=OUT, VEC=[0:C_GPIO_WIDTH-1]

AR# 16636
Date Created 09/03/2007
Last Updated 05/15/2014
Status Archive
Type General Article