-
Notifications
You must be signed in to change notification settings - Fork 70
Building Ordt from source
Starting in version 171108.01, ordt build uses gradle. To install gradle (from repo root):
./gradlew
To build ordt using gradle:
./gradlew shadowJar
The jar is written to build/libs/.
$ ls -l build/libs/
total 1108
-rw-r--r--. 1 jeff eng 1132180 Nov 8 14:12 Ordt-171103.02.jar
# Remove build
./gradlew clean
# Do clean, and then remove MyDebugController.java
./gradlew distclean
All ordt java source can be found in the src directory. The code is partitioned into the following packages...
- ordt.parse.* - antlr4 grammar files and antlr4 generated parser classes
- ordt.extract - classes for extraction of input into internal model
- ordt.output - general classes for walking the model and generating output
- ordt.output.* - child OutputBuilder classes for generating specific output forms
- ordt.parameters - ordt control parameter classes
- ordt.annotate - ordt model annotation classes
The root class main for ordt can be found in src/ordt/extract/Ordt.java.
Note that a child of the abstract class extract/DebugController with name MyDebugController will need to be created in the ordt.extract package to build the first time. The isActive() method should return false to bypass use of the debug controller when getting started. This class allows local, user-specific info (input/output files, annotations, etc) to be set at run time and should not be pushed to the repository. An example of this file can be found as MyDebugController.example in ordt.extract. The gradle build scripts will create a default copy of MyDebugController.java if this file does not exist.
The gradle build flow regenerates grammar parse code using the antlr 4.5 tool when grammar changes are introduced and writes these java files under build/generated-src/antlr/main. Use of build within the eclipse ide requires java source files to be stored in hierarchy corresponding to their package hierarchy. To accommodate this, a gradle task, generateEclipseGrammarSource is provided that will generate the antlr output and move it to the appropriate folder under src/ordt/parse/*. Files under ordt/parse/jspec, ordt/parse/systemrdl, and ordt/parse/parameters are generated by antlr4 from the corresponding .g4 grammar files in ordt/parse/grammar.
Home
Running Ordt
Building Ordt from source
Running Ordt Tests
Source contributions
Ordt Inputs
Ordt Outputs