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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
8,741 Views
Registered: ‎06-15-2015

Accessing LEDs without AXI GPIO

Hi,

 

I am trying to create a block design in Vivado, in which I want to access LED ports without GPIO AXI bus. I created a custom IP using sysgen and want to control LEDs blinking using this IP.

 

Can someone please help me on this.

 

Thanks,

Vinay

0 Kudos
14 Replies
Teacher muzaffer
Teacher
8,712 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

what can your IP do? Can it set a value to 1 and 0 ? If yes you are done. Connect that wire/pin/io to an LED IO on your board and change the value. You should see the LED blink.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
8,604 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

My IP does logical AND function. And yes, it can set a value to 1 and 0. Is there a way to access GPIO LEDs without specfying the AXI_GPIO IP? If not, is there a possibility to access other LEDs on the board?

0 Kudos
Teacher muzaffer
Teacher
8,569 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

when you say "I created a custom IP using sysgen" what exactly is the form of this IP ? Is it in Verilog? What is the top level interface?

Another question is where/how do you get the axi-gpio IP ? Do you have it because you asked for block-diagram automation help and vivado gave you one as your board has LEDs in its configuration?

Anyway, you certainly don't need axi-gpio. I have no clue about what sysgen does but ideally it would create the axi-slave wrapper for your custom block which does the logical-and. So you would get a block which has axi-slave interface on top and wires for led on the bottom. If you have this, you can package it in vivado, instantiate it in a block diagram and connect the top to one of the axi ports, bottom to the leds. You need more detailed description of your problem.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
8,471 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

In sysgen, I created the IP. It just consists of logical-AND block. Sysgen provides us with the facility of generating IP, which can be added to the IP catalog of Vivado. Yes, it is in Verilog. 

 

AXI_GPIO Ip is already available in the IP catalog of Vivado. No, I added AXI_GPIO IP beacuse it is the only way to access the GPIO LEDs.

 

My concern is I am unable to access GPIO LEDs without using AXI_GPIO IP. Is there a way to access the LEDs without instantiating AXI_GPIO IP?

 

0 Kudos
Teacher muzaffer
Teacher
8,461 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

As I have mentioned earlier, if you have an IP which can set a wire to 1/0 you don't need axi-gpio. Instantiate your IP and connect the outputs to the LED pins. If you have any trouble doing this, post a picture which shows your IP and LED pins on the block diagram and tell us what doesn't work.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
8,431 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

Hi @muzaffer,

 

I've attached the picture with this mail.

 

My main concern is, how to connect 'pin_input[3:0]' to 'dip_switches_4bits'(GPIO), and 'pin_output[3:0]' to 'led_4bits'(GPIO), without instantiating the AXI GPIO IPs. And also able to access them using SDK.

 

GPIO_LED.JPG

0 Kudos
Teacher muzaffer
Teacher
8,424 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

what happens if you delete the axi_gpio blocks and connect pin_output to led_4bits and pin_input to dip_switches_4bits directly?
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
8,379 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

Hi @muzaffer,

 

I was able to connect the pins with LEDs and dip switches, without using AXI GPIO IP block.

 

Can you please let me know if there is a procedure to access/control these pins in Xilinx SDK?

 

Thanks,

Vinay

0 Kudos
Teacher muzaffer
Teacher
8,377 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

It's extremely easy. Look at the address map of your block diagram. There should be an address for your custom IP. Then figure out (from sysgen?) what the offset(s) of each output is. In general you should be able to write to a location and set the values of pin_output vector and read from a certain location and get the values of pin_input vector. This depends on your IP. It should be as simple as:
int *foo = ADDRESS_OF_PIN_OUTPUT;
*foo = 0xF; // turn on/off leds
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
6,380 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

 

Okay. Thank you for the information!

 

I'll try this and update you with the results.

 

0 Kudos
Contributor
Contributor
6,334 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

Hi @muzaffer,

 

Can you please provide more information on this. From the address editor, I got to know that the offset address is 0x43C0_0000 and high address is 0x43C0_FFFF, but I am unable to program these pins. Is it possible to provide any tutorial on this.

 

Thanks,

Vinay

0 Kudos
Teacher muzaffer
Teacher
6,312 Views
Registered: ‎03-31-2012

Re: Accessing LEDs without AXI GPIO

what does your ip look like ? what are the register definitions and offsets? Suppose at offset 0, you have the signals for LEDs and these signals are always output (ie direction doesn't need to be set). Then just *(int*)0x43c00000 = 0xFF; should turn on (or off) the leds. Write a program which just does this and see what happens.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Contributor
Contributor
6,259 Views
Registered: ‎06-15-2015

Re: Accessing LEDs without AXI GPIO

Hi @muzaffer,

 

I created shared_memory IP in  sysgen. 'Push_data' and 'Push_write' are the ports connected to GPIO push buttons on ZC706, and 'LED' to GPIO LEDs. The functionality of this design is, whenever I tap both the push buttons, LEDs should blink. This is done using block memory generator. The control and data signals of the block memory generator are connected to the shared memory IP. I think the remaining block design is self-explanatory.

 

 

Shared_memory_demo.JPG

 

And also I am experiencing the below issue. Could you also please look into this.

SDK_error.JPG

 

Thanks,

Vinay

0 Kudos
Highlighted
Visitor almaz1988_2
Visitor
4,950 Views
Registered: ‎01-19-2016

Re: Accessing LEDs without AXI GPIO

Hello!

How to blink without using AXI_GPIO and SDK code?

I wrote simple blinky module:

`timescale 20ns / 1ps
module blinky (A,S);
    input A;
    output reg S = 0'b1;
    reg [31:0] counter = 0'b1;
      
//    always @(A) begin
    always @ (posedge A) begin  
        counter <= counter + 1;
        if (counter == 1000000) begin
            counter <= 0;
            S = ~S;
        end
    end
endmodule

And testbench:

`timescale 20ns / 1ps
module blinkyTestBench();
    reg A_t;
    wire S_t;
    reg i;
    blinky blinky_0(A_t, S_t);
    
    initial begin
    
        for(i=0;i<100;i=i+1) begin
                A_t <=1;
                #1;

                A_t <=0;
                #1;
        end
    end
endmodule

Do I must to transform it to custom IP? How to do that? Point me please to any helpful manual?

0 Kudos