Support part writes into part select nodes.
This commit is contained in:
parent
21522c90bc
commit
f5a204720d
25
vvp/part.cc
25
vvp/part.cc
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ident "$Id: part.cc,v 1.11 2006/05/01 18:44:08 steve Exp $"
|
#ident "$Id: part.cc,v 1.12 2006/11/16 01:11:26 steve Exp $"
|
||||||
|
|
||||||
# include "compile.h"
|
# include "compile.h"
|
||||||
# include "part.h"
|
# include "part.h"
|
||||||
|
|
@ -53,6 +53,26 @@ void vvp_fun_part::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle the case that the part select node is actually fed by a part
|
||||||
|
* select assignment. It's not exactly clear what might make this
|
||||||
|
* happen, but is does seem to happen and this should have sell
|
||||||
|
* defined behavior.
|
||||||
|
*/
|
||||||
|
void vvp_fun_part::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 = val_;
|
||||||
|
if (tmp.size() == 0)
|
||||||
|
tmp = vvp_vector4_t(vwid);
|
||||||
|
|
||||||
|
assert(tmp.size() == vwid);
|
||||||
|
tmp.set_vec(base, bit);
|
||||||
|
recv_vec4(port, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
void vvp_fun_part::run_run()
|
void vvp_fun_part::run_run()
|
||||||
{
|
{
|
||||||
vvp_net_t*ptr = net_;
|
vvp_net_t*ptr = net_;
|
||||||
|
|
@ -180,6 +200,9 @@ void compile_part_select_var(char*label, char*source, char*var,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: part.cc,v $
|
* $Log: part.cc,v $
|
||||||
|
* Revision 1.12 2006/11/16 01:11:26 steve
|
||||||
|
* Support part writes into part select nodes.
|
||||||
|
*
|
||||||
* Revision 1.11 2006/05/01 18:44:08 steve
|
* Revision 1.11 2006/05/01 18:44:08 steve
|
||||||
* Reduce steps to make logic output.
|
* Reduce steps to make logic output.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ident "$Id: part.h,v 1.1 2005/09/20 00:51:53 steve Exp $"
|
#ident "$Id: part.h,v 1.2 2006/11/16 01:11:26 steve Exp $"
|
||||||
|
|
||||||
# include "schedule.h"
|
# include "schedule.h"
|
||||||
|
|
||||||
|
|
@ -37,6 +37,9 @@ class vvp_fun_part : public vvp_net_fun_t, private vvp_gen_event_s {
|
||||||
public:
|
public:
|
||||||
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit);
|
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:
|
private:
|
||||||
void run_run();
|
void run_run();
|
||||||
|
|
||||||
|
|
@ -92,6 +95,9 @@ class vvp_fun_part_var : public vvp_net_fun_t {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: part.h,v $
|
* $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
|
* Revision 1.1 2005/09/20 00:51:53 steve
|
||||||
* Lazy processing of vvp_fun_part functor.
|
* Lazy processing of vvp_fun_part functor.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue