Essentially, we use double-barreled CPS to lower try-catch styled exceptions from a high-level language to VHDL.
This project is written in OCaml. Make sure you have opam installed.
Inside the cloned repository, run the following to setup the local switch and get the necessary dependencies.
opam switch create . --locked --deps-only --with-test --with-doc
eval $(opam env)Then, use dune build to build the project, dune test to run the tests under the test directory, and dune clean to clean the build directory.
You may also use dune build @install && dune install to install the binary.
Building the project results in the cpls binary,
which is the "compiler" that translates your exceptional code to VHDL.
The executable can be invoked after installing or via dune exec cpls -- ... to run the development version of the cpls executable (replace ... with the program arguments).
bin: the driver (argument parsing and such ...) ofcplslang: the parser, lexer, AST, and CPS (higher-level)core: the VHDL emitter and CPS (lower-level)out: some files needed by the generated VHDL codesample: the manually ported MachSuite tests (with and without exceptions)test: some tests that are run withdune test