diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deca88a..86db80f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,28 +77,20 @@ jobs: with: key: linux-gcc-cache-${{ matrix.os }} - - name: Configure shell - run: echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV - - - name: Set up Python + - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.11' - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - components: clippy - override: true - - name: Install python dependencies run: pip install orderedmultidict - name: Global Dependencies run: sudo apt install bison flex libfl-dev libreadline-dev tcl-dev + - name: Configure shell for CCache + run: echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV + - name: Build - googletest run: make googletest/install @@ -132,11 +124,6 @@ jobs: make simview/install make simview/debian - - name: Build - surfer - run: | - make surfer/install - make surfer/debian - - name: Build - yosys run: | make yosys/install @@ -162,10 +149,126 @@ jobs: # ./*.rpm # !./*-debuginfo-*.rpm + build-linux-packages-verible: + needs: + - initialize + + strategy: + matrix: + os: + - ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + override: true + + - name: Global Dependencies + run: sudo apt install bison flex libfl-dev libreadline-dev tcl-dev + + - name: Install Bazel + uses: bazelbuild/setup-bazelisk@v2 + + - name: Mount bazel cache + uses: actions/cache@v3 + with: + path: "~/.cache/bazel" + key: bazel + + - name: Build - verible + run: | + make verible/install + make verible/debian + env: + USE_BAZEL_VERSION: 6.4.0 + + - uses: actions/upload-artifact@v4 + with: + name: artifact-deb-verible + path: ./*.deb + + # - uses: actions/upload-artifact@v4 + # with: + # name: artifact-rpm + # path: | + # ./*.rpm + # !./*-debuginfo-*.rpm + + build-linux-packages-surfer: + needs: + - initialize + + strategy: + matrix: + os: + - ubuntu-22.04 # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: clippy + override: true + + - name: Global Dependencies + run: sudo apt install bison flex libfl-dev libreadline-dev tcl-dev + + - name: Install Bazel + uses: bazelbuild/setup-bazelisk@v2 + + - name: Mount bazel cache + uses: actions/cache@v3 + with: + path: "~/.cache/bazel" + key: bazel + + - name: Build - surfer + run: | + make surfer/install + make surfer/debian + + - uses: actions/upload-artifact@v4 + with: + name: artifact-deb-surfer + path: ./*.deb + + # - uses: actions/upload-artifact@v4 + # with: + # name: artifact-rpm + # path: | + # ./*.rpm + # !./*-debuginfo-*.rpm + create-release: needs: - initialize - build-linux-packages + - build-linux-packages-verible + - build-linux-packages-surfer strategy: matrix: @@ -181,6 +284,14 @@ jobs: with: name: artifact-deb + - uses: actions/download-artifact@v4 + with: + name: artifact-deb-verible + + - uses: actions/download-artifact@v4 + with: + name: artifact-deb-surfer + - name: Release uses: softprops/action-gh-release@v1 with: diff --git a/.gitignore b/.gitignore index 596fc86..6be16f2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ surfer synlig uhdm verilator +verible yosys *.deb diff --git a/Makefile b/Makefile index a0fa096..a93f485 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,13 @@ CMAKE_INSTALL_ARGS_STATIC := --install build_static $(CMAKE_INSTALL_ARGS) ifeq ($(UNAME), Linux) ROOT_PREFIX := $(or $(INSTALL_PREFIX),"/usr/local") BIN_DIR := $(or $(INSTALL_PREFIX),"/usr/local")/bin/ +INC_DIR := $(or $(INSTALL_PREFIX),"/usr/local")/include/ LIB_DIR := $(or $(INSTALL_PREFIX),"/usr/local")/lib/ SHARE_DIR := $(or $(INSTALL_PREFIX),"/usr/local")/share/ else ifeq ($(UNAME), Darwin) ROOT_PREFIX := $(or $(INSTALL_PREFIX),"/opt/homebrew") BIN_DIR := $(or $(INSTALL_PREFIX),"/opt/homebrew")/bin/ +INC_DIR := $(or $(INSTALL_PREFIX),"/opt/homebrew")/include/ LIB_DIR := $(or $(INSTALL_PREFIX),"/opt/homebrew")/lib/ SHARE_DIR := $(or $(INSTALL_PREFIX),"/opt/homebrew")/share/ endif @@ -70,11 +72,12 @@ GOOGLETEST_VERSION := 1.14.0 CAPNPROTO_VERSION := 1.0.0 JSON_VERSION := 3.11.2 ANTLR_VERSION := 4.13.0 -UHDM_VERSION := 1.75 -SURELOG_VERSION := 1.75 -YOSYS_VERSION := 0.33 -SYNLIG_VERSION := 2023-09-19-a2c9ca8 -VERILATOR_VERSION := 5.014 +UHDM_VERSION := 1.80 +SURELOG_VERSION := 1.80 +VERIBLE_VERSION := 0.1.0 +YOSYS_VERSION := 0.35 +SYNLIG_VERSION := 2023-12-13-b3e690f +VERILATOR_VERSION := 5.018 SIMVIEW_VERSION := 0.0.1 SURFER_VERSION := 0.0.1 @@ -331,6 +334,38 @@ surelog/debian: ## build debian package for surelog dpkg-deb -Z"gzip" --root-owner-group --build surelog/debian surelog_$(SURELOG_VERSION)_amd64.deb +##################################################################################################################################################################################################################################################################################### +# __ __ _ _ _ +# \ \ / / (_) | | | +# \ \ / /__ _ __ _| |__ | | ___ +# \ \/ / _ \ '__| | '_ \| |/ _ \ +# \ / __/ | | | |_) | | __/ +# \/ \___|_| |_|_.__/|_|\___| +# +# https://github.com/chipsalliance/verible +# +.PHONY: verible/libs verible verible/install verible/debian +verible/.git: + # git clone --depth 1 --branch v$(VERIBLE_VERSION) https://github.com/chipsalliance/verible.git + git clone --depth 1 --branch master https://github.com/chipsalliance/verible.git + +verible/libs: verible/.git + cd verible && bazel build -c opt //... + # cd verible && bazel build -c opt --config=create_static_linked_executables //... + +verible: verible/libs ## build verible + +verible/install: verible/libs ## build and install verible + mkdir -p $(or $(INSTALL_PREFIX),"/usr/local")/bin + cd verible && bazel run -c opt :install -- -s $(or $(INSTALL_PREFIX),"/usr/local")/bin + +verible/debian: ## build debian package for verible + mkdir -p verible/debian/DEBIAN + printf "Package: verible\nVersion: $(VERIBLE_VERSION)\nSection: utils\nPriority: optional\nArchitecture: amd64\nMaintainer: timkpaine \nDescription: verible\n" > verible/debian/DEBIAN/control + $(MAKE) verible/libs + $(MAKE) verible/install INSTALL_PREFIX=`pwd`/debian + dpkg-deb -Z"gzip" --root-owner-group --build verible/debian verible_$(VERIBLE_VERSION)_amd64.deb + ##################################################################################################################################################################################################################################################################################### # _ _ ___ ___ _ _ ___ @@ -351,8 +386,7 @@ YOSYS_ARGS := CONFIG=clang endif yosys/.git: - # git clone --depth 1 --branch yosys-$(YOSYS_VERSION) https://github.com/YosysHQ/yosys.git - git clone --depth 1 --branch master https://github.com/YosysHQ/yosys.git + git clone --depth 1 --branch yosys-$(YOSYS_VERSION) https://github.com/YosysHQ/yosys.git yosys/libs: yosys/.git cd yosys && make $(YOSYS_ARGS) -j $(NPROC) @@ -370,6 +404,7 @@ yosys/debian: ## build debian package for yosys dpkg-deb -Z"gzip" --root-owner-group --build yosys/debian yosys_$(YOSYS_VERSION)_amd64.deb +##################################################################################################################################################################################################################################################################################### # _ _ # | (_) # ___ _ _ _ __ | |_ __ _ @@ -381,25 +416,35 @@ yosys/debian: ## build debian package for yosys # # https://github.com/chipsalliance/synlig # -.PHONY: synlig/libs synlig synlig/install synlig/debian +.PHONY: synlig/build synlig synlig/install synlig/debian +SYNLIG_CMAKE_ARGS := \ + -DSYNLIG_USE_HOST_SURELOG=ON \ + -DSYNLIG_USE_HOST_CAPNP=ON \ + -DSYNLIG_USE_HOST_GTEST=ON \ + -DSYNLIG_USE_HOST_YOSYS=OFF \ + -DYOSYS_CONFIG=yosys-config \ + -DYOSYS_PATH=$(shell yosys-config --datdir)/include \ + -DSYNLIG_WITH_TCMALLOC=OFF \ + -DSYNLIG_WITH_ZLIB=ON synlig/.git: - # TODO once merged # git clone --depth 1 --branch $(SYNLIG_VERSION) https://github.com/chipsalliance/synlig.git - git clone --depth 1 --branch tkp/newyosys https://github.com/timkpaine/synlig.git + git clone --depth 1 --branch tkp/cmakeext https://github.com/dau-dev/synlig.git -synlig/libs: synlig/.git - cd synlig/frontends/systemverilog && make -j $(NPROC) +synlig/build: synlig/.git + echo "cmake $(SYNLIG_CMAKE_ARGS) $(CMAKE_COMMON_ARGS_SHARED) ." + cd synlig && cmake $(SYNLIG_CMAKE_ARGS) $(CMAKE_COMMON_ARGS_SHARED) . + cd synlig && cmake $(CMAKE_BUILD_ARGS_SHARED) -synlig: synlig/libs ## build synlig +synlig: synlig/build ## build synlig -synlig/install: synlig/libs ## build and install synlig - cd synlig/frontends/systemverilog && sudo make PREFIX=$(ROOT_PREFIX) install +synlig/install: synlig/build ## build and install synlig + cd synlig && sudo cmake $(CMAKE_INSTALL_ARGS_SHARED) synlig/debian: ## build debian package for synlig mkdir -p synlig/debian/DEBIAN printf "Package: synlig\nVersion: $(SYNLIG_VERSION)\nSection: utils\nPriority: optional\nArchitecture: amd64\nMaintainer: timkpaine \nDescription: synlig\n" > synlig/debian/DEBIAN/control - $(MAKE) synlig/libs + $(MAKE) synlig/build $(MAKE) synlig/install INSTALL_PREFIX=./debian dpkg-deb -Z"gzip" --root-owner-group --build synlig/debian synlig_$(SYNLIG_VERSION)_amd64.deb @@ -525,6 +570,8 @@ clean: ## Delete all built repos sudo rm -rf surelog sudo rm -rf synlig sudo rm -rf verible + sudo rm -rf yosys + sudo rm -rf surfer .DEFAULT_GOAL := help diff --git a/README.md b/README.md index 2bd72b7..db574d4 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ Software Tools | capnproto | [capnproto/capnproto](https://github.com/capnproto/capnproto) | 1.0.0 | amd64 | deb | | JSON | [nlohmann/json](https://github.com/nlohmann/json) | 3.11.2 | amd64 | deb | | simview | [pieter3d/simview](https://github.com/pieter3d/simview) | N/A | amd64 | deb | -| Surelog | [chipsalliance/surelog](https://github.com/chipsalliance/surelog) | 1.74 | amd64 | deb | +| Surelog | [chipsalliance/surelog](https://github.com/chipsalliance/surelog) | 1.80 | amd64 | deb | | surfer | [surfer-project/surfer](https://gitlab.com/surfer-project/surfer) | N/A | amd64 | deb | -| UHDM | [chipsalliance/uhdm](https://github.com/chipsalliance/uhdm) | 1.74 | amd64 | deb | +| UHDM | [chipsalliance/uhdm](https://github.com/chipsalliance/uhdm) | 1.80 | amd64 | deb | +| Verible | [chipsalliance/verible](https://github.com/chipsalliance/verible) | 0.0-3430-g060bde0f | amd64 | deb | | verilator | [verilator/verilator](https://github.com/verilator/verilator) | 5.014 | | | -| yosys | [YosysHQ/yosys](https://github.com/YosysHQ/yosys) | 0.33 | amd64 | deb | +| yosys | [YosysHQ/yosys](https://github.com/YosysHQ/yosys) | 0.35 | amd64 | deb |