2014-11-24 03:06:10 +01:00
|
|
|
// -*- mode: C++; c-file-style: "cc-mode" -*-
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
// DESCRIPTION: verilator_coverage: Command line options
|
|
|
|
|
//
|
2019-11-08 04:33:59 +01:00
|
|
|
// Code available from: https://verilator.org
|
2014-11-24 03:06:10 +01:00
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
//
|
2021-01-01 16:29:54 +01:00
|
|
|
// Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
2020-03-21 16:24:24 +01:00
|
|
|
// can redistribute it and/or modify it under the terms of either the GNU
|
2014-11-24 03:06:10 +01:00
|
|
|
// Lesser General Public License Version 3 or the Perl Artistic License
|
|
|
|
|
// Version 2.0.
|
2020-03-21 16:24:24 +01:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
2014-11-24 03:06:10 +01:00
|
|
|
//
|
|
|
|
|
//*************************************************************************
|
2019-10-05 02:17:11 +02:00
|
|
|
|
2021-03-04 03:57:07 +01:00
|
|
|
#ifndef VERILATOR_VLCOPTIONS_H_
|
|
|
|
|
#define VERILATOR_VLCOPTIONS_H_
|
2014-11-24 03:06:10 +01:00
|
|
|
|
|
|
|
|
#include "config_build.h"
|
|
|
|
|
#include "verilatedos.h"
|
2018-10-14 19:43:24 +02:00
|
|
|
|
|
|
|
|
#include "config_rev.h"
|
|
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
#include <map>
|
|
|
|
|
#include <set>
|
2018-10-15 00:39:33 +02:00
|
|
|
#include <vector>
|
2014-11-24 03:06:10 +01:00
|
|
|
|
|
|
|
|
//######################################################################
|
|
|
|
|
// V3Options - Command line options
|
|
|
|
|
|
2021-03-13 00:10:45 +01:00
|
|
|
using VlStringSet = std::set<std::string>;
|
2014-11-24 03:06:10 +01:00
|
|
|
|
2020-11-19 03:32:16 +01:00
|
|
|
class VlcOptions final {
|
2014-11-24 03:06:10 +01:00
|
|
|
// MEMBERS (general options)
|
2020-04-14 04:51:35 +02:00
|
|
|
// clang-format off
|
2019-05-08 05:00:52 +02:00
|
|
|
string m_annotateOut; // main switch: --annotate I<output_directory>
|
2020-08-15 19:11:27 +02:00
|
|
|
bool m_annotateAll=false; // main switch: --annotate-all
|
|
|
|
|
int m_annotateMin=10; // main switch: --annotate-min I<count>
|
2019-05-08 05:00:52 +02:00
|
|
|
VlStringSet m_readFiles; // main switch: --read
|
2020-08-15 19:11:27 +02:00
|
|
|
bool m_rank=false; // main switch: --rank
|
|
|
|
|
bool m_unlink=false; // main switch: --unlink
|
2019-05-08 05:00:52 +02:00
|
|
|
string m_writeFile; // main switch: --write
|
2020-05-16 15:18:35 +02:00
|
|
|
string m_writeInfoFile; // main switch: --write-info
|
2020-04-14 04:51:35 +02:00
|
|
|
// clang-format on
|
2014-11-24 03:06:10 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// METHODS
|
2020-04-16 03:47:37 +02:00
|
|
|
static void showVersion(bool verbose);
|
2014-11-24 03:06:10 +01:00
|
|
|
|
|
|
|
|
public:
|
2017-11-01 23:51:41 +01:00
|
|
|
// CONSTRUCTORS
|
2020-11-17 01:56:16 +01:00
|
|
|
VlcOptions() = default;
|
|
|
|
|
~VlcOptions() = default;
|
2014-11-24 03:06:10 +01:00
|
|
|
|
|
|
|
|
// METHODS
|
|
|
|
|
void parseOptsList(int argc, char** argv);
|
|
|
|
|
void addReadFile(const string& filename);
|
|
|
|
|
|
|
|
|
|
// ACCESSORS (options)
|
|
|
|
|
const VlStringSet& readFiles() const { return m_readFiles; }
|
|
|
|
|
string annotateOut() const { return m_annotateOut; }
|
|
|
|
|
bool annotateAll() const { return m_annotateAll; }
|
|
|
|
|
int annotateMin() const { return m_annotateMin; }
|
|
|
|
|
bool rank() const { return m_rank; }
|
|
|
|
|
bool unlink() const { return m_unlink; }
|
|
|
|
|
string writeFile() const { return m_writeFile; }
|
2020-05-16 15:18:35 +02:00
|
|
|
string writeInfoFile() const { return m_writeInfoFile; }
|
2017-09-12 01:18:58 +02:00
|
|
|
|
2014-11-24 03:06:10 +01:00
|
|
|
// METHODS (from main)
|
|
|
|
|
static string version();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//######################################################################
|
|
|
|
|
|
2019-05-08 05:00:52 +02:00
|
|
|
#endif // guard
|