blob: f2475cc332172100a0e7350423dccfd6e3eca328 [file] [log] [blame] [view]
Zain Rizwan Khan56c404b2020-12-07 22:52:44 +00001# Ghazi
2
3An SoC (System on a Chip) design for Google sponsored Open MPW shuttles for SKY130.
4
5<p align=”center”>
6<img src="/doc/Ghazi-SoC.png" >
7</p>
8
Mohamed Kassem49a4ff62020-10-14 04:56:27 -07009# CIIC Harness
shalan0d14e6e2020-08-31 16:50:48 +020010
11A template SoC for Google SKY130 free shuttles. It is still WIP. The current SoC architecture is given below.
12
13<p align=”center”>
Mohamed Shalan12a9a1d2020-09-01 18:03:17 +020014<img src="/doc/ciic_harness.png" width="75%" height="75%">
shalan0d14e6e2020-08-31 16:50:48 +020015</p>
16
Ahmed Ghazy0893d012020-12-05 23:30:25 +020017
agorararmard7d6fadb2020-11-25 20:23:20 +020018## Getting Started:
19
Ahmed Ghazy0893d012020-12-05 23:30:25 +020020* For information on tooling and versioning, please refer to [this][1].
21
agorararmard7d6fadb2020-11-25 20:23:20 +020022Start by cloning the repo and uncompressing the files.
23```bash
24git clone https://github.com/efabless/caravel.git
25cd caravel
26make uncompress
27```
28
agorararmardd4a2d6f2020-12-01 19:21:51 +020029Then you need to install the open_pdks prerequisite:
30 - [Magic VLSI Layout Tool](http://opencircuitdesign.com/magic/index.html) is needed to run open_pdks -- version >= 8.3.60*
31
32 > \* Note: You can avoid the need for the magic prerequisite by using the openlane docker to do the installation step in open_pdks. This [file](https://github.com/efabless/openlane/blob/develop/travisCI/travisBuild.sh) shows how.
33
agorararmard212cd822020-11-26 22:40:17 +020034Install the required version of the PDK by running the following commands:
35
36```bash
37export PDK_ROOT=<The place where you want to install the pdk>
38make pdk
39```
40
agorararmard7d6fadb2020-11-25 20:23:20 +020041Then, you can learn more about the caravel chip by watching these video:
42- Caravel User Project Features -- https://youtu.be/zJhnmilXGPo
43- Aboard Caravel -- How to put your design on Caravel? -- https://youtu.be/9QV8SDelURk
44- Things to Clarify About Caravel -- What versions to use with Caravel? -- https://youtu.be/-LZ522mxXMw
agorararmardda92aef2020-12-04 23:56:37 +020045 - You could only use openlane:rc5
46 - Make sure you have the commit hashes provided here inside the [Makefile](./Makefile)
agorararmarddc723a62020-11-26 20:00:29 +020047## Aboard Caravel:
agorararmarddc723a62020-11-26 20:00:29 +020048
agorararmarde2bdaef2020-11-27 16:43:22 +020049Your area is the full user_project_wrapper, so feel free to add your project there or create a differnt macro and harden it seperately then insert it into the user_project_wrapper. For example, if your design is analog or you're using a different tool other than OpenLANE.
agorararmarddc723a62020-11-26 20:00:29 +020050
51If you will use OpenLANE to harden your design, go through the instructions in this [README.md][0].
52
agorararmarde2bdaef2020-11-27 16:43:22 +020053Then, you will need to put your design aboard the Caravel chip. Make sure you have the following:
agorararmarddc723a62020-11-26 20:00:29 +020054
agorararmard3741dfc2020-12-01 18:04:37 +020055- [Magic VLSI Layout Tool](http://opencircuitdesign.com/magic/index.html) installed on your machine. We may provide a Dockerized version later.\*
agorararmarde2bdaef2020-11-27 16:43:22 +020056- You have your user_project_wrapper.gds under `./gds/` in the Caravel directory.
agorararmarddc723a62020-11-26 20:00:29 +020057
agorararmard065a9422020-12-05 00:24:07 +020058 > \* **Note:** You can avoid the need for the magic prerequisite by using the openlane docker to run the make step. This [section](#running-make-using-openlane-magic) shows how.
agorararmard3741dfc2020-12-01 18:04:37 +020059
agorararmarddc723a62020-11-26 20:00:29 +020060Run the following command:
61
62```bash
agorararmard212cd822020-11-26 22:40:17 +020063export PDK_ROOT=<The place where the installed pdk resides. The same PDK_ROOT used in the pdk installation step>
agorararmarddc723a62020-11-26 20:00:29 +020064make
65```
66
agorararmarde2bdaef2020-11-27 16:43:22 +020067This should merge the GDSes using magic and you'll end up with your version of `./gds/caravel.gds`. You should expect hundred of thousands of magic DRC violations with the current "development" state of caravel.
agorararmarddc723a62020-11-26 20:00:29 +020068
agorararmard065a9422020-12-05 00:24:07 +020069## Running Make using OpenLANE Magic
agorararmard3741dfc2020-12-01 18:04:37 +020070
71To use the magic installed inside Openlane to complete the final GDS streaming out step, export the following:
72
73```bash
74export PDK_ROOT=<The location where the pdk is installed>
75export OPENLANE_ROOT=<the absolute path to the openlane directory cloned or to be cloned>
76export IMAGE_NAME=<the openlane image name installed on your machine. Preferably openlane:rc5>
77export CARAVEL_PATH=$(pwd)
78```
79
80Then, mount the docker:
81
82```bash
83docker run -it -v $CARAVEL_PATH:$CARAVEL_PATH -v $OPENLANE_ROOT:/openLANE_flow -v $PDK_ROOT:$PDK_ROOT -e CARAVEL_PATH=$CARAVEL_PATH -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $IMAGE_NAME
84```
85
86Finally, once inside the docker run the following commands:
87```bash
88cd $CARAVEL_PATH
89make
90exit
91```
92
93This should merge the GDSes using magic and you'll end up with your version of `./gds/caravel.gds`. You should expect hundred of thousands of magic DRC violations with the current "development" state of caravel.
94
agorararmardda92aef2020-12-04 23:56:37 +020095## Required Directory Structure
96
97- ./gds/ : includes all the gds files used or produced from the project.
98- ./def/ : includes all the def files used or produced from the project.
99- ./lef/ : includes all the lef files used or produced from the project.
100- ./mag/ : includes all the mag files used or produced from the project.
101- ./maglef/ : includes all the maglef files used or produced from the project.
102- ./spi/lvs/ : includes all the maglef files used or produced from the project.
103- ./verilog/dv/ : includes all the simulation test benches and how to run them.
104- ./verilog/gl/ : includes all the synthesized/elaborated netlists.
105- ./verilog/rtl/ : includes all the Verilog RTLs and source files.
106- ./openlane/`<macro>`/ : includes all configuration files used to run openlane on your project.
107- info.yaml: includes all the info required in [this example](info.yaml). Please make sure that you are pointing to an elaborated caravel netlist as well as a synthesized gate-level-netlist for the user_project_wrapper
108
shalan0d14e6e2020-08-31 16:50:48 +0200109## Managment SoC
thesourcerer80a6a4472020-10-20 13:31:24 +0200110The managment SoC runs firmware that can be used to:
agorararmarddc723a62020-11-26 20:00:29 +0200111- Configure User Project I/O pads
112- Observe and control User Project signals (through on-chip logic analyzer probes)
113- Control the User Project power supply
shalan0d14e6e2020-08-31 16:50:48 +0200114
Mohamed Shalan4f756162020-11-18 15:25:22 +0200115The memory map of the management SoC can be found [here](verilog/rtl/README)
shalan0d14e6e2020-08-31 16:50:48 +0200116
agorararmarddc723a62020-11-26 20:00:29 +0200117## User Project Area
Mohamed Shalan4f756162020-11-18 15:25:22 +0200118This is the user space. It has limited silicon area (TBD, about 3.1mm x 3.8mm) as well as a fixed number of I/O pads (37) and power pads (10). See [the Caravel premliminary datasheet](doc/caravel_datasheet.pdf) for details.
agorararmarddc723a62020-11-26 20:00:29 +0200119The repository contains a [sample user project](/verilog/rtl/user_proj_example.v) that contains a binary 32-bit up counter. </br>
shalan0d14e6e2020-08-31 16:50:48 +0200120
121<p align=”center”>
Mohamed Shalan49fc4892020-08-31 16:56:48 +0200122<img src="/doc/counter_32.png" width="50%" height="50%">
shalan0d14e6e2020-08-31 16:50:48 +0200123</p>
124
125The firmware running on the Management Area SoC, configures the I/O pads used by the counter and uses the logic probes to observe/control the counter. Three firmware examples are provided:
agorararmarddc723a62020-11-26 20:00:29 +02001261. Configure the User Project I/O pads as o/p. Observe the counter value in the testbench: [IO_Ports Test](verilog/dv/caravel/user_proj_example/io_ports).
1272. Configure the User Project I/O pads as o/p. Use the Chip LA to load the counter and observe the o/p till it reaches 500: [LA_Test1](verilog/dv/caravel/user_proj_example/la_test1).
1283. Configure the User Project I/O pads as o/p. Use the Chip LA to control the clock source and reset signals and observe the counter value for five clock cylcles: [LA_Test2](verilog/dv/caravel/user_proj_example/la_test2).
129
130[0]: openlane/README.md
Ahmed Ghazy0893d012020-12-05 23:30:25 +0200131[1]: mpw-one-a.md