Skip to content

Building Ordt from source

Scott Nellenbach edited this page Nov 9, 2017 · 7 revisions

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.

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. These classes are regenerated using the antlr 4.5 tool when grammar changes are introduced.

Clone this wiki locally