ivl_target support for assign/deassign.
This commit is contained in:
parent
a75326e2e0
commit
75e78e86d3
13
ivl_target.h
13
ivl_target.h
|
|
@ -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.85 2001/10/19 21:53:24 steve Exp $"
|
||||
#ident "$Id: ivl_target.h,v 1.86 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -272,12 +272,16 @@ typedef enum ivl_statement_type_e {
|
|||
IVL_ST_CASE,
|
||||
IVL_ST_CASEX,
|
||||
IVL_ST_CASEZ,
|
||||
IVL_ST_CASSIGN,
|
||||
IVL_ST_CONDIT,
|
||||
IVL_ST_DEASSIGN,
|
||||
IVL_ST_DELAY,
|
||||
IVL_ST_DELAYX,
|
||||
IVL_ST_DISABLE,
|
||||
IVL_ST_FORCE,
|
||||
IVL_ST_FOREVER,
|
||||
IVL_ST_FORK,
|
||||
IVL_ST_RELEASE,
|
||||
IVL_ST_REPEAT,
|
||||
IVL_ST_STASK,
|
||||
IVL_ST_TRIGGER,
|
||||
|
|
@ -923,9 +927,9 @@ extern ivl_expr_t ivl_stmt_delay_expr(ivl_statement_t net);
|
|||
extern unsigned long ivl_stmt_delay_val(ivl_statement_t net);
|
||||
/* IVL_ST_WAIT */
|
||||
extern ivl_event_t ivl_stmt_event(ivl_statement_t net);
|
||||
/* IVL_ST_ASSIGN IVL_ST_ASSIGN_NB */
|
||||
/* IVL_ST_ASSIGN IVL_ST_ASSIGN_NB IVL_ST_CASSIGN IVL_ST_DEASSIGN */
|
||||
extern ivl_lval_t ivl_stmt_lval(ivl_statement_t net, unsigned idx);
|
||||
/* IVL_ST_ASSIGN IVL_ST_ASSIGN_NB */
|
||||
/* IVL_ST_ASSIGN IVL_ST_ASSIGN_NB IVL_ST_CASSIGN IVL_ST_DEASSIGN */
|
||||
extern unsigned ivl_stmt_lvals(ivl_statement_t net);
|
||||
/* IVL_ST_ASSIGN IVL_ST_ASSIGN_NB */
|
||||
extern unsigned ivl_stmt_lwidth(ivl_statement_t net);
|
||||
|
|
@ -967,6 +971,9 @@ _END_DECL
|
|||
|
||||
/*
|
||||
* $Log: ivl_target.h,v $
|
||||
* Revision 1.86 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.85 2001/10/19 21:53:24 steve
|
||||
* Support multiple root modules (Philip Blundell)
|
||||
*
|
||||
|
|
|
|||
10
net_force.cc
10
net_force.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: net_force.cc,v 1.4 2001/10/28 01:14:53 steve Exp $"
|
||||
#ident "$Id: net_force.cc,v 1.5 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -59,6 +59,11 @@ NetCAssign::~NetCAssign()
|
|||
lval_->decr_eref();
|
||||
}
|
||||
|
||||
const NetNet* NetCAssign::lval() const
|
||||
{
|
||||
return lval_;
|
||||
}
|
||||
|
||||
const Link& NetCAssign::lval_pin(unsigned idx) const
|
||||
{
|
||||
assert(idx < lval_->pin_count());
|
||||
|
|
@ -117,6 +122,9 @@ const NetNet*NetRelease::lval() const
|
|||
|
||||
/*
|
||||
* $Log: net_force.cc,v $
|
||||
* Revision 1.5 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.4 2001/10/28 01:14:53 steve
|
||||
* NetObj constructor finally requires a scope.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#if !defined(WINNT) && !defined(macintosh)
|
||||
#ident "$Id: netlist.h,v 1.219 2001/10/28 01:14:53 steve Exp $"
|
||||
#ident "$Id: netlist.h,v 1.220 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -1425,6 +1425,8 @@ class NetCAssign : public NetProc, public NetNode {
|
|||
virtual void dump_node(ostream&, unsigned ind) const;
|
||||
virtual bool emit_node(struct target_t*) const;
|
||||
|
||||
const NetNet*lval() const;
|
||||
|
||||
private:
|
||||
NetNet*lval_;
|
||||
|
||||
|
|
@ -2849,6 +2851,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
|||
|
||||
/*
|
||||
* $Log: netlist.h,v $
|
||||
* Revision 1.220 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.219 2001/10/28 01:14:53 steve
|
||||
* NetObj constructor finally requires a scope.
|
||||
*
|
||||
|
|
|
|||
16
t-dll-api.cc
16
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.69 2001/10/19 21:53:24 steve Exp $"
|
||||
#ident "$Id: t-dll-api.cc,v 1.70 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1282,6 +1282,12 @@ extern "C" ivl_lval_t ivl_stmt_lval(ivl_statement_t net, unsigned idx)
|
|||
case IVL_ST_ASSIGN_NB:
|
||||
assert(idx < net->u_.assign_.lvals_);
|
||||
return net->u_.assign_.lval_ + idx;
|
||||
|
||||
case IVL_ST_CASSIGN:
|
||||
case IVL_ST_DEASSIGN:
|
||||
assert(idx < net->u_.cassign_.lvals);
|
||||
return net->u_.cassign_.lval + idx;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -1294,6 +1300,11 @@ extern "C" unsigned ivl_stmt_lvals(ivl_statement_t net)
|
|||
case IVL_ST_ASSIGN:
|
||||
case IVL_ST_ASSIGN_NB:
|
||||
return net->u_.assign_.lvals_;
|
||||
|
||||
case IVL_ST_CASSIGN:
|
||||
case IVL_ST_DEASSIGN:
|
||||
return net->u_.cassign_.lvals;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
@ -1398,6 +1409,9 @@ extern "C" ivl_statement_t ivl_stmt_sub_stmt(ivl_statement_t net)
|
|||
|
||||
/*
|
||||
* $Log: t-dll-api.cc,v $
|
||||
* Revision 1.70 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.69 2001/10/19 21:53:24 steve
|
||||
* Support multiple root modules (Philip Blundell)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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.37 2001/10/30 02:52:07 steve Exp $"
|
||||
#ident "$Id: t-dll-proc.cc,v 1.38 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -390,7 +390,25 @@ void dll_target::proc_case(const NetCase*net)
|
|||
|
||||
bool dll_target::proc_cassign(const NetCAssign*net)
|
||||
{
|
||||
return false;
|
||||
|
||||
assert(stmt_cur_);
|
||||
assert(stmt_cur_->type_ == IVL_ST_NONE);
|
||||
|
||||
stmt_cur_->type_ = IVL_ST_CASSIGN;
|
||||
|
||||
stmt_cur_->u_.cassign_.lvals = 1;
|
||||
stmt_cur_->u_.cassign_.lval = (struct ivl_lval_s*)
|
||||
calloc(1, sizeof(struct ivl_lval_s));
|
||||
|
||||
const NetNet*lsig = net->lval();
|
||||
|
||||
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].idx = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dll_target::proc_condit(const NetCondit*net)
|
||||
|
|
@ -420,7 +438,23 @@ void dll_target::proc_condit(const NetCondit*net)
|
|||
|
||||
bool dll_target::proc_deassign(const NetDeassign*net)
|
||||
{
|
||||
return false;
|
||||
assert(stmt_cur_);
|
||||
assert(stmt_cur_->type_ == IVL_ST_NONE);
|
||||
|
||||
stmt_cur_->type_ = IVL_ST_DEASSIGN;
|
||||
stmt_cur_->u_.cassign_.lvals = 1;
|
||||
stmt_cur_->u_.cassign_.lval = (struct ivl_lval_s*)
|
||||
calloc(1, sizeof(struct ivl_lval_s));
|
||||
|
||||
const NetNet*lsig = net->lval();
|
||||
|
||||
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].idx = 0;
|
||||
stmt_cur_->u_.cassign_.lval[0].n.sig = find_signal(des_, lsig);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dll_target::proc_delay(const NetPDelay*net)
|
||||
|
|
@ -679,6 +713,9 @@ void dll_target::proc_while(const NetWhile*net)
|
|||
|
||||
/*
|
||||
* $Log: t-dll-proc.cc,v $
|
||||
* Revision 1.38 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.37 2001/10/30 02:52:07 steve
|
||||
* Stubs for assign/deassign for t-dll.
|
||||
*
|
||||
|
|
|
|||
10
t-dll.h
10
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.67 2001/10/30 02:52:07 steve Exp $"
|
||||
#ident "$Id: t-dll.h,v 1.68 2001/10/31 05:24:52 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "target.h"
|
||||
|
|
@ -522,6 +522,11 @@ struct ivl_statement_s {
|
|||
struct ivl_statement_s*case_st;
|
||||
} case_;
|
||||
|
||||
struct { /* IVL_ST_CASSIGN, IVL_ST_DEASSIGN */
|
||||
unsigned lvals;
|
||||
struct ivl_lval_s*lval;
|
||||
} cassign_;
|
||||
|
||||
struct { /* IVL_ST_CONDIT */
|
||||
/* This is the condition expression */
|
||||
ivl_expr_t cond_;
|
||||
|
|
@ -575,6 +580,9 @@ struct ivl_statement_s {
|
|||
|
||||
/*
|
||||
* $Log: t-dll.h,v $
|
||||
* Revision 1.68 2001/10/31 05:24:52 steve
|
||||
* ivl_target support for assign/deassign.
|
||||
*
|
||||
* Revision 1.67 2001/10/30 02:52:07 steve
|
||||
* Stubs for assign/deassign for t-dll.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue