FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-21-2006, 04:54 PM
jmariano
Guest
 
Posts: n/a
Default Spartan-3 starter kit strange problem

Dear All,

I'm having a strange problem with my design that is driving me nuts...

I'm a newcomer to FPGA in general and to Xilinx tools in particular.
I'm using a
Spartan-3 starter kit board with a XC3S200FT256 FPGA and ISE & EDK 7.1.
My idea is to use the board as a controller for my hardware project.

I've started with one of EDK's reference designs (Spartan-3 MicroBlaze
Example Design) and change it to meet my specifications.

My present configuration in:
- microblaze
- 16 KB block RAM
- RS232 (OPB_UARTlite)
- 8 LEDs (OPB_GPIO)
- OPB_Timer
- 3 pushbuttons (OPB_GPIO)
- 8 DIP switches (OPB_GPIO)
- 1 custom IP core to drive the 7-segments LEDs on the board
- 1 custom IP core to drive a 2x16 LDC display
- 1 custom IP core to generate a 5 MHz ADC clock, by dividing the on
board 50 MHz clock, and to read 32 inputs from 4 8 bits ADCs.
- 1 32 bit GPIO instance, configured as all inputs.
- 1 32 bit GPIO instance, configured as all outputs.

The design compiles OK and I don't get any error message, at least as
far as I can tell.

Now, here is the strange part:

- If I connect all the modules to pins in the FPGA, using, of course,
the .UCF file, the code
does not run. It freezes after only a few lines. The first line of my
code is a printf statement,
and only a few characters are sent to the uart. After that, noting else
happens.

- If I comment, in the UCF file the, lines connecting the output GPIO
to the FPGA pins, the program runs as it is suppose to run (the input
GPIO is, for now, commented).

Note that this behavior does not depend on what the code does. It may
be
the complet code with the initiation and write/read instructions, or it
may be a simple "hello world" program. It doesn't matter.

I have read the documentation on the FPGA, to see if I was using somme
pins that I was not suppose to use, and I have also read the GPIO
specification, but could not find any hint on what the origine of my
problem is. What am I missing here? I must be doing a really stupid
error, but I can't find it. I'm sure this is not a problem with the
code, so it must be a problem in the design, but i'm not sure what kind
of hardware debugging techniques I should use in this case.

I'm posting the UCF below and I would appreciate any kind of help,
hint, suggestion, etc.

Tanks to all,

Josť Mariano

PS: Sorry for the lousy spell and the long post!!


################################################## ##########################
## This system.ucf file is generated by Base System Builder based on
the
## settings in the selected Xilinx Board Definition file. Please add
other
## user constraints to this file based on customer design
specifications.
##
## Test version: ADC clock generated by IP and data read by IP
##
################################################## ##########################

Net sys_clk_pin LOC=T9;
Net sys_rst_pin LOC=l14;
## System level constraints
Net sys_clk_pin TNM_NET = sys_clk_pin;
TIMESPEC TS_sys_clk_pin = PERIOD sys_clk_pin 20000 ps;
Net sys_rst_pin TIG;

################################################## ########
## FPGA pin constraints
################################################## ########

## RS-232
Net fpga_0_RS232_RX_pin LOC=t13;
Net fpga_0_RS232_TX_pin LOC=r13;


## LEDs
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<0> LOC=k12;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<1> LOC=p14;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<2> LOC=l12;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<3> LOC=n14;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<4> LOC=p13;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<5> LOC=n12;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<6> LOC=p12;
Net fpga_0_LEDs_8Bit_GPIO_d_out_pin<7> LOC=p11;


## Push Buttons
Net fpga_0_Push_Buttons_3Bit_GPIO_in_pin<0> LOC=l13;
Net fpga_0_Push_Buttons_3Bit_GPIO_in_pin<1> LOC=m14;
Net fpga_0_Push_Buttons_3Bit_GPIO_in_pin<2> LOC=m13;


