mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Added design->scratchpad
This commit is contained in:
parent
4724d94fbc
commit
2a1b08aeb3
10 changed files with 91 additions and 64 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue