FAUST compiler  0.9.9.6b8
Functions
signals.hh File Reference
#include "tlib.hh"
#include "binop.hh"
#include <assert.h>
#include <vector>
Include dependency graph for signals.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Tree sigInt (int n)
 Signals Block-diagrams are converted into signal expressions via symbolic propagation.
Tree sigReal (double n)
bool isSigInt (Tree t, int *i)
bool isSigReal (Tree t, double *r)
Tree sigInput (int i)
Tree sigOutput (int i, Tree t)
bool isSigInput (Tree t, int *i)
bool isSigOutput (Tree t, int *i, Tree &t0)
Tree sigDelay0 (Tree t)
Tree sigDelay1 (Tree t)
bool isSigDelay1 (Tree t, Tree &t0)
Tree sigFixDelay (Tree t0, Tree t1)
bool isSigFixDelay (Tree t, Tree &t0, Tree &t1)
Tree sigPrefix (Tree t0, Tree t1)
bool isSigPrefix (Tree t, Tree &t0, Tree &t1)
Tree sigIota (Tree t0)
bool isSigIota (Tree t, Tree &t0)
Tree sigIntCast (Tree t)
Tree sigFloatCast (Tree t)
bool isSigIntCast (Tree t)
bool isSigFloatCast (Tree t)
bool isSigIntCast (Tree t, Tree &x)
bool isSigFloatCast (Tree t, Tree &x)
Tree sigRDTbl (Tree t, Tree i)
Tree sigWRTbl (Tree id, Tree t, Tree i, Tree s)
Tree sigTable (Tree id, Tree n, Tree sig)
Tree sigGen (Tree content)
bool isSigRDTbl (Tree s, Tree &t, Tree &i)
bool isSigWRTbl (Tree u, Tree &id, Tree &t, Tree &i, Tree &s)
bool isSigTable (Tree t, Tree &id, Tree &n, Tree &sig)
bool isSigGen (Tree t, Tree &content)
bool isSigGen (Tree t)
Tree sigWriteReadTable (Tree n, Tree init, Tree widx, Tree wsig, Tree ridx)
Tree sigReadOnlyTable (Tree n, Tree init, Tree ridx)
Tree sigDocConstantTbl (Tree n, Tree init)
Tree sigDocWriteTbl (Tree n, Tree init, Tree widx, Tree wsig)
Tree sigDocAccessTbl (Tree doctbl, Tree ridx)
bool isSigDocConstantTbl (Tree s, Tree &n, Tree &init)
bool isSigDocWriteTbl (Tree s, Tree &n, Tree &init, Tree &widx, Tree &wsig)
bool isSigDocAccessTbl (Tree s, Tree &doctbl, Tree &ridx)
Tree sigSelect2 (Tree selector, Tree s1, Tree s2)
Tree sigSelect3 (Tree selector, Tree s1, Tree s2, Tree s3)
bool isSigSelect2 (Tree t, Tree &selector, Tree &s1, Tree &s2)
bool isSigSelect3 (Tree t, Tree &selector, Tree &s1, Tree &s2, Tree &s3)
Tree sigBinOp (int op, Tree x, Tree y)
bool isSigBinOp (Tree s, int *op, Tree &x, Tree &y)
Tree sigFFun (Tree ff, Tree largs)
bool isSigFFun (Tree s, Tree &ff, Tree &largs)
Tree sigFConst (Tree type, Tree name, Tree file)
bool isSigFConst (Tree s)
bool isSigFConst (Tree s, Tree &type, Tree &name, Tree &file)
Tree sigFVar (Tree type, Tree name, Tree file)
bool isSigFVar (Tree s)
bool isSigFVar (Tree s, Tree &type, Tree &name, Tree &file)
Tree sigAdd (Tree x, Tree y)
Tree sigSub (Tree x, Tree y)
Tree sigMul (Tree x, Tree y)
Tree sigDiv (Tree x, Tree y)
Tree sigRem (Tree x, Tree y)
Tree sigAND (Tree x, Tree y)
Tree sigOR (Tree x, Tree y)
Tree sigXOR (Tree x, Tree y)
Tree sigLeftShift (Tree x, Tree y)
Tree sigRightShift (Tree x, Tree y)
Tree sigGT (Tree x, Tree y)
Tree sigLT (Tree x, Tree y)
Tree sigGE (Tree x, Tree y)
Tree sigLE (Tree x, Tree y)
Tree sigEQ (Tree x, Tree y)
Tree sigNE (Tree x, Tree y)
bool isSigAdd (Tree a, Tree &x, Tree &y)
bool isSigMul (Tree a, Tree &x, Tree &y)
bool isSigSub (Tree a, Tree &x, Tree &y)
bool isSigDiv (Tree a, Tree &x, Tree &y)
Tree addNums (Tree a, Tree b)
Tree subNums (Tree a, Tree b)
Tree mulNums (Tree a, Tree b)
Tree divNums (Tree a, Tree b)
Tree divExtendedNums (Tree a, Tree b)
Tree minusNum (Tree a)
Tree inverseNum (Tree a)
bool isNum (Tree a)
bool isZero (Tree a)
bool isGTZero (Tree a)
bool isGEZero (Tree a)
bool isOne (Tree a)
bool isMinusOne (Tree a)
Tree sigProj (int i, Tree rgroup)
bool isProj (Tree t, int *i, Tree &rgroup)
bool isNum (const Tree &t, num &n)
Tree sigButton (Tree label)
bool isSigButton (Tree s)
bool isSigButton (Tree s, Tree &label)
Tree sigCheckbox (Tree label)
bool isSigCheckbox (Tree s)
bool isSigCheckbox (Tree s, Tree &label)
Tree sigVSlider (Tree label, Tree cur, Tree min, Tree max, Tree step)
bool isSigVSlider (Tree s)
bool isSigVSlider (Tree s, Tree &label, Tree &cur, Tree &min, Tree &max, Tree &step)
Tree sigHSlider (Tree label, Tree cur, Tree min, Tree max, Tree step)
bool isSigHSlider (Tree s)
bool isSigHSlider (Tree s, Tree &label, Tree &cur, Tree &min, Tree &max, Tree &step)
Tree sigNumEntry (Tree label, Tree cur, Tree min, Tree max, Tree step)
bool isSigNumEntry (Tree s)
bool isSigNumEntry (Tree s, Tree &label, Tree &cur, Tree &min, Tree &max, Tree &step)
Tree sigVBargraph (Tree label, Tree min, Tree max, Tree t0)
bool isSigVBargraph (Tree s)
bool isSigVBargraph (Tree s, Tree &label, Tree &min, Tree &max, Tree &t0)
Tree sigHBargraph (Tree label, Tree min, Tree max, Tree t0)
bool isSigHBargraph (Tree s)
bool isSigHBargraph (Tree s, Tree &label, Tree &min, Tree &max, Tree &t0)
Tree sigAttach (Tree x, Tree y)
bool isSigAttach (Tree s)
bool isSigAttach (Tree s, Tree &x, Tree &y)
Tree sigTuple (int mode, Tree ls)
bool isSigTuple (Tree s, int *mode, Tree &ls)
Tree sigTupleAccess (Tree ts, Tree idx)
bool isSigTupleAccess (Tree s, Tree &ts, Tree &idx)
Tree sigCartesianProd (Tree s1, Tree s2)
int getSubSignals (Tree sig, vector< Tree > &vsigs, bool visitgen=true)
 Extract the sub signals of a signal expression, that is not necesseraly all the subtrees.
