blob: 850f2fbe1b4d7f869b7023f488b5e6f9a47f59fc [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
60 # The default for the management core is litex, to install the pico version use
61 export MCW=pico
62 # To install the management core for simulation
63 make install_mcw
64
kareemb104c942022-02-15 06:05:35 -080065 # To clone the management core pico for simulation
66 git clone git@github.com:efabless/caravel_pico.git
67
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080068 # Install openlane for hardening your project
69 # make sure to change <directory_name> with the directory you created in step 1
70 # in this case it is caravel_tutorial
71 export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
72 make openlane
73
74 # Build the pdk
75 # make sure to change <directory_name> with the directory you created in step 1
76 # in this case it is caravel_tutorial
Marwan Abbas75ba5732022-02-11 16:50:50 +020077
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -080078 export PDK_ROOT=~/<directory_name>/pdks # you need to export this whenever you start a new shell
79 make pdk
80
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -0800815. Now you can start hardening your design, for example
82
83.. code:: bash
84
85 make user_proj_example
86 make user_project_wrapper
87
886. To run simulation on your design
89
90.. code:: bash
91
92 make simenv
93 # you can run RTL/GL simulations by using
94 export SIM=RTL
95 # OR
96 export SIM=GL
97
98 # you can then run the simulations using
99 make verify-<testbench-name>
100
Marwan Abbasfa8d7ec2022-02-03 09:50:05 -0800101 # for example
102 make verify-io_ports
103
1047. To run the precheck locally
105
106.. code:: bash
107
108 make precheck
109 make run-precheck
110
11117. You are done! now go to www.efabless.com to submit your project!
112
113
114.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
115 :target: https://opensource.org/licenses/Apache-2.0
116.. |User CI| image:: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml/badge.svg
117 :target: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml
118.. |Caravel Build| image:: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml/badge.svg
119 :target: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml