diff options
author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-08-30 16:40:41 -0700 |
---|---|---|
committer | Andrew Zonenberg <azonenberg@drawersteak.com> | 2017-08-30 16:40:41 -0700 |
commit | 06754108fc3cc3d78e7b86d7093da110cc716224 (patch) | |
tree | 4493a1e34ce7b44cef1d836c05a40edad0b04f2d /kernel/rtlil.cc | |
parent | 634f18be961683917ca589bed1a44b8031f06764 (diff) | |
parent | c0034f51e6540ab945e88843bb20035bfa7b333b (diff) | |
download | yosys-06754108fc3cc3d78e7b86d7093da110cc716224.tar.gz yosys-06754108fc3cc3d78e7b86d7093da110cc716224.tar.bz2 yosys-06754108fc3cc3d78e7b86d7093da110cc716224.zip |
Merge branch 'master' of https://github.com/cliffordwolf/yosys into counter-extraction
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 4427303cc..f3522e30b 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -234,6 +234,22 @@ pool<string> RTLIL::AttrObject::get_strpool_attribute(RTLIL::IdString id) const return data; } +void RTLIL::AttrObject::set_src_attribute(const std::string &src) +{ + if (src.empty()) + attributes.erase("\\src"); + else + attributes["\\src"] = src; +} + +std::string RTLIL::AttrObject::get_src_attribute() const +{ + std::string src; + if (attributes.count("\\src")) + src = attributes.at("\\src").decode_string(); + return src; +} + bool RTLIL::Selection::selected_module(RTLIL::IdString mod_name) const { if (full_selection) |