Replace single release with release/net and release/reg.

This commit is contained in:
steve 2004-12-17 04:47:47 +00:00
parent 59bac26f4f
commit 26d97558c4
5 changed files with 57 additions and 38 deletions

View File

@ -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.68 2004/12/15 17:17:42 steve Exp $"
#ident "$Id: codes.h,v 1.69 2004/12/17 04:47:47 steve Exp $"
#endif
@ -97,7 +97,8 @@ extern bool of_NOR(vthread_t thr, vvp_code_t code);
extern bool of_NORR(vthread_t thr, vvp_code_t code);
extern bool of_OR(vthread_t thr, vvp_code_t code);
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_RELEASE_NET(vthread_t thr, vvp_code_t code);
extern bool of_RELEASE_REG(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_WORDR(vthread_t thr, vvp_code_t code);
@ -168,6 +169,9 @@ extern vvp_code_t codespace_null(void);
/*
* $Log: codes.h,v $
* Revision 1.69 2004/12/17 04:47:47 steve
* Replace single release with release/net and release/reg.
*
* Revision 1.68 2004/12/15 17:17:42 steve
* Add the force/v instruction.
*

View File

@ -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.177 2004/12/15 17:17:42 steve Exp $"
#ident "$Id: compile.cc,v 1.178 2004/12/17 04:47:47 steve Exp $"
#endif
# include "arith.h"
@ -143,7 +143,8 @@ const static struct opcode_table_s opcode_table[] = {
{ "%nor/r", of_NORR, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} },
{ "%or", of_OR, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} },
{ "%or/r", of_ORR, 3, {OA_BIT1, OA_BIT2, OA_NUMBER} },
{ "%release",of_RELEASE,1, {OA_FUNC_PTR, OA_NONE, OA_NONE} },
{ "%release/net",of_RELEASE_NET,1,{OA_FUNC_PTR,OA_NONE,OA_NONE} },
{ "%release/reg",of_RELEASE_REG,1,{OA_FUNC_PTR,OA_NONE,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/wr", of_SET_WORDR,2,{OA_VPI_PTR, OA_BIT1, OA_NONE} },
@ -1562,6 +1563,9 @@ void compile_param_string(char*label, char*name, char*str, char*value)
/*
* $Log: compile.cc,v $
* Revision 1.178 2004/12/17 04:47:47 steve
* Replace single release with release/net and release/reg.
*
* Revision 1.177 2004/12/15 17:17:42 steve
* Add the force/v instruction.
*

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: force.cc,v 1.10 2004/12/15 17:17:42 steve Exp $"
#ident "$Id: force.cc,v 1.11 2004/12/17 04:47:47 steve Exp $"
#endif
# include "codes.h"
@ -97,25 +97,6 @@ static bool release_force(vvp_ipoint_t itgt, functor_t tgt)
}
/*
* The %release instruction causes any force functors driving the
* target functor to be released.
*/
bool of_RELEASE(vthread_t thr, vvp_code_t cp)
{
#if 0
vvp_ipoint_t itgt = cp->iptr;
functor_t tgt = functor_index(itgt);
if (release_force(itgt, tgt))
tgt->enable(itgt);
#else
fprintf(stderr, "XXXX forgot how to implement %%release\n");
#endif
return true;
}
/*
** Variable functors receive %set or %assign-ed values at port[0].
** Continuous assignments are connected to port[1].
@ -171,6 +152,9 @@ bool var_functor_s::deassign(vvp_ipoint_t itgt)
/*
* $Log: force.cc,v $
* Revision 1.11 2004/12/17 04:47:47 steve
* Replace single release with release/net and release/reg.
*
* Revision 1.10 2004/12/15 17:17:42 steve
* Add the force/v instruction.
*

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 2001-2003 Stephen Williams (steve@icarus.com)
*
* $Id: opcodes.txt,v 1.57 2004/12/15 17:17:42 steve Exp $
* $Id: opcodes.txt,v 1.58 2004/12/17 04:47:47 steve Exp $
*/
@ -481,21 +481,17 @@ and the <dst> is a writable scalar. The <dst> gets the value of the
or of all the bits of the src vector.
* %release <functor-label>
* %release/net <functor-label>
* %release/reg <functor-label>
Release the force on the signal that is represented by the functor
<functor-label>. The force was previously activated with a %force
<functor-label>. The force was previously activated with a %force/v
statement. If no force was active on this functor the statement does
nothing. %release restores and propagates the normal value of the
previously forced functor. In case of a forced Verilog register, the
current value of the force expression should be %set to the .var
functor before the force is released, to comply with Verilog release
semantics. Like:
%load <bit>, <functor-label> ; get the forced value
%set <functor-label>, <bit> ; set the .var value
%release <functor-label> ; remove the force
nothing. The %release/net sends to the labeled functor the release
command with net semantics: the unforced value is propagated to the
output of the signal after the release is complete. The %release/reg
sends the release command with reg semantics: the signal holds its
forced value until another value propagates through.
* %set/v <var-label>, <bit>, <wid>

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: vthread.cc,v 1.124 2004/12/15 17:17:42 steve Exp $"
#ident "$Id: vthread.cc,v 1.125 2004/12/17 04:47:47 steve Exp $"
#endif
# include "config.h"
@ -2550,6 +2550,34 @@ bool of_NOR(vthread_t thr, vvp_code_t cp)
return true;
}
/*
* These implement the %release/net and %release/reg instructions. The
* %release/net instruction applies to a net kind of functor by
* sending the release/net command to the command port. (See vvp_net.h
* for details.) The %release/reg instruction is the same, but sends
* the release/reg command instead. These are very similar to the
* %deassign instruction.
*/
bool of_RELEASE_NET(vthread_t thr, vvp_code_t cp)
{
vvp_net_t*net = cp->net;
vvp_net_ptr_t ptr (net, 3);
vvp_send_long(ptr, 2);
return true;
}
bool of_RELEASE_REG(vthread_t thr, vvp_code_t cp)
{
vvp_net_t*net = cp->net;
vvp_net_ptr_t ptr (net, 3);
vvp_send_long(ptr, 3);
return true;
}
static const unsigned char strong_values[4] = {St0, St1, StX, HiZ};
bool of_SET_MEM(vthread_t thr, vvp_code_t cp)
@ -3007,6 +3035,9 @@ bool of_JOIN_UFUNC(vthread_t thr, vvp_code_t cp)
/*
* $Log: vthread.cc,v $
* Revision 1.125 2004/12/17 04:47:47 steve
* Replace single release with release/net and release/reg.
*
* Revision 1.124 2004/12/15 17:17:42 steve
* Add the force/v instruction.
*