Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Ibex #85

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rtl/system/ibex_demo_system.sv
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ module ibex_demo_system #(
end

`ifdef VERILATOR

export "DPI-C" function mhpmcounter_num;

function automatic int unsigned mhpmcounter_num();
return u_top.u_ibex_core.cs_registers_i.MHPMCounterNum;
endfunction

export "DPI-C" function mhpmcounter_get;

function automatic longint unsigned mhpmcounter_get(int index);
Expand Down
2 changes: 1 addition & 1 deletion vendor/lowrisc_ibex.lock.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
upstream:
{
url: https://github.com/lowRISC/ibex.git
rev: 7139313ad3964353898ed446105f13916925a1ed
rev: df88055aa38868451ce90d7fcc2bbf172a2dc8a0
}
}
7 changes: 6 additions & 1 deletion vendor/lowrisc_ibex.vendor.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
upstream: {
url: "https://github.com/lowRISC/ibex.git",
rev: "master",
}
},

exclude_from_upstream: [
// GitHub CI configuration
'.github',
]
}
57 changes: 0 additions & 57 deletions vendor/lowrisc_ibex/.github/ISSUE_TEMPLATE/bug.md

This file was deleted.

45 changes: 0 additions & 45 deletions vendor/lowrisc_ibex/.github/ISSUE_TEMPLATE/question.md

This file was deleted.

49 changes: 0 additions & 49 deletions vendor/lowrisc_ibex/.github/workflows/pr_lint_review.yml

This file was deleted.

25 changes: 0 additions & 25 deletions vendor/lowrisc_ibex/.github/workflows/pr_trigger.yml

This file was deleted.

36 changes: 35 additions & 1 deletion vendor/lowrisc_ibex/CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,68 @@ in the form of source code, bug reports, testing, marketing, or any other form,
please feel free to open a pull request to get your name added to this file.

- Alex Bradbury
- Andreas Kurth
- Andreas Traber
- Antonio Pullini
- Bryan Cantrill
- Canberk Topal
- Cathal Minnock
- Daniel Mlynek
- Dawid Zimonczyk
- Eunchan Kim
- Felix Yan
- Flavian Solt
- Florian Zaruba
- Francesco Conti
- Gary Guo
- Germain Haugou
- Greg Chadwick
- Harry Callahan
- Hai Hoang Dang
- Henner Zeller
- Hodjat Asghari Esfeden
- Igor Loi
- Ioannis Karageorgos
- Markus Wegmann
- Ivan Ribeiro
- Karol Gugala
- Leon Woestenberg
- Luís Marques
- Marek Pikuła
- Markus Wegmann
- Marno van der Maas
- Matthias Baer
- Mehmet Burak Aykenar
- Michael Gautschi
- Michael Gielda
- Michael Munday
- Michael Platzer
- Michael Schaffner
- Nils Graf
- Noah Huesser
- Noam Gallmann
- Pasquale Davide Schiavone
- Paul O'Keeffe
- Philipp Wagner
- Pirmin Vogel
- Prajwala Puttappa
- Rahul Behl
- Rhys Thomas
- Renzo Andri
- Robert Schilling
- Rupert Swarbick
- Sam Elliott
- Scott Johnson
- Stefan Mach
- Stefan Tauner
- Stefan Wallentowitz
- Sven Stucki
- Tao Liu
- Tobias Wölfel
- Tom Roberts
- Tudor Timi
- Udi Jonnalagadda
- Vladimir Rozic
- Yuichi Sugiyama
- Yusef Karim
- Zachary Snow
- Zeeshan Rafique
8 changes: 8 additions & 0 deletions vendor/lowrisc_ibex/ci/install-build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ if [ "$(id -u)" -ne 0 ]; then
SUDO_CMD="sudo "
fi

if [ -z "$GITHUB_ACTIONS" ]; then
GITHUB_PATH=/dev/null
fi

case "$ID-$VERSION_ID" in
ubuntu-16.04|ubuntu-18.04|ubuntu-20.04)
# Curl must be available to get the repo key below.
Expand Down Expand Up @@ -57,12 +61,14 @@ case "$ID-$VERSION_ID" in
$SUDO_CMD chmod 777 /tools/riscv-isa-sim
$SUDO_CMD tar -C /tools/riscv-isa-sim -xvzf ibex-cosim-"$IBEX_COSIM_VERSION".tar.gz --strip-components=1
echo "##vso[task.prependpath]/tools/riscv-isa-sim/bin"
echo "/tools/riscv-isa-sim/bin" >> $GITHUB_PATH

wget https://storage.googleapis.com/verilator-builds/verilator-"$VERILATOR_VERSION".tar.gz
$SUDO_CMD mkdir -p /tools/verilator
$SUDO_CMD chmod 777 /tools/verilator
$SUDO_CMD tar -C /tools/verilator -xvzf verilator-"$VERILATOR_VERSION".tar.gz
echo "##vso[task.prependpath]/tools/verilator/$VERILATOR_VERSION/bin"
echo "/tools/verilator/$VERILATOR_VERSION/bin" >> $GITHUB_PATH
# Python dependencies
#
# Updating pip and setuptools is required to have these tools properly
Expand All @@ -81,6 +87,7 @@ case "$ID-$VERSION_ID" in
$SUDO_CMD mkdir -p /tools/verible && $SUDO_CMD chmod 777 /tools/verible
tar -C /tools/verible -xf verible.tar.gz --strip-components=1
echo "##vso[task.prependpath]/tools/verible/bin"
echo "/tools/verible/bin" >> $GITHUB_PATH
;;

*)
Expand All @@ -96,3 +103,4 @@ curl -Ls -o build/toolchain/rv32-toolchain.tar.xz "$TOOLCHAIN_URL"
$SUDO_CMD mkdir -p /tools/riscv && $SUDO_CMD chmod 777 /tools/riscv
tar -C /tools/riscv -xf build/toolchain/rv32-toolchain.tar.xz --strip-components=1
echo "##vso[task.prependpath]/tools/riscv/bin"
echo "/tools/riscv/bin" >> $GITHUB_PATH
3 changes: 3 additions & 0 deletions vendor/lowrisc_ibex/ci/run-cosim-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ echo "Running $TEST_NAME with co-simulation"
build/lowrisc_ibex_ibex_simple_system_cosim_0/sim-verilator/Vibex_simple_system --meminit=ram,$TEST_ELF
if [ $? != 0 ]; then
echo "##vso[task.logissue type=error]Running % failed co-simulation testing"
echo "::error::Running % failed co-simulation testing"
exit 1
fi

grep 'FAILURE' ibex_simple_system.log
if [ $? != 1 ]; then
echo "##vso[task.logissue type=error]Failure seen in $TEST_NAME log"
echo "::error::Failure seen in $TEST_NAME log"
echo "Log contents:"
cat ibex_simple_system.log
exit 1
Expand All @@ -42,6 +44,7 @@ if [ $SKIP_PASS_CHECK != 1 ]; then
grep 'PASS' ibex_simple_system.log
if [ $? != 0 ]; then
echo "##vso[task.logissue type=error]No pass seen in $TEST_NAME log"
echo "::error::No pass seen in $TEST_NAME log"
echo "Log contents:"
cat ibex_simple_system.log
exit 1
Expand Down
15 changes: 15 additions & 0 deletions vendor/lowrisc_ibex/ci/vars.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# Pipeline variables, used by the public and private CI pipelines
# Quote values to ensure they are parsed as string (version numbers might
# end up as float otherwise).
VERILATOR_VERSION=v4.104
IBEX_COSIM_VERSION=15fbd568
RISCV_TOOLCHAIN_TAR_VERSION=20220210-1
RISCV_TOOLCHAIN_TAR_VARIANT=lowrisc-toolchain-gcc-rv32imcb
RISCV_COMPLIANCE_GIT_VERSION=844c6660ef3f0d9b96957991109dfd80cc4938e2
VERIBLE_VERSION=v0.0-2135-gb534c1fe
# lowRISC-internal version numbers of Ibex-specific Spike builds.
SPIKE_IBEX_VERSION=20220817-git-eccdcb15c3e51b4f7906c7b42fb824f24a4338a2
Loading