is_constant method for PEConcat.

This commit is contained in:
steve 1999-07-22 02:05:20 +00:00
parent 3766ee7822
commit 9021f68996
4 changed files with 26 additions and 8 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: PExpr.cc,v 1.6 1999/07/17 19:50:59 steve Exp $"
#ident "$Id: PExpr.cc,v 1.7 1999/07/22 02:05:20 steve Exp $"
#endif
# include "PExpr.h"
@ -43,6 +43,15 @@ bool PEBinary::is_constant(Module*mod) const
return left_->is_constant(mod) && right_->is_constant(mod);
}
bool PEConcat::is_constant(Module *mod) const
{
bool constant = repeat_->is_constant(mod);
for (unsigned i = 0; constant && i < parms_.count(); ++i) {
constant = constant && parms_[i]->is_constant(mod);
}
return constant;
}
PEConcat::~PEConcat()
{
delete repeat_;
@ -93,6 +102,9 @@ bool PETernary::is_constant(Module*) const
/*
* $Log: PExpr.cc,v $
* Revision 1.7 1999/07/22 02:05:20 steve
* is_constant method for PEConcat.
*
* Revision 1.6 1999/07/17 19:50:59 steve
* netlist support for ternary operator.
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: PExpr.h,v 1.14 1999/07/17 19:50:59 steve Exp $"
#ident "$Id: PExpr.h,v 1.15 1999/07/22 02:05:20 steve Exp $"
#endif
# include <string>
@ -79,6 +79,7 @@ class PEConcat : public PExpr {
virtual void dump(ostream&) const;
virtual NetNet* elaborate_net(Design*des, const string&path) const;
virtual NetExpr*elaborate_expr(Design*des, const string&path) const;
virtual bool is_constant(Module*) const;
private:
svector<PExpr*>parms_;
@ -226,6 +227,9 @@ class PETernary : public PExpr {
/*
* $Log: PExpr.h,v $
* Revision 1.15 1999/07/22 02:05:20 steve
* is_constant method for PEConcat.
*
* Revision 1.14 1999/07/17 19:50:59 steve
* netlist support for ternary operator.
*

View File

@ -12,7 +12,7 @@ IVL is not aimed at being a simulator in the traditional sense, but a
compiler that generates code employed by back-end tools. These back-
end tools currently include a simulator written in C++ called VVM
and an XNF (Xilinx Netlist Format) generator. See "vvm.txt" and
"xnf.txt" for further details on the back-end processors.
"xnf.txt" for further details on these back-end processors.
2.0 How IVL Works
@ -47,7 +47,7 @@ PFORM into the file named <path>.
This phase takes the pform and generates a netlist. The driver selects
(by user request or lucky guess) the root module to elaborate,
resolves references and expands the instantiations to form the design
netlist.
netlist. (See netlist.txt.)
The elaborate() function performs the elaboration.

10
xnf.txt
View File

@ -18,10 +18,9 @@ programmer to use $attributes to control certain aspects of code
generation.
XNF code generation is enabled with the ``-t xnf'' flag on the command
line. The XNF code generator needs to know the type of part to
generate code for, so the ``-fpart=<type>'' flag is also needed. For
example, to generate code for the 4010E the command line might start
out as:
line. The code generator needs to know the type of part to generate
code for, so the ``-fpart=<type>'' flag is also needed. For example,
to generate code for the 4010E the command line might start out as:
ivl -txnf -fpart=4010e -Fxnfsyn -Fxnfio [...]
@ -84,6 +83,9 @@ IBUF, NOT gates cannot be absorbed as in the OPAD case.
$Log: xnf.txt,v $
Revision 1.3 1999/07/22 02:05:20 steve
is_constant method for PEConcat.
Revision 1.2 1999/07/18 21:17:51 steve
Add support for CE input to XNF DFF, and do
complete cleanup of replaced design nodes.