Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
18 years ago

Coding Guidelines for VHDL and Verilog HDL

Many threads on the Altera Forum are about basic issues with synthesis like warnings, errors, and writing the HDL properly to synthesize the intended logic. If you need to know how to fix your HDL, start by checking whether it follows a recommended coding style for synthesis.

The purpose of this thread is for people to post HDL coding guideline references that they recommend and to comment on others' recommendations. The references can be books, links to information available on the Internet, code examples posted directly here, etc.

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    For basic coding guidelines, see the Quartus II handbook, Volume 1, Section II, Chapter 6: "Recommended HDL Coding Styles".

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Recommendation by Randall at http://www.alteraforum.com/forum/showthread.php?p=3367#post3367:

    --- Quote Start ---

    ... my favorite book for people settling on a coding approach, HDL Chip Design by Doug Smith. He has, for example, all the typical flavors of a Flip Flop written with example code "The way it should be done" for both verilog and VHDL. There are little dialog boxes pointing to and explaining how each variation in the HDL text gives you a slightly different feature. It's not deep, but if you are looking for the right approach to basic synthesizable code, this is the ticket.

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The Quartus text editor provides many code examples in the "Insert Template" dialog box. Use "Edit --> Insert Template" while an HDL file is open in the text editor.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Another useful book is titled

    The Designer’s Guide to VHDL by Peter J. Ashenden.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    A VHDL Primer - by Jayaram Bhasker

    VHDL : Programming by Example - by Douglas L. Perry
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    One of my favorite books is: HDL Chip Design by Douglas J. Smith. They list examples in VHDL, Verilog, and then a schematic representation. Unfortunately it is out of print but there are some used books available through Amazon.

    -Brian
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I though I would place multiple responses in here that I got through another channel:

    ---------------

    Digital Design and Modeling with VHDL and Synthesis

    K.C. Chang (IEEE)

    This was a good book for someone new to VHDL it is a book you can actually read vs just a syntax book

    http://www.amazon.com/digital-design-modeling-synthesis-systems/dp/0818677163

    --------------

    The designer’s guide to VHDL – this is the definitive reference book for VHDL, hands down.

    -------------

    Real World FPGA Designs with Verilog by Ken Coffman.

    -------------