forked from github/verilator
fad465abf1
* Add more directives to configuration files Allow to set the same directives in configuration files that can also be set by comment attributes (such as /* verilator public */ etc). * Add support for lint messsage waivers Add configuration file switch '-match' for lint_off. It takes a string with wildcards allowed and warnings will be matched against it (if rule and file also match). If it matches, the warning is waived. Fixes #1649 and #1514 Closes #2072
53 lines
2.3 KiB
C++
53 lines
2.3 KiB
C++
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
|
//*************************************************************************
|
|
// DESCRIPTION: Verilator: Configuration Files
|
|
//
|
|
// Code available from: https://verilator.org
|
|
//
|
|
//*************************************************************************
|
|
//
|
|
// Copyright 2010-2020 by Wilson Snyder. This program is free software; you can
|
|
// redistribute it and/or modify it under the terms of either the GNU
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
// Version 2.0.
|
|
//
|
|
// Verilator is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
//*************************************************************************
|
|
|
|
#ifndef _V3CONFIG_H_
|
|
#define _V3CONFIG_H_ 1
|
|
|
|
#include "config_build.h"
|
|
#include "verilatedos.h"
|
|
|
|
#include "V3Error.h"
|
|
#include "V3FileLine.h"
|
|
#include "V3Ast.h"
|
|
|
|
//######################################################################
|
|
|
|
class V3Config {
|
|
public:
|
|
static void addCaseFull(const string& file, int lineno);
|
|
static void addCaseParallel(const string& file, int lineno);
|
|
static void addCoverageBlockOff(const string& file, int lineno);
|
|
static void addCoverageBlockOff(const string& module, const string& blockname);
|
|
static void addIgnore(V3ErrorCode code, bool on, const string& filename, int min, int max);
|
|
static void addWaiver(V3ErrorCode code, const string& filename, const string& msg);
|
|
static void addInline(FileLine* fl, const string& module, const string& ftask, bool on);
|
|
static void addVarAttr(FileLine* fl, const string& module, const string& ftask, const string& signal, AstAttrType type, AstSenTree* nodep);
|
|
static void applyCase(AstCase* nodep);
|
|
static void applyCoverageBlock(AstNodeModule* modulep, AstBegin* nodep);
|
|
static void applyIgnores(FileLine* filelinep);
|
|
static void applyModule(AstNodeModule* nodep);
|
|
static void applyFTask(AstNodeModule* modulep, AstNodeFTask* ftaskp);
|
|
static void applyVarAttr(AstNodeModule* modulep, AstNodeFTask* ftaskp, AstVar* varp);
|
|
static bool waive(FileLine* filelinep, V3ErrorCode code, const string& match);
|
|
};
|
|
|
|
#endif // Guard
|