Spartan3 Problem

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
Hello,

This is my first post here and I'm in need of a bit of help on two things,if anyone could help me i would really appreciate it :D.
I've recently started learning about HDL and Verilog at college and I find it all very interesting on how to simulate digital circuits. For my enthusiasm I've received and old Spartan3 FPGA from college to play with at home but I'm having a little trouble with the board. (this is the board in question http://www.digilentinc.com/Data/Products/S3BOARD/S3BOARD-top-400.gif)
When i plug it in all of the 8 LEDs light up and as far as i know that's not supposed to happen,it was part of an old laboratory kit but apart from that I don't know anything about it. When I program the board with a circuit design it seems to work just fine,however, when I press the reset button all of the LEDs will light up. Someone suggested that it might have something stored in it's memory but i don't know how unless it has more than 1 programmable memory unit. I'm really new to this kind of stuff so i don't know a lot about FPGAs I'm afraid:(
Does anyone have any ideea what might be causing this? I'm afraid that it might burn out on me if use it too often while all the LEDs are lit up.:(

Also can anyone give me any advice or any usefull links/tutorials about Verilog or what can one do with FPGAs?(the source material from my college is fairly weak unfortunately :() I've searced the net for some but I haven't really found a good place from where i could learn more about Digital Circuits and FPGAs.

Thank you & sorry for the long post. :D
 

tshuck

Joined Oct 18, 2012
3,534
Since a FPGA uses a volatile configuration, each time the device is reset, power cycled or reset, the FPGA losses it's configuration. This is suited of the FPGA in either a CPLD, or a EEPROM which configures the FPGA and puts the "program" into it.

The FPGA is simply being configured from an old configuration.

If you run the impact tool from Xilinx, and a JTAG scan, you should be able to see the FPGA and some other device (s). One of them will be where the FPGA is configured from, so erasing/overwriting the bit-file there will change the FPGA's behavior on reset.

fpga4fun.com is a pretty interesting site...
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
In the Impact window after doing a Chain initialization I have 2 gray chips, one with the name of the chipset xc3s400 bypass and xcf02s bypass.
When I load a program file .bit i load it into the xc3s400 and click the bypass button for the other one. And its worked this way so far or am I supposed to load the bit file into the other gray chip?

LE: I've erased the PROM (xcf02s) but the LEDs are still lit up unless i actually load a new program into it.
 

tshuck

Joined Oct 18, 2012
3,534
It's possible that the LEDs have an inverting buffer on the output of the FPGA in order to drive the LEDs, so they could be on by default.

Your PROM had a limited number of writes, and it will take longer to write to it. Write to it only if you want the function defined in your .bit file implemented on startup/reset, otherwise, writing to the FPGA itself will only last add long as power is applied.
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
I'm not sure that's the case, I've seen other boards plugged in and all LEDs were not lit when plugged in. The one i got was in storage so i guess it could be slightly broken?... I don't know, it's weird, it works when i program it, but I'm not sure if everything works... like the VGA slot or any of the other ports. I lack the necessary knowledge to test them out :(.
 

tshuck

Joined Oct 18, 2012
3,534
That's part of the problem with second-hand electronics: you never know if/what works on it.

I wouldn't expect the LEDs to be on by default, but what you are describing, provided we are on the same page, would suggest they are.

Either way, it isn't a problem as you using the LEDs would mean you have loaded a new configuration into it.

Also, I think it it's important to make the distinction between a program and a configuration. You are not programming, you are describing hardware. The .bit file is the configuration(what LUTs are used and where they are routed to) of the FPGA, as an FPGA does not run software, unless you create a processor that can run software on the FPGA.
 
Last edited:

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
Configuration...ok, I keep saying program because I'm used to programming software so I guess it kinda feels the same way,though I know what I'm doing here is definitely not the same thing:)

I really hope it's not broken in more ways that I can see. :( On the other hand I've just finished my latest project a simple RAM 8x8 that i can read to light up the LEDs I want when I want.(though if i press the reset button the all become active lol). I'm having trouble figuring out how to design a Clock Divider or Frequency Divider I think it's called (not a native english speaker) and an Impuls generator with a variable Duty to go along with it.
 

tshuck

Joined Oct 18, 2012
3,534
I have heard professors call it a program, which is quite unfortunate for the students as they don't understand the distinction. Most people will still know what you mean, but it isn't technically correct. I just thought I'd emphasize the point. :)

You can always make a counter and use bit x as the clock for the rest of your system to slow it down.

For the reset, you could generate a bit file with no outputs and nothing routed and put it into the PROM.
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
"You can always make a counter and use bit x as the clock for the rest of your system to slow it down." Yeah I know that method but it has limitations as far as I know, like I can't use it for a 4Hz or 1Hz counter, that's what I currently need to tie into impulse generator.
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
I don't think it has one,even if it did my assignment states that I have to make something that will give me a 250kHz 4hz or 1hz clock depending on what I select.
 

Brownout

Joined Jan 10, 2012
2,390
The LED's are on because there is an old configuration file in flash memory which gets loaded each time you power up the system. My guess is you only 'think' you've erased it. It's easy to get fooled. When you configure your part using JTAG, you write the bit file directly to the device, and do not affect flash, so the old program remains. The fact that you can load a new design and make the device work says your device is good.

The LED's won't be on by default. Unprogrammed pins default to HI-Z.
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
Well then how I erase the flash memory then? I used the Erase option in Impact to erase the PROM. What else could I do?
 

Brownout

Joined Jan 10, 2012
2,390
PS: Also look online and see if you can find the user's manual for your dev board. I was able to find and print the one for my old spartan board. Maybe you'll get lucky.
 

Brownout

Joined Jan 10, 2012
2,390
Xiliinx has gobs of tutorials online. Also, as I've suggested, look for the manual for your dev kit. Try google or Xilinx or Diligent.
 

Thread Starter

Bogdan911

Joined Apr 8, 2013
19
I have the manual but it doesn't have any relevant information concerning my little problem. I've searched the net too and haven't found anyone with a similar problem. Usually those with similar problems have bricked boards from what i've seen but mine seems to work just fine apart from the LEDs lighting up on plug-in.
 
Top