diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-30 19:37:12 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-30 19:37:12 +0200 |
commit | 2a1b08aeb34b7d5f2df1a43c9ef1f99abacb9cae (patch) | |
tree | 858accdb45dd772e8a9ffb8556e6faf6bca7b6f8 /kernel/rtlil.h | |
parent | 4724d94fbce587b39cd7343dc8de3b859311f55c (diff) | |
download | yosys-2a1b08aeb34b7d5f2df1a43c9ef1f99abacb9cae.tar.gz yosys-2a1b08aeb34b7d5f2df1a43c9ef1f99abacb9cae.tar.bz2 yosys-2a1b08aeb34b7d5f2df1a43c9ef1f99abacb9cae.zip |
Added design->scratchpad
Diffstat (limited to 'kernel/rtlil.h')
-rw-r--r-- | kernel/rtlil.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/rtlil.h b/kernel/rtlil.h index d58873570..e35c3c681 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -486,6 +486,7 @@ struct RTLIL::Monitor struct RTLIL::Design { std::set<RTLIL::Monitor*> monitors; + std::map<std::string, std::string> scratchpad; int refcount_modules_; std::map<RTLIL::IdString, RTLIL::Module*> modules_; @@ -508,6 +509,16 @@ struct RTLIL::Design RTLIL::Module *addModule(RTLIL::IdString name); void remove(RTLIL::Module *module); + void scratchpad_unset(std::string varname); + + void scratchpad_set_int(std::string varname, int value); + void scratchpad_set_bool(std::string varname, bool value); + void scratchpad_set_string(std::string varname, std::string value); + + int scratchpad_get_int(std::string varname, int default_value = 0) const; + bool scratchpad_get_bool(std::string varname, bool default_value = false) const; + std::string scratchpad_get_string(std::string varname, std::string default_value = std::string()) const; + void check(); void optimize(); |