Jump to content
  • 0

Connecting GPIO switches to a custom IP (Zybo Z7-20)


bklolo

Question

Hello, everyone. I am having difficult finding a guide or solution to this problem. I would like to simply connect a switch (G15 on the Z720) to my custom IP that should toggle a Clean or Distortion signal.

For some reason I am unable to insert a link to the Block Diagram: https://imgur.com/a/D3uOchd

In the diagram you can see that I had originally just made CTRL external and added it to the constraints file for pin G15, but this did not work. I'm think that I need to instantiate GPIO in Vitis to use this method, but so far I haven't had any luck. My next thought was to use the AXI_GPIO block and somehow tie it to both sws_4bits and the CTRL port on Serialeffects, but that is what I cannot figure out how to do.

 

Does anyone have a resource for learning how to do this? I'm open to any suggestions, as I would eventually like to use the 4 switches on the board to control different audio effects, such as chorus, echo, etc.

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
On 12/1/2021 at 4:48 AM, thinkthinkthink said:

Nah, it's correct what you did with the external port and XDC file and it should have worked, maybe put an ILA on that line and see if it toggles correctly or try other switches maybe even the buttons. It could be that the switch is defective in which case maybe try cleaning it with some isopropylic alcohol.

Thanks for the response. Are you saying the combination of 'CTRL' made external and its reference in the XDC, plus having the GPIO block with its output sws_4bits is correct? 

Link to comment
Share on other sites

  • 0
13 minutes ago, thinkthinkthink said:

You don't need the GPIO IP, get rid of it, you just need to constrain the CTRL external input port to a switch or button in the board XDC file. It's probably because you connected the GPIO IP inputs/outputs to the switches that your CTRL port does nothing.

I was just about to respond with this image: https://imgur.com/a/3OU0e7D

 

CTRL on the bottom left is connected to Serialeffects and LED is connected to the output port LED_O (LED_O <= CTRL). When I flash the fpga in Vivado with this bitstream, the LED (led M14) does actually toggle with CTRL (switch G15). However, when I flash the fpga with Vitis, the switch does nothing.

Any ideas why Vitis may be causing an issue? I've asked other places online, but everyone says the the PS should have no effect on the PL which makes sense to me, but something weird is going on and I'm not really sure how to debug it.

Edited by bklolo
Link to comment
Share on other sites

  • 0

I'm still not familiar with all the intricacies of the PS, but you're getting your clocks from it so make sure the PS isn't in some idle state where everything is stopped including the PLLs, maybe put a while(1) loop at the end of your code. The PLLs inside the PS should still give out clock signals even if the ARM cores are in a parked state where they do nothing but dunno what's stopping them. Also try giving the ZYNQ 7000's technical reference manual a read too, it's called UG585 Zynq 7000 TRM, you might find something.

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...