Skip to content

Commit

Permalink
Do not pull non-essential submodules by default.
Browse files Browse the repository at this point in the history
Only yosys and surelog submodules are needed for plugin build. Those two
are automatically fetched as before, i.e. after calling just
`git submodule update --recursive`.

All other submodules are skipped, even when their paths are explicitly
specified. To fetch them one has to add `--checkout` flag has to
`git submodule update`, e.g.:

```
git submodule update --dept 1 --init --recursive --checkout
```
  • Loading branch information
Mariusz Glebocki committed Sep 25, 2023
1 parent 7e0d168 commit 9605635
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/bsg-test-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/bsg_micro_designs \
;
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/formal-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/yosys \
third_party/sv2v \
;
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/large-designs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/make_env \
third_party/ibex \
;
Expand Down Expand Up @@ -134,7 +135,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/make_env \
third_party/ibex \
third_party/yosys_f4pga_plugins \
Expand Down Expand Up @@ -224,7 +226,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/opentitan_9d82960888 \
;
Expand Down Expand Up @@ -335,7 +338,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/opentitan \
;
Expand Down Expand Up @@ -436,7 +440,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/opentitan \
;
Expand Down Expand Up @@ -544,7 +549,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/veer \
;
Expand Down Expand Up @@ -621,10 +627,11 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/black_parrot \
;
git submodule update --depth 1 --init \
git submodule update --depth 1 --init --checkout \
third_party/black_parrot_tools \
third_party/black_parrot_sdk \
;
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/{surelog,yosys} \
;
Expand Down Expand Up @@ -195,7 +196,8 @@ jobs:
- name: Checkout submodules
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/sv2v \
;
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/parsing-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/surelog \
;
Expand Down Expand Up @@ -167,7 +168,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
git submodule sync
git submodule update --depth 1 --init --recursive --checkout \
third_party/surelog \
;
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tuttest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,9 @@ jobs:
run: |
tuttest README.md example-verilog | bash -
tuttest README.md example-multiple-files | yosys
- name: Test sv2v pull and build
run: |
export PATH=`pwd`/image/bin:$PATH
tuttest README.md sv2v-update | bash -
tuttest README.md sv2v-build | bash -
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,48 @@
[submodule "sv2v"]
path = third_party/sv2v
url = https://github.com/zachjs/sv2v.git
update = none
[submodule "yosys-f4pga-plugins"]
path = third_party/yosys_f4pga_plugins
url = https://github.com/chipsalliance/yosys-f4pga-plugins.git
update = none
[submodule "make-env"]
path = third_party/make_env
url = https://github.com/SymbiFlow/make-env.git
update = none
[submodule "uhdm-tests/ibex/ibex"]
path = third_party/ibex
url = https://github.com/lowRISC/ibex.git
update = none
[submodule "uhdm-tests/opentitan/opentitan-9d82960888"]
path = third_party/opentitan_9d82960888
url = https://github.com/lowRISC/opentitan.git
update = none
[submodule "uhdm-tests/opentitan/opentitan"]
path = third_party/opentitan
url = https://github.com/antmicro/opentitan.git
update = none
[submodule "uhdm-tests/black-parrot/black-parrot"]
path = third_party/black_parrot
url = https://github.com/black-parrot/black-parrot.git
update = none
[submodule "uhdm-tests/black-parrot/black-parrot-tools"]
path = third_party/black_parrot_tools
url = https://github.com/black-parrot/black-parrot-tools
update = none
[submodule "uhdm-tests/black-parrot/black-parrot-sdk"]
path = third_party/black_parrot_sdk
url = https://github.com/black-parrot-sdk/black-parrot-sdk.git
update = none
[submodule "uhdm-tests/bsg_micro_designs/bsg_micro_designs"]
path = third_party/bsg_micro_designs
url = https://github.com/bsg-idea/bsg_micro_designs.git
update = none
[submodule "third_party/veer"]
path = third_party/veer
url = https://github.com/chipsalliance/Cores-VeeR-EH1
update = none
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest
update = none
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ You need to add this folder to your `PATH` variable to ensure you are using corr

<!-- name="build-binaries" -->
``` bash
git submodule sync
git submodule update --init --recursive third_party/{surelog,yosys}
./build_binaries.sh
```
Expand Down Expand Up @@ -155,6 +156,27 @@ If you encounter any problems with it, please compare the results with a single

### Formal Verification

#### Prerequisites

Formal Verification uses `sv2v` tool and tests from its repository, which is available as a submodule.
To download the sv2v submodule run:

<!-- name="sv2v-update" -->
``` bash
git submodule update --init --recursive --checkout third_party/sv2v
```

To build sv2v and copy it to `images/bin` (where it is expected to be by the test script) run:

<!-- name="sv2v-build" -->
``` bash
wget -qO- https://get.haskellstack.org/ | sh -s - -f -d $PWD/image/bin
make -j$(nproc) -C $PWD/third_party/sv2v
cp ./third_party/sv2v/bin/sv2v ./image/bin
```

#### Testing

To start formal verification tests, use `run_fv_tests.mk`, either as an executable or by using make:

<!-- name="run-fv-tests-exec" -->
Expand Down

0 comments on commit 9605635

Please sign in to comment.