Electronic – Why the FPGA programs does not work

fpgaisespartanverilogxilinx

I am very new to FPGA and sorry for this elementary question. I just made a very simple XOR code like this with Webpack ISE to download to XC2S100 ( just for test!) but it does not work.

EDITION1: According to comments, I checked DONE situation after programming and it is in High state. Also added pull down resistors to a and b. Also added a 1KΩ pull down resistor to TMS. Now it works fine but after I restart the device, it does not work any more.It seems the configuration memory is erased after shut down.

enter image description here

1- Obviously this code sythesizes well, and simulation is OK. Then Implemented -> Assigned pins -> re-implemented -> and finally Generated .bit file ( this sequence: )

enter image description here

2- I also used the pins that don't require Vref. ( a:P3 , b:P4, out:P7). Here is a screenshot of pin assignment. At the end clicked Save:

enter image description here

3- Then I re-implemented and checked the pins in design summary. All OK:enter image description here

4- I have one of these Alkamar download cables. I connected the pins as recommended and ran iMPACT . It finds the device well and reads its config also well. I was happy when I saw "Program Succeeded " message! but when I connect VCCO voltage (3.3v) to P3(a) or P4(b), nothing happens in P7(out).I double checked everything but of no avail!

What is going wrong there?

enter image description here

Here is the schematic I use:

1- Test board:

enter image description here

2- Power Supply:

enter image description here

3- Crystal Oscillator part ( Not used in this test ):

enter image description here

This is the programming cable:

enter image description here

Best Answer

This is an SRAM-based FPGA. After cycling power, its configuration is lost!

Normally a board using these FPGAs will have some non-volatile memory, and you load the configuration into that. The FPGA has some logic (configured by M0,M1,M2 the Configuration Mode pins) to boot itself from several common types of Flash memory or EEPROM. Some of them fit into the JTAG chain so you can program them with Impact and the Platform Cable you have.

I can't help with the precise details, the XC2S100 is a rather old device, but Xilinx have plenty of documentation on configuration memory.

Meanwhile, you can continue your experiments configuring the FPGA directly, in the knowledge that this is the normal behaviour for this FPGA.

This may seem odd, and there are indeed a few non-volatile FPGAs; ACTEL (Microsemi) make some. But SRAM technology is such a good match for FPGA logic that it makes sense despite the obvious drawbacks.

The non-volatile FPGAs are a compromise : relatively small and relatively slow - so much so that for most applications, the inconvenience of an an external ROM is a small price to pay for the advantages of SRAM-based FPGAs.