bool verySimple (Tree exp)
 Test if exp is very simple that is it can't be considered a real component.

Function Documentation

Tree addNums ( Tree  a,
Tree  b 
)

Definition at line 290 of file signals.cpp.

References addNode(), CTree::node(), and tree().

Referenced by mterm::operator+=(), and simplifyingAdd().

{
    Tree r = tree(addNode(a->node(),b->node()));
    //cerr.flags(ios::showpoint); cerr << "addNums " << *a << "+" << *b << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree divExtendedNums ( Tree  a,
Tree  b 
)

Definition at line 318 of file signals.cpp.

References divExtendedNode(), CTree::node(), and tree().

Referenced by mterm::operator/=().

{
    Tree r = tree(divExtendedNode(a->node(),b->node()));
    //cerr.flags(ios::showpoint); cerr << "divExtendeNums " << *a << "/" << *b << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree divNums ( Tree  a,
Tree  b 
)

Definition at line 311 of file signals.cpp.

References divNode(), CTree::node(), and tree().

{
    Tree r = tree(divNode(a->node(),b->node()));
    //cerr.flags(ios::showpoint); cerr << "divNums " << *a << "/" << *b << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

int getSubSignals ( Tree  sig,
vector< Tree > &  vsigs,
bool  visitgen 
)

Extract the sub signals of a signal expression, that is not necesseraly all the subtrees.

Parameters:
sigthe signals
vsigsa reference to the vector where the subsignals will be placed
Returns:
the number of subsignals

Definition at line 12 of file subsignals.cpp.

References CTree::arity(), CTree::branch(), getUserData(), hd(), isList(), isNil(), isProj(), isRec(), isSigAttach(), isSigBinOp(), isSigButton(), isSigCheckbox(), isSigDelay1(), isSigDocAccessTbl(), isSigDocConstantTbl(), isSigDocWriteTbl(), isSigFConst(), isSigFFun(), isSigFixDelay(), isSigFloatCast(), isSigFVar(), isSigGen(), isSigHBargraph(), isSigHSlider(), isSigInput(), isSigInt(), isSigIntCast(), isSigIota(), isSigNumEntry(), isSigOutput(), isSigPrefix(), isSigRDTbl(), isSigReal(), isSigSelect2(), isSigSelect3(), isSigTable(), isSigVBargraph(), isSigVSlider(), isSigWRTbl(), name(), and tl().

Referenced by annotate(), colorize(), VectorCompiler::generateCodeRecursions(), OccMarkup::incOcc(), listMultiColoredExp(), recdraw(), ScalarCompiler::sharingAnnotation(), DocCompiler::sharingAnnotation(), symlistVisit(), and uncolorize().

{
    vsigs.clear();

    int     i;
    double  r;
    Tree    c, sel, x, y, z, u, v, var, le, label, id, ff, largs, type, name, file;

         if ( getUserData(sig) )                    { for (int i=0; i<sig->arity(); i++) { vsigs.push_back(sig->branch(i)); }
                                                      return sig->arity(); }
    else if ( isSigInt(sig, &i) )                   { return 0; }
    else if ( isSigReal(sig, &r) )                  { return 0; }
    else if ( isSigInput(sig, &i) )                 { return 0;             }
    else if ( isSigOutput(sig, &i, x) )             { vsigs.push_back(x); return 1; }

    else if ( isSigDelay1(sig, x) )                 { vsigs.push_back(x); return 1; }

    else if ( isSigFixDelay(sig, x, y) )            { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isSigPrefix(sig, x, y) )              { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isSigIota(sig, x) )                   { vsigs.push_back(x); return 1; }

    else if ( isSigBinOp(sig, &i, x, y) )           { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isSigFFun(sig, ff, largs) )           { int n = 0; while (!isNil(largs)) { vsigs.push_back(hd(largs)); largs = tl(largs); n++; } return n; }
    else if ( isSigFConst(sig, type, name, file) )  { return 0; }
    else if ( isSigFVar(sig, type, name, file) )    { return 0; }

    else if ( isSigTable(sig, id, x, y) )           { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isSigWRTbl(sig, id, x, y, z) )        { vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(z); return 3; }
    else if ( isSigRDTbl(sig, x, y) )               { vsigs.push_back(x); vsigs.push_back(y); return 2; }

    else if ( isSigDocConstantTbl(sig, x, y) )      { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isSigDocWriteTbl(sig, x, y, u, v) )   { vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(u); vsigs.push_back(v); return 4; }
    else if ( isSigDocAccessTbl(sig, x, y) )        { vsigs.push_back(x); vsigs.push_back(y); return 2; }


    else if ( isSigSelect2(sig, sel, x, y) )        { vsigs.push_back(sel); vsigs.push_back(x); vsigs.push_back(y); return 3; }
    else if ( isSigSelect3(sig, sel, x, y, z) )     { vsigs.push_back(sel); vsigs.push_back(x); vsigs.push_back(y); vsigs.push_back(z); return 4; }

    else if ( isSigGen(sig, x) )                    { if (visitgen) { vsigs.push_back(x); return 1;} else { return 0; } }

    else if ( isProj(sig, &i, x) )                  { vsigs.push_back(x); return 1; }
    else if ( isRec(sig, var, le) )                 { vsigs.push_back(le); return 1; }

    else if ( isSigIntCast(sig, x) )                { vsigs.push_back(x); return 1; }
    else if ( isSigFloatCast(sig, x) )              { vsigs.push_back(x); return 1; }

    else if ( isSigButton(sig, label) )             { return 0; }
    else if ( isSigCheckbox(sig, label) )           { return 0; }
    else if ( isSigVSlider(sig, label,c,x,y,z) )    { return 0; }
    else if ( isSigHSlider(sig, label,c,x,y,z) )    { return 0; }
    else if ( isSigNumEntry(sig, label,c,x,y,z) )   { return 0; }

    else if ( isSigVBargraph(sig, label,x,y,z) )    { vsigs.push_back(z); return 1; }
    else if ( isSigHBargraph(sig, label,x,y,z) )    { vsigs.push_back(z); return 1; }
    else if ( isSigAttach(sig, x, y) )              { vsigs.push_back(x); vsigs.push_back(y); return 2; }
    else if ( isList(sig) )                         { vsigs.push_back(hd(sig)); vsigs.push_back(tl(sig));  return 2; }
    else if ( isNil(sig) )                          { return 0; }

    else {
        cerr << "ERROR, unrecognized signal : " << *sig << endl;
        exit(1);
    }
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 332 of file signals.cpp.

References inverseNode(), CTree::node(), and tree().

{
    Tree r = tree(inverseNode(a->node()));
    //cerr.flags(ios::showpoint); cerr << "inverseNum " << *a << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

bool isGEZero ( Tree  a) [inline]

Definition at line 187 of file signals.hh.

References CTree::node().

Referenced by mterm::isNegative().

{ assert(a); return isGEZero(a->node()); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isGTZero ( Tree  a) [inline]

Definition at line 186 of file signals.hh.

References CTree::node().

{ assert(a); return isGTZero(a->node()); }

Here is the call graph for this function:

bool isMinusOne ( Tree  a) [inline]

Definition at line 189 of file signals.hh.

References CTree::node().

Referenced by mterm::normalizedTree().

{ assert(a); return isMinusOne(a->node()); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isNum ( Tree  a) [inline]
bool isNum ( const Tree t,
num n 
) [inline]

Definition at line 195 of file signals.hh.

References isDouble(), isInt(), and CTree::node().

{
    double      f;
    int         i;

    if (isDouble(t->node(), &f)) { n = f; return true;  }
    if (isInt(t->node(), &i)) { n = i; return true;  }
    return false;
}

Here is the call graph for this function:

bool isOne ( Tree  a) [inline]

Definition at line 188 of file signals.hh.

References CTree::node().

Referenced by mterm::complexity(), mterm::normalizedTree(), mterm::print(), and simplification().

{ assert(a); return isOne(a->node()); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isProj ( Tree  t,
int *  i,
Tree rgroup 
)

Definition at line 151 of file signals.cpp.

References isInt(), isTree(), and CTree::node().

Referenced by VectorCompiler::CS(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), VectorCompiler::generateLoopCode(), getSubSignals(), infereSigOrder(), infereSigType(), VectorCompiler::needSeparateLoop(), normalizeFixedDelayTerm(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ Tree x; return isTree(t, SIGPROJ, x, rgroup) && isInt(x->node(), i);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigAdd ( Tree  a,
Tree x,
Tree y 
)

Definition at line 339 of file signals.cpp.

References isSigBinOp(), and kAdd.

{
    int op;
    return isSigBinOp(a, &op, x, y) && (op == kAdd);
}

Here is the call graph for this function:

bool isSigAttach ( Tree  s)
bool isSigAttach ( Tree  s,
Tree x,
Tree y 
)

Definition at line 286 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ return isTree(t, SIGATTACH, t0, t1);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigBinOp ( Tree  s,
int *  op,
Tree x,
Tree y 
)
bool isSigButton ( Tree  s)

Definition at line 199 of file signals.cpp.

References isTree().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl; return isTree(s, SIGBUTTON, lbl);   }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigButton ( Tree  s,
Tree label 
)

Definition at line 200 of file signals.cpp.

References isTree().

{ return isTree(s, SIGBUTTON, lbl);             }

Here is the call graph for this function:

bool isSigCheckbox ( Tree  s)

Definition at line 205 of file signals.cpp.

References isTree().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl; return isTree(s, SIGCHECKBOX, lbl); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigCheckbox ( Tree  s,
Tree label 
)

Definition at line 206 of file signals.cpp.

References isTree().

{ return isTree(s, SIGCHECKBOX, lbl);               }

Here is the call graph for this function:

bool isSigDelay1 ( Tree  t,
Tree t0 
)

Definition at line 58 of file signals.cpp.

References isTree().

Referenced by getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigLabel(), simplification(), and sigvisitor::visit().

{ return isTree(t, SIGDELAY1, t0);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDiv ( Tree  a,
Tree x,
Tree y 
)

Definition at line 357 of file signals.cpp.

References isSigBinOp(), and kDiv.

Referenced by normalizeFixedDelayTerm().

{
    int op;
    return isSigBinOp(a, &op, x, y) && (op == kDiv);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocAccessTbl ( Tree  s,
Tree doctbl,
Tree ridx 
)

Definition at line 107 of file signals.cpp.

References isTree().

Referenced by DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), and sigvisitor::visit().

{ return isTree(t, SIGDOCACCESSTBL, tbl, ridx);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocConstantTbl ( Tree  s,
Tree n,
Tree init 
)

Definition at line 99 of file signals.cpp.

References isTree().

Referenced by DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), and sigvisitor::visit().

{ return isTree(t, SIGDOCONSTANTTBL, n, sig);   }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocWriteTbl ( Tree  s,
Tree n,
Tree init,
Tree widx,
Tree wsig 
)

Definition at line 103 of file signals.cpp.

References isTree().

Referenced by DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), and sigvisitor::visit().

{ return isTree(t, SIGDOCWRITETBL, n, sig, widx, wsig);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigFConst ( Tree  s)

Definition at line 138 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), verySimple(), and sigvisitor::visit().

{ Tree t,n,f; return isTree(s, SIGFCONST, t, n, f); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigFConst ( Tree  s,
Tree type,
Tree name,
Tree file 
)

Definition at line 139 of file signals.cpp.

References isTree().

{ return isTree(s, SIGFCONST,type, name, file);     }

Here is the call graph for this function:

bool isSigFFun ( Tree  s,
Tree ff,
Tree largs 
)

Definition at line 133 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ return isTree(s, SIGFFUN, ff, largs);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigFixDelay ( Tree  t,
Tree t0,
Tree t1 
)
bool isSigFloatCast ( Tree  t)

Definition at line 187 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigFloatCast(), sigLabel(), simplification(), and sigvisitor::visit().

{ Tree x; return isTree(t, SIGFLOATCAST, x);}

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigFloatCast ( Tree  t,
Tree x 
)

Definition at line 188 of file signals.cpp.

References isTree().

{ return isTree(t, SIGFLOATCAST, x);        }

Here is the call graph for this function:

bool isSigFVar ( Tree  s)

Definition at line 144 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree t,n,f; return isTree(s, SIGFVAR, t, n, f);   }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigFVar ( Tree  s,
Tree type,
Tree name,
Tree file 
)

Definition at line 145 of file signals.cpp.

References isTree().

{ return isTree(s, SIGFVAR, type, name, file);      }

Here is the call graph for this function:

bool isSigGen ( Tree  t,
Tree content 
)
bool isSigGen ( Tree  t)

Definition at line 92 of file signals.cpp.

References CTree::node().

{ return t->node()== Node(SIGGEN);  }

Here is the call graph for this function:

bool isSigHBargraph ( Tree  s)

Definition at line 274 of file signals.cpp.

References isTree(), max(), and min().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl, min, max, x; return isTree(s, SIGHBARGRAPH, lbl, min, max, x);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigHBargraph ( Tree  s,
Tree label,
Tree min,
Tree max,
Tree t0 
)

Definition at line 275 of file signals.cpp.

References isTree().

{ return isTree(s, SIGHBARGRAPH, lbl, min, max, x); }

Here is the call graph for this function:

bool isSigHSlider ( Tree  s)

Definition at line 212 of file signals.cpp.

References isTree().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl, params; return isTree(s, SIGHSLIDER, lbl, params);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigHSlider ( Tree  s,
Tree label,
Tree cur,
Tree min,
Tree max,
Tree step 
)

Definition at line 214 of file signals.cpp.

References isTree(), and nth().

{
    Tree params;
    if (isTree(s, SIGHSLIDER, lbl, params)) {
        cur = nth(params, 0);
        min = nth(params, 1);
        max = nth(params, 2);
        step= nth(params, 3);
        return true;
    } else {
        return false;
    }
}

Here is the call graph for this function:

bool isSigInput ( Tree  t,
int *  i 
)

Definition at line 48 of file signals.cpp.

References isInt(), isTree(), and CTree::node().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), printSignal(), sigFloatCast(), sigLabel(), verySimple(), and sigvisitor::visit().

{ Tree x; return isTree(t, SIGINPUT, x) && isInt(x->node(),i);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigInt ( Tree  t,
int *  i 
)
bool isSigIntCast ( Tree  t)

Definition at line 184 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigIntCast(), sigLabel(), simplification(), and sigvisitor::visit().

{ Tree x; return isTree(t, SIGINTCAST, x);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigIntCast ( Tree  t,
Tree x 
)

Definition at line 185 of file signals.cpp.

References isTree().

{ return isTree(t, SIGINTCAST, x);          }

Here is the call graph for this function:

bool isSigIota ( Tree  t,
Tree t0 
)

Definition at line 70 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), ppsig::print(), and sigLabel().

{ return isTree(t, SIGIOTA, t0);    }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigMul ( Tree  a,
Tree x,
Tree y 
)

Definition at line 345 of file signals.cpp.

References isSigBinOp(), and kMul.

Referenced by normalizeFixedDelayTerm().

{
    int op;
    return isSigBinOp(a, &op, x, y) && (op == kMul);
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigNumEntry ( Tree  s)

Definition at line 252 of file signals.cpp.

References isTree().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl, params; return isTree(s, SIGNUMENTRY, lbl, params); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigNumEntry ( Tree  s,
Tree label,
Tree cur,
Tree min,
Tree max,
Tree step 
)

Definition at line 254 of file signals.cpp.

References isTree(), and nth().

{
    Tree params;
    if (isTree(s, SIGNUMENTRY, lbl, params)) {
        cur = nth(params, 0);
        min = nth(params, 1);
        max = nth(params, 2);
        step= nth(params, 3);
        return true;
    } else {
        return false;
    }
}

Here is the call graph for this function:

bool isSigOutput ( Tree  t,
int *  i,
Tree t0 
)

Definition at line 52 of file signals.cpp.

References isInt(), isTree(), and CTree::node().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ Tree x; return isTree(t, SIGOUTPUT, x, t0) && isInt(x->node(),i);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigPrefix ( Tree  t,
Tree t0,
Tree t1 
)

Definition at line 66 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), OccMarkup::incOcc(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ return isTree(t, SIGPREFIX, t0, t1);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigRDTbl ( Tree  s,
Tree t,
Tree i 
)

Definition at line 77 of file signals.cpp.

References isTree().

Referenced by docTableConverter(), ScalarCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ return isTree(s, SIGRDTBL, t, i);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigReal ( Tree  t,
double *  r 
)

Definition at line 44 of file signals.cpp.

References isDouble(), and CTree::node().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), isBoxNumeric(), isVerySimpleFormula(), numericBoxSimplification(), ppsig::print(), printSignal(), sigLabel(), verySimple(), and sigvisitor::visit().

{ return isDouble(t->node(), r);    }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigSelect2 ( Tree  t,
Tree selector,
Tree s1,
Tree s2 
)

Definition at line 116 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), sigLabel(), simplification(), and sigvisitor::visit().

{ return isTree(t, SIGSELECT2, selector, s1, s2); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigSelect3 ( Tree  t,
Tree selector,
Tree s1,
Tree s2,
Tree s3 
)

Definition at line 119 of file signals.cpp.

References isTree().

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), OccMarkup::incOcc(), infereSigOrder(), infereSigType(), ppsig::print(), ScalarCompiler::sharingAnnotation(), sigLabel(), simplification(), and sigvisitor::visit().

{ return isTree(t, SIGSELECT3, selector, s1, s2, s3); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigSub ( Tree  a,
Tree x,
Tree y 
)

Definition at line 351 of file signals.cpp.

References isSigBinOp(), and kSub.

{
    int op;
    return isSigBinOp(a, &op, x, y) && (op == kSub);
}

Here is the call graph for this function:

bool isSigTable ( Tree  t,
Tree id,
Tree n,
Tree sig 
)

Definition at line 85 of file signals.cpp.

References isTree().

Referenced by computePrivatisation(), docTableConverter(), ScalarCompiler::generateCode(), ScalarCompiler::generateRDTbl(), getSubSignals(), infereSigOrder(), infereSigType(), labelize(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ return isTree(t, SIGTABLE, id, n, sig);   }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigTuple ( Tree  s,
int *  mode,
Tree ls 
)

Definition at line 375 of file signals.cpp.

References isInt(), isTree(), and CTree::node().

Referenced by sigCartesianProd(), and sigvisitor::visit().

{ Tree m; return isTree(s, SIGTUPLE, m, ls) && isInt(m->node(), mode); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigTupleAccess ( Tree  s,
Tree ts,
Tree idx 
)

Definition at line 380 of file signals.cpp.

References isTree().

Referenced by sigvisitor::visit().

{ return isTree(s, SIGTUPLEACCESS, ts, idx); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigVBargraph ( Tree  s)

Definition at line 280 of file signals.cpp.

References isTree(), max(), and min().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl, min, max, x; return isTree(s, SIGVBARGRAPH, lbl, min, max, x);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigVBargraph ( Tree  s,
Tree label,
Tree min,
Tree max,
Tree t0 
)

Definition at line 281 of file signals.cpp.

References isTree().

{ return isTree(s, SIGVBARGRAPH, lbl, min, max, x); }

Here is the call graph for this function:

bool isSigVSlider ( Tree  s)

Definition at line 232 of file signals.cpp.

References isTree().

Referenced by Description::addWidget(), ScalarCompiler::generateCode(), DocCompiler::generateCode(), Compiler::generateWidgetCode(), Compiler::generateWidgetMacro(), getSubSignals(), infereSigOrder(), infereSigType(), isVerySimpleFormula(), ppsig::print(), sigLabel(), and sigvisitor::visit().

{ Tree lbl, params; return isTree(s, SIGVSLIDER, lbl, params);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigVSlider ( Tree  s,
Tree label,
Tree cur,
Tree min,
Tree max,
Tree step 
)

Definition at line 234 of file signals.cpp.

References isTree(), and nth().

{
    Tree params;
    if (isTree(s, SIGVSLIDER, lbl, params)) {
        cur = nth(params, 0);
        min = nth(params, 1);
        max = nth(params, 2);
        step= nth(params, 3);
        return true;
    } else {
        return false;
    }
}

Here is the call graph for this function:

bool isSigWRTbl ( Tree  u,
Tree id,
Tree t,
Tree i,
Tree s 
)

Definition at line 81 of file signals.cpp.

References isTree().

Referenced by computePrivatisation(), docTableConverter(), ScalarCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), labelize(), ppsig::print(), printSignal(), sigLabel(), and sigvisitor::visit().

{ return isTree(u, SIGWRTBL, id, t, i, s);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isZero ( Tree  a) [inline]

Definition at line 185 of file signals.hh.

References CTree::node().

Referenced by mterm::cleanup(), mterm::isNotZero(), aterm::normalizedTree(), mterm::normalizedTree(), normalizeFixedDelayTerm(), mterm::operator+=(), mterm::operator-=(), setSigNickname(), simplification(), and simplifyingAdd().

{ assert(a); return isZero(a->node()); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree minusNum ( Tree  a)

Definition at line 325 of file signals.cpp.

References minusNode(), CTree::node(), and tree().

Referenced by mterm::normalizedTree(), and mterm::operator-=().

{
    Tree r = tree(minusNode(a->node()));
    //cerr.flags(ios::showpoint); cerr << "minusNum " << *a << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree mulNums ( Tree  a,
Tree  b 
)

Definition at line 304 of file signals.cpp.

References mulNode(), CTree::node(), and tree().

Referenced by mterm::operator*=().

{
    Tree r = tree(mulNode(a->node(),b->node()));
    //cerr.flags(ios::showpoint); cerr << "mulNums " << *a << "*" << *b << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigAdd ( Tree  x,
Tree  y 
) [inline]

Definition at line 148 of file signals.hh.

References kAdd, and sigBinOp().

Referenced by iterateSum(), mix(), normalizeFixedDelayTerm(), prim2name(), simplifyingAdd(), and yyparse().

{ return sigBinOp(kAdd, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigAND ( Tree  x,
Tree  y 
) [inline]

Definition at line 154 of file signals.hh.

References kAND, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kAND, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigAttach ( Tree  x,
Tree  y 
)

Definition at line 285 of file signals.cpp.

References tree().

Referenced by prim2name(), and yyparse().

{ return tree(SIGATTACH, t0, t1);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigBinOp ( int  op,
Tree  x,
Tree  y 
)

Definition at line 125 of file signals.cpp.

References tree().

Referenced by sigAdd(), sigAND(), sigDiv(), sigEQ(), sigGE(), sigGT(), sigLE(), sigLeftShift(), sigLT(), sigMul(), sigNE(), sigOR(), sigRem(), sigRightShift(), sigSub(), and sigXOR().

{ return tree(SIGBINOP, tree(op), x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigButton ( Tree  label)

Definition at line 198 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGBUTTON, lbl);                  }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigCartesianProd ( Tree  s1,
Tree  s2 
)

Definition at line 383 of file signals.cpp.

References concat(), isSigTuple(), list1(), and sigTuple().

{
    Tree    l1, l2;
    int     m1, m2;

    if (isSigTuple(s1, &m1, l1) && (m1 == 0)) {
        // nothing to do
    } else {
        l1 = list1(s1);
    }

    if (isSigTuple(s2, &m2, l2) && (m2 == 0)) {
        // nothing to do
    } else {
        l2 = list1(s2);
    }


    return sigTuple(0, concat(l1,l2));
}

Here is the call graph for this function:

Tree sigCheckbox ( Tree  label)

Definition at line 204 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGCHECKBOX, lbl);                    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 55 of file signals.cpp.

References sigFixDelay(), and sigInt().

Referenced by makeSigProjList().

{ return sigFixDelay(t0, sigInt(0));}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 57 of file signals.cpp.

References tree().

Referenced by makeMemSigProjList(), prim1name(), and yyparse().

{ return tree(SIGDELAY1, t0);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDiv ( Tree  x,
Tree  y 
) [inline]

Definition at line 151 of file signals.hh.

References kDiv, and sigBinOp().

Referenced by combineDivLeft(), mterm::normalizedTree(), normalizeFixedDelayTerm(), prim2name(), and yyparse().

{ return sigBinOp(kDiv, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDocAccessTbl ( Tree  doctbl,
Tree  ridx 
)

Definition at line 106 of file signals.cpp.

References tree().

Referenced by docTableConverter().

{ return tree(SIGDOCACCESSTBL, tbl, ridx);      }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDocConstantTbl ( Tree  n,
Tree  init 
)

Definition at line 98 of file signals.cpp.

References tree().

Referenced by docTableConverter().

{ return tree(SIGDOCONSTANTTBL, n, sig);        }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDocWriteTbl ( Tree  n,
Tree  init,
Tree  widx,
Tree  wsig 
)

Definition at line 102 of file signals.cpp.

References tree().

Referenced by docTableConverter().

{ return tree(SIGDOCWRITETBL, n, sig, widx, wsig);      }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigEQ ( Tree  x,
Tree  y 
) [inline]

Definition at line 165 of file signals.hh.

References kEQ, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kEQ, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigFConst ( Tree  type,
Tree  name,
Tree  file 
)

Definition at line 137 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGFCONST, type, name, file);         }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigFFun ( Tree  ff,
Tree  largs 
)

Definition at line 132 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGFFUN, ff, largs);          }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigFixDelay ( Tree  t0,
Tree  t1 
)

Definition at line 61 of file signals.cpp.

References sigIntCast(), and tree().

Referenced by normalizeFixedDelayTerm(), prim2name(), sigDelay0(), and yyparse().

{ return tree(SIGFIXDELAY, t0, sigIntCast(t1));         }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 170 of file signals.cpp.

References isDouble(), isInt(), isSigFloatCast(), isSigInput(), CTree::node(), and tree().

Referenced by prim1name(), and yyparse().

{ 
    Node n = t->node();
    
    int i;      if (isInt(n, &i))           return tree(double(i)); 
    double x;   if (isDouble(n, &x))        return t;
                if (isSigFloatCast(t))      return t;
                if (isSigInput(t, &i))      return t;
     
    return tree(SIGFLOATCAST, t);   
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigFVar ( Tree  type,
Tree  name,
Tree  file 
)

Definition at line 143 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGFVAR, type, name, file);           }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigGE ( Tree  x,
Tree  y 
) [inline]

Definition at line 163 of file signals.hh.

References kGE, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kGE, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigGen ( Tree  content)

Definition at line 90 of file signals.cpp.

References tree().

Referenced by sigReadOnlyTable(), and sigWriteReadTable().

{ return tree(SIGGEN, s);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigGT ( Tree  x,
Tree  y 
) [inline]

Definition at line 161 of file signals.hh.

References kGT, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kGT, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigHBargraph ( Tree  label,
Tree  min,
Tree  max,
Tree  t0 
)

Definition at line 273 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGHBARGRAPH, lbl, min, max, x);      }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigHSlider ( Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)

Definition at line 210 of file signals.cpp.

References list4(), and tree().

Referenced by propagate().

                                            { return tree(SIGHSLIDER, lbl, list4(cur,min,max,step));        }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigInput ( int  i)

Definition at line 47 of file signals.cpp.

References tree().

Referenced by makeSigInputList(), and propagate().

{ return tree(SIGINPUT, tree(i));   }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigInt ( int  i)

Signals Block-diagrams are converted into signal expressions via symbolic propagation.

Definition at line 40 of file signals.cpp.

References tree().

Referenced by mix(), propagate(), sigDelay0(), and sigPow().

{ return tree(i);                   }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 159 of file signals.cpp.

References isDouble(), isInt(), isSigIntCast(), CTree::node(), and tree().

Referenced by prim1name(), sigFixDelay(), sigSelect2(), sigSelect3(), and yyparse().

{ 
    Node n = t->node();
    
    int i;      if (isInt(n, &i))           return t; 
    double x;   if (isDouble(n, &x))        return tree(int(x));
                if (isSigIntCast(t))        return t;
     
    return tree(SIGINTCAST, t);   
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigIota ( Tree  t0)

Definition at line 69 of file signals.cpp.

References tree().

{ return tree(SIGIOTA, t0);         }

Here is the call graph for this function:

Tree sigLE ( Tree  x,
Tree  y 
) [inline]

Definition at line 164 of file signals.hh.

References kLE, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kLE, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigLeftShift ( Tree  x,
Tree  y 
) [inline]

Definition at line 158 of file signals.hh.

References kLsh, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kLsh, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigLT ( Tree  x,
Tree  y 
) [inline]

Definition at line 162 of file signals.hh.

References kLT, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kLT, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigMul ( Tree  x,
Tree  y 
) [inline]

Definition at line 150 of file signals.hh.

References kMul, and sigBinOp().

Referenced by combineMulLeft(), aterm::factorize(), isInverter(), iterateProd(), normalizeFixedDelayTerm(), prim2name(), and yyparse().

{ return sigBinOp(kMul, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigNE ( Tree  x,
Tree  y 
) [inline]

Definition at line 166 of file signals.hh.

References kNE, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kNE, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigNumEntry ( Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)

Definition at line 250 of file signals.cpp.

References list4(), and tree().

Referenced by propagate().

                                            { return tree(SIGNUMENTRY, lbl, list4(cur,min,max,step));       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigOR ( Tree  x,
Tree  y 
) [inline]

Definition at line 155 of file signals.hh.

References kOR, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kOR, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigOutput ( int  i,
Tree  t 
)

Definition at line 51 of file signals.cpp.

References tree().

{ return tree(SIGOUTPUT, tree(i), t0);  }

Here is the call graph for this function:

Tree sigPrefix ( Tree  t0,
Tree  t1 
)

Definition at line 65 of file signals.cpp.

References tree().

Referenced by applyList(), prim2name(), and yyparse().

{ return tree(SIGPREFIX, t0, t1);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigProj ( int  i,
Tree  rgroup 
)

Definition at line 150 of file signals.cpp.

References tree().

Referenced by ScalarCompiler::generateRec(), DocCompiler::generateRec(), makeMemSigProjList(), and makeSigProjList().

{ return tree(SIGPROJ, tree(i), rgroup);    }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigRDTbl ( Tree  t,
Tree  i 
)

Definition at line 76 of file signals.cpp.

References tree().

Referenced by sigReadOnlyTable(), and sigWriteReadTable().

{ return tree(SIGRDTBL, t, i);  }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigReadOnlyTable ( Tree  n,
Tree  init,
Tree  ridx 
) [inline]

Definition at line 100 of file signals.hh.

References nil, sigGen(), sigRDTbl(), and sigTable().

Referenced by prim3name(), and yyparse().

{
    return sigRDTbl(sigTable(nil, n, sigGen(init)), ridx);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigReal ( double  n)

Definition at line 43 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(r);                   }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigRem ( Tree  x,
Tree  y 
) [inline]

Definition at line 152 of file signals.hh.

References kRem, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kRem, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigRightShift ( Tree  x,
Tree  y 
) [inline]

Definition at line 159 of file signals.hh.

References kRsh, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kRsh, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigSelect2 ( Tree  selector,
Tree  s1,
Tree  s2 
)

Definition at line 115 of file signals.cpp.

References sigIntCast(), and tree().

Referenced by prim3name(), simplification(), and yyparse().

{ return tree(SIGSELECT2, sigIntCast(selector), s1, s2); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigSelect3 ( Tree  selector,
Tree  s1,
Tree  s2,
Tree  s3 
)

Definition at line 118 of file signals.cpp.

References sigIntCast(), and tree().

Referenced by prim4name(), and yyparse().

{ return tree(SIGSELECT3, sigIntCast(selector), s1, s2, s3); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigSub ( Tree  x,
Tree  y 
) [inline]

Definition at line 149 of file signals.hh.

References kSub, and sigBinOp().

Referenced by isInverter(), aterm::normalizedTree(), prim2name(), and yyparse().

{ return sigBinOp(kSub, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigTable ( Tree  id,
Tree  n,
Tree  sig 
)

Definition at line 84 of file signals.cpp.

References tree().

Referenced by labelize(), sigReadOnlyTable(), and sigWriteReadTable().

{ return tree(SIGTABLE, id, n, sig);        }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigTuple ( int  mode,
Tree  ls 
)

Definition at line 374 of file signals.cpp.

References tree().

Referenced by sigCartesianProd().

{ return tree(SIGTUPLE, tree(mode), ls); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigTupleAccess ( Tree  ts,
Tree  idx 
)

Definition at line 379 of file signals.cpp.

References tree().

{ return tree(SIGTUPLEACCESS, ts, idx); }

Here is the call graph for this function:

Tree sigVBargraph ( Tree  label,
Tree  min,
Tree  max,
Tree  t0 
)

Definition at line 279 of file signals.cpp.

References tree().

Referenced by propagate().

{ return tree(SIGVBARGRAPH, lbl, min, max, x);      }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigVSlider ( Tree  label,
Tree  cur,
Tree  min,
Tree  max,
Tree  step 
)

Definition at line 230 of file signals.cpp.

References list4(), and tree().

Referenced by propagate().

                                            { return tree(SIGVSLIDER, lbl, list4(cur,min,max,step));        }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigWriteReadTable ( Tree  n,
Tree  init,
Tree  widx,
Tree  wsig,
Tree  ridx 
) [inline]

Definition at line 95 of file signals.hh.

References nil, sigGen(), sigRDTbl(), sigTable(), and sigWRTbl().

Referenced by prim5name(), and yyparse().

{
    return sigRDTbl(sigWRTbl(nil, sigTable(nil, n, sigGen(init)), widx, wsig), ridx);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigWRTbl ( Tree  id,
Tree  t,
Tree  i,
Tree  s 
)

Definition at line 80 of file signals.cpp.

References tree().

Referenced by computePrivatisation(), labelize(), and sigWriteReadTable().

{ return tree(SIGWRTBL, id, t, i, s);   }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigXOR ( Tree  x,
Tree  y 
) [inline]

Definition at line 156 of file signals.hh.

References kXOR, and sigBinOp().

Referenced by prim2name(), and yyparse().

{ return sigBinOp(kXOR, x, y); }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree subNums ( Tree  a,
Tree  b 
)

Definition at line 297 of file signals.cpp.

References CTree::node(), subNode(), and tree().

Referenced by mterm::operator-=().

{
    Tree r = tree(subNode(a->node(),b->node()));
    //cerr.flags(ios::showpoint); cerr << "subNums " << *a << "-" << *b << " -> " << *r << endl;
    return r;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool verySimple ( Tree  exp)

Test if exp is very simple that is it can't be considered a real component.

Parameters:
expthe signal we want to test
Returns:
true if it a very simple signal

Definition at line 412 of file signals.cpp.

References isSigFConst(), isSigInput(), isSigInt(), isSigReal(), and name().

Referenced by VectorCompiler::generateCacheCode(), VectorCompiler::generateDelayVec(), and VectorCompiler::needSeparateLoop().

{
    int     i;
    double  r;
    Tree    type, name, file;
    
    return  isSigInt(exp, &i) 
            ||  isSigReal(exp, &r)
            ||  isSigInput(exp, &i)
            ||  isSigFConst(exp, type, name, file);
}

Here is the call graph for this function:

Here is the caller graph for this function: