mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-07 06:46:06 +00:00
rtlil: add source tracking to CaseRule actions
This commit is contained in:
parent
c45a035ebf
commit
304757c881
6 changed files with 15 additions and 14 deletions
|
|
@ -311,7 +311,7 @@ struct ProcArstPass : public Pass {
|
|||
if (arst_sig.size()) {
|
||||
log("Added global reset to process %s: %s <- %s\n",
|
||||
proc->name.c_str(), log_signal(arst_sig), log_signal(arst_val));
|
||||
arst_actions.push_back({arst_sig, arst_val});
|
||||
arst_actions.push_back({arst_sig, arst_val, act.src});
|
||||
}
|
||||
}
|
||||
if (!arst_actions.empty()) {
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ void proc_dff(RTLIL::Module *mod, RTLIL::Process *proc, ConstEval &ce)
|
|||
single_async_rule.type = RTLIL::SyncType::ST1;
|
||||
single_async_rule.signal = mod->ReduceOr(NEW_ID, triggers);
|
||||
// TODO
|
||||
single_async_rule.actions.push_back({sig, rstval});
|
||||
single_async_rule.actions.push_back({sig, rstval, Const("")});
|
||||
|
||||
// Replace existing rules with this new rule
|
||||
async_rules.clear();
|
||||
|
|
|
|||
|
|
@ -197,16 +197,16 @@ struct RomWorker
|
|||
if (abits == GetSize(sw->signal)) {
|
||||
sw->signal = SigSpec();
|
||||
RTLIL::CaseRule *cs = new RTLIL::CaseRule;
|
||||
cs->actions.push_back({lhs, rdata});
|
||||
cs->actions.push_back({lhs, rdata, std::move(action_src)});
|
||||
sw->cases.push_back(cs);
|
||||
} else {
|
||||
sw->signal = sw->signal.extract_end(abits);
|
||||
RTLIL::CaseRule *cs = new RTLIL::CaseRule;
|
||||
cs->compare.push_back(Const(State::S0, GetSize(sw->signal)));
|
||||
cs->actions.push_back({lhs, rdata});
|
||||
cs->actions.push_back({lhs, rdata, action_src});
|
||||
sw->cases.push_back(cs);
|
||||
RTLIL::CaseRule *cs2 = new RTLIL::CaseRule;
|
||||
cs2->actions.push_back({lhs, default_val});
|
||||
cs2->actions.push_back({lhs, default_val, std::move(action_src)});
|
||||
sw->cases.push_back(cs2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue