Skip to content

Commit

Permalink
Add vvp_fun_part_var::recv_vec4_pv().
Browse files Browse the repository at this point in the history
Add missing vvp_fun_part_var::recv_vec4_pv() function. This is mostly
a duplicate of the _pv() routine from vvp_fun_part.
  • Loading branch information
caryr authored and steveicarus committed Mar 3, 2008
1 parent cb920bd commit 3221f70
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
17 changes: 15 additions & 2 deletions vvp/part.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2004 Stephen Williams ([email protected])
* Copyright (c) 2004-2008 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand All @@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ident "$Id: part.cc,v 1.12 2006/11/16 01:11:26 steve Exp $"

# include "compile.h"
# include "part.h"
Expand Down Expand Up @@ -154,6 +153,20 @@ void vvp_fun_part_var::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit)
}
}

void vvp_fun_part_var::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned wid, unsigned vwid)
{
assert(bit.size() == wid);

vvp_vector4_t tmp = source_;
if (tmp.size() == 0)
tmp = vvp_vector4_t(vwid);

assert(tmp.size() == vwid);
tmp.set_vec(base, bit);
recv_vec4(port, tmp);

}

/*
* Given a node functor, create a network node and link it into the
Expand Down
16 changes: 4 additions & 12 deletions vvp/part.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __part_H
#define __part_H
/*
* Copyright (c) 2005 Stephen Williams ([email protected])
* Copyright (c) 2005-2008 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
Expand All @@ -18,7 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ident "$Id: part.h,v 1.2 2006/11/16 01:11:26 steve Exp $"

# include "schedule.h"

Expand Down Expand Up @@ -84,6 +83,9 @@ class vvp_fun_part_var : public vvp_net_fun_t {
public:
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit);

void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned, unsigned, unsigned);

private:
unsigned base_;
unsigned wid_;
Expand All @@ -92,14 +94,4 @@ class vvp_fun_part_var : public vvp_net_fun_t {
vvp_vector4_t ref_;
};


/*
* $Log: part.h,v $
* Revision 1.2 2006/11/16 01:11:26 steve
* Support part writes into part select nodes.
*
* Revision 1.1 2005/09/20 00:51:53 steve
* Lazy processing of vvp_fun_part functor.
*
*/
#endif

0 comments on commit 3221f70

Please sign in to comment.