Jump to content
  • 0

Direct connect to pin?


d3x0r

Question

Do I have to connect pins to a GPIO block in order to set direction?  Or when I create the port, is that enough to set direction?

image.thumb.png.dc18c73a2ad3c5c96e2717e75f35aca2.png

On the input side I'd like to use sheild pins 12,13  as inputs, just connected to my verilog module, and 8-11 on the right side as status and test signal generation pins... 
The pins used for buttons and LEDs in the sample project go through a GPIO AXI block, and the program sets their direction, can't I just create the ports with the correct directions and connect directly?


I do have the code in the constraints file referencing the right ports... (I'm pretty sure I do anyway)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @d3x0r, welcome to the forums!

Manually constraining AXI GPIO interfaces is covered in this section (https://digilent.com/reference/programmable-logic/guides/vivado-add-gpio) of this guide (https://digilent.com/reference/programmable-logic/guides/getting-started-with-ipi), which uses GPIOs with the default "not all inputs or all outputs" configuration. In this case, the tristates need to be manually set in software (XGpio_SetDataDirection).

You can alternatively change the AXI GPIO configuration to set either all inputs or all outputs, which doesn't require you to set the tristates, however the pin names that need to be constrained are different as only that pin direction is associated with a port on the block. I believe you'd be constraining a port named like "led_tri_o[0]" instead of "led_tri_io[0]" here.

So, you can either configure the AXI GPIO for all input/output, change the default tristate value to match the intended port direction, or you can set the tristates in software. It sounds like you have it working correctly.

Thanks,

Arthur

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...