mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-06 19:21:23 +00:00
Do not SigSpec::extract() beyond bounds
This commit is contained in:
parent
e3d898dccb
commit
d90b8b081a
2 changed files with 10 additions and 8 deletions
|
@ -224,11 +224,11 @@ void create_ice40_dsp(ice40_dsp_pm &pm)
|
|||
pm.autoremove(st.ffH);
|
||||
pm.autoremove(st.addAB);
|
||||
if (st.ffO_lo) {
|
||||
SigSpec O = st.sigO.extract(0,16);
|
||||
SigSpec O = st.sigO.extract(0,GetSize(st.ffO_lo));
|
||||
st.ffO_lo->connections_.at("\\Q").replace(O, pm.module->addWire(NEW_ID, GetSize(O)));
|
||||
}
|
||||
if (st.ffO_hi) {
|
||||
SigSpec O = st.sigO.extract(16,16);
|
||||
SigSpec O = st.sigO.extract(16,GetSize(st.ffo_hi));
|
||||
st.ffO_hi->connections_.at("\\Q").replace(O, pm.module->addWire(NEW_ID, GetSize(O)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue