Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Manarabdelaty authored Apr 16, 2021
1 parent 191408b commit de45164
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,33 @@
-->

# Caravel User Project
[![CI](https://github.com/efabless/caravel_project_example/actions/workflows/caravel_example_ci.yml/badge.svg)](https://github.com/efabless/caravel_project_example/actions/workflows/caravel_example_ci.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![CI](https://github.com/efabless/caravel_project_example/actions/workflows/caravel_example_ci.yml/badge.svg)](https://github.com/efabless/caravel_project_example/actions/workflows/caravel_example_ci.yml)

# Overview

This repo contains a sample user project that utilizes the [caravel](https://github.com/efabless/caravel.git) chip user space. The user project is a simple counter that showcases how to make use of [caravel's](https://github.com/efabless/caravel.git) user space utilities like IO pads, logic analyzer probes, and wishbone port. The repo also demonstrates the recommended strucute for the open-mpw shuttle projects.
This repo contains a sample user project that utilizes the [caravel](https://github.com/efabless/caravel.git) chip user space. The user project is a simple counter that showcases how to make use of [caravel's](https://github.com/efabless/caravel.git) 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.

# Caravel Integration

## Files Integration

Caravel files are kept seperate from the user project by having caravel as submodule. The submodule commit should point to the latest of caravel master. The following files should have a symbolic link to [caravel's](https://github.com/efabless/caravel.git) corresponding files:
Caravel files are kept separate from the user project by having caravel as submodule. The submodule commit should point to the latest of caravel master. The following files should have a symbolic link to [caravel's](https://github.com/efabless/caravel.git) corresponding files:

- [Root Makefile](Makefile): This is to make sure that you adhere to the required implementation of the `compress` and `uncompress` targets. Also, [caravel's](https://github.com/efabless/caravel.git) Makefile provides useful targets like running `lvs`, `drc`, and `xor` checks. Run `make help` to display the available targets.

- [Openlane Makefile](openlane/Makefile): This provides an easier way for running openlane to harden your macros. Refer to [ Hardening the User Project Macro]. Also, the makefile retains the openlane summary reports under the signoff directory.

- [Pin order](openlane/user_project_wrapper/pin_order.cfg) 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 backend.
- [Pin order](openlane/user_project_wrapper/pin_order.cfg) 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.

To create the symbolic links run the following:

```bash
# In case caravel is submoduled under the project root, export CARAVEL_PATH=caravel
export CARAVEL_PATH=<caravel-path>
# In case caravel is sub-moduled under the project root, export CARAVEL_ROOT=caravel
export CARAVEL_ROOT=<caravel-path>

ln -s $CARAVEL_PATH/Makefile Makefile
ln -s $CARAVEL_PATH/openlane/Makefile openlane/Makefile
ln -s $CARAVEL_PATH/openlane/user_project_wrapper_empty/pin_order.cfg openlane/user_project_wrapper/pin_order.cfg
ln -s $CARAVEL_ROOT/Makefile Makefile
ln -s $CARAVEL_ROOT/openlane/Makefile openlane/Makefile
ln -s $CARAVEL_ROOT/openlane/user_project_wrapper_empty/pin_order.cfg openlane/user_project_wrapper/pin_order.cfg
```

## Verilog Integration
Expand All @@ -52,11 +52,11 @@ You need to create a wrapper around your macro that adheres to the template at [

For this sample project, the user macro makes use of:

- The IO ports are used for displaying the count register values on the IO pads.
- The IO ports for displaying the count register values on the IO pads.

- The LA probes are used for supplying an optional reset and clock signals and for setting an initial value for the count register.
- The LA probes for supplying an optional reset and clock signals and for setting an initial value for the count register.

- The wishbeone port is also connected to the count register allowing for reading/writing the count value through the management SoC.
- The wishbeone port for reading/writing the count value through the management SoC.

Refer to [user_project_wrapper](verilog/rtl/user_project_wrapper.v) for more information.

Expand All @@ -66,20 +66,20 @@ Refer to [user_project_wrapper](verilog/rtl/user_project_wrapper.v) for more inf

# Running Full Chip Simulation

The verilog testbenches are under this [verilog/dv](verilog/dv). For more information on setting up the simulation enviroment and the available testbenches for this sample project, refer to [README] (verilog/dv/README.md).
The verilog test-benches are under this [verilog/dv](verilog/dv). For more information on setting up the simulation environment and the available testbenches for this sample project, refer to [README] (verilog/dv/README.md).

# Hardening the User Project Macro using Openlane

For instructions on how to install openlane and the pdk refere to [README](https://github.com/efabless/openlane/blob/master/README.md).
For instructions on how to install openlane and the pdk refer to [README](https://github.com/efabless/openlane/blob/master/README.md).

There are two options for hardening the user project macro using openlane:

1. Hardening the user macro, then embedding it in the wrapper
2. Flattening the user macro with the wrapper.

For more details on this, refer to this [README]().
For more details on this, refer to this [README](caravel/blob/master/openlane/README.rst).

For this sample project, we went for the first option where the user macro is hardened first, then it is inserted in the user wrapper as a macro.
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.

<p align=”center”>
<img src="doc/wrapper.png" width="30%" height="5%">
Expand All @@ -102,7 +102,7 @@ make user_project_wrapper
- [x] The project repo contain info.yaml at the project root.
- [x] Top level macro is named `user_project_wrapper`.
- [x] Full Chip Simulation passes for RTL and GL (gate-level)
- [x] Hardened Macros are LVS and DRC clean
- [x] Hardened `user_project_wrapper` adheres to the same pin order specified at [pin_order]()
- [x] The hardened Macros are LVS and DRC clean
- [x] The hardened `user_project_wrapper` adheres to the same pin order specified at [pin_order](https://github.com/efabless/caravel/blob/master/openlane/user_project_wrapper_empty/pin_order.cfg)
- [x] XOR check passes with zero total difference.
- [x] Openlane summary reports are retained under ./signoff/
- [x] Openlane summary reports are retained under ./signoff/<macro-name>

0 comments on commit de45164

Please sign in to comment.