4

Sorry for Newbish question.

I am trying to learn about FPGA programming.

Before I spend $1K on a FPGA board:

if I just want to learn Verilog, can I run it entirely in Modelsim? (I realize there are some timing issues that only show up in actual chips; but for learning syntax / style of coding / ...)_

Thanks!

anon
  • 41,035
  • 53
  • 197
  • 293

7 Answers7

3

You can of course!

However, there are a few things that a simulator will let you away with that the FPGA compiler will not. Have a $FAVOURITE_SEARCH_ENGINE around for keywords like verilog coding styles synthesis.

See Resources for learning Verilog for some info on the differences between HDL programming and computer programming.

Community
  • 1
  • 1
Marty
  • 6,494
  • 3
  • 37
  • 40
3

You most definitely don't need to splashout on a dev board if you are happy with just learning the language and simulating the results.

You can get the free Xilinx ISE Webpack which includes a basic version of ModelSim.

As you have mentioned simulation and testbenching is one aspect of FPGA design. Actually getting a design to work on real hardware is usually the more challenging part. However, just using software you can learn the language, get to grips with simulation and even synthesize your design to make sure it will meet timing and fit on a target device.

I would also suggest that $1K for your first dev board is quite high. I would start with something like the low-cost Xilinx Spartan-6 board, which is a tad under $300. You'll get a device with a decent amount of logic, memory and DSP slices for that.

Binary Nerd
  • 13,872
  • 4
  • 42
  • 44
  • FYI, lattice makes several low cost FPGAs and development kits which can be a good option too. Xilinx isn't the only FPGA manufacturer, just one of the more popular/established vendors – Sam Post Feb 18 '10 at 02:10
  • There are other options as @Sam Post has pointed out. Make sure you understand the kinds of projects you will be undertaking so you get hardware that can support your requirements. The board I suggested is just one of the ones that i personally own. – Binary Nerd Feb 18 '10 at 03:27
2

If you're trying to learn Verilog there's no need to actually get an FPGA board (though, you can get FPGA development boards for much less than $1000 - you can get Xilinx's kit for $100). You can and should first learn Verilog using a simulator, though if you don't want to spend anything I'd suggest Icarus Verilog which is free (Open Source).

aneccodeal
  • 8,531
  • 7
  • 45
  • 74
1

We had a hardware systems course in which some FPGA programming was done using VHDL. I downloaded ModelSim-Altera Software (starter edition available here)

We had FPGA boards in our lab, so it was easy to actually see your model behave. In your case, I would suggest:

  1. Start modeling basic circuits like adder, decoders etc. In ModelSim you can also create and configure(characteristics like frequency of different signals) a test bench to verify (using timing diagrams) your model.

  2. Once you are confident with the syntax and modeling, you can look for a lab around you which will allow you to get your hands dirty.

I hope this helps.

cheers

Arnkrishn
  • 29,828
  • 40
  • 114
  • 128
1

As others have noted, a simulator will get you a long way. There's nothing quite like flashing some real LEDs on and off though - wiggly waveforms on a screen just aren't the same :)

Many of the starter kits have VGA outputs so you can display your own pictures, which is always gratifying (I've found anyway!) $1000 is a lot to spend, try this Xilinx starter kit for $189 (which does have VGA), or this Altera starter kit (which doesn't).

Martin Thompson
  • 16,395
  • 1
  • 38
  • 56
0

Everyone above is right. However there is a synthesizable subset of Verilog and VDHL that can be used for actual hardware. For example $display can't be used. Recursion may be supported in some tools, as @Chiggs pointed out below. Keep that in mind when writing your code if it will ever be used in a chip. However the full language can be used in test benches.

Brian Carlton
  • 7,545
  • 5
  • 38
  • 47
0

No one mentioned www.edaplayground.com to learn SystemVerilog and/or VHDL. 100% free versions of the industry standard tools for simulation from the major vendors. Runs in the cloud. Nothing to download. Need email to register. Don't put your employers code up there; its on someone else's computer. There are example designs on the edaplaygroud site itself. Other sites have code examples that run on edaplayground, so you can run their code examples as a learning lesson by clicking one button. A list of verilog examples here: https://verificationguide.com/verilog-examples/

As others have stated there are aspects of FPGA & ASIC design that you will not learn in the simulation flow, specifically those related physical implementation but you can learn a lot from this approach, and it is very low cost (they want your email).

That being said edaplaygroud also has a synthesis tool.

Mikef
  • 1,572
  • 2
  • 10
  • 21