Set negative absolute SDF delays to zero.

The SDF standard allows negative absolute delays, but simulation
tools cannot handle this so set negative delays to zero.
(cherry picked from commit 301bbe94a0)
This commit is contained in:
Cary R 2010-04-01 17:46:43 -07:00 committed by Stephen Williams
parent a0681e580f
commit 65ba9c3bf5
1 changed files with 4 additions and 0 deletions

View File

@ -194,6 +194,10 @@ void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst,
delay_vals[idx].type = vpiScaledRealTime; delay_vals[idx].type = vpiScaledRealTime;
if (delval_list->val[idx].defined) { if (delval_list->val[idx].defined) {
delay_vals[idx].real = delval_list->val[idx].value; delay_vals[idx].real = delval_list->val[idx].value;
/* Simulation cannot support negative delays. */
if (delay_vals[idx].real < 0.0) {
delay_vals[idx].real = 0.0;
}
} }
} }