Implement recv_vec4_pv for event functors.
This commit is contained in:
parent
88668e3df5
commit
f0f35376cd
29
vvp/event.cc
29
vvp/event.cc
|
|
@ -271,6 +271,17 @@ void vvp_fun_edge_sa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
}
|
||||
}
|
||||
|
||||
void vvp_fun_edge_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
vvp_context_t)
|
||||
{
|
||||
assert(base == 0);
|
||||
if (recv_vec4_(port, bit, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4_pv(bit, base, wid, vwid, 0);
|
||||
}
|
||||
}
|
||||
|
||||
vvp_fun_edge_aa::vvp_fun_edge_aa(edge_t e)
|
||||
: vvp_fun_edge(e)
|
||||
{
|
||||
|
|
@ -422,6 +433,24 @@ void vvp_fun_anyedge_sa::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
}
|
||||
}
|
||||
|
||||
void vvp_fun_anyedge_sa::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
vvp_context_t)
|
||||
{
|
||||
vvp_vector4_t tmp = bits_[port.port()];
|
||||
if (tmp.size() == 0)
|
||||
tmp = vvp_vector4_t(vwid, BIT4_Z);
|
||||
assert(wid == bit.size());
|
||||
assert(base+wid <= vwid);
|
||||
assert(tmp.size() == vwid);
|
||||
tmp.set_vec(base, bit);
|
||||
|
||||
if (recv_vec4_(port, tmp, bits_[port.port()], threads_)) {
|
||||
vvp_net_t*net = port.ptr();
|
||||
net->send_vec4(bit, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void vvp_fun_anyedge_sa::recv_real(vvp_net_ptr_t port, double bit,
|
||||
vvp_context_t)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,6 +182,9 @@ class vvp_fun_edge_sa : public vvp_fun_edge {
|
|||
|
||||
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t context);
|
||||
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
vvp_context_t context);
|
||||
|
||||
private:
|
||||
vthread_t threads_;
|
||||
|
|
@ -252,6 +255,9 @@ class vvp_fun_anyedge_sa : public vvp_fun_anyedge {
|
|||
|
||||
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t context);
|
||||
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned base, unsigned wid, unsigned vwid,
|
||||
vvp_context_t context);
|
||||
|
||||
void recv_real(vvp_net_ptr_t port, double bit,
|
||||
vvp_context_t context);
|
||||
|
|
|
|||
Loading…
Reference in New Issue