ivl_target support for cassign.

This commit is contained in:
steve 2001-11-01 04:25:31 +00:00
parent 82c0a2ebac
commit ab9a853d52
5 changed files with 60 additions and 4 deletions

View File

@ -146,6 +146,8 @@ ivl_stmt_lval
ivl_stmt_lvals ivl_stmt_lvals
ivl_stmt_lwidth ivl_stmt_lwidth
ivl_stmt_name ivl_stmt_name
ivl_stmt_nexus
ivl_stmt_nexus_count
ivl_stmt_parm ivl_stmt_parm
ivl_stmt_parm_count ivl_stmt_parm_count
ivl_stmt_rval ivl_stmt_rval

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: ivl_target.h,v 1.86 2001/10/31 05:24:52 steve Exp $" #ident "$Id: ivl_target.h,v 1.87 2001/11/01 04:25:31 steve Exp $"
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
@ -935,6 +935,9 @@ extern unsigned ivl_stmt_lvals(ivl_statement_t net);
extern unsigned ivl_stmt_lwidth(ivl_statement_t net); extern unsigned ivl_stmt_lwidth(ivl_statement_t net);
/* IVL_ST_STASK */ /* IVL_ST_STASK */
extern const char* ivl_stmt_name(ivl_statement_t net); extern const char* ivl_stmt_name(ivl_statement_t net);
/* IVL_ST_CASSIGN */
extern ivl_nexus_t ivl_stmt_nexus(ivl_statement_t net, unsigned idx);
extern unsigned ivl_stmt_nexus_count(ivl_statement_t net);
/* IVL_ST_STASK */ /* IVL_ST_STASK */
extern ivl_expr_t ivl_stmt_parm(ivl_statement_t net, unsigned idx); extern ivl_expr_t ivl_stmt_parm(ivl_statement_t net, unsigned idx);
/* IVL_ST_STASK */ /* IVL_ST_STASK */
@ -971,6 +974,9 @@ _END_DECL
/* /*
* $Log: ivl_target.h,v $ * $Log: ivl_target.h,v $
* Revision 1.87 2001/11/01 04:25:31 steve
* ivl_target support for cassign.
*
* Revision 1.86 2001/10/31 05:24:52 steve * Revision 1.86 2001/10/31 05:24:52 steve
* ivl_target support for assign/deassign. * ivl_target support for assign/deassign.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-dll-api.cc,v 1.70 2001/10/31 05:24:52 steve Exp $" #ident "$Id: t-dll-api.cc,v 1.71 2001/11/01 04:25:31 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -1349,6 +1349,31 @@ extern "C" const char* ivl_stmt_name(ivl_statement_t net)
return 0; return 0;
} }
extern "C" ivl_nexus_t ivl_stmt_nexus(ivl_statement_t net, unsigned idx)
{
switch (net->type_) {
case IVL_ST_CASSIGN:
assert(idx < net->u_.cassign_.npins);
return net->u_.cassign_.pins[idx];
default:
assert(0);
}
return 0;
}
extern "C" unsigned ivl_stmt_nexus_count(ivl_statement_t net)
{
switch (net->type_) {
case IVL_ST_CASSIGN:
return net->u_.cassign_.npins;
default:
assert(0);
}
return 0;
}
extern "C" ivl_expr_t ivl_stmt_parm(ivl_statement_t net, unsigned idx) extern "C" ivl_expr_t ivl_stmt_parm(ivl_statement_t net, unsigned idx)
{ {
switch (net->type_) { switch (net->type_) {
@ -1409,6 +1434,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net)
/* /*
* $Log: t-dll-api.cc,v $ * $Log: t-dll-api.cc,v $
* Revision 1.71 2001/11/01 04:25:31 steve
* ivl_target support for cassign.
*
* Revision 1.70 2001/10/31 05:24:52 steve * Revision 1.70 2001/10/31 05:24:52 steve
* ivl_target support for assign/deassign. * ivl_target support for assign/deassign.
* *

View File

@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-dll-proc.cc,v 1.38 2001/10/31 05:24:52 steve Exp $" #ident "$Id: t-dll-proc.cc,v 1.39 2001/11/01 04:25:31 steve Exp $"
#endif #endif
# include "config.h" # include "config.h"
@ -408,6 +408,16 @@ bool dll_target::proc_cassign(const NetCAssign*net)
stmt_cur_->u_.cassign_.lval[0].idx = 0; stmt_cur_->u_.cassign_.lval[0].idx = 0;
stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig); stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig);
stmt_cur_->u_.cassign_.npins = net->pin_count();
stmt_cur_->u_.cassign_.pins = (ivl_nexus_t*)
calloc(stmt_cur_->u_.cassign_.npins, sizeof(ivl_nexus_t));
ivl_nexus_t*ntmp = stmt_cur_->u_.cassign_.pins;
for (unsigned idx = 0 ; idx < net->pin_count() ; idx += 1) {
ntmp[idx] = (ivl_nexus_t)net->pin(idx).nexus()->t_cookie();
assert(ntmp[idx]);
}
return true; return true;
} }
@ -453,6 +463,8 @@ bool dll_target::proc_deassign(const NetDeassign*net)
stmt_cur_->u_.cassign_.lval[0].type_ = IVL_LVAL_REG; stmt_cur_->u_.cassign_.lval[0].type_ = IVL_LVAL_REG;
stmt_cur_->u_.cassign_.lval[0].idx = 0; stmt_cur_->u_.cassign_.lval[0].idx = 0;
stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig); stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig);
stmt_cur_->u_.cassign_.npins = 0;
stmt_cur_->u_.cassign_.pins = 0;
return true; return true;
} }
@ -713,6 +725,9 @@ void dll_target::proc_while(const NetWhile*net)
/* /*
* $Log: t-dll-proc.cc,v $ * $Log: t-dll-proc.cc,v $
* Revision 1.39 2001/11/01 04:25:31 steve
* ivl_target support for cassign.
*
* Revision 1.38 2001/10/31 05:24:52 steve * Revision 1.38 2001/10/31 05:24:52 steve
* ivl_target support for assign/deassign. * ivl_target support for assign/deassign.
* *

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) && !defined(macintosh) #if !defined(WINNT) && !defined(macintosh)
#ident "$Id: t-dll.h,v 1.68 2001/10/31 05:24:52 steve Exp $" #ident "$Id: t-dll.h,v 1.69 2001/11/01 04:25:31 steve Exp $"
#endif #endif
# include "target.h" # include "target.h"
@ -525,6 +525,8 @@ struct ivl_statement_s {
struct { /* IVL_ST_CASSIGN, IVL_ST_DEASSIGN */ struct { /* IVL_ST_CASSIGN, IVL_ST_DEASSIGN */
unsigned lvals; unsigned lvals;
struct ivl_lval_s*lval; struct ivl_lval_s*lval;
unsigned npins;
ivl_nexus_t*pins;
} cassign_; } cassign_;
struct { /* IVL_ST_CONDIT */ struct { /* IVL_ST_CONDIT */
@ -580,6 +582,9 @@ struct ivl_statement_s {
/* /*
* $Log: t-dll.h,v $ * $Log: t-dll.h,v $
* Revision 1.69 2001/11/01 04:25:31 steve
* ivl_target support for cassign.
*
* Revision 1.68 2001/10/31 05:24:52 steve * Revision 1.68 2001/10/31 05:24:52 steve
* ivl_target support for assign/deassign. * ivl_target support for assign/deassign.
* *