Setting up an fpga board - Page 1
Forum section: electronics / general

author: Dajgoro
author_rank: Frequent Contributor
timestamp: March 11, 2015, 04:20:06 am
content: Hi.I need to make a project that requires an fpga, something like a spartan 3 would do.I poked with discrete cpld-s and fpga modules, but I never made a device with a discrete fpga chip.I know that fpga-s need an external rom chip, and a clock source. I googled a bit, but I could not find an easy cookbook on how to set it all up. Any links to a cookbook like document?

author: deephaven
author_rank: Frequent Contributor
timestamp: March 11, 2015, 08:31:39 am
content: Why not start with a ready-made board? This is a low cost Altera onehttp://www.terasic.com.tw/cgi-bin/page/archive.pl?CategoryNo=139&No=593and they have a special price for students. I'm sure there would be similar for Xilinx if you particularly wanted to use that make.

author: Ice-Tea
author_rank: Super Contributor
timestamp: March 11, 2015, 09:07:46 am
content: There's not really a cookbook. There's hundreds and hundreds of pages of documentation, though O0So a module is the better aproach for sure.In addtion, not all FPGAs require an additional external ROM. Actel/Microsemi chips do not require them (non-volatile tech) and the Spartan 3AN series has it integrated in the package. Furthermore, not all FPGAs require an external clock source. If I remember, the Smartfusion has a clock inside.

author: hamster_nz
author_rank: Super Contributor
timestamp: March 11, 2015, 09:50:44 am
content: There are also quite a few open source boards out there, that you could leverage for your designs.Quote from: Ice-Tea on March 11, 2015, 09:07:46 amQuite a few have a vaguely hidden RC configuration clock that you can leverage on start up if required. It is enough to get a design running to configure and switch onto the external clock.e.g. for Spartan 6 it is hidden in the STARTUP_SPARTAN6 primitive:Code:STARTUP_SPARTAN6_inst : STARTUP_SPARTAN6port map (CFGCLK => open, -- 1-bit output: Configuration logic main clock output.CFGMCLK => config_clock, -- 1-bit output: Configuration internal oscillator clock output.EOS => open, -- 1-bit output: Active high output signal indicates the End Of Configuration.CLK => '0', -- 1-bit input: User startup-clock inputGSR => '0', -- 1-bit input: Global Set/Reset input (GSR cannot be used for the port name)GTS => '0', -- 1-bit input: Global 3-state input (GTS cannot be used for the port name)KEYCLEARB => '0' -- 1-bit input: Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM));It is somewhere between 1MHz and 50MHz, depending on config options used when generating the bitstream.

author: Ice-Tea
author_rank: Super Contributor
timestamp: March 11, 2015, 10:23:06 am
content: Quote from: hamster_nz on March 11, 2015, 09:50:44 amDidn't know that but makes sense I suppose. They all run a clock to their conf deviceIn the smartfusion it's not so hidden, though.

author: Scrts
author_rank: Frequent Contributor
timestamp: March 11, 2015, 01:52:30 pm
content: I'd offer to have a look to Altera MAX10. Might be easier to start with.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 11, 2015, 02:01:45 pm
content: Most manufacturers have a section in one of their manuals covering minimum setups.Usually something like "configuration guide" for config devices (usually SPI flash), and also for power.If all your IO is at the same voltage, Power is usually fairly straightforward but you need to check whether Vccaux is needed, as it is only required for soem I/O standards.Looking at schematics of (simple) devboards will be a good start

author: KM4FER
author_rank: Regular Contributor
timestamp: March 11, 2015, 02:12:33 pm
content: It appears that this is a student assignment but it's not clear from your message if the assignment includes designing a hardware circuit using an fpga or if it is just to program an fgpa in an existing circuit.In the March/April 2015 copy of QEX magazine from ARRL there is an article on using an Altera Cyclone fpga in a Bemicro board where the author goes through the steps required to program the fpga from existing sample code for a Software Defined Radio. This might give you an overview of what you need to do for your assignment.earl...

author: suicidaleggroll
author_rank: Super Contributor
timestamp: March 11, 2015, 03:14:12 pm
content: Digilent has a lot of FPGA dev boards, and they provide schematics for most (all?) of them. The CMODs are pretty basic and just include the components necessary to get it up and running, with maybe a couple of buttons or LEDs stuck on as well.Here's the schematic for their Cmod S6 board, which uses a Xilinx Spartan-6:http://digilentinc.com/Products/Detail.cfm?NavPath=2,400,1227&Prod=CMOD-S6http://digilentinc.com/Data/Products/CMOD-S6/Cmod%20S6_sch.pdf

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 11, 2015, 03:33:48 pm
content: Quote from: hamster_nz on March 11, 2015, 09:50:44 amAFAIK all FPGAs have an RC clock used for configuration. SOme have one that is accessble to user designs. Of course it is possible to have an FPGA design that needs no clock, but won't be very useful.Clock requirement will be dependent on your design, and though clocks can go into any pin, where possible you should use the pins specifically allocated to clocks to ensure minimum delays. In some cases (e.g. driving PLLs) it may ne essential to use specific clock pins.

author: Scrts
author_rank: Frequent Contributor
timestamp: March 11, 2015, 04:45:07 pm
content: Actually, you should always use a dedicated clock input pins for continuous (not stretched like SPI or I2C) clocks, because these clock inputs connects to global clock networks and can be constrained as clocks. Otherwise forget a proper design timing.

