Due to a college assignment, I'm currently learning Verilog. I've never heard of it before and the more I dig up, the more I find it interesting.
Verilog is basically a "programming" language that describes hardware. Technically, it's called a hardware description language (HDL), because it doesn't make "programs" per se. It tells an electronic circuit how to behave.
That's a whole different paradigm. Programming languages (C, C++, Ruby), Markup languages (HTML, TeX) and now, Hardware description languages? If you're more interested on the varous different language types, check this out!.
Last semester I took a course on Digital Circuits, where the standard technique on designing circuits was:
- Draw a state-machine block-like diagram.
- Make the truth table, with state transitions for each flip-flop
- Draw Karnaugh maps
- Enjoy the optimized circuit
But for big projects this becomes too cumbersome. That's where Verilog shows it's worth.
We can command an electronic circuit on many different ways. The focus on Verilog are levels of abstraction.
On the Behavioral level, we kind of program algorithms that the circuit will do. Logical blocks are created, that do something (like adding two numbers) and we're not concerned on how the're physically implemented (what ports are used, etc).
Register-Transfer level of abstraction specifies communication between the registers. Data transferral on exact timing bounds; what will register x do when it receives data from y and such.
Finally, on the Gate Level we basically describe the logic circuit of the element (with AND/NOT/NOR/etc ports).
For more, do check this tutorial.
On the current course, I must implement some features on a MIPS-processor implementation (using Altera's DE2-70 FPGA for "simulation").
At the end of the semester, I'll have an Arkanoid-like game completely programmed using MIPS-Assembly and using Verilog-defined components (!). This blog'll be updated whenever I do something on it.