diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-04-01 14:58:11 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-04-01 14:58:11 +0200 |
commit | 32ee794bfb4aebbab10da4b620d9bece6e89035e (patch) | |
tree | 1e3be80b2628f1d4892aa666e130a12f93ca980d /kernel | |
parent | 5919bf5525f91231210d79bb04ca46e70c7b4d8d (diff) | |
download | yosys-32ee794bfb4aebbab10da4b620d9bece6e89035e.tar.gz yosys-32ee794bfb4aebbab10da4b620d9bece6e89035e.tar.bz2 yosys-32ee794bfb4aebbab10da4b620d9bece6e89035e.zip |
Added support for @<set-name> in expand select ops (%x, %ci, %co)
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/select.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/select.cc b/kernel/select.cc index 730f47b43..fa1c3db02 100644 --- a/kernel/select.cc +++ b/kernel/select.cc @@ -346,8 +346,18 @@ static void select_op_expand(RTLIL::Design *design, std::string arg, char mode) size_t endpos = arg.find(':', pos); if (endpos == std::string::npos) endpos = arg.size(); - if (int(endpos) > pos) - limits.insert(RTLIL::escape_id(arg.substr(pos, endpos-pos))); + if (int(endpos) > pos) { + std::string str = arg.substr(pos, endpos-pos); + if (str[0] == '@') { + str = RTLIL::escape_id(str.substr(1)); + if (design->selection_vars.count(str) > 0) { + for (auto i1 : design->selection_vars.at(str).selected_members) + for (auto i2 : i1.second) + limits.insert(i2); + } + } else + limits.insert(RTLIL::escape_id(str)); + } pos = endpos; } } |