RTMPL—A Structured Programming and Documentation Utility for Real- Time Multiprocessor Simulations
Total Page:16
File Type:pdf, Size:1020Kb
N84-20259 NASA Technical Memorandum 83606 RTMPL—A Structured Programming and Documentation Utility for Real- Time Multiprocessor Simulations Dale J. Arpasi Lewis Research Center Cleveland, Ohio Prepared for the Summer Computer Simulation Conference sponsored by the Society for Computer Simulation Boston, Massachusetts, July 23-25, 1984 rWNSA RTMPL - A STRUCTURED PROGRAMMING AND DOCUMENTATION UTILITY FOR REAL-TIME MULTIPROCESSOR SIMULATIONS Dale J. Arpasi National Aeronautics and Space Administration Lewis Research Center Cleveland, Ohio 44135 ABSTRACT multiprocessor simulation programs. The language and its utility (translator) are targetable to The NASA Lewis Research Center is developing specific simulator architectures, processor-types, and evaluating experimental hardware and software and simulation requirements. To aid in portability systems to help meet future needs for real-time sim- of RTMPL, the utility is written, for the most part, ulations of air-breathing propulsion systems. The in Pascal. Two simple MC68000 assembly language Real-Time Multiprocessor Simulator (RTMPS) project routines are used for special system interfacing. is aimed at developing a prototype simulator system The RTMPL utility functions as an assembly language that uses multiple microprocessors to achieve the programmer, accepting an engineering-level des- desired computing speed and accuracy at relatively cription of the simulation and translating it into low cost. Software utilities are being developed to time-efficient assembler source code. The utility provide engineering-level programming and inter- provides program optimization and diagnostic in- active operation of the simulator. formation to the user via output listings. It also provides operational information to the simulator Two major software development efforts were operating system in the form of database files to undertaken in the RTMPS project. A real-time multi- facilitate real-time, interactive, running of the processor operating system (subject of a companion simulation. paper) was developed to provide for interactive operation of the simulator. The second effort (the The RTMPL was developed initially to support subject of this paper) was aimed at developing a the development of a Real-Time Multiprocessor structured, high-level, engineering-oriented Simulator (RTMPS) at LeRC. It was felt that rapid programming language and translator that would turnaround of code generation would be required in facilitate the programming of the simulator. the process of testing and evaluating the simulator and associated simulation techniques. In the long The Real-Time Multiprocessor Programming term it is hoped that the demonstrated value of Language (RTMPL) allows the user to describe RTMPL will help to promote the acceptance and use of simulation tasks for each processor in a straight- real-time multiprocessor simulation by the general forward, structured manner. The RTMPL utility acts engineering community. This paper presents an over- as an assembly language programmer, translating the view of the RTMPL language and utility. The general high-level simulation description into time- simulator configuration to which RTMPL is applicable efficient assembly language code for the is described with emphasis on the simulator's in- processors. The utility sets up all of the inter- formation-transfer capabilities. RTMPL is described faces between the simulator hardware, firmware, and in the context of the overall simulation development operating system. All required interprocessor com- effort. The targeting of code and the major utility munications (i.e., data transfers) are automatically functions are discussed. A brief discussion of the established by the utility. RTMPL simulations are language is included to show how it reflects the self-documenting since the utility produces general RTMPS simulation philosophy. Finally, a listings, error messages, warnings, and database description of the utility's output listing is files that can aid in the debugging and running of a presented and its usefulness for simulation opti- simulation. mization and execution is discussed. A more detailed description of RTMPL will be provided in a The RTMPL utility is written in Pascal. The detailed user's manual (to be published). It current implementation runs on a Motorola EXORmacs includes a full definition of the language con- Development System (host for experimental simulator) structs and presents an example simulation with a and produces MC68000 assembly language code. The complete set of source and output listings. utility can easily be retargeted for different processors by changing the contents of a target General Simulator Configuration definition file. The RTMPL language (i.e., command and operation set) is macro-based and can be The RTMPL language and utility were developed modified/expanded to meet particular simulation to provide a means for programming a multiprocessor needs. simulator having the general configuration shown in Fig. 1. Subsets of this configuration are also INTRODUCTION supported. The general simulator consists of a number of simulation channels. Each channel would A Real-Time Multiprocessor Programming Language be directed to solving a portion of the simulation. (RTMPL) has been designed to aid in developing There are two special-purpose devices' (1) a user-interface or front-end processor (FEP) which Real-Time Multiprocessor Operating System (RTMPOS) provides for user interaction with the simulator, at run-time. RTMPOS is a LeRC-developed utility and and (2) a real-time interface which provides for is the subject of a companion paper (1). The RTMPL communications between the simulator and external utility also produces simulation-descriptive devices (e.g., controllers, actuators). Internal data-base files for use by RTMPOS in providing simulator communications are accomplished via two run-time initialization and interactive operational data paths. The Interactive Information Bus links capabilities. Finally, an RTMPL listing file is the FEP and simulation channels. The Real-Time provided which contains messages and source Information Bus links the real-time interface and interpretations to aid the user in developing simulation channels. For noninteractive simu- error-free, time-optimum simulations. lations, both buses can be used for real-time inter- channel data communications, thus providing the As mentioned previously, the RTMPL utility potential for significant speed improvements makes use of target definition files to perform its relative to a single-bus configuration. However, translation function. These files provide des- for interactive simulation, the Interactive Infor- criptions of the simulator configuration, target mation Bus could be tied up servicing user requests processors, the target assembler, and simulator and would not be available for real-time data logical states. Examples of processor information transfers. contained'in the target definition files are register specifications (number, length, and names), Each simulation channel in the general con- available memory (starting locations and amount), figuration consists of two processors' a pre- and value representations (single, double, or triple processor tied directly to the real-time bus and a precisions, and values used to represent the logical computational processor tied directly to the inter- constants TRUE and FALSE). The target assembler active bus. These processors communicate through information defines memory addressing formats shared memory. (scratch pad and array item access), pseud- operations (data definitions, memory allocation and The general configuration allows a simulation reservation, library referencing), and special program to be segmented into 1 to N parts where N is assembler characters available for RTMPL-created- the number of channels. The computations for each names. Simulator logical states can be defined to channel may be further segmented between the com- allow the user to access simulator firmware (flags putational and preprocessors. In this way, each and latches), and processor status register in- channel's computations can be speeded up, relative formation (overflow, result positive, negative, to a single processor. etc.). Because the RTMPL utility produces assembly language source files that are made up of general The RTMPL utility automatically sets up the macro statements, the target definition file must appropriate data transfers between and within the specify which macros are available for the trans- channels. It does this using information contained lation process. For example, should an integer in operands that appear in the RTMPL source programs addition operation be required, the utility will (one for each processor). Transfer paths can be consult the appropriate target definition file to specified in the source programs allowing any determine which precisions and argument sources are processor to communicate with any other processor available for use in implementing the operation. It via any information path. These features of RTMPL will then select the add macro that is best suited allow the user to generate simulations that will run for time-efficient execution and insert the as- on any subset of the general simulator. Subsets of sociated housekeeping operations (load, store, the general configuration are the results of elim- precision conversion) as required. Similarly, if inating processors and/or data paths from the the utility detects the need for data transfer