09-16-2008 11:51 PM
I am doing sample lab programs using XPS 10.1 . I have selected DCE_UART , LEDs_8bit and DDR_SDRAM using BSB. Then i added two general purpose IOs "dip" and "push". I connected it with plb bus, set the size. Then i generate address. Then i make port settings for 4 pin and input. Then made the pin external. Changed the TestApp_Memory.c below one.
int main (void)
XGpio dip, push;
int i, psb_check, dip_check;
//xil_printf("-- Start of the Program --\r\n");
XGpio_SetDataDirection(&dip, 1, 0xffffffff);
XGpio_SetDataDirection(&push, 1, 0xffffffff);
psb_check = XGpio_DiscreteRead(&push, 1);
xil_printf("Push Buttons Status %x\r\n", psb_check);
dip_check = XGpio_DiscreteRead(&dip, 1);
xil_printf("DIP Switch Status %x\r\n", dip_check);
for (i=0; i<999999; i++);
Then i changed the ucf file. Generated net llist and finally downloaded. But there is no impact of push button or dip switch.
When I downloaded the download.bit file given from XILINX it is working. I don't know wat is problem with me..
10-19-2009 08:17 AM
Try deploying the TestApp_Peripheral.c file's bitstream to your board, if that works you will know for sure that the bitstream is being generated properly. This might help you:
Follow the below given link, select FPGA page at the bottom and perform a page search with the "FPGA EDK: Creating a new MicroBlaze project using XPS BSB and deploying it on the XUPV2P development board"as the search criteria. http://www.afflatustechtronics.org/tutorials/basics.html
While you are there also search for "FPGA EDK: Using the Xilinx Platform Studio SDK", it may be of some help to you.
10-20-2009 05:35 AM
The C code looks all right.
Two things to check:
1. Check if the application has been downloaded and run properly. You can debug the application with XMD.
2. Check if the gpio pins are locked at the right location.