Skip to content

Commit

Permalink
sw: Update initialization for iis machines
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Sinigaglia committed Jan 11, 2024
1 parent 2dc5155 commit 303ee8e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
17 changes: 11 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# Author: Matheus Cavalcante, ETH Zurich
# Authors: Matheus Cavalcante, ETH Zurich
# Mattia Sinigaglia, Universisty of Bologna

# Include Makefrag
include util/Makefrag
Expand All @@ -13,9 +14,13 @@ BENDER_VERSION = 0.27.1
# Do not include minifloat opcodes, since they conflict with the RVV opcodes!
OPCODES := "opcodes-rvv opcodes-rv32b_CUSTOM opcodes-ipu_CUSTOM opcodes-frep_CUSTOM opcodes-dma_CUSTOM opcodes-ssr_CUSTOM opcodes-smallfloat"


# Default target
all: bender toolchain update_opcodes

# Target for IIS users
init: bender update_opcodes

###############
# Toolchain #
###############
Expand Down Expand Up @@ -107,18 +112,18 @@ tc-riscv-isa-sim: sw/toolchain/riscv-isa-sim sw/toolchain/dtc

bender: check-bender
check-bender:
@if [ -x $(BENDER_INSTALL_DIR)/bin/bender ]; then \
@if [ -x $(BENDER_INSTALL_DIR)/bender ]; then \
req="bender $(BENDER_VERSION)"; \
current="$$($(BENDER_INSTALL_DIR)/bin/bender --version)"; \
current="$$($(BENDER_INSTALL_DIR)/bender --version)"; \
if [ "$$(printf '%s\n' "$${req}" "$${current}" | sort -V | head -n1)" != "$${req}" ]; then \
rm -rf $(BENDER_INSTALL_DIR); \
fi \
fi
@$(MAKE) -C $(ROOT_DIR) $(BENDER_INSTALL_DIR)/bin/bender
@$(MAKE) -C $(ROOT_DIR) $(BENDER_INSTALL_DIR)/bender

$(BENDER_INSTALL_DIR)/bin/bender:
$(BENDER_INSTALL_DIR)/bender:
mkdir -p $(BENDER_INSTALL_DIR) && cd $(BENDER_INSTALL_DIR) && \
cargo install bender --version $(BENDER_VERSION) --root $(BENDER_INSTALL_DIR) --locked
curl --proto '=https' --tlsv1.2 https://pulp-platform.github.io/bender/init -sSf | sh -s -- $(BENDER_VERSION)

###############
# Verilator #
Expand Down
5 changes: 3 additions & 2 deletions util/Makefrag
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# Author: Matheus Cavalcante, ETH Zurich
# Authors: Matheus Cavalcante, ETH Zurich
# Mattia Sinigaglia, Universisty of Bologna

# Root
SHELL = /usr/bin/env bash
Expand All @@ -19,7 +20,7 @@ BENDER_INSTALL_DIR ?= ${INSTALL_DIR}/bender
VERILATOR_INSTALL_DIR ?= ${INSTALL_DIR}/verilator

# Support for local override
BENDER ?= ${BENDER_INSTALL_DIR}/bin/bender
BENDER ?= ${BENDER_INSTALL_DIR}/bender
DASM ?= ${SPIKE_INSTALL_DIR}/bin/spike-dasm
VLT ?= ${VERILATOR_INSTALL_DIR}/bin/verilator_bin
CMAKE ?= cmake-3.18.1
Expand Down
9 changes: 9 additions & 0 deletions util/iis-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2022 ETH Zurich and University of Bologna.
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51
#
# Author: Mattia Sinigaglia, Universisty of Bologna

echo "export Spatz toolchains"
export LLVM_INSTALL_DIR=/usr/pack/riscv-1.0-kgf/spatz-llvm-2023.08.10
export GCC_INSTALL_DIR=/usr/pack/riscv-1.0-kgf/spatz-gcc-7.1.1

0 comments on commit 303ee8e

Please sign in to comment.