Binary operators with operands of indefinite width
has itself an indefinite width.
This commit is contained in:
parent
f5d0211864
commit
7d7beeecc1
11
netlist.cc
11
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) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: netlist.cc,v 1.156 2001/02/08 01:10:30 steve Exp $"
|
#ident "$Id: netlist.cc,v 1.157 2001/02/10 21:20:38 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include <cassert>
|
# include <cassert>
|
||||||
|
|
@ -1882,6 +1882,11 @@ NetEBinary::~NetEBinary()
|
||||||
delete right_;
|
delete right_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NetEBinary::has_width() const
|
||||||
|
{
|
||||||
|
return left_->has_width() && right_->has_width();
|
||||||
|
}
|
||||||
|
|
||||||
NetEBinary* NetEBinary::dup_expr() const
|
NetEBinary* NetEBinary::dup_expr() const
|
||||||
{
|
{
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
@ -2455,6 +2460,10 @@ bool NetUDP::sequ_glob_(string input, char output)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.cc,v $
|
* $Log: netlist.cc,v $
|
||||||
|
* Revision 1.157 2001/02/10 21:20:38 steve
|
||||||
|
* Binary operators with operands of indefinite width
|
||||||
|
* has itself an indefinite width.
|
||||||
|
*
|
||||||
* Revision 1.156 2001/02/08 01:10:30 steve
|
* Revision 1.156 2001/02/08 01:10:30 steve
|
||||||
* Remove dead code.
|
* Remove dead code.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
18
netlist.h
18
netlist.h
|
|
@ -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) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: netlist.h,v 1.197 2001/02/10 20:29:39 steve Exp $"
|
#ident "$Id: netlist.h,v 1.198 2001/02/10 21:20:38 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -843,9 +843,14 @@ class NetExpr : public LineInfo {
|
||||||
// This returns true if the expression has a definite
|
// This returns true if the expression has a definite
|
||||||
// width. This is generally true, but in some cases the
|
// width. This is generally true, but in some cases the
|
||||||
// expression is amorphous and desires a width from its
|
// expression is amorphous and desires a width from its
|
||||||
// environment.
|
// environment. For example, 'd5 has indefinite width, but
|
||||||
|
// 5'd5 has a definite width.
|
||||||
|
|
||||||
|
// This method is only really used within concatenation
|
||||||
|
// expressions to check validity.
|
||||||
virtual bool has_width() const;
|
virtual bool has_width() const;
|
||||||
|
|
||||||
|
|
||||||
// This method evaluates the expression and returns an
|
// This method evaluates the expression and returns an
|
||||||
// equivilent expression that is reduced as far as compile
|
// equivilent expression that is reduced as far as compile
|
||||||
// time knows how. Essentially, this is designed to fold
|
// time knows how. Essentially, this is designed to fold
|
||||||
|
|
@ -2078,6 +2083,11 @@ class NetEBinary : public NetExpr {
|
||||||
|
|
||||||
virtual bool set_width(unsigned w);
|
virtual bool set_width(unsigned w);
|
||||||
|
|
||||||
|
// A binary expression node only has a definite
|
||||||
|
// self-determinable width if the operands both have definite
|
||||||
|
// widths.
|
||||||
|
virtual bool has_width() const;
|
||||||
|
|
||||||
virtual NetEBinary* dup_expr() const;
|
virtual NetEBinary* dup_expr() const;
|
||||||
|
|
||||||
virtual void expr_scan(struct expr_scan_t*) const;
|
virtual void expr_scan(struct expr_scan_t*) const;
|
||||||
|
|
@ -2855,6 +2865,10 @@ extern ostream& operator << (ostream&, NetNet::Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: netlist.h,v $
|
* $Log: netlist.h,v $
|
||||||
|
* Revision 1.198 2001/02/10 21:20:38 steve
|
||||||
|
* Binary operators with operands of indefinite width
|
||||||
|
* has itself an indefinite width.
|
||||||
|
*
|
||||||
* Revision 1.197 2001/02/10 20:29:39 steve
|
* Revision 1.197 2001/02/10 20:29:39 steve
|
||||||
* In the context of range declarations, use elab_and_eval instead
|
* In the context of range declarations, use elab_and_eval instead
|
||||||
* of the less robust eval_const methods.
|
* of the less robust eval_const methods.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue