https://github.com/mbarbin/bopkit
An educational project for digital circuits programming
https://github.com/mbarbin/bopkit
Last synced: about 1 year ago
JSON representation
An educational project for digital circuits programming
- Host: GitHub
- URL: https://github.com/mbarbin/bopkit
- Owner: mbarbin
- License: mit
- Created: 2023-03-20T08:52:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-10T19:45:01.000Z (over 1 year ago)
- Last Synced: 2024-11-10T20:32:50.591Z (over 1 year ago)
- Language: OCaml
- Homepage: https://mbarbin.github.io/bopkit/
- Size: 6.16 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
Bopkit
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](stdlib/bopboard/) or
a [7-segment display](project/digital-watch/).
#  Install
Bopkit can be installed via the [opam](https://opam.ocaml.org) package manager.
Releases for this project are published to a custom opam-repo. To add it to your
current opam switch, run:
```sh
opam repo add mbarbin https://github.com/mbarbin/opam-repository.git
```
Then you can install `bopkit` using a normal opam workflow.
```sh
opam install bopkit
```
#  Documentation
Bopkit's documentation is published [here](https://mbarbin.github.io/bopkit). It
is built with [docusaurus](https://docusaurus.io/), an application developed by
Meta, Inc to create open source documentation websites.
#  Tutorials
Check out our [tutorials](tutorial/) for an introduction to different parts of
Bopkit, and explore our more substantive [projects](project/), including a
digital watch, user-friendly graphical devices, and projects involving
microprocessors, assemblers and compilers. There's plenty of fun stuff there!
#  Development
## Build
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:
```sh
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:
```sh
dune build
```
## Preview the doc locally
In a local clone setup for development you can preview the doc locally with:
```sh
npm start
```
This will serve the doc on `http://localhost:3000/bopkit/` and update
dynamically as you edit the sources.
#  Origin
The project originated in 2007 as a class assignment with Professor Jean
Vuillemin[^1]:
> 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 2Z[^2] 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!
#  Acknowledgments
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 Pouzet**[^3] 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 Cousot**[^4] 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/.
[^1]:Jean Vuillemin, https://www.di.ens.fr/~jv/
[^2]: 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.
[^3]:Marc Pouzet, https://www.di.ens.fr/~pouzet/
[^4]:Patrick Cousot, https://cs.nyu.edu/~pcousot/