Unary reduction operators do not set their operand width

This commit is contained in:
steve 2000-02-14 06:04:52 +00:00
parent e0873f6c14
commit a9264d71c6
2 changed files with 19 additions and 3 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: elab_net.cc,v 1.20 2000/01/18 04:53:40 steve Exp $" #ident "$Id: elab_net.cc,v 1.21 2000/02/14 06:04:52 steve Exp $"
#endif #endif
# include "PExpr.h" # include "PExpr.h"
@ -117,6 +117,14 @@ NetNet* PEBinary::elaborate_net(Design*des, const string&path,
break; break;
case '&': // AND case '&': // AND
if (lsig->pin_count() != rsig->pin_count()) {
cerr << get_line() << ": internal error: lsig pin count ("
<< lsig->pin_count() << ") != rsig pin count ("
<< rsig->pin_count() << ")." << endl;
des->errors += 1;
return 0;
}
assert(lsig->pin_count() == rsig->pin_count()); assert(lsig->pin_count() == rsig->pin_count());
osig = new NetNet(0, des->local_symbol(path), NetNet::WIRE, osig = new NetNet(0, des->local_symbol(path), NetNet::WIRE,
lsig->pin_count()); lsig->pin_count());
@ -1136,7 +1144,8 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
unsigned long fall, unsigned long fall,
unsigned long decay) const unsigned long decay) const
{ {
NetNet* sub_sig = expr_->elaborate_net(des, path, width, NetNet* sub_sig = expr_->elaborate_net(des, path,
op_=='~'?width:0,
0, 0, 0); 0, 0, 0);
if (sub_sig == 0) { if (sub_sig == 0) {
des->errors += 1; des->errors += 1;
@ -1281,6 +1290,9 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
/* /*
* $Log: elab_net.cc,v $ * $Log: elab_net.cc,v $
* Revision 1.21 2000/02/14 06:04:52 steve
* Unary reduction operators do not set their operand width
*
* Revision 1.20 2000/01/18 04:53:40 steve * Revision 1.20 2000/01/18 04:53:40 steve
* Support structural XNOR. * Support structural XNOR.
* *

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: t-null.cc,v 1.8 1999/10/05 03:26:37 steve Exp $" #ident "$Id: t-null.cc,v 1.9 2000/02/14 06:04:52 steve Exp $"
#endif #endif
# include "netlist.h" # include "netlist.h"
@ -35,6 +35,7 @@ static class target_null_t : public target_t {
void task_def(ostream&, const NetTaskDef*) { } void task_def(ostream&, const NetTaskDef*) { }
void net_assign(ostream&os, const NetAssign*) { } void net_assign(ostream&os, const NetAssign*) { }
void net_assign_nb(ostream&os, const NetAssignNB*) { } void net_assign_nb(ostream&os, const NetAssignNB*) { }
void net_const(ostream&, const NetConst*) { }
void net_esignal(ostream&, const NetESignal*) { } void net_esignal(ostream&, const NetESignal*) { }
void net_event(ostream&, const NetNEvent*) { } void net_event(ostream&, const NetNEvent*) { }
bool proc_block(ostream&, const NetBlock*) { return true; } bool proc_block(ostream&, const NetBlock*) { return true; }
@ -51,6 +52,9 @@ static class target_null_t : public target_t {
extern const struct target tgt_null = { "null", &target_null_obj }; extern const struct target tgt_null = { "null", &target_null_obj };
/* /*
* $Log: t-null.cc,v $ * $Log: t-null.cc,v $
* Revision 1.9 2000/02/14 06:04:52 steve
* Unary reduction operators do not set their operand width
*
* Revision 1.8 1999/10/05 03:26:37 steve * Revision 1.8 1999/10/05 03:26:37 steve
* null target ignore assignment nodes. * null target ignore assignment nodes.
* *