From 3b8dc81a97ec73c016c68bd00f21c04ce83ec899 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 27 Aug 2008 18:25:03 -0700 Subject: [PATCH] By default convert a recv_vec8_pv to a recv_vec4_pv Assume that anything that is strength aware already handles a recv_vec8_pv and make the default function convert the bits to a vec4 and then call recv_vec4_pv with this new value. --- vvp/vvp_net.cc | 11 ++++------- vvp/vvp_net.h | 5 +++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/vvp/vvp_net.cc b/vvp/vvp_net.cc index a9d9df79c..f921e014c 100644 --- a/vvp/vvp_net.cc +++ b/vvp/vvp_net.cc @@ -2144,22 +2144,19 @@ void vvp_net_fun_t::recv_vec4(vvp_net_ptr_t, const vvp_vector4_t&) assert(0); } -void vvp_net_fun_t::recv_vec4_pv(vvp_net_ptr_t, const vvp_vector4_t&bits, +void vvp_net_fun_t::recv_vec4_pv(vvp_net_ptr_t, const vvp_vector4_t&bit, unsigned base, unsigned wid, unsigned vwid) { cerr << "internal error: " << typeid(*this).name() << ": " - << "recv_vec4_pv(" << bits << ", " << base + << "recv_vec4_pv(" << bit << ", " << base << ", " << wid << ", " << vwid << ") not implemented" << endl; assert(0); } -void vvp_net_fun_t::recv_vec8_pv(vvp_net_ptr_t, const vvp_vector8_t&bits, +void vvp_net_fun_t::recv_vec8_pv(vvp_net_ptr_t port, const vvp_vector8_t&bit, unsigned base, unsigned wid, unsigned vwid) { - cerr << "internal error: " << typeid(*this).name() << ": " - << "recv_vec8_pv(" << bits << ", " << base - << ", " << wid << ", " << vwid << ") not implemented" << endl; - assert(0); + recv_vec4_pv(port, reduce4(bit), base, wid, vwid); } void vvp_net_fun_t::recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) diff --git a/vvp/vvp_net.h b/vvp/vvp_net.h index 1297564e8..b9b3bfb6c 100644 --- a/vvp/vvp_net.h +++ b/vvp/vvp_net.h @@ -859,8 +859,9 @@ struct vvp_net_t { * port. The value is a vvp_vector4_t. * * Most nodes do not care about the specific strengths of bits, so the - * default behavior for recv_vec8 is to reduce the operand to a - * vvp_vector4_t and pass it on to the recv_vec4 method. + * default behavior for recv_vec8 and recv_vec8_pv is to reduce the + * operand to a vvp_vector4_t and pass it on to the recv_vec4 or + * recv_vec4_pv method. */ class vvp_net_fun_t {