3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-22 13:53:40 +00:00

rtlil: add AttrObject::{get,set}_string_attribute.

And make {get,set}_src_attribute use those functions.
This commit is contained in:
whitequark 2020-04-16 21:43:03 +00:00
parent b4b2345a10
commit ff7a1a1568
2 changed files with 26 additions and 19 deletions

View file

@ -663,12 +663,19 @@ struct RTLIL::AttrObject
return get_bool_attribute(ID::blackbox) || (!ignore_wb && get_bool_attribute(ID::whitebox));
}
void set_string_attribute(RTLIL::IdString id, string value);
string get_string_attribute(RTLIL::IdString id) const;
void set_strpool_attribute(RTLIL::IdString id, const pool<string> &data);
void add_strpool_attribute(RTLIL::IdString id, const pool<string> &data);
pool<string> get_strpool_attribute(RTLIL::IdString id) const;
void set_src_attribute(const std::string &src);
std::string get_src_attribute() const;
void set_src_attribute(const std::string &src) {
set_string_attribute(ID::src, src);
}
std::string get_src_attribute() const {
return get_string_attribute(ID::src);
}
};
struct RTLIL::SigChunk