2012-04-13 01:08:20 +00:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
2010-01-21 11:11:30 +00:00
|
|
|
//*************************************************************************
|
|
|
|
// DESCRIPTION: Verilator: Configuration Files
|
|
|
|
//
|
2019-11-08 03:33:59 +00:00
|
|
|
// Code available from: https://verilator.org
|
2010-01-21 11:11:30 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
|
|
|
//
|
2020-01-06 23:05:53 +00:00
|
|
|
// Copyright 2010-2020 by Wilson Snyder. This program is free software; you can
|
2010-01-21 11:11:30 +00:00
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//*************************************************************************
|
2019-10-05 00:17:11 +00:00
|
|
|
|
2010-01-21 11:11:30 +00:00
|
|
|
#ifndef _V3CONFIG_H_
|
|
|
|
#define _V3CONFIG_H_ 1
|
2018-10-14 17:43:24 +00:00
|
|
|
|
2010-01-21 11:11:30 +00:00
|
|
|
#include "config_build.h"
|
|
|
|
#include "verilatedos.h"
|
2018-10-14 17:43:24 +00:00
|
|
|
|
2010-01-21 11:11:30 +00:00
|
|
|
#include "V3Error.h"
|
2014-11-22 16:48:39 +00:00
|
|
|
#include "V3FileLine.h"
|
2020-01-12 09:03:17 +00:00
|
|
|
#include "V3Ast.h"
|
2010-01-21 11:11:30 +00:00
|
|
|
|
|
|
|
//######################################################################
|
|
|
|
|
|
|
|
class V3Config {
|
|
|
|
public:
|
2020-01-12 09:03:17 +00:00
|
|
|
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);
|
2018-02-08 00:31:21 +00:00
|
|
|
static void addIgnore(V3ErrorCode code, bool on, const string& filename, int min, int max);
|
2020-01-12 09:03:17 +00:00
|
|
|
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);
|
2010-01-21 11:11:30 +00:00
|
|
|
static void applyIgnores(FileLine* filelinep);
|
2020-01-12 09:03:17 +00:00
|
|
|
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);
|
2010-01-21 11:11:30 +00:00
|
|
|
};
|
|
|
|
|
2019-05-19 20:13:13 +00:00
|
|
|
#endif // Guard
|