mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-20 04:43:40 +00:00
Consistent use of 'override' for virtual methods in derived classes.
o Not all derived methods were marked 'override', but it is a great feature of C++11 that we should make use of. o While at it: touched header files got a -*- c++ -*- for emacs to provide support for that language. o use YS_OVERRIDE for all override keywords (though we should probably use the plain keyword going forward now that C++11 is established)
This commit is contained in:
parent
323f6f6f60
commit
3aa4484a3c
170 changed files with 414 additions and 416 deletions
|
@ -27,7 +27,7 @@ PRIVATE_NAMESPACE_BEGIN
|
|||
|
||||
struct FsmPass : public Pass {
|
||||
FsmPass() : Pass("fsm", "extract and optimize finite state machines") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -68,7 +68,7 @@ struct FsmPass : public Pass {
|
|||
log(" passed through to fsm_recode pass\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
bool flag_nomap = false;
|
||||
bool flag_norecode = false;
|
||||
|
|
|
@ -245,7 +245,7 @@ static void detect_fsm(RTLIL::Wire *wire)
|
|||
|
||||
struct FsmDetectPass : public Pass {
|
||||
FsmDetectPass() : Pass("fsm_detect", "finding FSMs in design") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -261,7 +261,7 @@ struct FsmDetectPass : public Pass {
|
|||
log("'fsm_encoding' attribute to \"none\".\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
log_header(design, "Executing FSM_DETECT pass (finding FSMs in design).\n");
|
||||
extra_args(args, 1, design);
|
||||
|
|
|
@ -265,7 +265,7 @@ struct FsmExpand
|
|||
|
||||
struct FsmExpandPass : public Pass {
|
||||
FsmExpandPass() : Pass("fsm_expand", "expand FSM cells by merging logic into it") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -279,7 +279,7 @@ struct FsmExpandPass : public Pass {
|
|||
log("word-wide cells. Call with -full to consider all cells for merging.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
bool full_mode = false;
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void write_kiss2(struct RTLIL::Module *module, struct RTLIL::Cell *cell, std::st
|
|||
*/
|
||||
struct FsmExportPass : public Pass {
|
||||
FsmExportPass() : Pass("fsm_export", "exporting FSMs to KISS2 files") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -143,7 +143,7 @@ struct FsmExportPass : public Pass {
|
|||
log(" use binary state encoding as state names instead of s0, s1, ...\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
dict<RTLIL::IdString, RTLIL::Const>::iterator attr_it;
|
||||
std::string arg;
|
||||
|
|
|
@ -401,7 +401,7 @@ static void extract_fsm(RTLIL::Wire *wire)
|
|||
|
||||
struct FsmExtractPass : public Pass {
|
||||
FsmExtractPass() : Pass("fsm_extract", "extracting FSMs in design") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -417,7 +417,7 @@ struct FsmExtractPass : public Pass {
|
|||
log("'opt_clean' pass to eliminate this signal.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
log_header(design, "Executing FSM_EXTRACT pass (extracting FSM from design).\n");
|
||||
extra_args(args, 1, design);
|
||||
|
|
|
@ -30,7 +30,7 @@ PRIVATE_NAMESPACE_BEGIN
|
|||
|
||||
struct FsmInfoPass : public Pass {
|
||||
FsmInfoPass() : Pass("fsm_info", "print information on finite state machines") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -41,7 +41,7 @@ struct FsmInfoPass : public Pass {
|
|||
log("pass so that this information is included in the synthesis log file.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
log_header(design, "Executing FSM_INFO pass (dumping all available information on FSM cells).\n");
|
||||
extra_args(args, 1, design);
|
||||
|
|
|
@ -322,7 +322,7 @@ static void map_fsm(RTLIL::Cell *fsm_cell, RTLIL::Module *module)
|
|||
|
||||
struct FsmMapPass : public Pass {
|
||||
FsmMapPass() : Pass("fsm_map", "mapping FSMs to basic logic") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -331,7 +331,7 @@ struct FsmMapPass : public Pass {
|
|||
log("This pass translates FSM cells to flip-flops and logic.\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
log_header(design, "Executing FSM_MAP pass (mapping FSMs to basic logic).\n");
|
||||
extra_args(args, 1, design);
|
||||
|
|
|
@ -323,7 +323,7 @@ PRIVATE_NAMESPACE_BEGIN
|
|||
|
||||
struct FsmOptPass : public Pass {
|
||||
FsmOptPass() : Pass("fsm_opt", "optimize finite state machines") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -334,7 +334,7 @@ struct FsmOptPass : public Pass {
|
|||
log("combination with the 'opt_clean' pass (see also 'help fsm').\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
log_header(design, "Executing FSM_OPT pass (simple optimizations of FSMs).\n");
|
||||
extra_args(args, 1, design);
|
||||
|
|
|
@ -126,7 +126,7 @@ static void fsm_recode(RTLIL::Cell *cell, RTLIL::Module *module, FILE *fm_set_fs
|
|||
|
||||
struct FsmRecodePass : public Pass {
|
||||
FsmRecodePass() : Pass("fsm_recode", "recoding finite state machines") { }
|
||||
virtual void help()
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
log("\n");
|
||||
|
@ -151,7 +151,7 @@ struct FsmRecodePass : public Pass {
|
|||
log(" .map <old_bitpattern> <new_bitpattern>\n");
|
||||
log("\n");
|
||||
}
|
||||
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
{
|
||||
FILE *fm_set_fsm_file = NULL;
|
||||
FILE *encfile = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue