HDL Overview

From Ithaca Generator Wiki
Jump to navigation Jump to search

General Overview

  • Hardware Description Languages (HDLs) are a way of formally expressing the composition of logic circuits.
  • I prefer not to use the term "program" for a given instance of HDL. A better terminology is "module."
    • While HDL often bares a resemblance to a software program, thinking of it through that lens is wrought with peril.
  • The key thing thing that distinguishes FPGA programming from computer programming is parallelism
    • All the assignments that you make in an FPGA module happen at the same time and do so continuously
    • There are constructs that can lead to inherent non-determinism if one is not mindful of this
    • It's also easy to fool yourself into thinking the order you express yourself in the module is relevant to the module's operation. It is not, except in a declarative sense.
  • The best world view you can have when writing HDL is that you are abstractly capturing a schematic representation of a realizable circuit. That is, you can draw your implementation, and it's typically a good idea to do that at least in a sketch before you start coding.
  • Fundamentally what you have to work with are: wires, registers, modules (user and vendor defined), primitive gates/function blocks, and the connections (assignments) among them
    • Modules are just containers for the other stuff (including possibly other modules), and expose an interface (inputs, outputs, and bidirectional inout signals).
    • The different HDLs differ principally in their syntax