tree: 8477ba83f2cb71f9fc25ddb9004d89f93b9b4f7f [path history] [tgz]
  1. .github/
  2. def/
  3. docs/
  4. gds/
  5. lef/
  6. mag/
  7. maglef/
  8. openlane/
  9. pics/
  10. signoff/
  11. spi/
  12. verilog/
  13. .gitignore
  14. .gitmodules
  15. info.yaml
  17. Makefile

Caravel User Project

License UPRJ_CI Caravel Build

SHA-1 engine

See a for the full git history of this code. Branch name is submission-mpw-two.

This is an implementation of [](RFC 3174) of SHA-1 engine.

It is not the most secure one nowadays (it is still used for git commit ids and TPM PCR values), but it looked like the easiest of the SHA engines to implement. The communication channel is via WishBone commands to provide sixteen words after which the engine starts and computes the digest in about 160 cycles. Then digest can be retrieved via the wishbone. There is a IRQ line so when it has completed it will bring it high if that is enabled.


Documentation for building


To create the GDS files, there are macros that are being ingested. The best way to do is by checking out the SHA-1 engine

git clone

And then there are some pre-requisities:

  • You need to have OpenLANE installed. The Makefile assumes that is all setup. Specifically that the docker container is installed.
  • And make sure to have TARGET_PATH set to this directory (caravel_user_project).
  • You have the open_mpw_checker installed as well (and the docker container).

From within the sha1 directory execute:

Creating of GDS

make gds

which after running tests will generate the GDS, LEF, etc files. It will also copy them in the gds sub-directory. Those files should then be in caravel_user_project, which can either be done manually, or with automatic way. To do that:

make caravel

which will copy the appropiate files, run the OpenLANE to create the user_project_wrapper macro together, and run the checkers.

To understand the code

The best way is to look at the test-cases and run them:

make test_wb_logic

which will use the various WishBone commands to program it.