FPGARelated.com
Forums

Getting started with FPGA

Started by rupe...@googlemail.com August 17, 2010
On Wed, 18 Aug 2010 01:38:00 -0700 (PDT)
"rupertlssmith@googlemail.com" <rupertlssmith@googlemail.com> wrote:

> On Aug 17, 8:43=C2=A0pm, Jonathan Bromley <s...@oxfordbromley.plus.com> > wrote: > > On Tue, 17 Aug 2010 10:07:45 -0700 (PDT), > > > > rupertlssm...@googlemail.com wrote: > > >I'm interested in learning more about FPGAs > > > > Wow. =C2=A0I think this thread reminds me why it's still > > kinda nice to hang out on comp.arch.fpga (and > > comp.lang.vhdl, .verilog). > > > > You get three seriously expert people, with distinctly > > different viewpoints and distinctly different positions, > > each giving a clearly expressed and nuanced take on > > a bunch of issues (X vs A, Verilog vs VHDL) that > > could so easily degenerate into a schoolyard scrap. > > > > And the OP gets spot-on advice too. > > > > Hard to beat. =C2=A0Thanks to all the contributors for > > their time and their generously shared expertise. > > -- > > Jonathan Bromley >=20 > Yes, some excellent advice, thanks very much. >=20 > I hadn't really appreciated that I can download Xilinx ISE or Altera > Quartus web editions for free and that both run on Linux. Also that I > can run simulations of designs without having a chip to program them > onto, so it looks like I can at least have a play around with the > basics at no cost at all. >=20 > Is a development environment like Xilinx ISE or Altera Quartus > necessary? or are there standalone Verilog or VHDL compilers available > that can be used? I'm a bit unclear as to the process of going from > the source code to writing the design onto the chip. The development > boards generally have an FPGA chip that is removable, and one removes > it and inserts it into a 'programmer' to burn in the design? or is the > FPGA chip fixed onto the dev board and gets programmed in place?
I can only speak for Xilinx, as I've never used Altera. I do use the xilinx tools on linux exclusively, however.=20 The actual synthesis tools (xst, par, map, bitgen etc) can all be driven from the command line, or even better, Makefiles. There is no actual need to use the ISE environment, except possibly for simulations. And simulations are better and faster done by modelsim in any case, but that might cost money. There is also F/OSS simulation tools out there, but I have very limited experience with them. It might even be possible to Makefile up the ISE simulator, but I've never tried. Modelsim spoiled me. Our main projects are all straight Makefiles for building, but I have recently had to use the ISE for a smaller project. It works well enough for small code, especially since the GUI updates from 10.1 -> 12, but I would definitely bypass it if I didn't have to use it, as there is a lot of overhead I'm not using / have substitutes for.=20 //Oscar
> If you just want a minimum cost FPGA board with a bunch of I/O to play > with (but less hand-holding) look at Enterpoint's Craignell modules > (enterpoint.co.uk), Sparkfun's Break Out Board (www.sparkfun.com), > OHO-Elektronik's GODIL boards (www.oho-elektronik.de), KNJN's Pluto > boards (www.knjn.com), or terasIC's Max II Micro board > (www.terasic.com.tw/en/). =A0The terasIC and KNJN boards are Altera, the > rest are Xilinx. =A0The terasIC and the Nexys_2 are unique because they > don't need a separate programmer (well KNJN only needs a serial > adapter). =A0In fact the terasIC board can even be used in place of an > Altera programmer to configure other boards. > > Just some ideas for things to look at. > > Chris Abele
terasIC's MAX boards have CPLD, not FPGA.
> Is a development environment like Xilinx ISE or Altera Quartus > necessary? or are there standalone Verilog or VHDL compilers available > that can be used? I'm a bit unclear as to the process of going from > the source code to writing the design onto the chip. The development > boards generally have an FPGA chip that is removable, and one removes > it and inserts it into a 'programmer' to burn in the design? or is the > FPGA chip fixed onto the dev board and gets programmed in place?
FPGA is fixed to board and programmed in place. FPGA can be programmed with either ISE or QUARTUS or another software provided from the boards manufacturer. There are programs you can simulate your HDL code. I don't know any program other than ISE or QUARTUS that generates the programming files for your FPGA.
> Is a development environment like Xilinx ISE or Altera Quartus > necessary? or are there standalone Verilog or VHDL compilers available > that can be used? I'm a bit unclear as to the process of going from > the source code to writing the design onto the chip. The development > boards generally have an FPGA chip that is removable, and one removes > it and inserts it into a 'programmer' to burn in the design? or is the > FPGA chip fixed onto the dev board and gets programmed in place?
There are two main processes involved with non trivial FPGA design. 1) Write HDL (VHDL if you've any sense :-) ) and functionally simulate it. This is the only way you're going to get a design of any reasonable complexity to work. It involves writing a testbench 'wrapper' of HDL round the module or complete design you've written, this drives inputs, can check outputs etc. For a simple small module you might just check the outputs manually, for a complex design some form of self checking is a good idea. It's a good idea to thoroughly check all sub modules before plugging them together to form the top level design. You'll spend >>50% of your development time writing and testing modules/the design (in my experience). There is a subset of HDL that can be used when designing the FPGA itself, synthesiseable code. However when writing the testbench you can use all the constructs available so can read stimuli from text files, dump results etc, it's much more flexible. At a more system level Modelsim (one of the industry standards) has hooks to allow things to be driven from C etc. When you're convinced the design is functionally correct it's time for stage 2.... 2) Take the synthesiseable core that you've been testing and run it through the vendor tools to generate a programming file. This is a completely separate process to 1). When you're starting the GUI is a sensible way to drive things. You can use scripts eventually, but when you're searching for the syntax to apply an IO standard to a pin it's all there in the GUI. If I have a lot of similar pins I sometimes apply a constraint to 1 in the GUI then look at the generated constraint files and repeat this where necessary. Having said that Quartus has a pretty good Assignments editor where you can drag assignments from one pin to multiple pins (as you copy formulae in excel). Being a satisfied mostly Altera user and reading of recent ISE problems I'd recommend Altera tools to a beginner. I hope this helps, Nial
I forgot to say that to generate the programming files for your target
device you will need the vendors tools.

