Skip to content

Commit

Permalink
Move third-party submodules to /third_party (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbieganski authored Aug 31, 2023
2 parents 71143e7 + d7d16c3 commit 7646baf
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bsg-test-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/bsg_micro_designs/bsg_micro_designs \
third_party/bsg_micro_designs \
;
- name: Download binaries
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/formal-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: UHDM-integration-tests
test-suite: UHDM-integration-tests/tests
- name: sv2v
test-suite: sv2v/test
test-suite: third_party/sv2v/test
- name: yosys
test-suite: yosys/tests
test-suite: third_party/yosys/tests
fail-fast: false
name: ${{ matrix.name }}
env:
Expand Down Expand Up @@ -71,8 +71,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
yosys \
sv2v \
third_party/yosys \
third_party/sv2v \
UHDM-integration-tests \
;
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/large-designs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/ibex/make-env \
uhdm-tests/ibex/ibex \
third_party/make_env \
third_party/ibex \
;
- name: Download binaries
Expand Down Expand Up @@ -91,8 +91,8 @@ jobs:
path: |
**/plot_*.svg
ibex_synth_symbiflow:
name: Ibex (Symbiflow synthesis)
ibex_synth_f4pga:
name: Ibex (F4PGA synthesis)
runs-on: [self-hosted, Linux, X64]
container: ubuntu:jammy
env:
Expand Down Expand Up @@ -137,8 +137,8 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/ibex/make-env \
uhdm-tests/ibex/ibex \
third_party/make_env \
third_party/ibex \
;
- name: Download binaries
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/opentitan/opentitan-9d82960888 \
third_party/opentitan_9d82960888 \
;
- name: Download binaries
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/opentitan/opentitan \
third_party/opentitan \
;
- name: Download binaries
Expand Down Expand Up @@ -445,7 +445,7 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/opentitan/opentitan \
third_party/opentitan \
;
- name: Download binaries
Expand Down Expand Up @@ -554,7 +554,7 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/swerv/Cores-SweRV \
third_party/swerv \
;
- name: Download binaries
Expand Down Expand Up @@ -634,11 +634,11 @@ jobs:
run: |
git submodule update --depth 1 --init --recursive \
UHDM-integration-tests \
uhdm-tests/black-parrot/black-parrot \
third_party/black_parrot \
;
git submodule update --depth 1 --init \
uhdm-tests/black-parrot/black-parrot-tools \
uhdm-tests/black-parrot/black-parrot-sdk \
third_party/black_parrot_tools \
third_party/black_parrot_sdk \
;
- name: Download binaries
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
Surelog \
yosys \
third_party/surelog \
third_party/yosys \
yosys-f4pga-plugins \
;
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
id: rev
run: |
CACHE_HASH_LENGTH=20
repo_hash="$(git submodule status sv2v)"
repo_hash="$(git submodule status third_party/sv2v)"
# Skip first character which is ' ' or '+'
repo_hash="${repo_hash:1:$CACHE_HASH_LENGTH}"
printf '::set-output name=%s::%s\n' 'sv2v-submodule-rev' "${repo_hash}"
Expand All @@ -253,7 +253,7 @@ jobs:
if: ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
run: |
git submodule update --depth 1 --init --recursive \
sv2v \
third_party/sv2v \
;
- name: Build binaries
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/parsing-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
Surelog \
third_party/surelog \
UHDM-integration-tests \
;
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Checkout submodules
run: |
git submodule update --depth 1 --init --recursive \
Surelog \
third_party/surelog \
UHDM-integration-tests \
;
Expand Down
24 changes: 12 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "yosys"]
path = yosys
path = third_party/yosys
url = https://github.com/YosysHQ/yosys.git
[submodule "Surelog"]
path = Surelog
path = third_party/surelog
url = https://github.com/chipsalliance/Surelog.git
[submodule "sv2v"]
path = sv2v
path = third_party/sv2v
url = https://github.com/zachjs/sv2v.git
[submodule "UHDM-integration-tests"]
path = UHDM-integration-tests
Expand All @@ -14,29 +14,29 @@
path = yosys-f4pga-plugins
url = https://github.com/chipsalliance/yosys-f4pga-plugins.git
[submodule "make-env"]
path = uhdm-tests/ibex/make-env
path = third_party/make_env
url = https://github.com/SymbiFlow/make-env.git
[submodule "uhdm-tests/ibex/ibex"]
path = uhdm-tests/ibex/ibex
path = third_party/ibex
url = https://github.com/lowRISC/ibex.git
[submodule "uhdm-tests/opentitan/opentitan-9d82960888"]
path = uhdm-tests/opentitan/opentitan-9d82960888
path = third_party/opentitan_9d82960888
url = https://github.com/lowRISC/opentitan.git
[submodule "uhdm-tests/swerv/Cores-SweRV"]
path = uhdm-tests/swerv/Cores-SweRV
path = third_party/swerv
url = https://github.com/chipsalliance/Cores-SweRV.git
[submodule "uhdm-tests/opentitan/opentitan"]
path = uhdm-tests/opentitan/opentitan
path = third_party/opentitan
url = https://github.com/antmicro/opentitan.git
[submodule "uhdm-tests/black-parrot/black-parrot"]
path = uhdm-tests/black-parrot/black-parrot
path = third_party/black_parrot
url = https://github.com/black-parrot/black-parrot.git
[submodule "uhdm-tests/black-parrot/black-parrot-tools"]
path = uhdm-tests/black-parrot/black-parrot-tools
path = third_party/black_parrot_tools
url = https://github.com/black-parrot/black-parrot-tools
[submodule "uhdm-tests/black-parrot/black-parrot-sdk"]
path = uhdm-tests/black-parrot/black-parrot-sdk
path = third_party/black_parrot_sdk
url = https://github.com/black-parrot-sdk/black-parrot-sdk.git
[submodule "uhdm-tests/bsg_micro_designs/bsg_micro_designs"]
path = uhdm-tests/bsg_micro_designs/bsg_micro_designs
path = third_party/bsg_micro_designs
url = https://github.com/bsg-idea/bsg_micro_designs.git
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You can build all required binaries using provided ``build_binaries.sh`` script.
:name: build-binaries
#Make sure submodules are inited and updated to the latest version
git submodule update --init --recursive Surelog yosys yosys-f4pga-plugins UHDM-integration-tests
git submodule update --init --recursive third_party/{surelog,yosys} yosys-f4pga-plugins UHDM-integration-tests
./build_binaries.sh
To use yosys built from a submodule, make sure to either use absolute paths, or update the ``PATH`` variable before use.
Expand Down
6 changes: 3 additions & 3 deletions build_binaries.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ${INSTALL_DIR}:
# Surelog
#───────────────────────────────────────────────────────────────────────────────

