Monthly R&D Status Report Date: February 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 The beta release of version 0.5 of Ptolemy is ready. During the day tomorrow (2/16), it will be made publicly available. To get it, do the following: 1. FTP to Internet host "ptolemy.eecs.berkeley.edu" 2. Login as "anonymous"; use your full email address as the password 3. cd pub/ptolemy/ptolemy0.5beta 4. get the README file and follow its instructions. The release notes are appended to this report as an appendix. A great deal of work has gone into fine tuning the code so that it would compile under not only gnu g++, but also cfront, and so that it would compile and run under Ultrix (for DEC machines) and HP Unix. We have also spent quite a bit of time with Purify, catching elusive errors and plugging memory leaks. Moreover, we have been compiling with g++ optimization (which had some trouble, particularly with old code that was imported from other systems). We do not feel that the optimized code has been sufficiently tested, so the beta release contains un-optimized executables. We hope that the final release will have optimized executables. A huge group effort went into the User's Manual, volume 1 of The Almagest, the Ptolemy manual. The postscript files for the User's Manual are included in the ftp distribution. The User's Manual has approximately 350 pages, divided into 19 chapters and four appendices, with an extensive index and glossary. The manual makes extensive use of graphics (in contrast to previous releases). Volume 2 (the Star Atlas) and 4 (the Kernel Manual) are nearly ready. Volume 3 (the Programmer's Manual) still needs quite a bit of work, and will consume much of our energy for the next two weeks or so. 2. Significant Accomplishments The alpha release has been in use for about three weeks now, with approximately 100 students working with it. Only very minor startup problems have been reported. These allowed us to refine some of the scripts that start Ptolemy, and also to refine the instructions given to users. These 100 students are taking the graduate and undergraduate signal processing classes, and consequently have been using only the most mature domain: SDF. They have been running the software on a variety of DEC and Sun machines, using a shared installation on our departmental Auspex file server. In regard to the software configuration for the 0.5 release: We identified a potential "show stopper" bug in our Fix class, which implements fixed-point arithmetic. The multiplication algorithm was not correct over the entire range of representable numbers, and rounding was not always done correctly. The class had been developed by an undergraduate student in the group, and had not (apparently) been sufficiently tested. Mike Chen, Brian Evans, Joe Buck (of Synopsys) pitched in to correct the problems. They concluded that the basic design was sound, and that the only problems were relatively minor implementation errors. However, we are still considering the fixed-point capability in Ptolemy to be "experimental." This means primarily that it does not have all of the capability yet that we expect users will want. Nonetheless, some major improvements were realized. For instance, overflow statistics are gathered and optionally reported at the end of a run, as are exceptions such as divide by zero. The HP port: The HP version of the software has been compiled and run, several weeks earlier than we had expected. Although we had planned to delay the HP release beyond the regular 0.5 release, this may not be necessary. The critical path at this point is to work with IMEC to get their dynamic linking working under version 0.5 (they have it working with 0.4.1, and only if they use a special assembler for the HP). A very large number (too many to detail here) of small software improvements were made over the last month. These include final GUI improvements, an improved method for identifying the targets that are compatible with a particular domain, improvements to the default options in various targets, fixes in the calendar-queue DE scheduler, etc. 3. Problems Encountered The only major difficulty in preparing this release was insufficient compute cycles and insufficient memory and disk space, particularly on the non-Sun platforms, but also to some degree on the Sun platforms. Over the next month or two, we plan to prepare a major equipment upgrade plan, and begin the process of obtaining approval for it. Some minor difficulties involved bugs that we identified in lib-g++, g++, and gnu make. These have been brought to the attention of our friends at Cygnus, but none were critical, so we don't expect immediate fixes. 4. Schedule Reconciliation We are precisely on schedule (the beta release was scheduled for 2/15, and here it is). We are ahead of schedule on the HP version. 5. Next Period Activities To wrap up the 0.5 release, we need to finalize the remaining three volumes of The Almagest. We believe that only the Programmer's Manual needs a great deal of more work. In addition, we need to exhaustively test the DEC, HP, cfront, and optimized g++ versions, and develop dynamic linking for the HP version. We will be creating a "Ptolemy-lite" release that will be much smaller than the full release, and will include only the most mature domains. This will make it much easier for people to experiment with the system without having to locate 130Mbytes of free disk space. The "lite" system will not support dynamic linking. We will be working on a mosaic server that mimics a Ptolemy demo so that outsiders can get a tour of Ptolemy without downloading and installing the software. With the end of the "release frenzy" in sight, we have started looking ahead. We are anxious to get back to research. The top priority topics that we will be addressing are: - possible redesign of our basic code generation mechanism, - use of higher order functions in graphical programming, - implementation of multidimensional dataflow, - rethinking the approach to image processing, - improved algorithm-level design, - a domain for design flow management, - a system-level methodology for evaluating parallel architectures, - a domain for finite-state machine control functions, and - a real-time multithreaded dataflow model of computation. The first of these is inspired by the VHDL separation of implementation from interface. We are evaluating the impact of adopting such a separation as a key part of the Ptolemy kernel. The main advantage is that this would ease retargeting of designs from one implementation (e.g. high-level algorithmic simulation) to another implementation (e.g. DSP assembly code). A secondary advantage is the avoidance of the proliferation of many different version of essentially the same function (and its documentation). 6. Budget Summary We are on-budget, as near as I can tell. Details will be provided by the University accounting office. 7. Conferences, Meetings, and Trips Edward Lee attended the Lockheed/Sanders six month review, in his capacity as chair of their Technical Review Board. 8. Other Comments We welcome feedback on the content and format of this report, as we would like these reports as useful as possible. APPENDIX Release Notes for the 0.5beta release of Ptolemy ------------------------------------------------ Please note that this is a Beta release. As a Beta release, there still may be some bugs that have slipped past our testing. If you find one, please report it promptly by sending mail to ptolemy-hackers@ohm.eecs.berkeley.edu or if you are not a member of the Ptolemy-hackers mailing list, you can send your bug report to ptolemy-request@ohm.eecs.berkeley.edu. Be sure to include the type of machine you are running Ptolemy on, the circumstances that led to the problem, the exact error message (if any), and whether or not the bug is repeatable. The Ptolemy 0.5 release has a number of new features and domains. These include a new Graphical User Interface (GUI) based on Tcl/Tk, the new Boolean Data Flow domain, fixed-point capability, matrix computations, a faster scheduler for the Discrete-Event domain, hardware/software co-design demos, a Silage code generation domain, and domains for VHDL code generation using functional and behavioral modeling. In addition, the documentation has been completely revised. There is now a Ptolemy User's Manual as well as a Ptolemy Programmer's manual. ADDITIONS: New Features in Ptolemy 0.5 Boolean Data Flow Domain: This new domain based on Joe Buck's Ph.D. work is able to statically schedule some Dynamic Data Flow graphs. Calendar Queue Scheduling: A new scheduler based on "calendar queue" gives faster performance for Discrete Event domain simulations. C Code Generation Domain: The CGC domain has a new "tcltk" target which links in the Tcl interpreter with generated C code. This allows CGC generated code to have control panels and graphical output capabilities. In addition, the CGC domain can be used to generate sound in real time on a Sparc 10 machine. Code Generation: There are three new code generation domains: Silage, VHDL behavioral modeling, and VHDL functional modeling. CG56 Domain: The Code Generation domains for the DSP56000 now supports the s56X card from Berkeley Camera Engineering. This card contains a Motorola DSP56000 chip on it and connects to the S-bus on Sun Workstations. Documentation: The Ptolemy manual (The Almagest) has been given a major overhaul. The manual is now split into a User's Manual and a Programmer's manual. The User's manual now contains more examples and for the first time includes many graphical illustrations. Fixed-Point Class: The new fixed-point class allows for fixed precision arithmetic and handles several types of overflow conditions. Fixed-Point Stars: To take advantage of the fixed-point class, a number of new stars have been added. These include fixed-point addition, multiplication, and even FIR and IIR filtering. Graphical User Interface: The Ptolemy GUI (pigi) has been rewritten to incorporate both Tcl/Tk and the Ptolemy textual interface (ptcl). There are many new dialog boxes and control panels. There are also many new stars that use the flexibility and extensibility of the new GUI. Hardware/Software Co-design Demos: The Thor domain contains a set of demos that illustrate what is possible with hardware/software co-design in Ptolemy. Unfortunately, you must have Motorola proprietary code (which is not part of the Ptolemy distribution) in order to run the demos. Matrix Class: A new matrix class has been added to the Ptolemy kernel. This new class provides for matrix manipulations as well as conversions from and to Matrix format. Matrix Stars: There are a number of new stars built around the capabilities of the Matrix class. These new stars include matrix sources, conversion stars, transpose, conjugation, and matrix arithmetic. New Stars: There are new stars in almost every domain-- many too many to list them all here. Porting: Source code for the Oct and Vem tools used by the Graphical User Interface are now included in the release. The Tcl/Tk source code is also provided. The user wishing to port Ptolemy to a new platform now has access to all of the necessary source code. Quick Tour: a new palette called "Quick Tour" in $PTOLEMY/init.pal takes the user through the features of the more mature Ptolemy domains. Recursion: The implementation of recursion has been improved for the Dynamic Data Flow domain. Silage Code Generation: There is a new Silage domain for generating Silage code. The Silage language is used by some high-level synthesis tools. Note that software to run Silage code is not included in the Ptolemy distribution. Tcl/Tk Stars: To take advantage of the new Ptolemy GUI, there are a number of new stars based on Tcl/Tk. These stars provide graphical input/output while a simulation is running. The stars generate graphs, implement control panels, monitor values during a simulation, and allow users to implement their own custom Tcl/Tk stars easily. VHDLB: There is a new VHDL code generation domain for behavioral modeling. It uses a discrete-event model of computation. Note that software to run VHDL code is not included in the Ptolemy distribution. VHDLF: This is a new domain for VHDL code generation for functional modeling in VHDL using the Synchronous Data Flow model of computation. Note that software to run VHDL code is not included in the Ptolemy distribution. What's New: A palette called "What's New" in $PTOLEMY/init.pal guides the user through an overview of what has been added in the 0.5 version of Ptolemy. CHANGES: From the 0.4.1 version to the 0.5 version of Ptolemy Environment Variables: Ptolemy is now dependent on many fewer environment variables. Once Ptolemy has been installed, only two environment variables are really necessary to get started: $PTOLEMY indicates where ptolemy has been installed, and $PT_DISPLAY indicates the editor to use when viewing text files. More complicated features may require more environment variables. .rhosts file: It is no longer necessary to maintain an ".rhosts" file in order to start pigi, the Ptolemy GUI. This was accomplished thanks to a change in the new release of VEM.