diff --git a/ivl_target.h b/ivl_target.h index 5710d61ce..5f2f4c2fc 100644 --- a/ivl_target.h +++ b/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.23 2000/10/25 05:41:24 steve Exp $" +#ident "$Id: ivl_target.h,v 1.24 2000/10/28 17:55:03 steve Exp $" #endif #ifdef __cplusplus @@ -135,6 +135,7 @@ typedef struct ivl_statement_s*ivl_statement_t; typedef enum ivl_expr_type_e { IVL_EX_NONE = 0, IVL_EX_BINARY, + IVL_EX_CONCAT, IVL_EX_NUMBER, IVL_EX_SFUNC, IVL_EX_SIGNAL, @@ -523,6 +524,9 @@ _END_DECL /* * $Log: ivl_target.h,v $ + * Revision 1.24 2000/10/28 17:55:03 steve + * stub for the concat operator. + * * Revision 1.23 2000/10/25 05:41:24 steve * Get target signal from nexus_ptr. * diff --git a/t-dll-expr.cc b/t-dll-expr.cc index 4b0489c32..92d2f8a4c 100644 --- a/t-dll-expr.cc +++ b/t-dll-expr.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-expr.cc,v 1.5 2000/10/05 05:03:01 steve Exp $" +#ident "$Id: t-dll-expr.cc,v 1.6 2000/10/28 17:55:03 steve Exp $" #endif # include "t-dll.h" @@ -55,6 +55,17 @@ void dll_target::expr_binary(const NetEBinary*net) expr_->u_.binary_.rig_ = rght; } +void dll_target::expr_concat(const NetEConcat*net) +{ + assert(expr_ == 0); + + expr_ = new struct ivl_expr_s; + assert(expr_); + + expr_->type_ = IVL_EX_CONCAT; + expr_->width_= net->expr_width(); +} + void dll_target::expr_const(const NetEConst*net) { assert(expr_ == 0); @@ -122,6 +133,9 @@ void dll_target::expr_signal(const NetESignal*net) /* * $Log: t-dll-expr.cc,v $ + * Revision 1.6 2000/10/28 17:55:03 steve + * stub for the concat operator. + * * Revision 1.5 2000/10/05 05:03:01 steve * xor and constant devices. * diff --git a/t-dll.h b/t-dll.h index 1a44a8013..b00bd1d98 100644 --- a/t-dll.h +++ b/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.15 2000/10/21 16:49:45 steve Exp $" +#ident "$Id: t-dll.h,v 1.16 2000/10/28 17:55:03 steve Exp $" #endif # include "target.h" @@ -79,6 +79,7 @@ struct dll_target : public target_t, public expr_scan_t { struct ivl_expr_s*expr_; void expr_binary(const NetEBinary*); + void expr_concat(const NetEConcat*); void expr_const(const NetEConst*); void expr_sfunc(const NetESFunc*); void expr_signal(const NetESignal*); @@ -310,6 +311,9 @@ struct ivl_statement_s { /* * $Log: t-dll.h,v $ + * Revision 1.16 2000/10/28 17:55:03 steve + * stub for the concat operator. + * * Revision 1.15 2000/10/21 16:49:45 steve * Reduce the target entry points to the target_design. * diff --git a/tgt-stub/stub.c b/tgt-stub/stub.c index 984c533a3..4b843a485 100644 --- a/tgt-stub/stub.c +++ b/tgt-stub/stub.c @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: stub.c,v 1.21 2000/10/25 05:41:24 steve Exp $" +#ident "$Id: stub.c,v 1.22 2000/10/28 17:55:03 steve Exp $" #endif /* @@ -35,20 +35,31 @@ static FILE*out; static void show_expression(ivl_expr_t net, unsigned ind) { const ivl_expr_type_t code = ivl_expr_type(net); + unsigned width = ivl_expr_width(net); + const char*sign = ivl_expr_signed(net)? "signed" : "unsigned"; switch (code) { + case IVL_EX_BINARY: + fprintf(out, "%*s<\"%c\" width=%u, %s>\n", ind, "", + ivl_expr_opcode(net), width, sign); + show_expression(ivl_expr_oper1(net), ind+3); + show_expression(ivl_expr_oper2(net), ind+3); + break; + + case IVL_EX_CONCAT: + fprintf(out, "%*s\n", ind, "", width, sign); + break; + case IVL_EX_NUMBER: { const char*bits = ivl_expr_bits(net); - unsigned width = ivl_expr_width(net); unsigned idx; fprintf(out, "%*s 0 ; idx -= 1) fprintf(out, "%c", bits[idx-1]); - fprintf(out, ", %s>\n", ivl_expr_signed(net)? "signed" - : "unsigned"); + fprintf(out, ", %s>\n", sign); break; } @@ -63,8 +74,8 @@ static void show_expression(ivl_expr_t net, unsigned ind) break; case IVL_EX_SIGNAL: - fprintf(out, "%*s\n", ind, "", - ivl_expr_name(net), ivl_expr_width(net)); + fprintf(out, "%*s\n", ind, "", + ivl_expr_name(net), width, sign); break; default: @@ -325,6 +336,9 @@ DECLARE_CYGWIN_DLL(DllMain); /* * $Log: stub.c,v $ + * Revision 1.22 2000/10/28 17:55:03 steve + * stub for the concat operator. + * * Revision 1.21 2000/10/25 05:41:24 steve * Get target signal from nexus_ptr. *