author: that_guy
author_rank: Contributor
timestamp: March 11, 2015, 05:35:21 pm
content: I've found Xilinx's reference documentation to be generally excellent; well written and complete, if a little spread out amongst many documents.Everything you need to design a circuit with a Spartan 3 FPGA that can be programmed and powered is in these docs:UG332XAPP453XAPP623Opinions differ on whether you really need the forest of decoupling caps that XAPP623 can end up recommending. That'll depend on your design.

author: Dajgoro
author_rank: Frequent Contributor
timestamp: March 11, 2015, 10:00:40 pm
content: Quote from: KM4FER on March 11, 2015, 02:12:33 pmIt is a free topic assignment. I have to do something, and I want do do a small usb logic analyzer, because I know I can do it. One option was to use a XC9572XL, which I know how to set up and program, or I could just put a small fpga so that I can have proper functionality and expand it at some later time.I could actually use a module, and I do indeed have one, but I would like to do it all on a single pcb. Since I always used Xilinx stuff, I would like to use an Xilinx fpga, just because I already know how the Xilinx ide works.As for the schematic, any recommendations of a properly built open source module that I could clone the schematic from that includes something like a Spartan 3 XC3S200, or any other Xilinx fpga that is cheap, non bga and runs on 3.3V?

author: tggzzz
author_rank: Super Contributor
timestamp: March 11, 2015, 10:46:42 pm
content: Quote from: Dajgoro on March 11, 2015, 10:00:40 pmIf the assignment's objective is to design a PCB and circuit with an FPGA, then making your own is a good idea.If the assignment's objective is to design a logic analyser with an FPGA, then making your own PCB is a bad idea - use a module and addyourvalue to that.A major aggro with logic analyser is the probes and ground connections - that's where high-end commercial equipment wins and cheapo grot fails. Make sure you have enough ground connections and that the (analogue) signal integrity is preserved.

author: Dajgoro
author_rank: Frequent Contributor
timestamp: March 11, 2015, 11:18:13 pm
content: Quote from: tggzzz on March 11, 2015, 10:46:42 pmI know the story abotu signal integrity, and actually I am not aiming for any high speed stuff.I want two things out of this project:1. Learn how to set up an fpga for future projects.2. Do a flexible board that will serve as an simple logic analyzer, but can be expanded for other uses in the future3. Pass the classAs an advice from another eevblog user, I looked into Lattice x02 devices, those seem to fit the bill also.For that seems that I need a ft2232 also.This looks straightforward:http://www.ccse.kfupm.edu.sa/~ahmadsm/coe203-082/S3BOARD-rm.pdfX02 board:http://www.latticesemi.com/~/media/Documents/UserManuals/MQ/MachXO2BreakoutBoardEvaluationKitUsersGuide.pdf?document_id=43937Somehow I don't trust that ftdi chip to work on the first try.Anyone handled the x02 before that can share some feedback?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 12, 2015, 12:11:03 am
content: Quote from: Dajgoro on March 11, 2015, 11:18:13 pmI like the XO2, because :Single supply - onboard core voltage regulator (HC versions)Onboard flash (can still download to SRAM for quicker debugging), so no need or external config deviceInternal oscillator (not very accurate though)Lattice Diamond software is rather less colossal that Xilinx ISEThey do nice cheap, simple eval boards like the one you linked aboveFor doing your own board, easy to use on 2 layer PCB

author: tggzzz
author_rank: Super Contributor
timestamp: March 12, 2015, 12:55:30 am
content: Quote from: Dajgoro on March 11, 2015, 11:18:13 pmOf course I'm sure you realiseyoudon't get to choose that high speed aspect; it is chosenfor youby therise time(not bitrate) of whatever you are probing.

author: Dajgoro
author_rank: Frequent Contributor
timestamp: March 12, 2015, 08:28:53 am
content: Can this cheap JTAG indeed program the X02?http://www.ebay.com/itm/USB-Download-Cable-Jtag-SPI-Programmer-for-LATTICE-FPGA-CPLD-/251686578853?pt=LH_DefaultDomain_77&hash=item3a99b06aa5

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: March 12, 2015, 09:08:38 am
content: Quote from: Dajgoro on March 12, 2015, 08:28:53 amProbably.Note the cheap Lattice devboards include an onboard programmer.

author: Bassman59
author_rank: Super Contributor
timestamp: March 12, 2015, 04:53:12 pm
content: Quote from: Dajgoro on March 11, 2015, 10:00:40 pmYou should use an FPGA because those devices have decent-sized block RAMs. CPLDs don't have them, so you have no way of storing samples, which is important if you are interested in implementing any sort of triggering.

author: Dajgoro
author_rank: Frequent Contributor
timestamp: March 17, 2015, 08:04:42 am
content: I decided to go for the X02. I will get that cheap devboard as well.Shipping from mouser would cost me ~150$, so I asked a friend to give me his.

author: DrRich
author_rank: Newbie
timestamp: March 18, 2015, 08:13:08 pm
content: I have used the Lattice XP2 for quite a few projects in the past, the XP2-17 being the largest flash based device I have found which is still PQFP. Quite nice devices, but they do need a separate 1.2V core supply. There is a reference design supplied by lattice for using a FTDI chip for communications and programming of the FPGA.The Spartan 6 LX9 is also a rather nice IC, and is also available in non-BGA packages.I have not used any XO2 parts yet, going to check them out now!