blob: eaeb4786ad0f949172aef1aa599152cfe3ff0283 [file] [log] [blame]
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -08001.. raw:: html
2
3 <!---
4 # SPDX-FileCopyrightText: 2020 Efabless Corporation
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 -->
20
21Complete roundtrip for caravel_user_project
22===========================================
23
241. To start the project you need to first create an empty Git project on Github and make sure your repo is public and includes a README
25
262. Open your Terminal. Create an empty folder to use as your Caravel workspace, and navigate to it.
27
28.. code:: bash
29
30 # Create a directory and call it anything you want
31 mkdir -p caravel_tutorial
32
33 # navigate into the directory
34 cd caravel_tutorial
35
363. Clone caravel_user_project and setup the git environment as follows
37
38.. code:: bash
39
40 # Make sure that ``caravel_example`` matches the empty github repo name in step 1
Jeff DiCorpo268f6462022-02-03 10:29:27 -080041 git clone -b mpw-5a https://github.com/efabless/caravel_user_project caravel_example
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080042 cd caravel_example
43 git remote rename origin upstream
44
45 # You need to put your empty github repo URL from step 1
46 git remote add origin <your github repo URL>
47
48 # Create a new branch, you can name it anything
49 git checkout -b <my_branch>
50 git push -u origin <my_branch>
51
Marwan Abbas5886c972022-02-15 22:30:24 +0200524. Now that your git environment is setup, it's time to setup your local environment. (NOTE: docker is a prerequisite to setting up your environment)
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080053
54.. code:: bash
55
56 # to install caravel-lite into your caravel_user_project
57 # you can install full caravel (not recommended) use ``export CARAVEL_LITE=0``
58 make install
kareemb104c942022-02-15 06:05:35 -080059
kareemb104c942022-02-15 06:05:35 -080060 # To install the management core for simulation
61 make install_mcw
62
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080063 # Install openlane for hardening your project
64 # make sure to change <directory_name> with the directory you created in step 1
65 # in this case it is caravel_tutorial
66 export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
67 make openlane
68
69 # Build the pdk
70 # make sure to change <directory_name> with the directory you created in step 1
71 # in this case it is caravel_tutorial
Marwan Abbas75ba5732022-02-11 16:50:50 +020072
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080073 export PDK_ROOT=~/<directory_name>/pdks # you need to export this whenever you start a new shell
74 make pdk
75
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -0800765. Now you can start hardening your design, for example
77
78.. code:: bash
79
80 make user_proj_example
81 make user_project_wrapper
82
836. To run simulation on your design
84
85.. code:: bash
86
87 make simenv
88 # you can run RTL/GL simulations by using
89 export SIM=RTL
90 # OR
91 export SIM=GL
92
93 # you can then run the simulations using
94 make verify-<testbench-name>
95
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080096 # for example
97 make verify-io_ports
98
997. To run the precheck locally
100
101.. code:: bash
102
103 make precheck
104 make run-precheck
105
10617. You are done! now go to www.efabless.com to submit your project!
107
108
109.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
110 :target: https://opensource.org/licenses/Apache-2.0
111.. |User CI| image:: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml/badge.svg
112 :target: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml
113.. |Caravel Build| image:: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml/badge.svg
114 :target: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml