From 03c31808e1280ca03aab0ffe89529c4dd0ae7929 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 28 Jan 2009 20:44:15 -0800 Subject: [PATCH] Make $sdf_annotate resilient to missing delay paths. The $sdf_annotate function needs to handle the special (and probably ver rare) case that there are no paths in the target module. --- vpi/sys_sdf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vpi/sys_sdf.c b/vpi/sys_sdf.c index a939fc433..d054478b6 100644 --- a/vpi/sys_sdf.c +++ b/vpi/sys_sdf.c @@ -132,7 +132,6 @@ void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst, return; vpiHandle iter = vpi_iterate(vpiModPath, sdf_cur_cell); - assert(iter); struct t_vpi_time delay_vals[12]; int idx; @@ -154,7 +153,7 @@ void sdf_iopath_delays(int vpi_edge, const char*src, const char*dst, the parser has found. */ vpiHandle path; int match_count = 0; - while ( (path = vpi_scan(iter)) ) { + if (iter) while ( (path = vpi_scan(iter)) ) { vpiHandle path_t_in = vpi_handle(vpiModPathIn,path); vpiHandle path_t_out = vpi_handle(vpiModPathOut,path);