Monthly R&D Status Report Date: December 15, 1994 Title: "SYSTEM-LEVEL DESIGN METHODOLOGY FOR EMBEDDED SIGNAL PROCESSORS" Contract Number: F33615-93-C-1317 Principal Investigator: Edward A. Lee Organization: University of California at Berkeley 1. Tasks Performed This reporting period was primarily concerned with consolidating the considerable progress made in the previous one. In addition, we have begun a major study design database and design representation issues and are formulating a plan for enhancing the database and GUI technology in Ptolemy to better support design methodology management. 2. Significant Accomplishments 2.1. Mixing Control and Signal Processing We continue to gain understanding of the use of control-oriented semantics mixed with dataflow. Our view is that while dataflow is well-suited to representing signal processing algorithms, there are much better techniques available for control. The most sophisticated of these fall into the class of "synchronous languages," which includes statecharts and their many variants, Esterel, and several other formalisms. Events in these so-called "synchronous languages" are totally ordered, in contrast to dataflow where they are partially ordered. We have focused on languages with the semantics of hierarchical state machines, like Esterel and statecharts, because these appear to be most natural for control and most different from dataflow. Part of our current effort is the evaluation of existing formalisms. Statecharts have the advantage of being readily amenable to a visual syntax, as implemented for example in the iLogix Statemate system. But considerable disadvantages have been exposed in the research community, where more than 22 versions (each a different language) have been implemented. Each of these versions patches perceived disadvantages in the original semantics. Esterel, by contrast appears to be on more solid footing, but has no visual syntax and has been perceived by some as difficult to learn. We are evaluating whether the introduction of a visual syntax will help. We continue to make progress on a Ptolemy prototype that uses Esterel for controller design. Working with Frederick Boulanger of Supelec in France, we have incorporated a new back end to the Esterel compiler called occ++ that generates C++ object definitions rather than C procedures to implement the Esterel controller. This matches the requirements in Ptolemy much better, allowing for an arbitrary number of instances of each Esterel module, and allowing for natural parameterization of these modules. In the current prototype, Esterel modules are implemented only in Ptolemy stars (in the dataflow and discrete-event domains). VHDL is another possible back end for Esterel. We are working next on generalizing the wormhole mechanism in Ptolemy so that controllers can be embedded at all levels of the design hierarchy, rather than just in the leaf cells. Towards this end, we have constructed as a demonstration an SDF star that takes as parameters the names of two galaxies. It creates wormholes for these two galaxies and invokes them at runtime, arbitrarily switching between them. This is just a starting point for a star that could be used as a basis for Esterel, Tcl, or state machine controllers that invoke dataflow subsystems depending on whatever conditions they wish to depend on. This mechanism can be viewed both as a generalization of our current higher-order functions mechanism (reported previously) and as a generalization of our Wormhole concept. Although the current implementation is very preliminary, the fact that no changes to the kernel were required is testimony to the Ptolemy architecture. 2.2 Design Representation and Design Management We have implemented an extension of the textual Ptolemy interpreter, ptcl, that incorporates the Tk X window toolkit. The objective is to begin prototyping alternative design database techniques (with an eye towards abandoning oct or drastically improving it). Some examples of capabilities that we require to properly implement design methodology management include version control, multi-user access, simulation data management, and equivalence information. The later is needed to support what we call "retargeting", which is the gradual migration of designs from high-level system simulations to implementations. The current strategy is that persistent design data should take the form primarily of executable Tcl scripts. This will give the database strongly object- oriented semantics, permitting inheritance, polymorphism, and information hiding. We are currently evaluating available database software, concentrating on those systems that are in the public domain. 2.3 Image Processing Mei Xiao has made considerable progress on integrating an image processing library written by John Gauch of the University of Kansas into Ptolemy's SDF domain. This library uses a particular image format that is a superset of many popular formats and can represent gray-scale and color images in two and three dimensions. To support this, Mei has created a new image class, derived from the Message class. Mei is writing a set of stars to make use of the library. 2.4 Technical Improvements to Ptolemy Christopher Hylands ported Ptolemy to gcc-2.6.2 and released a patch to version 0.5.1 that is compatible with the new compiler. Soon, we hope to provide a new set of sources and binaries with the patch already added. The upgrade from gcc-2.5.8 to gcc-2.6.2 uncovered a few minor bugs in both Ptolemy and gcc-2.6.2. We have done a major rewrite of the basic interactive plotting widget used in the SDF, DE, and CGC domains, and added the capability to plot continuous curves, rather than only plotting points. Brian Evans has reorganized our WWW documentation to make it more informative, particularly to the newcomer. This is an ongoing process. 2.5 Outside Contributions Alan Kamas installed an HTML version of the 0.5 Ptolemy User's Manual in the Ptolemy WWW site. Thanks to Gyorgy Csertan of the Technical University of Budapest for converting this to html format. Jeurgen Weiss of the University of Stuttgart, Germany, has contributed a fixed-point mechanism for the CGC domain. This mechanism is based largely on the fixed-point class already implemented in Ptolemy, so that migration from fixed-point simulations in SDF to CGC will be relatively simple. We are currently assessing the extension for inclusion in future Ptolemy releases. The code has been folded in to our development tree. There are still bugs under gcc-2.6.2, but the additions seem to work fairly well under gcc-2.5.8. Alan Kamas has installed in our development tree a set of new stars contributed by Neal Becker of Comsat. (We continue to seek a clean mechanism to allow users to deposit their own contributions at the ftp site). 2.6 Infrastructure Our HP workstation has finally arrived, so we now have our own HP platform for maintaining the Ptolemy port. 3. Problems Encountered The Tk canvas widget proves disappointingly slow, as displayed by the newly improved interactive plotting capabilities. We are evaluating the design of the widget to see whether a simpler version might be faster. 4. Schedule Reconciliation We are on schedule. 5. Next Period Activities We expect to consolidate and document the Esterel interface so that serious experimentation with it can begin. We plan to continue to define the requirements of a revised database and GUI. We continue to evaluate dataflow scheduling, particularly cyclostatic dataflow. We continue to investigate the fundamentals of controller/dataflow integration. We've started planning the next release of Ptolemy (version 0.6). Several key students will be leaving U.C. Berkeley at the end of the Spring semester, so adding their changed to Ptolemy is important. Over the holidays, we hope to start work on a regressive test suite for Ptolemy. Our current plan is to use the GNU dejaGNU test bed in combination with oct2ptcl, a tool that converts oct facets to ptcl code. Having a test suite will help the 0.6 release effort immensely. 6. Budget Summary Details will be provided by the University accounting office. 7. Conferences, Meetings, and Trips Edward Lee gave the following talks: - Nov. 17 at INRIA, Sophia Antipolis: "Dataflow process networks and their application to parallel systems design." - Nov. 29 at the workshop on Synchronous Languages, Dagstuhl, Germany: "Dataflow process networks and their relationship to synchronous languages." - Dec. 7 at Aachen Institute of Technology, Aachen, Germany: "Dataflow Process Networks". Tom Parks and Edward Lee (at different times) visited the Aachen Institute of Technology (originators of COSSAP, now sold by Synopsys), in Aachen, Germany, and Philips Research (originators of our programmable video signal processor), in Einhoven, The Netherlands. Tom Parks also visited the Katholic University at Leuven, where much of the current work on cyclostatic dataflow is being done.