Skip to content

Commit

Permalink
Merge pull request #12 from dau-dev/tkp/180
Browse files Browse the repository at this point in the history
bump uhdm / surelog to 1.80, yosys to 0.35, add verible
  • Loading branch information
timkpaine authored Dec 15, 2023
2 parents 80c03f6 + a7c1029 commit a8e5c4a
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 36 deletions.
145 changes: 128 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ surfer
synlig
uhdm
verilator
verible
yosys

*.deb
Expand Down
79 changes: 63 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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 <t.paine154@gmail.com>\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


#####################################################################################################################################################################################################################################################################################
# _ _ ___ ___ _ _ ___
Expand All @@ -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)
Expand All @@ -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


#####################################################################################################################################################################################################################################################################################
# _ _
# | (_)
# ___ _ _ _ __ | |_ __ _
Expand All @@ -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 <t.paine154@gmail.com>\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

Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

0 comments on commit a8e5c4a

Please sign in to comment.