Skip to content

plankp/Hardware-Synthesizable-Exceptions-using-Continuations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware Synthesizable Exceptions using Continuations

What is this?

Essentially, we use double-barreled CPS to lower try-catch styled exceptions from a high-level language to VHDL.

Build instructions

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.

Usage instructions

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).

Directory structure

  • bin: the driver (argument parsing and such ...) of cpls
  • lang: the parser, lexer, AST, and CPS (higher-level)
  • core: the VHDL emitter and CPS (lower-level)
  • out: some files needed by the generated VHDL code
  • sample: the manually ported MachSuite tests (with and without exceptions)
  • test: some tests that are run with dune test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published