Add force to nets.
This commit is contained in:
parent
ea779ac7dd
commit
cc74d2a6b0
16
README.txt
16
README.txt
|
|
@ -307,8 +307,8 @@ constructs.
|
|||
|
||||
- trireg is not supported. tri0 and tri1 are supported.
|
||||
|
||||
- force to nets are not supported. Force to variables, and
|
||||
assign/deassign, are supported.
|
||||
- Module instance arrays are not supported, although gate instance
|
||||
arrays do work.
|
||||
|
||||
5.1 Nonstandard Constructs or Behaviors
|
||||
|
||||
|
|
@ -454,10 +454,10 @@ just the systems where precompiled binaries are publicly available.
|
|||
|
||||
6.2 TEST SUITE MANAGER
|
||||
|
||||
Steve Wilson <stevew@ka6s.com> or <stevew@intrinsix.com> has taken on
|
||||
the large task of managing the test suite. He has maintained the
|
||||
regression test scripts, the driver list, received submissions from
|
||||
myself and others, and has written a great many tests on his own. Any
|
||||
compiler writer, for any language, will tell you that the test suite
|
||||
is at least as important as the compiler code itself.
|
||||
Steve Wilson <stevew@ka6s.com> has taken on the large task of managing
|
||||
the test suite. He has maintained the regression test scripts, the
|
||||
driver list, received submissions from myself and others, and has
|
||||
written a great many tests on his own. Any compiler writer, for any
|
||||
language, will tell you that the test suite is at least as important
|
||||
as the compiler code itself.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: t-dll-proc.cc,v 1.50 2002/08/04 18:28:15 steve Exp $"
|
||||
#ident "$Id: t-dll-proc.cc,v 1.51 2002/08/07 00:54:39 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -528,18 +528,27 @@ bool dll_target::proc_force(const NetForce*net)
|
|||
assert(lsig);
|
||||
ivl_signal_t sig = find_signal(des_, lsig);
|
||||
assert(sig);
|
||||
if (sig->type_ != IVL_SIT_REG) {
|
||||
|
||||
ivl_lval_type_t ltype;
|
||||
switch (sig->type_) {
|
||||
case IVL_SIT_REG:
|
||||
ltype = IVL_LVAL_REG;
|
||||
break;
|
||||
case IVL_SIT_TRI:
|
||||
case IVL_SIT_TRI0:
|
||||
case IVL_SIT_TRI1:
|
||||
ltype = IVL_LVAL_NET;
|
||||
break;
|
||||
default:
|
||||
cerr << net->get_line() << ": internal error: Sorry, "
|
||||
<< "force to nets not supported by this target."
|
||||
<< endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(sig->type_ == IVL_SIT_REG);
|
||||
|
||||
stmt_cur_->u_.cassign_.lval[0].width_ = lsig->pin_count();
|
||||
stmt_cur_->u_.cassign_.lval[0].loff_ = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].type_ = IVL_LVAL_REG;
|
||||
stmt_cur_->u_.cassign_.lval[0].type_ = ltype;
|
||||
stmt_cur_->u_.cassign_.lval[0].idx = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].n.sig = sig;
|
||||
|
||||
|
|
@ -589,11 +598,28 @@ bool dll_target::proc_release(const NetRelease*net)
|
|||
const NetNet*lsig = net->lval();
|
||||
ivl_signal_t sig = find_signal(des_, lsig);
|
||||
assert(sig);
|
||||
assert(sig->type_ == IVL_SIT_REG);
|
||||
|
||||
ivl_lval_type_t ltype;
|
||||
switch (sig->type_) {
|
||||
case IVL_SIT_REG:
|
||||
ltype = IVL_LVAL_REG;
|
||||
break;
|
||||
case IVL_SIT_TRI:
|
||||
case IVL_SIT_TRI0:
|
||||
case IVL_SIT_TRI1:
|
||||
ltype = IVL_LVAL_NET;
|
||||
break;
|
||||
default:
|
||||
cerr << net->get_line() << ": internal error: Sorry, "
|
||||
<< "force/release to nets not supported by this target."
|
||||
<< endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
stmt_cur_->u_.cassign_.lval[0].width_ = lsig->pin_count();
|
||||
stmt_cur_->u_.cassign_.lval[0].loff_ = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].type_ = IVL_LVAL_REG;
|
||||
stmt_cur_->u_.cassign_.lval[0].type_ = ltype;
|
||||
stmt_cur_->u_.cassign_.lval[0].idx = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].n.sig = sig;
|
||||
|
||||
|
|
@ -786,6 +812,9 @@ void dll_target::proc_while(const NetWhile*net)
|
|||
|
||||
/*
|
||||
* $Log: t-dll-proc.cc,v $
|
||||
* Revision 1.51 2002/08/07 00:54:39 steve
|
||||
* Add force to nets.
|
||||
*
|
||||
* Revision 1.50 2002/08/04 18:28:15 steve
|
||||
* Do not use hierarchical names of memories to
|
||||
* generate vvp labels. -tdll target does not
|
||||
|
|
|
|||
6
t-dll.h
6
t-dll.h
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: t-dll.h,v 1.90 2002/08/05 04:18:45 steve Exp $"
|
||||
#ident "$Id: t-dll.h,v 1.91 2002/08/07 00:54:39 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -329,6 +329,7 @@ enum ivl_lval_type_t {
|
|||
IVL_LVAL_REG = 0,
|
||||
IVL_LVAL_MUX = 1,
|
||||
IVL_LVAL_MEM = 2,
|
||||
IVL_LVAL_NET = 3 /* Only force can have NET l-values */
|
||||
};
|
||||
|
||||
struct ivl_lval_s {
|
||||
|
|
@ -616,6 +617,9 @@ struct ivl_statement_s {
|
|||
|
||||
/*
|
||||
* $Log: t-dll.h,v $
|
||||
* Revision 1.91 2002/08/07 00:54:39 steve
|
||||
* Add force to nets.
|
||||
*
|
||||
* Revision 1.90 2002/08/05 04:18:45 steve
|
||||
* Store only the base name of memories.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT)
|
||||
#ident "$Id: vvp_process.c,v 1.61 2002/08/04 18:28:15 steve Exp $"
|
||||
#ident "$Id: vvp_process.c,v 1.62 2002/08/07 00:54:39 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "vvp_priv.h"
|
||||
|
|
@ -771,14 +771,19 @@ static int show_stmt_release(ivl_statement_t net)
|
|||
assert(ivl_lval_mux(lval) == 0);
|
||||
assert(ivl_lval_part_off(lval) == 0);
|
||||
|
||||
/* On release, reg variables hold the value that was forced on
|
||||
to them. */
|
||||
for (idx = 0 ; idx < ivl_lval_pins(lval) ; idx += 1) {
|
||||
fprintf(vvp_out, " %%load 4, V_%s[%u];\n",
|
||||
vvp_signal_label(lsig), idx);
|
||||
fprintf(vvp_out, " %%set V_%s[%u], 4;\n",
|
||||
vvp_signal_label(lsig), idx);
|
||||
if (ivl_signal_type(lsig) == IVL_SIT_REG) {
|
||||
fprintf(vvp_out, " %%load 4, V_%s[%u];\n",
|
||||
vvp_signal_label(lsig), idx);
|
||||
fprintf(vvp_out, " %%set V_%s[%u], 4;\n",
|
||||
vvp_signal_label(lsig), idx);
|
||||
}
|
||||
fprintf(vvp_out, " %%release V_%s[%u];\n",
|
||||
vvp_signal_label(lsig), idx);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1221,6 +1226,9 @@ int draw_func_definition(ivl_scope_t scope)
|
|||
|
||||
/*
|
||||
* $Log: vvp_process.c,v $
|
||||
* Revision 1.62 2002/08/07 00:54:39 steve
|
||||
* Add force to nets.
|
||||
*
|
||||
* Revision 1.61 2002/08/04 18:28:15 steve
|
||||
* Do not use hierarchical names of memories to
|
||||
* generate vvp labels. -tdll target does not
|
||||
|
|
|
|||
Loading…
Reference in New Issue