ivl_target support for cassign.
This commit is contained in:
parent
82c0a2ebac
commit
ab9a853d52
2
ivl.def
2
ivl.def
|
|
@ -146,6 +146,8 @@ ivl_stmt_lval
|
|||
ivl_stmt_lvals
|
||||
ivl_stmt_lwidth
|
||||
ivl_stmt_name
|
||||
ivl_stmt_nexus
|
||||
ivl_stmt_nexus_count
|
||||
ivl_stmt_parm
|
||||
ivl_stmt_parm_count
|
||||
ivl_stmt_rval
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#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
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -935,6 +935,9 @@ extern unsigned ivl_stmt_lvals(ivl_statement_t net);
|
|||
extern unsigned ivl_stmt_lwidth(ivl_statement_t net);
|
||||
/* IVL_ST_STASK */
|
||||
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 */
|
||||
extern ivl_expr_t ivl_stmt_parm(ivl_statement_t net, unsigned idx);
|
||||
/* IVL_ST_STASK */
|
||||
|
|
@ -971,6 +974,9 @@ _END_DECL
|
|||
|
||||
/*
|
||||
* $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
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
|
|
|
|||
30
t-dll-api.cc
30
t-dll-api.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#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
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1349,6 +1349,31 @@ extern "C" const char* ivl_stmt_name(ivl_statement_t net)
|
|||
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)
|
||||
{
|
||||
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 $
|
||||
* 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
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.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
|
||||
|
||||
# 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].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;
|
||||
}
|
||||
|
||||
|
|
@ -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].idx = 0;
|
||||
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;
|
||||
}
|
||||
|
|
@ -713,6 +725,9 @@ void dll_target::proc_while(const NetWhile*net)
|
|||
|
||||
/*
|
||||
* $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
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
|
|
|
|||
7
t-dll.h
7
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.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
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -525,6 +525,8 @@ struct ivl_statement_s {
|
|||
struct { /* IVL_ST_CASSIGN, IVL_ST_DEASSIGN */
|
||||
unsigned lvals;
|
||||
struct ivl_lval_s*lval;
|
||||
unsigned npins;
|
||||
ivl_nexus_t*pins;
|
||||
} cassign_;
|
||||
|
||||
struct { /* IVL_ST_CONDIT */
|
||||
|
|
@ -580,6 +582,9 @@ struct ivl_statement_s {
|
|||
|
||||
/*
|
||||
* $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
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue