Monthly R&D Status Report Date: January 15, 1996 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 The most dramatic developments in this period have been in the area of heterogeneous targets and VHDL. These are well on track to provide a major new capability in Ptolemy for doing heterogeneous system-level design. We have begun the process of preparing to release Ptolemy 0.6, which will include the first (and very preliminary) version of Tycho, a syntax manager for Ptolemy. Details are below. 2. Significant Accomplishments 2.1. VHDL and Heterogeneous Design Work has continued in the development of a new VHDL domain for Ptolemy. This effort has progressed on three fronts. The first is the use of Design Compiler from Synopsys to synthesize VHDL code generated from dataflow graphs in Ptolemy into netlist form. There is a basic ability to control the code generation in order to affect the quality of the synthesis result. The second advance has come in the ability to generate VHDL code from dataflow graphs for efficient simulation in VHDL, and to pass that code from Ptolemy to simulators from Synopsys and Model Technology. This enables VHDL simulation from designs generated in Ptolemy. The third area of progress is the most innovative (and most speculative). Using Jose Pino's hierarchical scheduling framework (described in the previous monthly report), Jose and Mike Williamson were able to get VHDL simulations to interact with Ptolemy simulations in the SDF domain (synchronous dataflow) and, more interestingly, to interact with synthesized embedded software running in C on the host processor or in assembly code on a Motorola DSP. Their first demonstration system is an analysis/synthesis filter bank where the signal stimulus and analysis of the results are done in the CGC domain (code generation in C), the analysis half of the filter bank is done on a Motorola DSP56002, and the synthesis half of the filter bank is done in the Synopsys VHDL simulator. Both the DSP and the VHDL simulator are running code generated by Ptolemy from dataflow graphs. We believe that this is a major milestone in heterogeneous system-level design. 2.2. Control and Signal Processing Stephen Edwards and Praveen Murthy proved that Stephen's proposed execution policy for a synchronous domain in Ptolemy would always converge to the minimal fixed point, and would therefore we always produce correct results. Stephen has also determined a theoretical bound on the number of steps required to reach this fixed point (order N^2, where N is the number of actors in the graph). He is optimistic that with simple heuristics for ordering the evaluation of nodes in the graph, the actual complexity will be very close to linear. He took and passed his qualifying exam with this issue as his primary topic. 2.3. Design Methodology Management We have determined that the functionality of the DMM domain (design methodology management) can be achieved with a simpler implementation that does not require a new domain in Ptolemy. Instead, a "file" datatype will be added to the Ptolemy kernel, and a set of base-class stars will be provided where the "go" method is invoked only if the input files have been modified since the last invocation. We are currently assessing whether this new implementation can be completed and tested in time for the 0.6 release. 2.4. Code Generation Wormholes Jose Pino continues to make dramatic progress on integrating his heterogeneous scheduling framework into Ptolemy and preparing it for release. He has created targets that convert code-generation subsystems into stars in the SDF domain that may then be used the way any simulation star is used. Thus, the code generation framework in Ptolemy can be used to build library elements for simulation. This results in considerably more efficient simulations. 2.5. Technical Improvements to Ptolemy Tycho has been integrated into Pigi, the current visual editor for Ptolemy. So far, the only capabilities that are used directly are the Ptlang editor (for displaying star definitions) and the Tcl console window (for interactively entering Tcl, Tk, or Itcl commands). Mei Xiao has designed an image display widget for Tk that does a considerably better job of managing the colormap than the default photo widget. We are working on including this widget in the 0.6 release. Christopher Hylands upgraded Ptolemy to gcc-2.7.2 and ported it two new operating systems, Solaris2.5 and HPUX10.01. He also ported the Utah Raster Toolkit (which we use for video display) to Solaris and HPUX10.01 and made binaries available on the net. He also tracked down and reported some serious bugs in itcl2.0 and got John Ousterhout to state that he would like to see namespaces in the mainstream Tcl. This is a first step towards merging the now separate developments of Itcl and Tcl. 2.6. Technical Improvements to Tycho Tycho has been converted to Itcl2.0. In the process, most classes were redesigned. A major change is that all functionality (such as HTML browsers and context-sensitive editors) is available in the form of mega-widgets, not just as top-level windows. This means that these editors and display mechanism can be embedded into custom-designed windows. Also, Tycho was separated from Ptolemy so that it could be distributed and run without Ptolemy. This will permit us to release versions more frequently. It will also hopefully encourage other use of the system outside Berkeley. Tycho can now be invoked standalone, or with Ptolemy running behind the scenes, or with Ptolemy running under its current GUI. We have defined context-sensitive editors in Tycho for Itcl, Tcl, HTML, C, C++, Spice, and Ptlang (the preprocessor language used to define Ptolemy stars). We have defined a Matlab console window in Tycho that makes access to Matlab transparent and natural. Wan-Teh Chang carried out an exploratory project in which he converted portions of Tycho to Java. The conclusion was that Java by itself is a much lower-level language than Tcl/Tk/Itcl and that a serious effort to develop Tycho-like functionality in Java will have to wait for the emergence of good class libraries. We are now evaluating using Java for only the numeric-intensive and time-critical visual functions such as signal displays. Brian Evans continues to work with the MIT/Boston University RASSP team to develop IPUS, a Ptolemy domain aimed at knowledge-based signal processing. IPUS will be released as a tar overlay with the 0.6 Ptolemy release. 2.7 Release Information New domains: Process Network including gthreads. Retargetable VHDL domain. Significant new work Design Methodology Management (DMM) capability. Code generation Wormholes. Hierarchical scheduling for code generation domains. Peek/Poke Stars for interprocess communication. Improved dynamic dataflow schedulers. SDF Ptcl target (generates a textual description from a graphical one). Tcl/Matlab interface. Tcl/Mathematica interface. Tcl/Tk versions of Gantt chart. Tcl/Tk star-Galaxy-Universe cross-index. Tycho: A syntax manager for Ptolemy. Non-experimental domains (SDF and DE) do not leak memory. New stars and demonstrations New communications demonstrations. New speech coding demonstrations. New image processing stars (use matrix computation). New CGC stars. Configuration Management Issues New Makefile structure for standalone programs and custom binaries. We now use $PTARCH instead of $ARCH. HTML version of Almagest. Compiler warnings under gcc/g++ and Sun CC have been cleaned up. Tcl/Tk versions: use itcl2.0. Delivery platforms We will ship binaries for: sol2-Solaris2.4 hppa-HPUX-10.x and sun4-SunOS4.1.3. The Solaris binary distribution will use shared libraries. Hopefully, soon after the final release, we can get binaries for the following platforms: linux DECAlpha RS6000 Tar overlays to be shipped The Ptolemy sources other.src: octtools, tcltk, xv GNU sources Ptolemy binary and GNU binary overlays for sun4, sol2 and hppa. IPUS domain sources from Boston University Release schedule Fri, Jan 26 - Freeze feature set. Fri, Feb 2 - Prelease to anyone doing ports, see list above. Fri, Feb 16 - Changes from people doing other ports due. Fri, Feb 23 - Code freeze. Fri, Mar 8 - Documentation freeze. Fri, Mar 15 - Alpha release to selected sites. Fri, Mar 29 - Beta release on the net. Fri, Apr 12 - Final release. Note that this is subject to change. 3. Infrastructure The Ptolemy team has moved offices. Before, we were split between the 3'd and 5th floors of Cory Hall. Now we are all together on the 5th floor of Cory Hall. We had to upgrade our Synopsys installation (a non-trivial task) because of a bug in the C interface that affected floating-point data types. 4. Publications The following papers have been completed: [1] K. Chiang, B. L. Evans, W. T. Huang, F. Kovac, E. A. Lee, H. J. Reekie, D. G. Messerschmitt, and S. Sastry, ``Real-Time DSP for Sophomores,'' to appear in Proc. IEEE Int. Conf. on Acoustics, Speech, and Signal Processing, Atlanta, GA, May 1996. [2] P. K. Murthy and E. A. Lee, ``An Extension of Multidimensional Synchronous Dataflow to Handle Arbitrary Sampling Lattices,'' to appear in Proc. IEEE Int. Conf. on Acoustics, Speech, and Signal Processing, Atlanta, GA, May 1996. [3] J. L. Pino, M. C. Williamson, and E. A. Lee, ``Interface Synthesis in Heterogeneous System-Level DSP Design Tools,'' to appear in Proc. IEEE Int. Conf. on Acoustics, Speech, and Signal Processing, Atlanta, GA, May 1996.