From a3929330b075d92a79202c7ddec5b35a3eae27cf Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Mon, 11 Aug 2008 20:53:13 +0100 Subject: [PATCH] Fix regression caused by UDP delay patch translate_time_expr cannot be passed a NULL ivl_expr_t. --- tgt-vhdl/logic.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tgt-vhdl/logic.cc b/tgt-vhdl/logic.cc index 46cf26372..ca77c45d2 100644 --- a/tgt-vhdl/logic.cc +++ b/tgt-vhdl/logic.cc @@ -148,7 +148,11 @@ static void udp_logic(vhdl_arch *arch, ivl_net_logic_t log) vhdl_expr *value = new vhdl_const_bit(row[nin]); vhdl_expr *cond = new vhdl_const_bits(row, nin, false); - vhdl_expr *delay = translate_time_expr(ivl_logic_delay(log, 1)); + + ivl_expr_t delay_ex = ivl_logic_delay(log, 1); + vhdl_expr *delay = NULL; + if (delay_ex) + delay = translate_time_expr(delay_ex); ws->add_condition(value, cond, delay); }