[Librecores Discussion] [GSoC2017] What are your Verilog coding recommendations?
Amitosh Swain Mahapatra
amitosh.swain at gmail.com
Tue May 30 20:33:38 CEST 2017
On Tue, May 30, 2017 at 6:52 PM, Stefan Wallentowitz
<stefan at wallentowitz.de> wrote:
> Just out of curiosity, is there anyone aware of a generic
> approach/framework to verify coding guidelines? I know many software
> projects have such things, are they hacked together or something
> established and reusable?
Absolutely. There are a few state-of-the art frameworks.
Verifying code guidelines require parsing the source files as per a
grammar. We have ANTLR, and flex/bison (lex and yacc) to generate
the parser from a grammar. For a linter, the grammar is just the
stricter form of the language grammar with additional restrictions.
But designing a proper grammar is a challenging task indeed.
> Also giving guidance and not only
> matched/error would be interesting.
For guidance, one could match the rule violation with a database
consisting of help texts for rule violations and show them.
ANTLR used to bundle a Verilog grammar, but I cannot find it at the moment.
More information about the Discussion