views:

211

answers:

5

I'm beginning to learn embedded with C (and maybe some C++) and someone from the office said they're willing to donate a free xilinx chip they've got sitting on their shelf. I was thinking more along the lines of an Arduino, especially that the Arduino tutorials and sample projects are abundant.

  • Can someone confirm how xilinx chips compare to arduino? Are they known within the industry to be more "real world" in any way? or not?

  • Are there specific xilinx chips (maybe older models) that I should avoid, at least while I'm still starting out?

  • Do they have a relatively steeper learning curve than an Arduino due to lack of tutorials or not?

I'm interested in hearing whatever comes to your mind when you hear xilinx as opposed to Arduino. I know very little about chips, let alone this particular one, so it's very hard to have any informed comparison.

+10  A: 

Xilinx is in the business of selling FPGA chips. Such a chip is going to worthless to you without the tooling you need to create the logic design and burn the chip. The tooling used to be quite expensive but is available for free for low-to-medium end chips (as pointed out in the comments). Google "Verilog" and "FPGA programming".

The essential difference between a FPGA and your Arduino is that you program hardware on a FPGA, software on an Arduino.

Hans Passant
@Hans, Yep, Verilog and VHDL ring a bell from the conversation I've had with him. So FPGAs are not a good choice unless you work for a company that has the tooling to burn?
cooper
@Nathan and @Hans, not to sound doubting, but are you sure C can't be used with FPGAs? I thought that's what many embedded engineers use at least to test the code before they move it to the chip, or something...
cooper
Part of the toolset is a simulator, allowing you to test the custom logic design before you burn it. Yes, the code is VHDL, not C. You are programming hardware, not software.
Hans Passant
There are derivatives of C which can be used for programming FPGAs (look up HandelC, for example.) And tooling for small-medium FPGAs is all free nowadays too. But it's all still completely unsuitable for the OP's requirements, I quite agree.
Will Dean
Whoa. Wait a second. FPGA tools are NOT expensive at all. Most of them are totally free to use. It's not nearly the same as programming C... but it IS free. (Unless the "virtex chip" is a high end one worth hundreds of dollars)
darron
What darron said. I bought a (Xilinx) CPLD kit for a class at school: a board with some blinkenlights and buttons and whatnot. It didn't have billions of gates, but it was $60 for the whole package. That was purely hardware cost. It also came with the (free? $10?) student edition of the Xilinx software, but that is what made me abandon Windows (it caused the partition to cease booting). Verilog is based on C syntax but is still fundamentally for programming gate arrays not registers.
Nathon
+11  A: 

Xilinx chips are very commonly used, but not for what you want. Xilinx makes FPGAs and CPLDs, which are programmed with VHDL and Verilog (not respectively, both are programmed with both). They are used for prototyping logic circuits to be turned into integrated circuits. If you wanted to make your own ARM chip, for example, you could buy some code from ARM and put it on an FPGA from Xilinx and then program the result in C. I'm not recommending that, just trying to give you an idea of what these beasts are for. Anyway, Arduino is a solid platform for what you want. Go with that.

Nathon
There is also SystemC for hardware description which is gaining popularity. But it's still not what cooper wants.
Axel Gneiting
+4  A: 

Xilinx makes FPGAs and associated software tools. FPGAs are - abstractly - loads of NAND gates configured with look-up-tables. They are often used in place of custom silicon chips for extra-fast logic when the number of units is not enough to justify creating an ASIC.

FPGAs are programmed in VHDL or Verilog, which are - abstractly - hardware description languages. They are not like von Neumann or functional languages.

Mind you, you can load a 'soft-core' description of a regular CPU and program with C the CPU that the FPGA has loaded.... you don't want to do that when learning embedded. You may wind up needing to debug your CPU. Which, well, can be fun. If you want to do that.

For embedded work, the Arduino is the current popular chip. You can program it with C.

Paul Nathan
Is Arduino a chip? I thought it was just a hobbyist/student dev board.
Will Dean
Arduino is sort of a package thing. It relies on the Atmel AVR series, as I recall. The architecture used was a 16-bit Harvard.
Paul Nathan
recent? arduino software includes g++ compiler, so a number of C++ features is available. you can always use external AVR g++ compiler however
aaa
+5  A: 

You are comparing chalk and cheese. Xilinx is a company, not a chip and Arduino is an open development platform based on Atmel AVR microcontroller.

Also 'a chip' alone is probably useless to you; it will have to be assembled onto a development board with subsidiary components and power supplies etc.

Xilinx make FPGAs and other programmable logic devices. It is possible to have an FPGA with a hard or soft core processor embedded (i.e. a processor defined in FPGA logic gates), and for that core to be programmed in C, but if you are starting out, how many balls do you want to juggle at once? Such a core will be useless without the ability also to synthesize the peripheral hardware necessary to make it do something useful. They are used in highly specialised applications where the core and peripheral set need to be tightly coupled to the application. They are often used in applications where standards are still under development (such as wireless communications), where both firmware and software may need to change in-field to support changes. Another use of FPGAs is in directly implementing algorithms in hardware to take advantage of the parallelism and pipe-lining that they make possible offering massive acceleration compared to software solutions..

While Arduino, or more specifically AVR (there are other AVR development platforms available) can be programmed in C and C++, if you are serious about using C++ in embedded systems, a 32-bit platform may be more appropriate (as well as having performance advantages). A development board based on an ARM Cortex-M3 or ARM 7 would be a good start, especially since ARM is also a common choice for soft-core processors on FPGAs if you eventually progress to that.

Clifford
+1  A: 

As many here have already said Xilinx are FPGAs. FPGAs are "softlogic" in that you use a simalar development process to developing an ASIC, but you can test your design on hardware without requiring a fabrication plant to do so. The trade off is speed, they implement "meta-logic" instead layout a design composed of traditional "nand-nand" or "nor-nor" logic, they have programmable look up tables which can be programmed to implement arbitrary logic gates. This is simalar in concept to running an interpretor for a processor instead of native code.

While you can't achieve the same performance as you can with an asic, it allows low volume products to have most of the advantages of an asic with out the cost of a production run on at FAB facility. In addition you can treat an FPGA much more like a software design, and load different bitstreams for different modes of operation. Both Xilinx and Altera have dev kits that let you store your design on a compact flash and select different images at boot time.

For embedded designs FPGA allow you something that you typically can't get out of an off the shelf processor, your design can have the EXACT hardware you need, you don't have to look threw 1000 different micros to find the "perfect match!" On top of that I've seen old systems that used either 16bit or 32bit processors moved to FPGA and acheived better performance, lower cost, and lower power than the processor based designs. There is something to be said for including "the right" hardware.

Both VHDL and Verilog are high level langauges and while different from C and C++ they aren't significantly harder just different and require a different thought process. You don't get a lot of built in libraries to do everything for you, so you might wind up getting "Cores" off sites like "OpenCores.com" and connecting them together to implement your designs, with the additional logic you need. FPGA code is going to generally be parrallel, you have to specifically implement serial behaviours, and you have to take into considerations pipeline stages and delays. So while the languages themself aren't more difficult, some of the concepts maybe. But they are also more rewarding, kinda like building a house instead of writing about a house.

NoMoreZealots