SURELOG_SRC_DIR := ${REPO_DIR}/Surelog
SURELOG_BUILD_DIR := ${REPO_DIR}/Surelog/build
SURELOG_SRC_DIR := ${REPO_DIR}/third_party/surelog
SURELOG_BUILD_DIR := ${REPO_DIR}/third_party/surelog/build

surelog_build_type:=Release
ifeq ($(strip ${ENABLE_ASAN}),1)
Expand Down Expand Up @@ -77,7 +77,7 @@ install-surelog: build-surelog | ${INSTALL_DIR}
# Yosys
#───────────────────────────────────────────────────────────────────────────────

YOSYS_SRC_DIR := ${REPO_DIR}/yosys
YOSYS_SRC_DIR := ${REPO_DIR}/third_party/yosys
yosys_make_args := PREFIX:=${INSTALL_DIR}

ifeq ($(findstring clang,${CC}),clang)
Expand Down
8 changes: 4 additions & 4 deletions build_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ for arg in $@; do
done

#Surelog
cd Surelog
cd third_party/surelog
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build
cmake --build build -j $(nproc)
cmake --install build
cd ..
cd ../..
#Yosys
if [ "$SKIP_YOSYS" -eq "0" ]; then
cd yosys
cd third_party/yosys
make CONFIG=gcc PREFIX=$INSTALL_PATH install -j $(nproc)
cd ..
cd ../..
fi
#UHDM plugin
if [ "$PLUGIN_ASAN" -eq "1" ]; then
Expand Down
Submodule sv2v updated from 000000 to 6c4ee8
5 changes: 4 additions & 1 deletion uhdm-tests/black-parrot/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ curr_dir:=$(dir $(lastword $(MAKEFILE_LIST)))
###################
### BLACKPARROT ###
###################
BLACKPARROT = ${curr_dir}/black-parrot
BLACKPARROT = ${root_dir}/../third_party/black_parrot
BLACKPARROT_PATCHES_DIR = ${curr_dir}/black-parrot-patches/black-parrot/
BLACKPARROT_BASEJUMP = ${BLACKPARROT}/external/basejump_stl/
BLACKPARROT_BASEJUMP_PATCHES_DIR = ${curr_dir}/black-parrot-patches/basejump_stl
BLACKPARROT_CFG ?= e_bp_unicore_cfg
BLACKPARROT_UHDM = ${root_dir}/build/surelog/bp_tethered.${BLACKPARROT_CFG}.none.parse/out/slpp_unit/surelog.uhdm

export BP_TOOLS_DIR = $(BLACKPARROT)/../black_parrot_tools
export BP_SDK_DIR = $(BLACKPARROT)/../black_parrot_sdk

