From 65ba9c3bf50fe2d0c4184e966084f2c78bd00777 Mon Sep 17 00:00:00 2001 From: Cary R Date: Thu, 1 Apr 2010 17:46:43 -0700 Subject: [PATCH] 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 301bbe94a0a8902a651c3dfa297c3ced3a617e8a) --- vpi/sys_sdf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vpi/sys_sdf.c b/vpi/sys_sdf.c index feb6bdde1..3c999eba0 100644 --- a/vpi/sys_sdf.c +++ b/vpi/sys_sdf.c @@ -194,6 +194,10 @@ void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst, delay_vals[idx].type = vpiScaledRealTime; if (delval_list->val[idx].defined) { 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; + } } }