You can do your development in whatever text editing tool you want. I
use textpad with syntax highlighting with tools defined to do a
modelsim compile, grep a word in the current file and throw up a
list of all signals, entities or ports. I also have a perl script
written to generate testbench shells.

Emacs has a VHDL (and probably verilog) mode which does all of this
but I don't have enough knuckles to drive it.


Nial



On Aug 18, 11:11=A0am, "Nial Stewart"
<nial*REMOVE_TH...@nialstewartdevelopments.co.uk> wrote:
> Emacs has a VHDL (and probably verilog) mode which does all of this > but I don't have enough knuckles to drive it.
Thanks, this is good to know. I'm pretty comfortable in Emacs so I'll try that out. I also notice that ModelSim does a free cut down 'student' version, which sounds like it will make a very good starting point.
On Aug 18, 12:14=A0pm, "rupertlssm...@googlemail.com"
<rupertlssm...@googlemail.com> wrote:
> Thanks, this is good to know. I'm pretty comfortable in Emacs so I'll > try that out. I also notice that ModelSim does a free cut down > 'student' version, which sounds like it will make a very good starting > point.
Looks like its for genuine higher education use only, and possibly only for windows. I'll try out the hardware vendors tools, and maybe come back to modelsim later.
> I also notice that ModelSim does a free cut down > 'student' version, which sounds like it will make a very good starting > point.
Altera (and probably the rest) have a free OEM download version. This is speed crippled but is certainly good enough to get started with! Nial.
> Looks like its for genuine higher education use only, and possibly > only for windows. I'll try out the hardware vendors tools, and maybe > come back to modelsim later.
You'll need it to test your designs! As above(/below) most of the vendors include an OEM version with their downloadable tools. Nial.
>Hi, > >I'm interested in learning more about FPGAs in a hands on way. Can >anyone recommend an inexpensive set of tools to get started with? My >wishlist is: I'd like to develop on Linux, I'd like to spend no more >than a few hundred $ on a starter kit, I'd like to learn using the >tools and up-to-date skills that are relevant to the more high end set >ups available. Which is better to start with, Xilinx or Altera or >something else? Is there a choice between Verilog and VHDL to be made, >or can both be tried out just as easily? > >At the moment I am not too bothered about specific applications, just >if I can get some hands on experience, whatever i/o ports are >available on whatever board I use, I will think of some little project >to try out using them. > >Thanks for your recommendations. > >Rupert >
Since you've seen the expert's replies, I'll weigh in from a similar place to you (i.e. a newbie :-)). I bought a Xylinx Spartan3 starter kit: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,799&Prod=S3BOARD (although I spent the $50 to upgrade to the bigger FPGA so it was $159 instead o $109 plus a download cable) and a copy of Dr Chu's book (another $100 :-)) based on the reviews here: http://www.fpgarelated.com/books/30.php I have the VHDL one but there is one for verilog as well. Of especial note is that he includes a couple of simple test bench examples (and references to more information on test benches) which is very helpful. The examples in the book use the starter kit board for a variety of projects to teach hands on and as a bonus there is a on the web (google will likely find it, the url isn't to hand at the moment but I can dig it up if needed) a project that turns the starter kit in to a 32 channel 100 meg logic analyser so I expect it to have life after I've finished the book (one can never have too many logic analysers in my view :-)). As far as I can see the book covers all of the common pitfalls that get pointed out in comp.arch.fpga as well. There are other boards available from Digilent too and you may want to have a look at http://www.fpga4fun.com boards and good tutorial information http://www.fpga-faq.com/FPGA_Boards.shtml a listing of many many dev boards http://www.enterpoint.co.uk boards, and the only inexpensive Ethernet PHYs that I'm aware of (only 10/100 but not $500 US either!) if you are interested in host busses such as PCI or PCI-E (which you may not be) that may influence what you buy. As well there are lots of open source FPGA projects available on www.opencores.org. Hope this helps! Peter Van Epp --------------------------------------- Posted through http://www.FPGARelated.com