Hi everyone,
i'm currently working on a zedboard and have been able to achieve the following steps:
reading and writing to any MIO
reading and writing to any IO routed by an AXI_GPIO block
there's still one thing i am not getting right:
for instance i would like to read the 8 different switches.
I create a top and a bitstream with an AXI GPIO BLOCK with a width set to 8.
the .mhs then created looks like
BEGIN axi_gpio
PARAMETER INSTANCE = axi_gpio_0
PARAMETER HW_VER = 1.01.b
PARAMETER C_GPIO_WIDTH = 8
PARAMETER C_BASEADDR = 0x41200000
PARAMETER C_HIGHADDR = 0x4120ffff
BUS_INTERFACE S_AXI = axi_interconnect_1
PORT S_AXI_ACLK = processing_system7_0_FCLK_CLK0
PORT GPIO_IO = axi_gpio_0_GPIO_IO
END
then i suppose my ucf file will be like
NET axi_gpio_0_GPIO_IO[0] ...
.
.
NET axi_gpio_O_GPIO_IO[7] ...
and finally on the software C:
XGpio mySw;
XGpio Init(&mySw)
but then i am only able to read/write to the First (least significant bit) switch.
How do you handle the fact of having a bunch of GPIO into an AXI GPIO?
The only answer i found yet was to create an AXI GPIO BLOCK for every GPIO
which means that my ucf is now like
NET axi_gpio_0_GPIO_IO ...
.
NET axi_gpio_j_GPIO_IO ..
.
NET axi_gpio_n_GPIO_IO ...
and in the software i declare a XGpio for every single GPIO.
Which is pretty heavy and i'm sure there's one thing i'm missing, one way of doing it better.
Thanks for your advices