Unary reduction operators do not set their operand width
This commit is contained in:
parent
e0873f6c14
commit
a9264d71c6
16
elab_net.cc
16
elab_net.cc
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#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
|
||||
|
||||
# include "PExpr.h"
|
||||
|
|
@ -117,6 +117,14 @@ NetNet* PEBinary::elaborate_net(Design*des, const string&path,
|
|||
break;
|
||||
|
||||
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());
|
||||
osig = new NetNet(0, des->local_symbol(path), NetNet::WIRE,
|
||||
lsig->pin_count());
|
||||
|
|
@ -1136,7 +1144,8 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
|
|||
unsigned long fall,
|
||||
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);
|
||||
if (sub_sig == 0) {
|
||||
des->errors += 1;
|
||||
|
|
@ -1281,6 +1290,9 @@ NetNet* PEUnary::elaborate_net(Design*des, const string&path,
|
|||
|
||||
/*
|
||||
* $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
|
||||
* Support structural XNOR.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#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
|
||||
|
||||
# include "netlist.h"
|
||||
|
|
@ -35,6 +35,7 @@ static class target_null_t : public target_t {
|
|||
void task_def(ostream&, const NetTaskDef*) { }
|
||||
void net_assign(ostream&os, const NetAssign*) { }
|
||||
void net_assign_nb(ostream&os, const NetAssignNB*) { }
|
||||
void net_const(ostream&, const NetConst*) { }
|
||||
void net_esignal(ostream&, const NetESignal*) { }
|
||||
void net_event(ostream&, const NetNEvent*) { }
|
||||
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 };
|
||||
/*
|
||||
* $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
|
||||
* null target ignore assignment nodes.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue