diff --git a/elaborate.cc b/elaborate.cc index 19c400b44..3e3f8d250 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: elaborate.cc,v 1.50 1999/07/03 02:12:51 steve Exp $" +#ident "$Id: elaborate.cc,v 1.51 1999/07/10 02:19:26 steve Exp $" #endif /* @@ -1032,6 +1032,21 @@ NetNet* PAssign_::elaborate_lval(Design*des, const string&path, { /* Get the l-value, and assume that it is an identifier. */ const PEIdent*id = dynamic_cast(lval()); + + if (id == 0) { + NetNet*ll = lval_->elaborate_net(des, path); + if (ll == 0) { + cerr << get_line() << ": Assignment l-value too complex." + << endl; + return 0; + } + + lsb = 0; + msb = ll->pin_count()-1; + mux = 0; + return ll; + } + assert(id); /* Get the signal referenced by the identifier, and make sure @@ -1142,10 +1157,6 @@ NetProc* PAssign::elaborate(Design*des, const string&path) const delete reg; delete rv; return 0; -#if 0 - cur = new NetAssign(des->local_symbol(path), des, 1, mux, rv); - connect(cur->pin(0), reg->pin(0)); -#endif } @@ -1704,6 +1715,9 @@ Design* elaborate(const map&modules, /* * $Log: elaborate.cc,v $ + * Revision 1.51 1999/07/10 02:19:26 steve + * Support concatenate in l-values. + * * Revision 1.50 1999/07/03 02:12:51 steve * Elaborate user defined tasks. * diff --git a/parse.y b/parse.y index 07bd8f9a9..f065c26e5 100644 --- a/parse.y +++ b/parse.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: parse.y,v 1.49 1999/07/10 01:03:18 steve Exp $" +#ident "$Id: parse.y,v 1.50 1999/07/10 02:19:26 steve Exp $" #endif # include "parse_misc.h" @@ -842,10 +842,11 @@ lavalue $$ = tmp; } | '{' expression_list '}' - { yyerror(@1, "Sorry, concatenation expressions" - " not supported in lvalue."); - $$ = 0; + { PEConcat*tmp = new PEConcat(*$2); + tmp->set_file(@1.text); + tmp->set_lineno(@1.first_line); delete $2; + $$ = tmp; } ; @@ -878,10 +879,11 @@ lpvalue $$ = tmp; } | '{' expression_list '}' - { yyerror(@1, "Sorry, concatenation expressions" - " not supported in lvalue."); - $$ = 0; + { PEConcat*tmp = new PEConcat(*$2); + tmp->set_file(@1.text); + tmp->set_lineno(@1.first_line); delete $2; + $$ = tmp; } ;