From f5f104f8a612f5856600687eb80014490f890103 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 15 Aug 2009 15:59:20 +0100 Subject: [PATCH] Fix for pr2837451. pr2827132 changed the val_ field in vvp_fun_part_sa to only store the bit values for the selected part, not the entire source vector, but omitted to modify the recv_vec4_pv method to handle this change. This patch rectifies that omission. (cherry picked from commit 7c6176357f2a10751e2123f5a5efa812f4ce76b5) --- vvp/part.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/vvp/part.cc b/vvp/part.cc index 1dcc38735..51fe5395b 100644 --- a/vvp/part.cc +++ b/vvp/part.cc @@ -86,11 +86,8 @@ void vvp_fun_part_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit, { assert(bit.size() == wid); - vvp_vector4_t tmp = val_; - if (tmp.size() == 0) - tmp = vvp_vector4_t(vwid); - - assert(tmp.size() == vwid); + vvp_vector4_t tmp (vwid, BIT4_X); + tmp.set_vec(base_, val_); tmp.set_vec(base, bit); recv_vec4(port, tmp, 0); } @@ -179,11 +176,8 @@ void vvp_fun_part_aa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit, vvp_vector4_t*val = static_cast (vvp_get_context_item(context, context_idx_)); - vvp_vector4_t tmp = *val; - if (tmp.size() == 0) - tmp = vvp_vector4_t(vwid); - - assert(tmp.size() == vwid); + vvp_vector4_t tmp (vwid, BIT4_X); + tmp.set_vec(base_, *val); tmp.set_vec(base, bit); recv_vec4(port, tmp, context); } else {