kernel: add SwitchRule signal_src

(cherry picked from commit 53585db9f7)
This commit is contained in:
Emil J. Tywoniak
2026-07-20 15:01:30 +02:00
parent 4f9fa58efa
commit 3d2e268154
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -704,6 +704,7 @@ struct AST_INTERNAL::ProcessGenerator
sw->module = current_module;
set_src_attr(sw, ast);
sw->signal = ast->children[0]->genWidthRTLIL(width_hint, sign_hint, &subst_rvalue_map.stdmap());
sw->signal_src = current_module->design->twines.add(Twine{ast->children[0]->loc_string()});
current_case->switches.push_back(sw);
for (auto &attr : ast->attributes) {
+1
View File
@@ -2563,6 +2563,7 @@ struct RTLIL::SwitchRule : public RTLIL::AttrObject
RTLIL::Module *module = nullptr;
RTLIL::SigSpec signal;
TwineRef signal_src = Twine::Null;
std::vector<RTLIL::CaseRule*> cases;
~SwitchRule();