FAUST compiler  0.9.9.6b8
Functions | Variables
signals.cpp File Reference
#include "signals.hh"
Include dependency graph for signals.cpp:

Go to the source code of this file.

Functions

Tree sigInt (int i)
 Signals. More...
 
bool isSigInt (Tree t, int *i)
 
Tree sigReal (double r)
 
bool isSigReal (Tree t, double *r)
 
Tree sigInput (int i)
 
bool isSigInput (Tree t, int *i)
 
Tree sigOutput (int i, Tree t0)
 
bool isSigOutput (Tree t, int *i, Tree &t0)
 
Tree sigDelay0 (Tree t0)
 
Tree sigDelay1 (Tree t0)
 
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 sigRDTbl (Tree t, Tree i)
 
bool isSigRDTbl (Tree s, Tree &t, Tree &i)
 
Tree sigWRTbl (Tree id, Tree t, Tree i, Tree s)
 
bool isSigWRTbl (Tree u, Tree &id, Tree &t, Tree &i, Tree &s)
 
Tree sigTable (Tree id, Tree n, Tree sig)
 
bool isSigTable (Tree t, Tree &id, Tree &n, Tree &sig)
 
Tree sigGen (Tree s)
 
bool isSigGen (Tree t, Tree &x)
 
bool isSigGen (Tree t)
 
Tree sigDocConstantTbl (Tree n, Tree sig)
 
bool isSigDocConstantTbl (Tree t, Tree &n, Tree &sig)
 
Tree sigDocWriteTbl (Tree n, Tree sig, Tree widx, Tree wsig)
 
bool isSigDocWriteTbl (Tree t, Tree &n, Tree &sig, Tree &widx, Tree &wsig)
 
Tree sigDocAccessTbl (Tree tbl, Tree ridx)
 
bool isSigDocAccessTbl (Tree t, Tree &tbl, Tree &ridx)
 
Tree sigSelect2 (Tree selector, Tree s1, Tree s2)
 
bool isSigSelect2 (Tree t, Tree &selector, Tree &s1, Tree &s2)
 
Tree sigSelect3 (Tree selector, Tree s1, Tree s2, Tree s3)
 
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 sigProj (int i, Tree rgroup)
 
bool isProj (Tree t, int *i, Tree &rgroup)
 
Tree sigIntCast (Tree t)
 
Tree sigFloatCast (Tree t)
 
bool isSigIntCast (Tree t)
 
bool isSigIntCast (Tree t, Tree &x)
 
bool isSigFloatCast (Tree t)
 
bool isSigFloatCast (Tree t, Tree &x)
 
Tree sigButton (Tree lbl)
 
bool isSigButton (Tree s)
 
bool isSigButton (Tree s, Tree &lbl)
 
Tree sigCheckbox (Tree lbl)
 
bool isSigCheckbox (Tree s)
 
bool isSigCheckbox (Tree s, Tree &lbl)
 
Tree sigWaveform (const tvec &wf)
 
bool isSigWaveform (Tree s)
 
Tree sigHSlider (Tree lbl, Tree cur, Tree min, Tree max, Tree step)
 
bool isSigHSlider (Tree s)
 
bool isSigHSlider (Tree s, Tree &lbl, Tree &cur, Tree &min, Tree &max, Tree &step)
 
Tree sigVSlider (Tree lbl, Tree cur, Tree min, Tree max, Tree step)
 
bool isSigVSlider (Tree s)
 
bool isSigVSlider (Tree s, Tree &lbl, Tree &cur, Tree &min, Tree &max, Tree &step)
 
Tree sigNumEntry (Tree lbl, Tree cur, Tree min, Tree max, Tree step)
 
bool isSigNumEntry (Tree s)
 
bool isSigNumEntry (Tree s, Tree &lbl, Tree &cur, Tree &min, Tree &max, Tree &step)
 
Tree sigHBargraph (Tree lbl, Tree min, Tree max, Tree x)
 
bool isSigHBargraph (Tree s)
 
bool isSigHBargraph (Tree s, Tree &lbl, Tree &min, Tree &max, Tree &x)
 
Tree sigVBargraph (Tree lbl, Tree min, Tree max, Tree x)
 
bool isSigVBargraph (Tree s)
 
bool isSigVBargraph (Tree s, Tree &lbl, Tree &min, Tree &max, Tree &x)
 
Tree sigAttach (Tree t0, Tree t1)
 
bool isSigAttach (Tree t, Tree &t0, Tree &t1)
 
Tree addNums (Tree a, Tree b)
 
Tree subNums (Tree a, Tree b)
 
Tree mulNums (Tree a, Tree b)
 
Tree divExtendedNums (Tree a, Tree b)
 
Tree minusNum (Tree a)
 
Tree inverseNum (Tree a)
 
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 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)
 
