Get the data type of part select results right.

This commit is contained in:
steve 2006-04-30 05:17:48 +00:00
parent 10f8c66f4a
commit 0c9fb766b6
3 changed files with 24 additions and 8 deletions

View File

@ -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.182 2006/04/28 05:09:51 steve Exp $"
#ident "$Id: elab_net.cc,v 1.183 2006/04/30 05:17:48 steve Exp $"
#endif
# include "config.h"
@ -383,6 +383,7 @@ static NetNet* compare_eq_constant(Design*des, NetScope*scope,
1);
NetEConst*ogate = new NetEConst(oval);
NetNet*osig = ogate->synthesize(des);
osig->data_type(lsig->data_type());
delete ogate;
if (debug_elaborate)
@ -437,7 +438,7 @@ static NetNet* compare_eq_constant(Design*des, NetScope*scope,
NetNet*tmp = new NetNet(scope, scope->local_symbol(),
NetNet::WIRE, 0, 0);
tmp->data_type(IVL_VT_LOGIC);
tmp->data_type(lsig->data_type());
tmp->local_flag(true);
tmp->set_line(*lsig);
@ -1795,6 +1796,9 @@ NetNet* PEConcat::elaborate_lnet_common_(Design*des, NetScope*scope,
NetNet*osig = new NetNet(scope, scope->local_symbol(),
NetNet::IMPLICIT, width);
/* Assume that the data types of the nets are all the same, so
we can take the data type of any, the first will do. */
osig->data_type(nets[0]->data_type());
if (debug_elaborate) {
cerr << get_line() << ": debug: Generating part selects "
@ -2761,6 +2765,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope,
/*
* $Log: elab_net.cc,v $
* Revision 1.183 2006/04/30 05:17:48 steve
* Get the data type of part select results right.
*
* Revision 1.182 2006/04/28 05:09:51 steve
* Handle padding of MUX net results.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: elaborate.cc,v 1.337 2006/04/26 04:43:50 steve Exp $"
#ident "$Id: elaborate.cc,v 1.338 2006/04/30 05:17:48 steve Exp $"
#endif
# include "config.h"
@ -585,6 +585,7 @@ void PGBuiltin::elaborate(Design*des, NetScope*scope) const
connect(tmp1->pin(1), sig->pin(0));
NetNet*tmp2 = new NetNet(scope, scope->local_symbol(),
NetNet::WIRE, 1);
tmp2->data_type(sig->data_type());
connect(tmp1->pin(0), tmp2->pin(0));
connect(cur[gdx]->pin(idx), tmp1->pin(0));
}
@ -3127,6 +3128,9 @@ Design* elaborate(list<perm_string>roots)
/*
* $Log: elaborate.cc,v $
* Revision 1.338 2006/04/30 05:17:48 steve
* Get the data type of part select results right.
*
* Revision 1.337 2006/04/26 04:43:50 steve
* Chop down assign r-values that elaborate too wide.
*

View File

@ -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.74 2006/01/03 05:15:33 steve Exp $"
#ident "$Id: expr_synth.cc,v 1.75 2006/04/30 05:17:48 steve Exp $"
#endif
# include "config.h"
@ -720,10 +720,12 @@ NetNet* NetESelect::synthesize(Design *des)
sel->set_line(*this);
des->add_node(sel);
sub = new NetNet(scope, scope->local_symbol(),
NetNet::IMPLICIT, expr_width());
sub->local_flag(true);
sub->set_line(*this);
NetNet*tmp = new NetNet(scope, scope->local_symbol(),
NetNet::IMPLICIT, expr_width());
tmp->data_type(sub->data_type());
tmp->local_flag(true);
tmp->set_line(*this);
sub = tmp;
connect(sub->pin(0), sel->pin(0));
}
@ -848,6 +850,9 @@ NetNet* NetESignal::synthesize(Design*des)
/*
* $Log: expr_synth.cc,v $
* Revision 1.75 2006/04/30 05:17:48 steve
* Get the data type of part select results right.
*
* Revision 1.74 2006/01/03 05:15:33 steve
* Fix the return type of a synthesized divide.
*