Hello,
How do you determine the offset of the gpioxx.
#!/bin/bash
#This appears to work with fpga.bin loaded
echo "++ Exporting switches "
for i in 0 1 2 3 4 5 6 7;
do
sw=$(($i+65));
echo $sw > /sys/class/gpio/export;
done;
#!/bin/sh
value=0;
for i in 0 1 2 3 4 5 6 7;
do
sw=$((72-$i));
sw_tmp=`cat /sys/class/gpio/gpio$sw/value`;
value=$(($value*2));
value=$(($value+$sw_tmp));
done;
printf "0x%x %d
" $value $value;
This work with the system.ucf.
NET processing_system7_0_GPIO_pin[11]tLOC = F22 | IOSTANDARD="LVCMOS25"; # "SW0"
NET processing_system7_0_GPIO_pin[12]tLOC = G22 | IOSTANDARD="LVCMOS25"; # "SW1"
NET processing_system7_0_GPIO_pin[13]tLOC = H22 | IOSTANDARD="LVCMOS25"; # "SW2"
NET processing_system7_0_GPIO_pin[14]tLOC = F21 | IOSTANDARD="LVCMOS25"; # "SW3"
NET processing_system7_0_GPIO_pin[15]tLOC = H19 | IOSTANDARD="LVCMOS25"; # "SW4"
NET processing_system7_0_GPIO_pin[16]tLOC = H18 | IOSTANDARD="LVCMOS25"; # "SW5"
NET processing_system7_0_GPIO_pin[17]tLOC = H17 | IOSTANDARD="LVCMOS25"; # "SW6"
NET processing_system7_0_GPIO_pin[18]tLOC = M15 | IOSTANDARD="LVCMOS25"; # "SW7"
NET processing_system7_0_GPIO_pin[19]tLOC = T22 | IOSTANDARD="LVCMOS33"; # "LD0"
NET processing_system7_0_GPIO_pin[20]tLOC = T21 | IOSTANDARD="LVCMOS33"; # "LD1"
NET processing_system7_0_GPIO_pin[21]tLOC = U22 | IOSTANDARD="LVCMOS33"; # "LD2"
NET processing_system7_0_GPIO_pin[22]tLOC = U21 | IOSTANDARD="LVCMOS33"; # "LD3"
NET processing_system7_0_GPIO_pin[23]tLOC = V22 | IOSTANDARD="LVCMOS33"; # "LD4"
NET processing_system7_0_GPIO_pin[24]tLOC = W22 | IOSTANDARD="LVCMOS33"; # "LD5"
NET processing_system7_0_GPIO_pin[25]tLOC = U19 | IOSTANDARD="LVCMOS33"; # "LD6"
NET processing_system7_0_GPIO_pin[26]tLOC = U14 | IOSTANDARD="LVCMOS33"; # "LD7"
I can not get the LED to work.
Thanks