bool verySimple (Tree exp)
 Test if exp is very simple that is it can't be considered a real component. More...
 

Variables

Sym SIGINPUT = symbol ("sigInput")
 
Sym SIGOUTPUT = symbol ("sigOutput")
 
Sym SIGDELAY1 = symbol ("sigDelay1")
 
Sym SIGFIXDELAY = symbol ("sigFixDelay")
 
Sym SIGPREFIX = symbol ("sigPrefix")
 
Sym SIGIOTA = symbol ("sigIota")
 
Sym SIGRDTBL = symbol ("SigRDTbl")
 
Sym SIGWRTBL = symbol ("SigWRTbl")
 
Sym SIGTABLE = symbol ("SigTable")
 
Sym SIGGEN = symbol ("SigGen")
 
Sym SIGDOCONSTANTTBL = symbol ("SigDocConstantTbl")
 
Sym SIGDOCWRITETBL = symbol ("SigDocWriteTbl")
 
Sym SIGDOCACCESSTBL = symbol ("SigDocAccessTbl")
 
Sym SIGSELECT2 = symbol ("SigSelect2")
 
Sym SIGSELECT3 = symbol ("SigSelect3")
 
Sym SIGBINOP = symbol ("SigBinOp")
 
Sym SIGFFUN = symbol ("SigFFun")
 
Sym SIGFCONST = symbol ("SigFConst")
 
Sym SIGFVAR = symbol ("SigFVar")
 
Sym SIGPROJ = symbol ("SigProj")
 
Sym SIGINTCAST = symbol ("sigIntCast")
 
Sym SIGFLOATCAST = symbol ("sigFloatCast")
 
Sym SIGBUTTON = symbol ("SigButton")
 
Sym SIGCHECKBOX = symbol ("SigCheckbox")
 
Sym SIGWAVEFORM = symbol("SigWaveform")
 
Sym SIGHSLIDER = symbol ("SigHSlider")
 
Sym SIGVSLIDER = symbol ("SigVSlider")
 
Sym SIGNUMENTRY = symbol ("SigNumEntry")
 
Sym SIGHBARGRAPH = symbol ("SigHBargraph")
 
Sym SIGVBARGRAPH = symbol ("SigVBargraph")
 
Sym SIGATTACH = symbol ("sigAttach")
 
Sym SIGTUPLE = symbol ("SigTuple")
 
Sym SIGTUPLEACCESS = symbol ("SigTupleAccess")
 

Function Documentation

Tree addNums ( Tree  a,
Tree  b 
)

Definition at line 295 of file signals.cpp.

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

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

296 {
297  Tree r = tree(addNode(a->node(),b->node()));
298  //cerr.flags(ios::showpoint); cerr << "addNums " << *a << "+" << *b << " -> " << *r << endl;
299  return r;
300 }
const Node addNode(const Node &x, const Node &y)
Definition: node.hh:241
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Tree tree(const Node &n)
Definition: tree.hh:186

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 323 of file signals.cpp.

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

Referenced by mterm::operator/=().

