Skip to content

Commit 8cdfbe4

Browse files
Merge pull request #420 from awaisabbas006/eda-3287
fix eda-3287
2 parents 59bbb38 + 12fe847 commit 8cdfbe4

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

src/rs-pack-dsp-regs.cc

+21-6
Original file line numberDiff line numberDiff line change
@@ -364,15 +364,30 @@ struct RsPackDspRegsWorker
364364
continue;
365365
}
366366
}
367-
if (ignore_dsp){
368-
continue;
367+
RTLIL::Const DSP_RST_POL;
368+
if (!gen)
369+
{
370+
DSP_RST_POL = it_dsp->getParam(RTLIL::escape_id("DSP_RST_POL"));
371+
log("DSP_Reset value = %d\n", DSP_RST_POL.as_int());
372+
if ((ignore_dsp) && !(DSP_RST_POL.as_int()))
373+
continue;
374+
// if DSP data ports is driven from DFFs add it in vector
375+
if (port_a_from_dff && port_b_from_dff && port_load_acc_from_dff && (!ignore_dsp || DSP_RST_POL.as_int() != 0))
376+
DSP_driven_only_by_DFF.push_back(it_dsp);
377+
}
378+
else
379+
{
380+
if (ignore_dsp)
381+
continue;
382+
// if DSP data ports is driven from DFFs add it in vector
383+
if (port_a_from_dff && port_b_from_dff && port_load_acc_from_dff && !ignore_dsp)
384+
DSP_driven_only_by_DFF.push_back(it_dsp);
369385
}
370386

371387
// if DSP data ports is driven from DFFs add it in vector
372-
if (port_a_from_dff && port_b_from_dff && port_load_acc_from_dff && !ignore_dsp) {
373-
DSP_driven_only_by_DFF.push_back(it_dsp);
374-
}
375-
if (1) {
388+
389+
if (1)
390+
{
376391
DSP_drives_DFF.push_back(it_dsp);
377392
}
378393
}

0 commit comments

Comments
 (0)