This repo contains a sample user project that utilizes the caravel chip user space. The user project is a simple counter that showcases how to make use of caravel's user space utilities like IO pads, logic analyzer probes, and wishbone port. The repo also demonstrates the recommended structure for the open-mpw shuttle projects.
To setup caravel, run the following:
# By default, CARAVEL_ROOT is set to $(pwd)/caravel # If you want to install caravel at a different location, run "export CARAVEL_ROOT=<caravel-path>" # Disable submodule installation if needed by, run "export SUBMODULE=0" make install
To update the installed caravel to the latest, run:
To remove caravel, run
By default caravel-lite is installed. To install the full version of caravel, run this prior to calling make install.
Caravel files are kept separate from the user project by having caravel as submodule. The submodule commit should point to the latest of caravel/caravel-lite master. The following files should have a symbolic link to caravel's corresponding files:
Openlane Makefile: This provides an easier way for running openlane to harden your macros. Refer to Hardening the User Project Macro using Openlane. Also, the makefile retains the openlane summary reports under the signoff directory.
Pin order file for the user wrapper: The hardened user project wrapper macro must have the same pin order specified in caravel‘s repo. Failing to adhere to the same order will fail the gds integration of the macro with caravel’s back-end.
The symbolic links are automatically set when you run
You need to create a wrapper around your macro that adheres to the template at user_project_wrapper. The wrapper top module must be named
user_project_wrapper and must have the same input and output ports. The wrapper gives access to the user space utilities provided by caravel like IO ports, logic analyzer probes, and wishbone bus connection to the management SoC.
For this sample project, the user macro makes use of:
The IO ports for displaying the count register values on the IO pads.
The LA probes for supplying an optional reset and clock signals and for setting an initial value for the count register.
The wishbeone port for reading/writing the count value through the management SoC.
Refer to user_project_wrapper for more information.
First, you will need to install the simulation environment, by
This will pull a docker image with the needed tools installed.
Then, run the RTL and GL simulation by
export CARAVEL_ROOT=$(pwd)/caravel # specify simulation model: RTL/GL export SIM=RTL # Run IO ports testbench, make verify-io_ports make verify-<dv-pattern>
First, you will need to install the pdk by
export PDK_ROOT=<pdk-installation-path> make pdk
Then, you will need to install openlane by
export OPENLANE_ROOT=<openlane-installation-path> export OPENLANE_TAG=v0.12 make openlane
For detailed instructions on how to install openlane and the pdk refer to README.
There are two options for hardening the user project macro using openlane:
For more details on this, refer to this README.
For this sample project, we went for the first option where the user macro is hardened first, then it is inserted in the user project wrapper.
To reproduce hardening this project, run the following:
export OPENLANE_TAG=v0.12 # Run openlane to harden user_proj_example make user_proj_example # Run openlane to harden user_project_wrapper make user_project_wrapper
user_project_wrapperadheres to the same pin order specified at pin_order