## DIP Switches pin constrains
Net DIP_Switches_8Bit_GPIO_in<0> LOC=k13;
Net DIP_Switches_8Bit_GPIO_in<1> LOC=k14;
Net DIP_Switches_8Bit_GPIO_in<2> LOC=j13;
Net DIP_Switches_8Bit_GPIO_in<3> LOC=j14;
Net DIP_Switches_8Bit_GPIO_in<4> LOC=h13;
Net DIP_Switches_8Bit_GPIO_in<5> LOC=h14;
Net DIP_Switches_8Bit_GPIO_in<6> LOC=g12;
Net DIP_Switches_8Bit_GPIO_in<7> LOC=f12;


## 7 seg LED Display
Net digit<3> LOC=d14;
Net digit<2> LOC=g14;
Net digit<1> LOC=f14;
Net digit<0> LOC=e13;
Net segment<7> LOC=e14;
Net segment<6> LOC=g13;
Net segment<5> LOC=n15;
Net segment<4> LOC=p15;
Net segment<3> LOC=r16;
Net segment<2> LOC=f13;
Net segment<1> LOC=n16;
Net segment<0> LOC=p16;


## LCD
NET LCD_Data<7> LOC=n8; ## 14
NET LCD_Data<6> LOC=n7; ## 13
NET LCD_Data<5> LOC=t8; ## 12
NET LCD_Data<4> LOC=r6; ## 11
NET LCD_Data<3> LOC=t5; ## 10
NET LCD_Data<2> LOC=r5; ## 9
NET LCD_Data<1> LOC=c2; ## 8
NET LCD_Data<0> LOC=c1; ## 7
NET LCD_E LOC=b1; ## 6
NET LCD_RS LOC=m10; ## 4
##NET LCD_RW LOC=m7; ## gnd on the digital board


## GPIO - General purpose output
NET GPIO_Output_GPIO_d_out<0> LOC=b8; ## BW0->SwD1
NET GPIO_Output_GPIO_d_out<1> LOC=b6; ## BW1->SwD3
NET GPIO_Output_GPIO_d_out<2> LOC=b7; ## BW2->SwD4


## GPIO - General purpose input
##NET GPIO_Input_GPIO_in<0> LOC=xx;
##NET GPIO_Input_GPIO_in<1> LOC=xx;
##NET GPIO_Input_GPIO_in<2> LOC=xx;
##NET GPIO_Input_GPIO_in<3> LOC=xx;
##NET GPIO_Input_GPIO_in<4> LOC=xx;
##NET GPIO_Input_GPIO_in<5> LOC=xx;
##NET GPIO_Input_GPIO_in<6> LOC=xx;
##NET GPIO_Input_GPIO_in<7> LOC=xx;



## ADC's - INTEGRATOR IP
## ADC_0 -> In_Port[0:7]
## ADC_90 -> In_Port[8:15]
## ADC_180 -> In_Port[16:23]
## ADC_270 -> In_Port[24:31]
############################

NET fpga_INTEGRATOR_ENCODE_pin LOC=a5; ## ENCODE - ADC's Clock

NET fpga_INTEGRATOR_ADC0_pin<0> LOC=e10;
NET fpga_INTEGRATOR_ADC0_pin<1> LOC=c12;
NET fpga_INTEGRATOR_ADC0_pin<2> LOC=c11;
NET fpga_INTEGRATOR_ADC0_pin<3> LOC=b14;
NET fpga_INTEGRATOR_ADC0_pin<4> LOC=b13;
NET fpga_INTEGRATOR_ADC0_pin<5> LOC=b12;
NET fpga_INTEGRATOR_ADC0_pin<6> LOC=a10;
NET fpga_INTEGRATOR_ADC0_pin<7> LOC=a9;

