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
|
|
|
//
|
|
|
|
//*************************************************************************
|
|
|
|
//
|
2023-01-01 15:18:39 +00:00
|
|
|
// Copyright 2010-2023 by Wilson Snyder. This program is free software; you
|
2020-03-21 15:24:24 +00:00
|
|
|
// can redistribute it and/or modify it under the terms of either the GNU
|
2010-01-21 11:11:30 +00:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
// Version 2.0.
|
2020-03-21 15:24:24 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2010-01-21 11:11:30 +00:00
|
|
|
//
|
|
|
|
//*************************************************************************
|
2019-10-05 00:17:11 +00:00
|
|
|
|
2021-03-04 02:57:07 +00:00
|
|
|
#ifndef VERILATOR_V3CONFIG_H_
|
|
|
|
#define VERILATOR_V3CONFIG_H_
|
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
|
|
|
|
2022-08-05 09:56:57 +00:00
|
|
|
#include "V3Ast.h"
|
2010-01-21 11:11:30 +00:00
|
|
|
#include "V3Error.h"
|
2014-11-22 16:48:39 +00:00
|
|
|
#include "V3FileLine.h"
|
2010-01-21 11:11:30 +00:00
|
|
|
|
|
|
|
//######################################################################
|
|
|
|
|
2020-11-19 02:32:16 +00:00
|
|
|
class V3Config final {
|
2010-01-21 11:11:30 +00:00
|
|
|
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 addInline(FileLine* fl, const string& module, const string& ftask, bool on);
|
2022-01-02 18:56:40 +00:00
|
|
|
static void addModulePragma(const string& module, VPragmaType pragma);
|
2021-09-27 02:51:11 +00:00
|
|
|
static void addProfileData(FileLine* fl, const string& model, const string& key,
|
2022-03-27 19:27:40 +00:00
|
|
|
uint64_t cost);
|
2022-05-13 02:27:38 +00:00
|
|
|
static void addScopeTraceOn(bool on, const string& scope, int levels);
|
2020-03-16 03:20:33 +00:00
|
|
|
static void addVarAttr(FileLine* fl, const string& module, const string& ftask,
|
2022-01-02 18:56:40 +00:00
|
|
|
const string& signal, VAttrType type, AstSenTree* nodep);
|
2022-05-11 04:47:52 +00:00
|
|
|
static void addWaiver(V3ErrorCode code, const string& filename, const string& message);
|
2021-09-27 02:51:11 +00:00
|
|
|
|
2020-01-12 09:03:17 +00:00
|
|
|
static void applyCase(AstCase* nodep);
|
|
|
|
static void applyCoverageBlock(AstNodeModule* modulep, AstBegin* nodep);
|
2022-05-11 04:47:52 +00:00
|
|
|
static void applyFTask(AstNodeModule* modulep, AstNodeFTask* ftaskp);
|
2010-01-21 11:11:30 +00:00
|
|
|
static void applyIgnores(FileLine* filelinep);
|
2020-04-16 01:47:37 +00:00
|
|
|
static void applyModule(AstNodeModule* modulep);
|
2020-01-12 09:03:17 +00:00
|
|
|
static void applyVarAttr(AstNodeModule* modulep, AstNodeFTask* ftaskp, AstVar* varp);
|
2021-09-27 02:51:11 +00:00
|
|
|
|
2022-03-27 19:27:40 +00:00
|
|
|
static uint64_t getProfileData(const string& model, const string& key);
|
2021-09-27 02:51:11 +00:00
|
|
|
static FileLine* getProfileDataFileLine();
|
2022-05-13 02:27:38 +00:00
|
|
|
static bool getScopeTraceOn(const string& scope);
|
2020-06-02 03:16:02 +00:00
|
|
|
static bool waive(FileLine* filelinep, V3ErrorCode code, const string& message);
|
2010-01-21 11:11:30 +00:00
|
|
|
};
|
|
|
|
|
2019-05-19 20:13:13 +00:00
|
|
|
#endif // Guard
|