diff --git a/vvp/codes.h b/vvp/codes.h index 2eaae966b..7dcd43021 100644 --- a/vvp/codes.h +++ b/vvp/codes.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: codes.h,v 1.51 2002/09/18 04:29:55 steve Exp $" +#ident "$Id: codes.h,v 1.52 2002/11/07 02:32:39 steve Exp $" #endif @@ -74,6 +74,7 @@ extern bool of_JOIN(vthread_t thr, vvp_code_t code); extern bool of_LOAD(vthread_t thr, vvp_code_t code); extern bool of_LOAD_MEM(vthread_t thr, vvp_code_t code); extern bool of_LOAD_NX(vthread_t thr, vvp_code_t code); +extern bool of_LOAD_VEC(vthread_t thr, vvp_code_t code); extern bool of_LOAD_X(vthread_t thr, vvp_code_t code); extern bool of_MOD(vthread_t thr, vvp_code_t code); extern bool of_MOV(vthread_t thr, vvp_code_t code); @@ -89,6 +90,7 @@ extern bool of_ORR(vthread_t thr, vvp_code_t code); extern bool of_RELEASE(vthread_t thr, vvp_code_t code); extern bool of_SET(vthread_t thr, vvp_code_t code); extern bool of_SET_MEM(vthread_t thr, vvp_code_t code); +extern bool of_SET_VEC(vthread_t thr, vvp_code_t code); extern bool of_SET_X(vthread_t thr, vvp_code_t code); extern bool of_SHIFTL_I0(vthread_t thr, vvp_code_t code); extern bool of_SHIFTR_I0(vthread_t thr, vvp_code_t code); @@ -157,6 +159,9 @@ extern vvp_code_t codespace_index(vvp_cpoint_t ptr); /* * $Log: codes.h,v $ + * Revision 1.52 2002/11/07 02:32:39 steve + * Add vector set and load instructions. + * * Revision 1.51 2002/09/18 04:29:55 steve * Add support for binary NOR operator. * diff --git a/vvp/compile.cc b/vvp/compile.cc index 705ae24ff..2379bc376 100644 --- a/vvp/compile.cc +++ b/vvp/compile.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: compile.cc,v 1.143 2002/09/18 04:29:55 steve Exp $" +#ident "$Id: compile.cc,v 1.144 2002/11/07 02:32:39 steve Exp $" #endif # include "arith.h" @@ -119,6 +119,7 @@ const static struct opcode_table_s opcode_table[] = { { "%load", of_LOAD, 2, {OA_BIT1, OA_FUNC_PTR, OA_NONE} }, { "%load/m", of_LOAD_MEM,2, {OA_BIT1, OA_MEM_PTR, OA_NONE} }, { "%load/nx",of_LOAD_NX,3, {OA_BIT1, OA_VPI_PTR, OA_BIT2} }, + { "%load/v", of_LOAD_VEC,3, {OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%load/x", of_LOAD_X, 3, {OA_BIT1, OA_FUNC_PTR, OA_BIT2} }, { "%mod", of_MOD, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} }, { "%mov", of_MOV, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} }, @@ -134,6 +135,7 @@ const static struct opcode_table_s opcode_table[] = { { "%release",of_RELEASE,1, {OA_FUNC_PTR, OA_NONE, OA_NONE} }, { "%set", of_SET, 2, {OA_FUNC_PTR, OA_BIT1, OA_NONE} }, { "%set/m", of_SET_MEM,2, {OA_MEM_PTR, OA_BIT1, OA_NONE} }, + { "%set/v", of_SET_VEC,3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} }, { "%set/x", of_SET_X, 3, {OA_FUNC_PTR, OA_BIT1, OA_BIT2} }, { "%shiftl/i0", of_SHIFTL_I0, 2, {OA_BIT1,OA_NUMBER, OA_NONE} }, { "%shiftr/i0", of_SHIFTR_I0, 2, {OA_BIT1,OA_NUMBER, OA_NONE} }, @@ -1480,6 +1482,9 @@ void compile_net(char*label, char*name, int msb, int lsb, bool signed_flag, /* * $Log: compile.cc,v $ + * Revision 1.144 2002/11/07 02:32:39 steve + * Add vector set and load instructions. + * * Revision 1.143 2002/09/18 04:29:55 steve * Add support for binary NOR operator. * diff --git a/vvp/opcodes.txt b/vvp/opcodes.txt index 842505f2d..aa64177c3 100644 --- a/vvp/opcodes.txt +++ b/vvp/opcodes.txt @@ -1,7 +1,7 @@ /* * Copyright (c) 2001 Stephen Williams (steve@icarus.com) * - * $Id: opcodes.txt,v 1.42 2002/09/18 04:29:55 steve Exp $ + * $Id: opcodes.txt,v 1.43 2002/11/07 02:32:39 steve Exp $ */ @@ -297,6 +297,7 @@ ended, then the %join does not block or yield the thread. * %load , +* %load/v , , This instruction loads a value from the given functor output into the specified thread register bit. The functor-label can refer to a .net, @@ -304,6 +305,8 @@ a .var or a .functor, and may be indexed with array syntax to get at a functor within a vector of functors. This instruction loads only a single bit. +THe %load/v instruction is a vector version, that loads an entire +vector, starting at the given and functor. * %load/m , @@ -431,6 +434,7 @@ semantics. Like: * %set , +* %set/v , , This sets a bit of a variable, and is used to implement blocking assignments. The