VHDL or Verilog For Learning FPGAs?
FlyByPC writes "We're in the first stages of designing a course in programmable devices at the university where I work. The course will most likely be centered around various small projects implemented on an FPGA dev board, using a Xilinx Spartan3-series FPGA. I have a bit of experience working with technologies from 7400-series chips (designing using schematics) to 8-bit microcontrollers to C/C++. FPGAs, though, are new to me (although they look very interesting.) If you were an undergraduate student studying programmable devices (specifically, FPGAs), would you prefer the course be centered on VHDL, Verilog, a little of both, or something else entirely? (...Or is this an eternal, undecidable holy-war question along the lines of ATI/nVidia, AMD/Intel, Coke/Pepsi, etc...?) At this point, I've only seen a little of both languages, so I have no real preference. Any input, especially if you're using one or both in the field, would be very helpful. Thanks, and may all of your K-maps be glitch-free."
Personally, I would say that Verilog is more C-like: weakly typed, compact, efficient notation, whereas VHDL is much more Ada-like: strongly typed, often verbose, but can catch errors that the other one can't.
In industry, as far as I can tell, Verilog seems to be more used in North America and VHDL in Europe, so that might affect what you care about, too.
Personally, I prefer Verilog.
I'm in Computer Science, a somewhat related field, and I've had to take a few hardware courses during my time in school.
I felt like Xilinx Schematic layout was a great first step, because it introduced the circuit theory in a visual way.
I fear the Y2038 bug
Let's put it this way. I once implemented a subset of TCL in pure VHDL to implement feature rich scripting for simulation data. That can't be done in Verilog without dropping out to C.
I am becoming gerund, destroyer of verbs.
If your goal is to prevent the students from ever completing their project and running on real hardware, then pick VHDL. Its ADA-like compiler will reject every possible attempt at coding until you master the language.
At least with Verilog you'll compile some gates, which may or may not work functionally, but at least you'll have fun discovering what your code does in hardware.
I was part of the IEEE committee which standardized the VHDL subset for synthesis (a fiasco, but that's another story).
10 years ago, the debate between Verilog and VHDL was that the US was using Verilog and academia and Europe were using VHDL. That's over: pretty much everyone switched to some form of SystemVerilog.
In the end, what really matters is that students can go back and forth between any given language construct (blocking assignment, missing assignment, for loop, etc.) and its hardware equivalent (flip-fop, latch, mux, etc.).
Very few people are good at this. The ones that do make $150,000+ in Silicon Valley. So it is definitely a good career path.
I strongly disagree with the idea that these aren't programming languages and that all you need to know about is the synthesizable subset of each language.
I've worked for several years using VHDL for ASIC/FPGA work. Invariably, I spent 2-3 times as long working on the simulation / test-bench as I did on the VHDL that was actually synthesized into the product. There are a lot of very interesting language features that you can exploit to make the testing more flexible and easy. If you tried to make a simulation test-bench out of the synthesizable subset, you're being a lot less efficient than you could be.
Also, I have a strong preference for VHDL's strong typing and pseudo-object oriented features over the wild-west down-in-the-bits Verilog style. I think it's easier to manage complexity and reuse code in VHDL.
That said, Verilog is definitely more popular in the US, which is important to consider if you're looking for marketable skills. If, on the other hand, you find yourself in a position to choose the language once you already have a job, I'd strongly recommend VHDL
I've found that I can substantially reduce VHDL development time using Xilinx System Generator and its toolbox for Matlab's Simulink . Writing VHDL graphically makes understanding and testing substantially easier (for me, at least).
It has hand-coded VHDL equivalents for each Simulink function. Generate testbenches, hardware in the loop, etc. You can merge it directly with your own code by writing a simple high level wrapper. It interfaces easily with Chipscope as well (generates files to label each of your inputs).
You're right that Verilog has those constructs, but they're strictly used for modeling. You either won't make synthesizable code out of them, or if it handles them it's done in an implicit way that you absolutely have to know what the implications are. Again, HDLs are not programming languages in the get-to-the-chip sense, they're concurrent systems description languages. Even more reason to leave Verilog alone at the outset and learn with VHDL.
This post is remarkably well timed: I'm currently procrastinating over doing an assignment in Verilog for an undergrad course in FPGAs.
I'd definitely pick Verilog. The main problem will be what you choose for compiling. If you use ISE 9.2 (the immediately obvious choice for a Spartan board), make sure you check your brake lines every time you get in the carâ"your students will hate you.
I think Verilog offers the best combination of usability and actually learning about hardware.