EDK 8.2 bidir gpio in XBD (board definition)

I'm using WebPACK 8.2 and EDK 8.2, and created a board definition file (.xbd) for the Digilent Spartan-3 starter board with XC3S1000, based on the Xilinx Spartan-3 starter board .xbd file. That works fine, and now I want to add GPIO devices for the A2 and B1 expansion connectors.

None of the .xbd files supplied with EDK 8.2 show bidir GPIOs, so I dug around in the .mpd file to figure out how to do it. I tried adding this to the .xbd:

BEGIN IO_INTERFACE ATTRIBUTE IOTYPE = XIL_GPIO_V1 ATTRIBUTE_INSTANCE = Exp_Conn_A2 PARAMETER num_bits = 32, IO_IS=num_bits PARAMETER is_dual=0, IO_IS=is_dual PARAMETER bidir_data=1, IO_IS=is_bidir # bidir data pins PARAMETER all_inputs=0, IO_IS=all_inputs

PORT A2_4 = CONN_A2_4, IO_IS = gpio_io[0] PORT A2_5 = CONN_A2_5, IO_IS = gpio_io[1] PORT A2_6 = CONN_A2_6, IO_IS = gpio_io[2] #... PORT A2_34 = CONN_A2_34, IO_IS = gpio_io[30] PORT A2_35 = CONN_A2_35, IO_IS = gpio_io[31] END

and in the FPGA section:

### Expansion connector A2 ###

PORT A2_4 = CONN_A2_4, UCF_NET_STRING=("LOC=e6") PORT A2_5 = CONN_A2_5, UCF_NET_STRING=("LOC=d5") PORT A2_6 = CONN_A2_6, UCF_NET_STRING=("LOC=c5") #... PORT A2_34 = CONN_A2_34, UCF_NET_STRING=("LOC=b14") PORT A2_35 = CONN_A2_35, UCF_NET_STRING=("LOC=d9")

Unfortuantely it doesn't seem to work. The BSB doesn't complain, but it shows a mostly empty box where my peripheral should be (between the DIP switches and the SRAM controller).

Is gpio_io[x] the wrong signal name for a bidir pin? Or am I doing smoething else wrong?

Thanks! Eric

Reply to
Eric Smith
Loading thread data ...

^ That underscore between ATTRIBUTE and INSTANCE was the first problem. I haven't got bidir I/O pins working yet, but I'm getting closer. :-)

Reply to
Eric Smith

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.