mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 02:45:52 +00:00
Use C++11 final/override keywords.
This commit is contained in:
parent
dfde1cf1c5
commit
7191dd16f9
220 changed files with 540 additions and 548 deletions
|
@ -970,7 +970,7 @@ void AigerReader::post_process()
|
|||
|
||||
struct AigerFrontend : public Frontend {
|
||||
AigerFrontend() : Frontend("aiger", "read AIGER file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -996,7 +996,7 @@ struct AigerFrontend : public Frontend {
|
|||
log(" read XAIGER extensions\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
log_header(design, "Executing AIGER frontend.\n");
|
||||
|
||||
|
|
|
@ -322,12 +322,12 @@ namespace AST
|
|||
struct AstModule : RTLIL::Module {
|
||||
AstNode *ast;
|
||||
bool nolatches, nomeminit, nomem2reg, mem2reg, noblackbox, lib, nowb, noopt, icells, pwires, autowire;
|
||||
~AstModule() YS_OVERRIDE;
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, bool mayfail) YS_OVERRIDE;
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, const dict<RTLIL::IdString, RTLIL::Module*> &interfaces, const dict<RTLIL::IdString, RTLIL::IdString> &modports, bool mayfail) YS_OVERRIDE;
|
||||
~AstModule() override;
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, bool mayfail) override;
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, const dict<RTLIL::IdString, RTLIL::Module*> &interfaces, const dict<RTLIL::IdString, RTLIL::IdString> &modports, bool mayfail) override;
|
||||
std::string derive_common(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, AstNode **new_ast_out, bool quiet = false);
|
||||
void reprocess_module(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Module *> &local_interfaces) YS_OVERRIDE;
|
||||
RTLIL::Module *clone() const YS_OVERRIDE;
|
||||
void reprocess_module(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Module *> &local_interfaces) override;
|
||||
RTLIL::Module *clone() const override;
|
||||
void loadconfig() const;
|
||||
};
|
||||
|
||||
|
|
|
@ -586,7 +586,7 @@ error_with_reason:
|
|||
|
||||
struct BlifFrontend : public Frontend {
|
||||
BlifFrontend() : Frontend("blif", "read BLIF file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -602,7 +602,7 @@ struct BlifFrontend : public Frontend {
|
|||
log(" multi-bit port 'name'.\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
bool sop_mode = false;
|
||||
bool wideports = false;
|
||||
|
|
|
@ -35,7 +35,7 @@ YOSYS_NAMESPACE_BEGIN
|
|||
|
||||
struct IlangFrontend : public Frontend {
|
||||
IlangFrontend() : Frontend("ilang", "read modules from ilang file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -56,7 +56,7 @@ struct IlangFrontend : public Frontend {
|
|||
log(" only create empty blackbox modules\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
ILANG_FRONTEND::flag_nooverwrite = false;
|
||||
ILANG_FRONTEND::flag_overwrite = false;
|
||||
|
|
|
@ -535,7 +535,7 @@ void json_import(Design *design, string &modname, JsonNode *node)
|
|||
|
||||
struct JsonFrontend : public Frontend {
|
||||
JsonFrontend() : Frontend("json", "read JSON file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -545,7 +545,7 @@ struct JsonFrontend : public Frontend {
|
|||
log("for a description of the file format.\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
log_header(design, "Executing JSON frontend.\n");
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ void parse_type_map(std::map<std::string, std::tuple<int, int, bool>> &type_map,
|
|||
|
||||
struct LibertyFrontend : public Frontend {
|
||||
LibertyFrontend() : Frontend("liberty", "read cells from liberty file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -486,7 +486,7 @@ struct LibertyFrontend : public Frontend {
|
|||
log(" set the specified attribute (to the value 1) on all loaded modules\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
bool flag_lib = false;
|
||||
bool flag_nooverwrite = false;
|
||||
|
|
|
@ -157,7 +157,7 @@ struct RpcServer {
|
|||
struct RpcModule : RTLIL::Module {
|
||||
std::shared_ptr<RpcServer> server;
|
||||
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, bool /*mayfail*/) YS_OVERRIDE {
|
||||
RTLIL::IdString derive(RTLIL::Design *design, const dict<RTLIL::IdString, RTLIL::Const> ¶meters, bool /*mayfail*/) override {
|
||||
std::string stripped_name = name.str();
|
||||
if (stripped_name.compare(0, 9, "$abstract") == 0)
|
||||
stripped_name = stripped_name.substr(9);
|
||||
|
@ -229,7 +229,7 @@ struct RpcModule : RTLIL::Module {
|
|||
return derived_name;
|
||||
}
|
||||
|
||||
RTLIL::Module *clone() const YS_OVERRIDE {
|
||||
RTLIL::Module *clone() const override {
|
||||
RpcModule *new_mod = new RpcModule;
|
||||
new_mod->server = server;
|
||||
cloneInto(new_mod);
|
||||
|
@ -250,7 +250,7 @@ struct HandleRpcServer : RpcServer {
|
|||
HandleRpcServer(const std::string &name, HANDLE hsend, HANDLE hrecv)
|
||||
: RpcServer(name), hsend(hsend), hrecv(hrecv) { }
|
||||
|
||||
void write(const std::string &data) YS_OVERRIDE {
|
||||
void write(const std::string &data) override {
|
||||
log_assert(data.length() >= 1 && data.find('\n') == data.length() - 1);
|
||||
ssize_t offset = 0;
|
||||
do {
|
||||
|
@ -261,7 +261,7 @@ struct HandleRpcServer : RpcServer {
|
|||
} while(offset < (ssize_t)data.length());
|
||||
}
|
||||
|
||||
std::string read() YS_OVERRIDE {
|
||||
std::string read() override {
|
||||
std::string data;
|
||||
ssize_t offset = 0;
|
||||
while (data.length() == 0 || data[data.length() - 1] != '\n') {
|
||||
|
@ -304,7 +304,7 @@ struct FdRpcServer : RpcServer {
|
|||
log_cmd_error("RPC frontend terminated unexpectedly\n");
|
||||
}
|
||||
|
||||
void write(const std::string &data) YS_OVERRIDE {
|
||||
void write(const std::string &data) override {
|
||||
log_assert(data.length() >= 1 && data.find('\n') == data.length() - 1);
|
||||
ssize_t offset = 0;
|
||||
do {
|
||||
|
@ -316,7 +316,7 @@ struct FdRpcServer : RpcServer {
|
|||
} while(offset < (ssize_t)data.length());
|
||||
}
|
||||
|
||||
std::string read() YS_OVERRIDE {
|
||||
std::string read() override {
|
||||
std::string data;
|
||||
ssize_t offset = 0;
|
||||
while (data.length() == 0 || data[data.length() - 1] != '\n') {
|
||||
|
@ -346,7 +346,7 @@ struct FdRpcServer : RpcServer {
|
|||
// RpcFrontend does not inherit from Frontend since it does not read files.
|
||||
struct RpcFrontend : public Pass {
|
||||
RpcFrontend() : Pass("connect_rpc", "connect to RPC frontend") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -390,7 +390,7 @@ struct RpcFrontend : public Pass {
|
|||
log(" so the response should be the same whenever the same set of parameters\n");
|
||||
log(" is provided.\n");
|
||||
}
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
log_header(design, "Connecting to RPC frontend.\n");
|
||||
|
||||
|
|
|
@ -2008,7 +2008,7 @@ bool check_noverific_env()
|
|||
|
||||
struct VerificPass : public Pass {
|
||||
VerificPass() : Pass("verific", "load Verilog and VHDL designs using Verific") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -2147,7 +2147,7 @@ struct VerificPass : public Pass {
|
|||
log("\n");
|
||||
}
|
||||
#ifdef YOSYS_ENABLE_VERIFIC
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
static bool set_verific_global_flags = true;
|
||||
|
||||
|
@ -2582,7 +2582,7 @@ struct VerificPass : public Pass {
|
|||
|
||||
}
|
||||
#else /* YOSYS_ENABLE_VERIFIC */
|
||||
void execute(std::vector<std::string>, RTLIL::Design *) YS_OVERRIDE {
|
||||
void execute(std::vector<std::string>, RTLIL::Design *) override {
|
||||
log_cmd_error("This version of Yosys is built without Verific support.\n"
|
||||
"\n"
|
||||
"Use Symbiotic EDA Suite if you need Yosys+Verifc.\n"
|
||||
|
@ -2596,7 +2596,7 @@ struct VerificPass : public Pass {
|
|||
|
||||
struct ReadPass : public Pass {
|
||||
ReadPass() : Pass("read", "load HDL designs") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -2637,7 +2637,7 @@ struct ReadPass : public Pass {
|
|||
log("Verific support. The default is to use Verific if it is available.\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
#ifdef YOSYS_ENABLE_VERIFIC
|
||||
static bool verific_available = !check_noverific_env();
|
||||
|
|
|
@ -67,7 +67,7 @@ static void add_package_types(dict<std::string, AST::AstNode *> &user_types, std
|
|||
|
||||
struct VerilogFrontend : public Frontend {
|
||||
VerilogFrontend() : Frontend("verilog", "read modules from Verilog file") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -232,7 +232,7 @@ struct VerilogFrontend : public Frontend {
|
|||
log("supported by the Yosys Verilog front-end.\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
bool flag_dump_ast1 = false;
|
||||
bool flag_dump_ast2 = false;
|
||||
|
@ -503,7 +503,7 @@ struct VerilogFrontend : public Frontend {
|
|||
|
||||
struct VerilogDefaults : public Pass {
|
||||
VerilogDefaults() : Pass("verilog_defaults", "set default options for read_verilog") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -524,7 +524,7 @@ struct VerilogDefaults : public Pass {
|
|||
log("not imply -clear.\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::vector<std::string> args, RTLIL::Design*) YS_OVERRIDE
|
||||
void execute(std::vector<std::string> args, RTLIL::Design*) override
|
||||
{
|
||||
if (args.size() < 2)
|
||||
cmd_error(args, 1, "Missing argument.");
|
||||
|
@ -561,7 +561,7 @@ struct VerilogDefaults : public Pass {
|
|||
|
||||
struct VerilogDefines : public Pass {
|
||||
VerilogDefines() : Pass("verilog_defines", "define and undefine verilog defines") { }
|
||||
void help() YS_OVERRIDE
|
||||
void help() override
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -583,7 +583,7 @@ struct VerilogDefines : public Pass {
|
|||
log(" list currently defined preprocessor symbols\n");
|
||||
log("\n");
|
||||
}
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) override
|
||||
{
|
||||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue