From db25bba0d0b6130c0c89a89db52bf9490575c318 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 21 Jan 2008 19:57:17 -0800 Subject: [PATCH] Fix assertion fail handling certain conditional delays When conditional delays are in use, it is sometimes possible for there to be no delays available for a given input event. In that case, skip the delay processing for that case instead of crashing. --- vvp/delay.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vvp/delay.cc b/vvp/delay.cc index 9bcc2ed5e..a8396d493 100644 --- a/vvp/delay.cc +++ b/vvp/delay.cc @@ -387,6 +387,16 @@ void vvp_fun_modpath::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit) } } + /* Handle the special case that there are no delays that + match. This may happen, for example, if the set of + conditional delays is incomplete, leaving some cases + uncovered. In that case, just pass the data without delay */ + if (src == 0) { + cur_vec4_ = bit; + schedule_generic(this, 0, false); + return; + } + assert(src); vvp_time64_t out_at[12];