Welcome to Bopkit, an educational project that provides a description language for programming synchronous digital circuits.
With Bopkit, you can express synchronous digital circuits, simulate them using the Bopkit simulator, and convert your designs to standalone C executables or hierarchical Verilog.
Bopkit also provides an interface for integrating external blocks written in other languages. For example, you can use OCaml blocks for unit-testing, or connect your circuits to user-friendly graphical devices such as the Bopboard or a 7-segment display.
Bopkit can be installed via the opam package manager.
Releases for this project are published to a custom opam-repo. To add it to your current opam switch, run:
opam repo add mbarbin https://github.com/mbarbin/opam-repository.git
Then you can install bopkit
using a normal opam workflow.
opam install bopkit
Bopkit's documentation is published here. It is built with docusaurus, an application developed by Meta, Inc to create open source documentation websites.
Check out our tutorials for an introduction to different parts of Bopkit, and explore our more substantive projects, including a digital watch, user-friendly graphical devices, and projects involving microprocessors, assemblers and compilers. There's plenty of fun stuff there!
The repo depends on unreleased packages that are found in an external opam-repository which must be added to the opam switch that you use to build the project. For example, if you use a local opam switch this would look like this:
git clone https://github.com/mbarbin/bopkit.git
cd bopkit
opam switch create . 5.2.0 --no-install
eval $(opam env)
opam repo add mbarbin https://github.com/mbarbin/opam-repository.git
opam install . --deps-only
Once this is setup, you can build with dune:
dune build
In a local clone setup for development you can preview the doc locally with:
npm start
This will serve the doc on http://localhost:3000/bopkit/
and update
dynamically as you edit the sources.
The project originated in 2007 as a class assignment with Professor Jean Vuillemin1:
Write a simulator for a hardware description language of your choice; use it to execute on a microprocessor of your design a binary code that will drive the display of a digital calendar.
Ocan Sankur and Mathieu Barbin teamed up to complete the project, implementing a HDL based on a subset of the language 2Z2 used in the course notes, and designing a microprocessor called visa.
After the assignment was completed, Bopkit grew into a fun tool box for experimenting and playing around with various aspects of language implementation in OCaml and digital circuit programming.
In 2023, Bopkit was rediscovered in the archives and was given a new lease of life. The project was updated to work with modern tools and libraries, and hosted on GitHub. It was a delightful journey down memory lane!
We would like to express our gratitude to the following individuals:
- Jean Vuillemin for the class and assignment that sparked the beginning of this project.
- Ocan Sankur for co-authoring the initial assignment and for implementing the microprocessor visa with an early version of bopkit that had some rough edges.
- Mehdi Bouaziz for co-authoring the subleq project, which we implemented as a project for David Naccache's class.
- Marc Pouzet3 for suggesting the addition of Mode-automata constructs to the language. We implemented this as a project for M. Pouzet's class with Xun Gong.
- Patrick Cousot4 for teaching the compilation class that served as the basis for the wml project.
- Samuel Kvaalen for the bopkit logo and developing the adorable bopboard.
In addition, we'd like to thank:
- The Menhir developers, for a smooth experience migrating our older ocamlyacc parsers into Menhir.
- The Tsdl programmers, for a smooth experience migrating the bopboard from C/SDL-1 to OCaml.
- OpenAI, for providing ChatGPT and the DALL-E tool. We used ChatGPT to improve some of the text in this project, and used DALL-E to generate some images in this project. OpenAI is a research organization focused on artificial intelligence. Learn more about ChatGPT and DALL-E at openai.com/.
Footnotes
-
Jean Vuillemin, https://www.di.ens.fr/~jv/ ↩
-
F. Bourdoncle, J. Vuillemin and G. Berry, The 2Z reference manual, PRL report ??, Digital Equipment Corp., Paris Research Laboratory, 85, Av. Victor Hugo. 92563 Rueil-Malmaison Cedex, France, 1994. ↩
-
Marc Pouzet, https://www.di.ens.fr/~pouzet/ ↩
-
Patrick Cousot, https://cs.nyu.edu/~pcousot/ ↩