Get the bit widths of unary operators that return one bit.
This commit is contained in:
parent
9f30615a91
commit
900949ab56
21
netlist.cc
21
netlist.cc
|
|
@ -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: netlist.cc,v 1.69 1999/09/23 03:56:57 steve Exp $"
|
#ident "$Id: netlist.cc,v 1.70 1999/09/28 03:11:29 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <cassert>
|
# include <cassert>
|
||||||
|
|
@ -1020,6 +1020,22 @@ NetETernary* NetETernary::dup_expr() const
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NetEUnary::NetEUnary(char op, NetExpr*ex)
|
||||||
|
: NetExpr(ex->expr_width()), op_(op), expr_(ex)
|
||||||
|
{
|
||||||
|
switch (op_) {
|
||||||
|
case '!': // Logical not
|
||||||
|
case '&': // Reduction and
|
||||||
|
case '|': // Reduction or
|
||||||
|
case '^': // Reduction XOR
|
||||||
|
case 'A': // Reduction NAND (~&)
|
||||||
|
case 'N': // Reduction NOR (~|)
|
||||||
|
case 'X': // Reduction NXOR (~^)
|
||||||
|
expr_width(1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NetEUnary::~NetEUnary()
|
NetEUnary::~NetEUnary()
|
||||||
{
|
{
|
||||||
delete expr_;
|
delete expr_;
|
||||||
|
|
@ -1631,6 +1647,9 @@ NetNet* Design::find_signal(bool (*func)(const NetNet*))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.cc,v $
|
* $Log: netlist.cc,v $
|
||||||
|
* Revision 1.70 1999/09/28 03:11:29 steve
|
||||||
|
* Get the bit widths of unary operators that return one bit.
|
||||||
|
*
|
||||||
* Revision 1.69 1999/09/23 03:56:57 steve
|
* Revision 1.69 1999/09/23 03:56:57 steve
|
||||||
* Support shift operators.
|
* Support shift operators.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,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: netlist.h,v 1.72 1999/09/25 02:57:30 steve Exp $"
|
#ident "$Id: netlist.h,v 1.73 1999/09/28 03:11:30 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1427,8 +1427,7 @@ class NetETernary : public NetExpr {
|
||||||
class NetEUnary : public NetExpr {
|
class NetEUnary : public NetExpr {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetEUnary(char op, NetExpr*ex)
|
NetEUnary(char op, NetExpr*ex);
|
||||||
: NetExpr(ex->expr_width()), op_(op), expr_(ex) { }
|
|
||||||
~NetEUnary();
|
~NetEUnary();
|
||||||
|
|
||||||
char op() const { return op_; }
|
char op() const { return op_; }
|
||||||
|
|
@ -1690,6 +1689,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.h,v $
|
* $Log: netlist.h,v $
|
||||||
|
* Revision 1.73 1999/09/28 03:11:30 steve
|
||||||
|
* Get the bit widths of unary operators that return one bit.
|
||||||
|
*
|
||||||
* Revision 1.72 1999/09/25 02:57:30 steve
|
* Revision 1.72 1999/09/25 02:57:30 steve
|
||||||
* Parse system function calls.
|
* Parse system function calls.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue