Download Polychrony SSME User Guide
Transcript
Polychrony Polychrony_SSME_UserGuide Page 18/19 4.5.4 Simulation The Polychrony services provides several kinds of generators which needs external tools to be used or executed: SynDEx tools for sdx files, Sigali (distributed with the classical Polychrony distribution) for z3z files... The C, C++ or Java code generation is dedicated to simulations. By default, the code (C, C++, or Java) generated by Polychrony will read input values from a files called R<input name>.dat (or RC_<input name>.dat if the input signal is of type event) and will write output values into a file called W<output name>.dat. These input files has to be created and filled by the user (one value per line, and for event signal, 0 for absence and 1 for presence). 4.5.4.1 C/C++ For C and C++, you will need to use an external C/C++ compiler. The Polychrony libraries are provided and can be found in the Eclipse plugins directory and specifically in: ●fr.irisa.espresso.ssme.polychrony.win32.win32.x86/lib for Windows x86 ●fr.irisa.espresso.ssme.polychrony.win32.win32.x86_64/lib ●fr.irisa.espresso.ssme.polychrony.gtk.linux.x86/lib for Windows x86_64 for Linux x86 ●fr.irisa.espresso.ssme.polychrony.gtk.linux.x86_64/lib for Linux x86_64 ●fr.irisa.espresso.ssme.polychrony.cocoa.macosx.x86/lib for MacOS X/Intel x86 ●fr.irisa.espresso.ssme.polychrony.cocoa.macosx.x86_64/lib for MacOS X/Intel x86_64 Currently, there is not automatic generation of makefile to compile C/C++ file. 4.5.4.2 Java For the Java generation code, we take benefit of Eclipse which is originally a Java environment which provides several facilities to manage Java project. The call of the Java generation code creates (if all previous operations are executed without errors) a Java project containing the Polychrony Java libraries (SignalJavaStd.jar, and SignalGraphicalJavaStd.jar) and the Java source classes are generated in the src directory of the project. There may be some errors in the Java code if your SSME model has constant parameters. The correction of these errors consists in replacing the UNDEF() calls by the value of the constant parameter. To execute the simulation, you have only to right-click on the project (or on the Java class corresponding to the main) and select Run As->Java Application. 04/26/2012