Handle synthesis of concatenation expressions.
This commit is contained in:
parent
2894cdefc7
commit
d548c9a5f8
11
elab_net.cc
11
elab_net.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: elab_net.cc,v 1.160 2005/04/08 04:52:31 steve Exp $"
|
||||
#ident "$Id: elab_net.cc,v 1.161 2005/05/06 00:25:13 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -491,6 +491,7 @@ NetNet* PEBinary::elaborate_net_cmp_(Design*des, NetScope*scope,
|
|||
unsigned long fall,
|
||||
unsigned long decay) const
|
||||
{
|
||||
|
||||
/* Elaborate the operands of the compare first as expressions
|
||||
(so that the eval_tree method can reduce constant
|
||||
expressions, including parameters) then turn those results
|
||||
|
|
@ -653,6 +654,11 @@ NetNet* PEBinary::elaborate_net_cmp_(Design*des, NetScope*scope,
|
|||
break;
|
||||
}
|
||||
|
||||
if (debug_elaborate) {
|
||||
cerr << get_line() << ": debug: Elaborate net == gate."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
/* Oh well, do the general case with a NetCompare. */
|
||||
{ NetCompare*cmp = new NetCompare(scope, scope->local_symbol(),
|
||||
dwidth);
|
||||
|
|
@ -2502,6 +2508,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
|
|||
|
||||
/*
|
||||
* $Log: elab_net.cc,v $
|
||||
* Revision 1.161 2005/05/06 00:25:13 steve
|
||||
* Handle synthesis of concatenation expressions.
|
||||
*
|
||||
* Revision 1.160 2005/04/08 04:52:31 steve
|
||||
* Make clear that memory addresses are cannonical.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: expr_synth.cc,v 1.67 2005/04/25 01:30:31 steve Exp $"
|
||||
#ident "$Id: expr_synth.cc,v 1.68 2005/05/06 00:25:13 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -588,19 +588,14 @@ NetNet* NetEConcat::synthesize(Design*des)
|
|||
NetNet*osig = new NetNet(scope, path, NetNet::IMPLICIT, expr_width());
|
||||
osig->local_flag(true);
|
||||
|
||||
/* Connect the output vector to the operands. */
|
||||
unsigned obit = 0;
|
||||
for (unsigned idx = parms_.count() ; idx > 0 ; idx -= 1) {
|
||||
NetConcat*concat = new NetConcat(scope, scope->local_symbol(),
|
||||
osig->vector_width(), parms_.count());
|
||||
concat->set_line(*this);
|
||||
des->add_node(concat);
|
||||
connect(concat->pin(0), osig->pin(0));
|
||||
|
||||
assert(tmp[idx-1]);
|
||||
|
||||
for (unsigned bit = 0; bit < tmp[idx-1]->pin_count(); bit += 1) {
|
||||
connect(osig->pin(obit), tmp[idx-1]->pin(bit));
|
||||
obit += 1;
|
||||
}
|
||||
|
||||
if (tmp[idx-1]->local_flag() && tmp[idx-1]->get_refs() == 0)
|
||||
delete tmp[idx-1];
|
||||
for (unsigned idx = 0 ; idx < parms_.count() ; idx += 1) {
|
||||
connect(concat->pin(idx+1), tmp[parms_.count()-idx-1]->pin(0));
|
||||
}
|
||||
|
||||
delete[]tmp;
|
||||
|
|
@ -842,6 +837,9 @@ NetNet* NetESignal::synthesize(Design*des)
|
|||
|
||||
/*
|
||||
* $Log: expr_synth.cc,v $
|
||||
* Revision 1.68 2005/05/06 00:25:13 steve
|
||||
* Handle synthesis of concatenation expressions.
|
||||
*
|
||||
* Revision 1.67 2005/04/25 01:30:31 steve
|
||||
* synthesis of add and unary get vector widths right.
|
||||
*
|
||||
|
|
|
|||
10
pform.cc
10
pform.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifdef HAVE_CVS_IDENT
|
||||
#ident "$Id: pform.cc,v 1.130 2004/12/11 02:31:27 steve Exp $"
|
||||
#ident "$Id: pform.cc,v 1.131 2005/05/06 00:25:13 steve Exp $"
|
||||
#endif
|
||||
|
||||
# include "config.h"
|
||||
|
|
@ -1190,7 +1190,10 @@ void pform_makewire(const vlltype&li,
|
|||
PEIdent*lval = new PEIdent(hname_t(first->name));
|
||||
lval->set_file(li.text);
|
||||
lval->set_lineno(li.first_line);
|
||||
pform_make_pgassign(lval, first->expr, delay, str);
|
||||
PGAssign*ass = pform_make_pgassign(lval, first->expr,
|
||||
delay, str);
|
||||
ass->set_file(li.text);
|
||||
ass->set_lineno(li.first_line);
|
||||
}
|
||||
|
||||
free(first->name);
|
||||
|
|
@ -1597,6 +1600,9 @@ int pform_parse(const char*path, FILE*file)
|
|||
|
||||
/*
|
||||
* $Log: pform.cc,v $
|
||||
* Revision 1.131 2005/05/06 00:25:13 steve
|
||||
* Handle synthesis of concatenation expressions.
|
||||
*
|
||||
* Revision 1.130 2004/12/11 02:31:27 steve
|
||||
* Rework of internals to carry vectors through nexus instead
|
||||
* of single bits. Make the ivl, tgt-vvp and vvp initial changes
|
||||
|
|
|
|||
Loading…
Reference in New Issue