NET fpga_INTEGRATOR_ADC90_pin<0> LOC=e6;
NET fpga_INTEGRATOR_ADC90_pin<1> LOC=c5;
NET fpga_INTEGRATOR_ADC90_pin<2> LOC=c6;
NET fpga_INTEGRATOR_ADC90_pin<3> LOC=c7;
NET fpga_INTEGRATOR_ADC90_pin<4> LOC=c8;
NET fpga_INTEGRATOR_ADC90_pin<5> LOC=c9;
NET fpga_INTEGRATOR_ADC90_pin<6> LOC=a3;
NET fpga_INTEGRATOR_ADC90_pin<7> LOC=a4;

NET fpga_INTEGRATOR_ADC180_pin<0> LOC=c10;
NET fpga_INTEGRATOR_ADC180_pin<1> LOC=d11;
NET fpga_INTEGRATOR_ADC180_pin<2> LOC=a13;
NET fpga_INTEGRATOR_ADC180_pin<3> LOC=a12;
NET fpga_INTEGRATOR_ADC180_pin<4> LOC=b11;
NET fpga_INTEGRATOR_ADC180_pin<5> LOC=b10;
NET fpga_INTEGRATOR_ADC180_pin<6> LOC=a8;
NET fpga_INTEGRATOR_ADC180_pin<7> LOC=a7;

NET fpga_INTEGRATOR_ADC270_pin<0> LOC=d5;
NET fpga_INTEGRATOR_ADC270_pin<1> LOC=d6;
NET fpga_INTEGRATOR_ADC270_pin<2> LOC=e7;
NET fpga_INTEGRATOR_ADC270_pin<3> LOC=d7;
NET fpga_INTEGRATOR_ADC270_pin<4> LOC=d8;
NET fpga_INTEGRATOR_ADC270_pin<5> LOC=d10;
NET fpga_INTEGRATOR_ADC270_pin<6> LOC=b4;
NET fpga_INTEGRATOR_ADC270_pin<7> LOC=b5;

Reply With Quote
  #2 (permalink)  
Old 06-21-2006, 07:39 PM
Siva Velusamy
Guest
 
Posts: n/a
Default Re: Spartan-3 starter kit strange problem

jmariano wrote:
> Dear All,
>

<snip>>
> Now, here is the strange part:
>
> - If I connect all the modules to pins in the FPGA, using, of course,
> the .UCF file, the code
> does not run. It freezes after only a few lines. The first line of my
> code is a printf statement,
> and only a few characters are sent to the uart. After that, noting else
> happens.
>
> - If I comment, in the UCF file the, lines connecting the output GPIO
> to the FPGA pins, the program runs as it is suppose to run (the input
> GPIO is, for now, commented).
>


That is strange. I'd check the following:
- make sure interrupts are disabled
- if you are using 'printf' and not 'xil_printf' then the stack space
requirements will be high. Check your linker script to make sure you are
allocating enough space on the stack.
- connect to the target using XMD, and see where exactly the processor
is stalled. Correlate the PC back to the sources and see if you can spot
the bug.
- try using the Virtual Platform tool for your design. In cases that it
does work, it spots invalid memory accesses earlier..

/Siva
Reply With Quote
  #3 (permalink)  
Old 06-22-2006, 01:43 PM
jmariano
Guest
 
Posts: n/a
Default Re: Spartan-3 starter kit strange problem

Hello Siva,

Tank you very much for your help. I managed to solve the problem with
the help Rob
Barris, who reply to the same message posted elsewhere. It turns out
that the origin of
the problem was the unconnected nets. After I connected all the nets to
pins on the FPGA,
the problem disappeared.

Regards

Mariano

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Digilent Spartan-3 Starter Kit w/ JTAG-USB Problem/Solution Scott M. Kroll FPGA 14 03-16-2006 03:58 AM
Strange FPGA problem [email protected] FPGA 1 08-24-2005 06:07 PM
To Xilinx: Problem with Digilent Spartan III Starter Kit Documentation Rob Gaddi FPGA 2 05-13-2005 06:46 PM
Strange FPGA problem williams FPGA 4 04-20-2005 07:54 AM
Strange FPGA problem williams Verilog 4 04-20-2005 07:54 AM


All times are GMT +1. The time now is 03:34 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved