3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-16 19:06:18 +00:00

get_field_names for structs

This commit is contained in:
Gus Smith 2025-05-17 14:10:23 -07:00
parent 388955031f
commit fd5918c811

View file

@ -114,6 +114,13 @@ public:
size_t i = field_names.at(name);
return list(fields[i].accessor, std::move(record));
}
std::vector<std::string> get_field_names()
{
std::vector<std::string> names;
for (auto field : fields)
names.push_back(field.name);
return names;
}
};
std::string smt_const(RTLIL::Const const &c) {