324 {
325  Tree r = tree(divExtendedNode(a->node(),b->node()));
326  //cerr.flags(ios::showpoint); cerr << "divExtendeNums " << *a << "/" << *b << " -> " << *r << endl;
327  return r;
328 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node divExtendedNode(const Node &x, const Node &y)
Definition: node.hh:250
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree inverseNum ( Tree  a)

Definition at line 337 of file signals.cpp.

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

338 {
339  Tree r = tree(inverseNode(a->node()));
340  //cerr.flags(ios::showpoint); cerr << "inverseNum " << *a << " -> " << *r << endl;
341  return r;
342 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Tree tree(const Node &n)
Definition: tree.hh:186
const Node inverseNode(const Node &x)
Definition: node.hh:263

Here is the call 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().

151 { Tree x; return isTree(t, SIGPROJ, x, rgroup) && isInt(x->node(), i); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGPROJ
Definition: signals.cpp:149
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
bool isInt(const Node &n)
Definition: node.hh:126

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 344 of file signals.cpp.

References isSigBinOp(), and kAdd.

345 {
346  int op;
347  return isSigBinOp(a, &op, x, y) && (op == kAdd);
348 }
Definition: binop.hh:56
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
Definition: signals.cpp:126

Here is the call graph for this function:

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

Definition at line 291 of file signals.cpp.

References isTree().

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

291 { return isTree(t, SIGATTACH, t0, t1); }
Sym SIGATTACH
Definition: signals.cpp:289
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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 
)

Definition at line 126 of file signals.cpp.

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

Referenced by ScalarCompiler::generateCode(), DocCompiler::generateCode(), getSubSignals(), infereSigOrder(), infereSigType(), isSigAdd(), isSigDiv(), isSigMul(), isSigSub(), mterm::operator*=(), aterm::operator+=(), aterm::operator-=(), mterm::operator/=(), ppsig::print(), printSignal(), sigLabel(), simplification(), and sigvisitor::visit().

126 { Tree t; return isTree(s, SIGBINOP, t, x, y) && isInt(t->node(),op); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGBINOP
Definition: signals.cpp:124
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
bool isInt(const Node &n)
Definition: node.hh:126

Here is the call graph for this function:

Here is the caller graph for this function:

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().

199 { Tree lbl; return isTree(s, SIGBUTTON, lbl); }
Sym SIGBUTTON
Definition: signals.cpp:197
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigButton ( Tree  s,
Tree lbl 
)

Definition at line 200 of file signals.cpp.

References isTree().

200 { return isTree(s, SIGBUTTON, lbl); }
Sym SIGBUTTON
Definition: signals.cpp:197
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

205 { Tree lbl; return isTree(s, SIGCHECKBOX, lbl); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Sym SIGCHECKBOX
Definition: signals.cpp:203

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigCheckbox ( Tree  s,
Tree lbl 
)

Definition at line 206 of file signals.cpp.

References isTree().

206 { return isTree(s, SIGCHECKBOX, lbl); }
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Sym SIGCHECKBOX
Definition: signals.cpp:203

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().

58 { return isTree(t, SIGDELAY1, t0); }
Sym SIGDELAY1
Definition: signals.cpp:54
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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 362 of file signals.cpp.

References isSigBinOp(), and kDiv.

Referenced by normalizeFixedDelayTerm().

363 {
364  int op;
365  return isSigBinOp(a, &op, x, y) && (op == kDiv);
366 }
Definition: binop.hh:56
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
Definition: signals.cpp:126

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocAccessTbl ( Tree  t,
Tree tbl,
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().

107 { return isTree(t, SIGDOCACCESSTBL, tbl, ridx); }
Sym SIGDOCACCESSTBL
Definition: signals.cpp:105
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocConstantTbl ( Tree  t,
Tree n,
Tree sig 
)

Definition at line 99 of file signals.cpp.

References isTree().

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

99 { return isTree(t, SIGDOCONSTANTTBL, n, sig); }
Sym SIGDOCONSTANTTBL
Definition: signals.cpp:97
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigDocWriteTbl ( Tree  t,
Tree n,
Tree sig,
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().

103 { return isTree(t, SIGDOCWRITETBL, n, sig, widx, wsig); }
Sym SIGDOCWRITETBL
Definition: signals.cpp:101
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

138 { Tree t,n,f; return isTree(s, SIGFCONST, t, n, f); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGFCONST
Definition: signals.cpp:136
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

139 { return isTree(s, SIGFCONST,type, name, file); }
Sym SIGFCONST
Definition: signals.cpp:136
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

133 { return isTree(s, SIGFFUN, ff, largs); }
Sym SIGFFUN
Definition: signals.cpp:131
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 62 of file signals.cpp.

References isTree().

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

62 { return isTree(t, SIGFIXDELAY, t0, t1); }
Sym SIGFIXDELAY
Definition: signals.cpp:60
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

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().

187 { Tree x; return isTree(t, SIGFLOATCAST, x);}
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGFLOATCAST
Definition: signals.cpp:157
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

188 { return isTree(t, SIGFLOATCAST, x); }
Sym SIGFLOATCAST
Definition: signals.cpp:157
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

144 { Tree t,n,f; return isTree(s, SIGFVAR, t, n, f); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGFVAR
Definition: signals.cpp:142
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

145 { return isTree(s, SIGFVAR, type, name, file); }
Sym SIGFVAR
Definition: signals.cpp:142
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

bool isSigGen ( Tree  t,
Tree x 
)

Definition at line 91 of file signals.cpp.

References isTree().

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

91 { return isTree(t, SIGGEN, x); }
Sym SIGGEN
Definition: signals.cpp:89
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigGen ( Tree  t)

Definition at line 92 of file signals.cpp.

References CTree::node().

92 { return t->node()== Node(SIGGEN); }
Sym SIGGEN
Definition: signals.cpp:89
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
const Node & node() const
return the content of the tree
Definition: tree.hh:143

Here is the call graph for this function:

bool isSigHBargraph ( Tree  s)

Definition at line 279 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().

279 { Tree lbl, min, max, x; return isTree(s, SIGHBARGRAPH, lbl, min, max, x); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGHBARGRAPH
Definition: signals.cpp:277
double max(double x, double y)
Definition: interval.hh:60
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
double min(double x, double y)
Definition: interval.hh:59

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigHBargraph ( Tree  s,
Tree lbl,
Tree min,
Tree max,
Tree x 
)

Definition at line 280 of file signals.cpp.

References isTree().

280 { return isTree(s, SIGHBARGRAPH, lbl, min, max, x); }
Sym SIGHBARGRAPH
Definition: signals.cpp:277
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

bool isSigHSlider ( Tree  s)

Definition at line 217 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().

217 { Tree lbl, params; return isTree(s, SIGHSLIDER, lbl, params); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGHSLIDER
Definition: signals.cpp:214
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 219 of file signals.cpp.

References isTree(), and nth().

220 {
221  Tree params;
222  if (isTree(s, SIGHSLIDER, lbl, params)) {
223  cur = nth(params, 0);
224  min = nth(params, 1);
225  max = nth(params, 2);
226  step= nth(params, 3);
227  return true;
228  } else {
229  return false;
230  }
231 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGHSLIDER
Definition: signals.cpp:214
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Tree nth(Tree l, int i)
Definition: list.cpp:182

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().

48 { Tree x; return isTree(t, SIGINPUT, x) && isInt(x->node(),i); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGINPUT
Definition: signals.cpp:46
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
bool isInt(const Node &n)
Definition: node.hh:126

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().

184 { Tree x; return isTree(t, SIGINTCAST, x); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGINTCAST
Definition: signals.cpp:156
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

185 { return isTree(t, SIGINTCAST, x); }
Sym SIGINTCAST
Definition: signals.cpp:156
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

70 { return isTree(t, SIGIOTA, t0); }
Sym SIGIOTA
Definition: signals.cpp:68
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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 350 of file signals.cpp.

References isSigBinOp(), and kMul.

Referenced by normalizeFixedDelayTerm().

351 {
352  int op;
353  return isSigBinOp(a, &op, x, y) && (op == kMul);
354 }
Definition: binop.hh:56
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
Definition: signals.cpp:126

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigNumEntry ( Tree  s)

Definition at line 257 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().

257 { Tree lbl, params; return isTree(s, SIGNUMENTRY, lbl, params); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Sym SIGNUMENTRY
Definition: signals.cpp:254

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 259 of file signals.cpp.

References isTree(), and nth().

260 {
261  Tree params;
262  if (isTree(s, SIGNUMENTRY, lbl, params)) {
263  cur = nth(params, 0);
264  min = nth(params, 1);
265  max = nth(params, 2);
266  step= nth(params, 3);
267  return true;
268  } else {
269  return false;
270  }
271 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Sym SIGNUMENTRY
Definition: signals.cpp:254
Tree nth(Tree l, int i)
Definition: list.cpp:182

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().

52 { Tree x; return isTree(t, SIGOUTPUT, x, t0) && isInt(x->node(),i); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGOUTPUT
Definition: signals.cpp:50
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
bool isInt(const Node &n)
Definition: node.hh:126

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().

66 { return isTree(t, SIGPREFIX, t0, t1); }
Sym SIGPREFIX
Definition: signals.cpp:64
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

77 { return isTree(s, SIGRDTBL, t, i); }
Sym SIGRDTBL
Definition: signals.cpp:75
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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().

44 { return isDouble(t->node(), r); }
const Node & node() const
return the content of the tree
Definition: tree.hh:143
bool isDouble(const Node &n)
Definition: node.hh:143

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().

116 { return isTree(t, SIGSELECT2, selector, s1, s2); }
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Sym SIGSELECT2
Definition: signals.cpp:112

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().

119 { return isTree(t, SIGSELECT3, selector, s1, s2, s3); }
Sym SIGSELECT3
Definition: signals.cpp:113
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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 356 of file signals.cpp.

References isSigBinOp(), and kSub.

357 {
358  int op;
359  return isSigBinOp(a, &op, x, y) && (op == kSub);
360 }
bool isSigBinOp(Tree s, int *op, Tree &x, Tree &y)
Definition: signals.cpp:126
Definition: binop.hh:56

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().

85 { return isTree(t, SIGTABLE, id, n, sig); }
Sym SIGTABLE
Definition: signals.cpp:83
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

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 380 of file signals.cpp.

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

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

380 { Tree m; return isTree(s, SIGTUPLE, m, ls) && isInt(m->node(), mode); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGTUPLE
Definition: signals.cpp:374
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
bool isInt(const Node &n)
Definition: node.hh:126

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 385 of file signals.cpp.

References isTree().

Referenced by sigvisitor::visit().

385 { return isTree(s, SIGTUPLEACCESS, ts, idx); }
Sym SIGTUPLEACCESS
Definition: signals.cpp:375
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigVBargraph ( Tree  s)

Definition at line 285 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().

285 { Tree lbl, min, max, x; return isTree(s, SIGVBARGRAPH, lbl, min, max, x); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
double max(double x, double y)
Definition: interval.hh:60
Sym SIGVBARGRAPH
Definition: signals.cpp:283
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
double min(double x, double y)
Definition: interval.hh:59

Here is the call graph for this function:

Here is the caller graph for this function:

bool isSigVBargraph ( Tree  s,
Tree lbl,
Tree min,
Tree max,
Tree x 
)

Definition at line 286 of file signals.cpp.

References isTree().

286 { return isTree(s, SIGVBARGRAPH, lbl, min, max, x); }
Sym SIGVBARGRAPH
Definition: signals.cpp:283
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

bool isSigVSlider ( Tree  s)

Definition at line 237 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().

237 { Tree lbl, params; return isTree(s, SIGVSLIDER, lbl, params); }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGVSLIDER
Definition: signals.cpp:234
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 239 of file signals.cpp.

References isTree(), and nth().

240 {
241  Tree params;
242  if (isTree(s, SIGVSLIDER, lbl, params)) {
243  cur = nth(params, 0);
244  min = nth(params, 1);
245  max = nth(params, 2);
246  step= nth(params, 3);
247  return true;
248  } else {
249  return false;
250  }
251 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Sym SIGVSLIDER
Definition: signals.cpp:234
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305
Tree nth(Tree l, int i)
Definition: list.cpp:182

Here is the call graph for this function:

bool isSigWaveform ( Tree  s)

Definition at line 211 of file signals.cpp.

References isTree().

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

211 { return isTree(s, SIGWAVEFORM); }
Sym SIGWAVEFORM
Definition: signals.cpp:209
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller 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().

81 { return isTree(u, SIGWRTBL, id, t, i, s); }
Sym SIGWRTBL
Definition: signals.cpp:79
bool isTree(const Tree &t, const Node &n)
Definition: tree.cpp:305

Here is the call graph for this function:

Here is the caller graph for this function:

Tree minusNum ( Tree  a)

Definition at line 330 of file signals.cpp.

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

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

331 {
332  Tree r = tree(minusNode(a->node()));
333  //cerr.flags(ios::showpoint); cerr << "minusNum " << *a << " -> " << *r << endl;
334  return r;
335 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
const Node minusNode(const Node &x)
Definition: node.hh:260
Tree tree(const Node &n)
Definition: tree.hh:186

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 309 of file signals.cpp.

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

Referenced by mterm::operator*=().

310 {
311  Tree r = tree(mulNode(a->node(),b->node()));
312  //cerr.flags(ios::showpoint); cerr << "mulNums " << *a << "*" << *b << " -> " << *r << endl;
313  return r;
314 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
const Node mulNode(const Node &x, const Node &y)
Definition: node.hh:247
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigAttach ( Tree  t0,
Tree  t1 
)

Definition at line 290 of file signals.cpp.

References tree().

Referenced by prim2name(), and yyparse().

290 { return tree(SIGATTACH, t0, t1); }
Sym SIGATTACH
Definition: signals.cpp:289
Tree tree(const Node &n)
Definition: tree.hh:186

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().

125 { return tree(SIGBINOP, tree(op), x, y); }
Sym SIGBINOP
Definition: signals.cpp:124
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigButton ( Tree  lbl)

Definition at line 198 of file signals.cpp.

References tree().

Referenced by realPropagate().

198 { return tree(SIGBUTTON, lbl); }
Sym SIGBUTTON
Definition: signals.cpp:197
Tree tree(const Node &n)
Definition: tree.hh:186

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 388 of file signals.cpp.

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

389 {
390  Tree l1, l2;
391  int m1, m2;
392 
393  if (isSigTuple(s1, &m1, l1) && (m1 == 0)) {
394  // nothing to do
395  } else {
396  l1 = list1(s1);
397  }
398 
399  if (isSigTuple(s2, &m2, l2) && (m2 == 0)) {
400  // nothing to do
401  } else {
402  l2 = list1(s2);
403  }
404 
405 
406  return sigTuple(0, concat(l1,l2));
407 }
bool isSigTuple(Tree s, int *mode, Tree &ls)
Definition: signals.cpp:380
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree list1(Tree a)
Definition: list.hh:127
Tree concat(Tree l, Tree q)
Definition: list.cpp:216
Tree sigTuple(int mode, Tree ls)
Definition: signals.cpp:379

Here is the call graph for this function:

Tree sigCheckbox ( Tree  lbl)

Definition at line 204 of file signals.cpp.

References tree().

Referenced by realPropagate().

204 { return tree(SIGCHECKBOX, lbl); }
Tree tree(const Node &n)
Definition: tree.hh:186
Sym SIGCHECKBOX
Definition: signals.cpp:203

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDelay0 ( Tree  t0)

Definition at line 55 of file signals.cpp.

References sigFixDelay(), and sigInt().

Referenced by makeSigProjList().

55 { return sigFixDelay(t0, sigInt(0));}
Tree sigFixDelay(Tree t0, Tree t1)
Definition: signals.cpp:61
Tree sigInt(int i)
Signals.
Definition: signals.cpp:40

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDelay1 ( Tree  t0)

Definition at line 57 of file signals.cpp.

References tree().

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

57 { return tree(SIGDELAY1, t0); }
Sym SIGDELAY1
Definition: signals.cpp:54
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDocAccessTbl ( Tree  tbl,
Tree  ridx 
)

Definition at line 106 of file signals.cpp.

References tree().

Referenced by docTableConverter().

106 { return tree(SIGDOCACCESSTBL, tbl, ridx); }
Sym SIGDOCACCESSTBL
Definition: signals.cpp:105
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigDocConstantTbl ( Tree  n,
Tree  sig 
)

Definition at line 98 of file signals.cpp.

References tree().

Referenced by docTableConverter().

98 { return tree(SIGDOCONSTANTTBL, n, sig); }
Sym SIGDOCONSTANTTBL
Definition: signals.cpp:97
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 102 of file signals.cpp.

References tree().

Referenced by docTableConverter().

102 { return tree(SIGDOCWRITETBL, n, sig, widx, wsig); }
Sym SIGDOCWRITETBL
Definition: signals.cpp:101
Tree tree(const Node &n)
Definition: tree.hh:186

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 realPropagate().

137 { return tree(SIGFCONST, type, name, file); }
Sym SIGFCONST
Definition: signals.cpp:136
Tree tree(const Node &n)
Definition: tree.hh:186

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 realPropagate().

132 { return tree(SIGFFUN, ff, largs); }
Sym SIGFFUN
Definition: signals.cpp:131
Tree tree(const Node &n)
Definition: tree.hh:186

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().

61 { return tree(SIGFIXDELAY, t0, sigIntCast(t1)); }
Tree sigIntCast(Tree t)
Definition: signals.cpp:159
Sym SIGFIXDELAY
Definition: signals.cpp:60
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigFloatCast ( Tree  t)

Definition at line 170 of file signals.cpp.

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

Referenced by prim1name(), and yyparse().

171 {
172  Node n = t->node();
173 
174  int i; if (isInt(n, &i)) return tree(double(i));
175  double x; if (isDouble(n, &x)) return t;
176  if (isSigFloatCast(t)) return t;
177  if (isSigInput(t, &i)) return t;
178 
179  return tree(SIGFLOATCAST, t);
180 }
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
bool isSigInput(Tree t, int *i)
Definition: signals.cpp:48
const Node & node() const
return the content of the tree
Definition: tree.hh:143
bool isDouble(const Node &n)
Definition: node.hh:143
Sym SIGFLOATCAST
Definition: signals.cpp:157
Tree tree(const Node &n)
Definition: tree.hh:186
bool isSigFloatCast(Tree t)
Definition: signals.cpp:187
bool isInt(const Node &n)
Definition: node.hh:126

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 realPropagate().

143 { return tree(SIGFVAR, type, name, file); }
Sym SIGFVAR
Definition: signals.cpp:142
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigGen ( Tree  s)

Definition at line 90 of file signals.cpp.

References tree().

Referenced by sigReadOnlyTable(), and sigWriteReadTable().

90 { return tree(SIGGEN, s); }
Sym SIGGEN
Definition: signals.cpp:89
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigHBargraph ( Tree  lbl,
Tree  min,
Tree  max,
Tree  x 
)

Definition at line 278 of file signals.cpp.

References tree().

Referenced by realPropagate().

278 { return tree(SIGHBARGRAPH, lbl, min, max, x); }
Sym SIGHBARGRAPH
Definition: signals.cpp:277
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 215 of file signals.cpp.

References list4(), and tree().

Referenced by realPropagate().

216  { return tree(SIGHSLIDER, lbl, list4(cur,min,max,step)); }
Tree list4(Tree a, Tree b, Tree c, Tree d)
Definition: list.hh:130
Sym SIGHSLIDER
Definition: signals.cpp:214
Tree tree(const Node &n)
Definition: tree.hh:186

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 ScalarCompiler::compileMultiSignal(), makeSigInputList(), and realPropagate().

47 { return tree(SIGINPUT, tree(i)); }
Sym SIGINPUT
Definition: signals.cpp:46
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigInt ( int  i)

Signals.

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

Definition at line 40 of file signals.cpp.

References tree().

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

40 { return tree(i); }
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigIntCast ( Tree  t)

Definition at line 159 of file signals.cpp.

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

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

160 {
161  Node n = t->node();
162 
163  int i; if (isInt(n, &i)) return t;
164  double x; if (isDouble(n, &x)) return tree(int(x));
165  if (isSigIntCast(t)) return t;
166 
167  return tree(SIGINTCAST, t);
168 }
Class Node = (type x (int + double + Sym + void*))
Definition: node.hh:75
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Sym SIGINTCAST
Definition: signals.cpp:156
bool isDouble(const Node &n)
Definition: node.hh:143
Tree tree(const Node &n)
Definition: tree.hh:186
bool isSigIntCast(Tree t)
Definition: signals.cpp:184
bool isInt(const Node &n)
Definition: node.hh:126

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().

69 { return tree(SIGIOTA, t0); }
Sym SIGIOTA
Definition: signals.cpp:68
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

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

Definition at line 255 of file signals.cpp.

References list4(), and tree().

Referenced by realPropagate().

256  { return tree(SIGNUMENTRY, lbl, list4(cur,min,max,step)); }
Tree list4(Tree a, Tree b, Tree c, Tree d)
Definition: list.hh:130
Tree tree(const Node &n)
Definition: tree.hh:186
Sym SIGNUMENTRY
Definition: signals.cpp:254

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigOutput ( int  i,
Tree  t0 
)

Definition at line 51 of file signals.cpp.

References tree().

51 { return tree(SIGOUTPUT, tree(i), t0); }
Sym SIGOUTPUT
Definition: signals.cpp:50
Tree tree(const Node &n)
Definition: tree.hh:186

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().

65 { return tree(SIGPREFIX, t0, t1); }
Sym SIGPREFIX
Definition: signals.cpp:64
Tree tree(const Node &n)
Definition: tree.hh:186

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().

150 { return tree(SIGPROJ, tree(i), rgroup); }
Sym SIGPROJ
Definition: signals.cpp:149
Tree tree(const Node &n)
Definition: tree.hh:186

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().

76 { return tree(SIGRDTBL, t, i); }
Sym SIGRDTBL
Definition: signals.cpp:75
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigReal ( double  r)

Definition at line 43 of file signals.cpp.

References tree().

Referenced by realPropagate().

43 { return tree(r); }
Tree tree(const Node &n)
Definition: tree.hh:186

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().

115 { return tree(SIGSELECT2, sigIntCast(selector), s1, s2); }
Tree sigIntCast(Tree t)
Definition: signals.cpp:159
Tree tree(const Node &n)
Definition: tree.hh:186
Sym SIGSELECT2
Definition: signals.cpp:112

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().

118 { return tree(SIGSELECT3, sigIntCast(selector), s1, s2, s3); }
Tree sigIntCast(Tree t)
Definition: signals.cpp:159
Sym SIGSELECT3
Definition: signals.cpp:113
Tree tree(const Node &n)
Definition: tree.hh:186

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().

84 { return tree(SIGTABLE, id, n, sig); }
Sym SIGTABLE
Definition: signals.cpp:83
Tree tree(const Node &n)
Definition: tree.hh:186

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 379 of file signals.cpp.

References tree().

Referenced by sigCartesianProd().

379 { return tree(SIGTUPLE, tree(mode), ls); }
Sym SIGTUPLE
Definition: signals.cpp:374
Tree tree(const Node &n)
Definition: tree.hh:186

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 384 of file signals.cpp.

References tree().

384 { return tree(SIGTUPLEACCESS, ts, idx); }
Sym SIGTUPLEACCESS
Definition: signals.cpp:375
Tree tree(const Node &n)
Definition: tree.hh:186

Here is the call graph for this function:

Tree sigVBargraph ( Tree  lbl,
Tree  min,
Tree  max,
Tree  x 
)

Definition at line 284 of file signals.cpp.

References tree().

Referenced by realPropagate().

284 { return tree(SIGVBARGRAPH, lbl, min, max, x); }
Tree tree(const Node &n)
Definition: tree.hh:186
Sym SIGVBARGRAPH
Definition: signals.cpp:283

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 235 of file signals.cpp.

References list4(), and tree().

Referenced by realPropagate().

236  { return tree(SIGVSLIDER, lbl, list4(cur,min,max,step)); }
Tree list4(Tree a, Tree b, Tree c, Tree d)
Definition: list.hh:130
Tree tree(const Node &n)
Definition: tree.hh:186
Sym SIGVSLIDER
Definition: signals.cpp:234

Here is the call graph for this function:

Here is the caller graph for this function:

Tree sigWaveform ( const tvec wf)

Definition at line 210 of file signals.cpp.

References tree().

Referenced by realPropagate().

210 { return tree(SIGWAVEFORM, wf); }
Sym SIGWAVEFORM
Definition: signals.cpp:209
Tree tree(const Node &n)
Definition: tree.hh:186

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().

80 { return tree(SIGWRTBL, id, t, i, s); }
Sym SIGWRTBL
Definition: signals.cpp:79
Tree tree(const Node &n)
Definition: tree.hh:186

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 302 of file signals.cpp.

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

Referenced by mterm::operator-=().

303 {
304  Tree r = tree(subNode(a->node(),b->node()));
305  //cerr.flags(ios::showpoint); cerr << "subNums " << *a << "-" << *b << " -> " << *r << endl;
306  return r;
307 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
const Node & node() const
return the content of the tree
Definition: tree.hh:143
Tree tree(const Node &n)
Definition: tree.hh:186
const Node subNode(const Node &x, const Node &y)
Definition: node.hh:244

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 417 of file signals.cpp.

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

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

418 {
419  int i;
420  double r;
421  Tree type, name, file;
422 
423  return isSigInt(exp, &i)
424  || isSigReal(exp, &r)
425  || isSigInput(exp, &i)
426  || isSigFConst(exp, type, name, file);
427 }
bool isSigFConst(Tree s)
Definition: signals.cpp:138
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
bool isSigInput(Tree t, int *i)
Definition: signals.cpp:48
bool isSigReal(Tree t, double *r)
Definition: signals.cpp:44
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98
bool isSigInt(Tree t, int *i)
Definition: signals.cpp:41

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Sym SIGATTACH = symbol ("sigAttach")

Definition at line 289 of file signals.cpp.

Sym SIGBINOP = symbol ("SigBinOp")

Definition at line 124 of file signals.cpp.

Sym SIGBUTTON = symbol ("SigButton")

Definition at line 197 of file signals.cpp.

Sym SIGCHECKBOX = symbol ("SigCheckbox")

Definition at line 203 of file signals.cpp.

Sym SIGDELAY1 = symbol ("sigDelay1")

Definition at line 54 of file signals.cpp.

Sym SIGDOCACCESSTBL = symbol ("SigDocAccessTbl")

Definition at line 105 of file signals.cpp.

Sym SIGDOCONSTANTTBL = symbol ("SigDocConstantTbl")

Definition at line 97 of file signals.cpp.

Sym SIGDOCWRITETBL = symbol ("SigDocWriteTbl")

Definition at line 101 of file signals.cpp.

Sym SIGFCONST = symbol ("SigFConst")

Definition at line 136 of file signals.cpp.

Sym SIGFFUN = symbol ("SigFFun")

Definition at line 131 of file signals.cpp.

Sym SIGFIXDELAY = symbol ("sigFixDelay")

Definition at line 60 of file signals.cpp.

Sym SIGFLOATCAST = symbol ("sigFloatCast")

Definition at line 157 of file signals.cpp.

Sym SIGFVAR = symbol ("SigFVar")

Definition at line 142 of file signals.cpp.

Sym SIGGEN = symbol ("SigGen")

Definition at line 89 of file signals.cpp.

Sym SIGHBARGRAPH = symbol ("SigHBargraph")

Definition at line 277 of file signals.cpp.

Sym SIGHSLIDER = symbol ("SigHSlider")

Definition at line 214 of file signals.cpp.

Sym SIGINPUT = symbol ("sigInput")

Definition at line 46 of file signals.cpp.

Sym SIGINTCAST = symbol ("sigIntCast")

Definition at line 156 of file signals.cpp.

Sym SIGIOTA = symbol ("sigIota")

Definition at line 68 of file signals.cpp.

Sym SIGNUMENTRY = symbol ("SigNumEntry")

Definition at line 254 of file signals.cpp.

Sym SIGOUTPUT = symbol ("sigOutput")

Definition at line 50 of file signals.cpp.

Sym SIGPREFIX = symbol ("sigPrefix")

Definition at line 64 of file signals.cpp.

Sym SIGPROJ = symbol ("SigProj")

Definition at line 149 of file signals.cpp.

Sym SIGRDTBL = symbol ("SigRDTbl")

Definition at line 75 of file signals.cpp.

Sym SIGSELECT2 = symbol ("SigSelect2")

Definition at line 112 of file signals.cpp.

Sym SIGSELECT3 = symbol ("SigSelect3")

Definition at line 113 of file signals.cpp.

Sym SIGTABLE = symbol ("SigTable")

Definition at line 83 of file signals.cpp.

Sym SIGTUPLE = symbol ("SigTuple")

Definition at line 374 of file signals.cpp.

Sym SIGTUPLEACCESS = symbol ("SigTupleAccess")

Definition at line 375 of file signals.cpp.

Sym SIGVBARGRAPH = symbol ("SigVBargraph")

Definition at line 283 of file signals.cpp.

Sym SIGVSLIDER = symbol ("SigVSlider")

Definition at line 234 of file signals.cpp.

Sym SIGWAVEFORM = symbol("SigWaveform")

Definition at line 209 of file signals.cpp.

Sym SIGWRTBL = symbol ("SigWRTbl")

Definition at line 79 of file signals.cpp.