${BLACKPARROT}/.gitpatch:
cd ${BLACKPARROT}/ && git apply ${BLACKPARROT_PATCHES_DIR}/*.patch && touch $@

Expand Down
2 changes: 1 addition & 1 deletion uhdm-tests/bsg_micro_designs/generate_bsg_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def list_diffs_and_passes(difflist, passlist, faultlist, test_suite, output_dir)
def main():

parser = argparse.ArgumentParser()
parser.add_argument("--test-suite-dir", type=Path, default=Path.cwd()/"uhdm-tests"/"bsg_micro_designs"/"bsg_micro_designs",
parser.add_argument("--test-suite-dir", type=Path, default=Path.cwd()/"third_party"/"bsg_micro_designs",
help="Test suite directory to generate verilog netlists from.")
parser.add_argument("--ref-test-dir", type=Path, default=Path.cwd()/"UHDM-integration-tests"/"tests"/"bsg"/"bsg_micro_designs_results",
help="Referential test directory to compare generated verilog netlists with.")
Expand Down
4 changes: 2 additions & 2 deletions uhdm-tests/ibex/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
this_makefile := $(lastword $(MAKEFILE_LIST))
curr_dir := $(dir $(this_makefile))
IBEX = ${curr_dir}/ibex
IBEX = ${root_dir}/../third_party/ibex

#############################
#### SYNTHESIS ####
Expand Down Expand Up @@ -64,7 +64,7 @@ TOP_DIR := ${root_dir}
REQUIREMENTS_FILE := ${curr_dir}/f4pga_requirements.txt
ENVIRONMENT_FILE := ${curr_dir}/f4pga_environment.yml

include ${curr_dir}/make-env/conda.mk
include ${root_dir}/../third_party/make_env/conda.mk

# We need to apply the patch before Conda uses ${REQUIREMENTS_FILE}
${REQUIREMENTS_FILE}: ${IBEX}/.requirementspatch
Expand Down
2 changes: 1 addition & 1 deletion uhdm-tests/ibex/f4pga_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ dependencies:
- python=3
- pip
- pip:
- -r ./ibex/python-requirements.txt
- -r ../../third_party/ibex/python-requirements.txt
- -r f4pga_requirements.txt
6 changes: 3 additions & 3 deletions uhdm-tests/opentitan/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ curr_dir:=$(dir $(lastword $(MAKEFILE_LIST)))
##############################
### OPENTITAN_9d82960888 ###
##############################
VENV_OT_9d82960888 = ${root_dir}/venv-opentitan-9d82960888
OPENTITAN_9d82960888 = ${curr_dir}/opentitan-9d82960888
VENV_OT_9d82960888 = ${root_dir}/venv-opentitan_9d82960888
OPENTITAN_9d82960888 = ${root_dir}/../third_party/opentitan_9d82960888

${OPENTITAN_9d82960888}/.gitpatch:
cd ${OPENTITAN_9d82960888} && git apply ${curr_dir}/0001-Add-opentitan-patch-for-uhdm.patch && touch $@
Expand All @@ -25,7 +25,7 @@ uhdm/yosys/synth-opentitan-build: clean-build | ${OPENTITAN_9d82960888}/.gitpatc
#################
VENV_OT_SYNTH = ${root_dir}/venv-opentitan-synth
OPENTITAN_SYNTH_PATCHES_DIR = ${curr_dir}/opentitan_synth_patches
OPENTITAN = ${curr_dir}/opentitan
OPENTITAN = ${root_dir}/../third_party/opentitan

TOP := lowrisc:systems_custom_tiny:chip_custom_tiny_nexysvideo:0.1
TOP_HW_DIR := ${OPENTITAN}/hw/top_custom_tiny
Expand Down
2 changes: 1 addition & 1 deletion uhdm-tests/opentitan/opentitan_parsing_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ BUILD_DIR := ${this_mk.dir}/build
OPENTITAN_DEPS_MK_FILE := ${BUILD_DIR}/opentitan-deps.mk
PASSLIST_FILE := ${this_mk.dir}/ot-cores-passlist.txt
SKIPLIST_FILE := ${this_mk.dir}/ot-cores-skiplist.txt
export OPENTITAN_DIR := $(abspath ${this_mk.dir}/../opentitan)
export OPENTITAN_DIR := $(abspath ${this_mk.dir}/../../../third_party/opentitan)

# -1 == no minimum
export MIN_FREE_MEM_TO_START_TEST := -1
Expand Down
2 changes: 1 addition & 1 deletion uhdm-tests/swerv/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
curr_dir:=$(dir $(lastword $(MAKEFILE_LIST)))
DESIGN_DIR = ${curr_dir}/Cores-SweRV
DESIGN_DIR = ${root_dir}/../third_party/swerv
VENV = ${root_dir}/venv-swerv
TOP := top_earlgrey_nexysvideo

Expand Down

0 comments on commit 7646baf

Please sign in to comment.