[kepler-dev] How do I create nested loops in Kepler

Edward A. Lee eal at eecs.berkeley.edu
Wed Jul 6 20:47:40 PDT 2005


This is a very good question. In fact, I wrote a paper once on this

E. A. Lee, "Recurrences, Iteration, and Conditionals in Statically
Scheduled Block Diagram Languages," in VLSI Signal Processing III,
Ed. R. W. Brodersen and H. S. Moscovitz, IEEE Press, New York, 1988.

This paper is not on the web, although I could get you a copy if you like...

For your example, the attached model illustrates one simple technique.
It also elaborates on it, producing the iteration indices for both
the outer an inner iterations. There are also much more elaborate
models one can create using higher-order components, like the
IterateOverArray actor and many others that we haven't gotten
around to porting from Ptolemy Classic...


At 03:58 PM 7/5/2005 -0700, Dan Higgins wrote:
>Hi All,
>     I am having great difficulty in figuring out how to handle various
>looping constructs in Kepler/Ptolemy. So I ask if someone can explain
>how to handle nested loops (using SDF and/or PN directors)?
>     For example, assume I want to count from 0 to 3 twice in a row so
>that the output on a final text display is
>I've tried various ways using Ramp actors and Composite actors but
>cannot seem to get this simple case to work.
>Dan Higgins                                  higgins at nceas.ucsb.edu
>http://www.nceas.ucsb.edu/    Ph: 805-893-5127
>National Center for Ecological Analysis and Synthesis (NCEAS)
>Marine Science Building - Room 3405
>Santa Barbara, CA 93195
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org

Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iteration.xml
Type: application/xml
Size: 14160 bytes
Desc: not available
Url : http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20050706/eb60df3b/iteration.rdf

More information about the Kepler-dev mailing list