Java compiler
The simulator internally generates Java code from the CIF model. This code is compiled using a Java compiler and executed. Code generation and compilation result in faster simulation. However, compilation itself also takes time. The time it takes to compile is different for different Java compilers.
Using the Java Compiler option (Compiler category), the Java compiler implementation to use, can be configured. We currently provide two different Java compilers:
-
Java compiler from the Java Development Kit (
jdk
)The Java Development Kit (JDK) that is required to use our tooling includes a Java compiler. This compiler has the advantage that is has a bit less overhead of accessing the file system, while it has as disadvantage that it is a slower in actually compiling the Java code.
-
Eclipse Compiler for Java (
eclipse
)The Eclipse Compiler for Java (ecj) is part of the Eclipse Java Development Tools (JDT), and is provided with our tooling. This compiler has the advantage that is a faster in actually compiling the Java code, while it has as disadvantage that it has a bit more overhead of accessing the file system.
The names given above, in parentheses, indicate the command line option values to use for selecting the different compilers.
In general, the JDK compiler is faster for small CIF models, while the Eclipse compiler is faster for larger CIF models. By default, the JDK compiler is used.
The Java Compiler option has no effect when simulating using a compiled code file (e.g. a .cifcode
file) for repeated simulations, or when debugging generated code by enabling the Load debug code option (Simulator category).