blob: 899d3573c792cdf9db15f32d762d87c9b3e33182 [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
524. Now that your git environment is setup, it's time to setup your local environment
53
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
59
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
65
66
67 # To clone the management core pico for simulation
68 git clone git@github.com:efabless/caravel_pico.git
69
70 # Install openlane for hardening your project
71 # make sure to change <directory_name> with the directory you created in step 1
72 # in this case it is caravel_tutorial
73 export OPENLANE_ROOT=~/<directory_name>/openlane # you need to export this whenever you start a new shell
74 make openlane
75
76 # Build the pdk
77 # make sure to change <directory_name> with the directory you created in step 1
78 # in this case it is caravel_tutorial
79 export PDK_ROOT=~/<directory_name>/pdks # you need to export this whenever you start a new shell
80 make pdk
81
825. Now you can start hardening your design, for example
83
84.. code:: bash
85
86 make user_proj_example
87 make user_project_wrapper
88
896. To run simulation on your design
90
91.. code:: bash
92
93 make simenv
94 # you can run RTL/GL simulations by using
95 export SIM=RTL
96 # OR
97 export SIM=GL
98
99 # you can then run the simulations using
100 make verify-<testbench-name>
101
102 # for example
103 make verify-io_ports
104
1057. To run the precheck locally
106
107.. code:: bash
108
109 make precheck
110 make run-precheck
111
11217. You are done! now go to www.efabless.com to submit your project!
113
114
115.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
116 :target: https://opensource.org/licenses/Apache-2.0
117.. |User CI| image:: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml/badge.svg
118 :target: https://github.com/efabless/caravel_project_example/actions/workflows/user_project_ci.yml
119.. |Caravel Build| image:: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml/badge.svg
120 :target: https://github.com/efabless/caravel_project_example/actions/workflows/caravel_build.yml