Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d342953
feat: support P2E bank difftest
daiyongyuan Sep 12, 2026
d8815a8
fix: adapt bank difftest to latest main
daiyongyuan Sep 12, 2026
096cf13
fix: clean CI workspace before checkout
daiyongyuan Sep 14, 2026
284d85c
fix: clean CI workspace before prepare
daiyongyuan Sep 14, 2026
6b4dee5
fix: purge stale CI submodule worktrees
daiyongyuan Sep 14, 2026
70b4264
fix: execute CI reset script from target revision
daiyongyuan Sep 14, 2026
c596c1a
fix: update only current CI submodules
daiyongyuan Sep 14, 2026
8e10b21
fix: reset CI parent before submodules
daiyongyuan Sep 14, 2026
c3e2bef
fix: derive CI submodules from target tree
daiyongyuan Sep 14, 2026
b392206
fix: disable recursive fetch in CI reset
daiyongyuan Sep 14, 2026
2139aae
fix: provision clean CI runtime
daiyongyuan Sep 14, 2026
4ff7a1e
fix: make clean CI setup reproducible
daiyongyuan Sep 14, 2026
555abca
fix: initialize nested submodules for regression builds
daiyongyuan Sep 14, 2026
098040a
fix: initialize only required nested submodule
daiyongyuan Sep 14, 2026
455a594
fix: update nested submodule from its repository
daiyongyuan Sep 14, 2026
58bb59b
Fix poly Verilator CI regression
daiyongyuan Sep 15, 2026
2b67508
Format Scala files for CI
daiyongyuan Sep 15, 2026
2e472be
Fix CI jobs using stale repo lock script
daiyongyuan Sep 15, 2026
4a4ebd9
fix: repair P2E regression workloads
daiyongyuan Sep 15, 2026
d3bb373
ci: extend FPGA bitstream timeout
daiyongyuan Sep 16, 2026
f8e8e8c
fix: preserve Verilator top module output
daiyongyuan Sep 17, 2026
4bcaf6b
fix: preserve P2E top module output
daiyongyuan Sep 17, 2026
ea0e48e
fix: stabilize P2E bank difftest build
daiyongyuan Sep 17, 2026
e9f47d7
Delete examples/cores/pebble/configs/default.toml
daiyongyuan Sep 18, 2026
6027564
revert: use shared Rocket config for Pebble
daiyongyuan Sep 18, 2026
3c7cb3e
fix: restore regression coverage and explicit compiler builds
daiyongyuan Sep 18, 2026
7ebf69f
refactor: reformat and improve CI repo lock script for better handlin…
shirohasuki Sep 19, 2026
261a1da
[tools/difftest] refactor bankdiff to a decoupled feature
shirohasuki Sep 21, 2026
bb8f7e7
update: bump submodule commits for bbdev and bebop to the latest version
shirohasuki Sep 21, 2026
ea6f387
refactor: adjust xLen references in Frontend, Boot, and various decod…
shirohasuki Sep 21, 2026
9242bea
update: bump bbdev and bebop to the latest version
shirohasuki Sep 22, 2026
f4a3ba3
fix: refine CI repo lock script
shirohasuki Sep 22, 2026
848c9d4
fix: clean up gemmini state and loop micro ops code
shirohasuki Sep 22, 2026
cb89ab7
fix: refine shared memory configuration, and enhance Gemmini micro-op…
shirohasuki Sep 22, 2026
0418764
fix: refactor state management in smatmul and goban examples for muti…
shirohasuki Sep 22, 2026
31e9647
fix: removing unused synchronization structures in Goban and Poly
shirohasuki Sep 22, 2026
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
15 changes: 9 additions & 6 deletions .github/scripts/ci_repo_lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,22 @@ exec 9>"${LOCK_FILE}"

repo_reset() {
cd "${repo}"

# buckyball repository it self never depend on submodules in submodules unless llvm in buddy-mlir
git fetch --force --prune origin "${want_sha}"
git checkout --detach "${want_sha}"
git checkout --detach --force "${want_sha}"
git reset --hard "${want_sha}"
git clean -ffd
# rm -rf arch/out

rm -rf arch/out
rm -rf compiler/thirdparty/buddy-mlir/llvm/build
rm -rf compiler/thirdparty/buddy-mlir/build

git submodule sync
git submodule update --init --force
for submodule in bbdev bebop compiler/thirdparty/buddy-mlir; do
git -C "${repo}/${submodule}" reset --hard
git -C "${repo}/${submodule}" clean -ffd
done
git -C compiler/thirdparty/buddy-mlir submodule sync
git -C compiler/thirdparty/buddy-mlir submodule update --init --force -- llvm
git submodule foreach 'git clean -ffd'
have_sha="$(git rev-parse HEAD)"
if [[ "${have_sha}" != "${want_sha}" ]]; then
echo "ERROR: checkout is ${have_sha}, expected ${want_sha}" >&2
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ jobs:
set -euo pipefail
root=~/Code/buckyball
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"

# fetch first to ensure if we modify ci_repo_lock.sh, we still use the old version to checkout.
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
prepare "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

nix build
cd "${root}/bbdev"
nix develop -c true
cd "${root}/bebop"
nix develop -c true

- name: Check pre-commit
shell: zsh {0}
run: |
Expand Down Expand Up @@ -111,7 +121,9 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: Nix build
Expand Down Expand Up @@ -158,9 +170,9 @@ jobs:
root="${BB_ROOT/#\~/$HOME}"
cd "${root}"
nix develop -c bbdev bebop-verilator --clean '--chip ${{ matrix.chip }}'
nix develop -c bbdev bebop-verilator --verilog '--chip ${{ matrix.chip }}'
nix develop -c bbdev bebop-verilator --build '--jobs 16 --chip ${{ matrix.chip }}'
nix develop -c bbdev bebop-verilator --batch '--chip ${{ matrix.chip }} --test elf-tests --clean-before'
nix develop -c bbdev bebop-verilator --verilog '--chip ${{ matrix.chip }} --diff'
nix develop -c bbdev bebop-verilator --build '--jobs 16 --chip ${{ matrix.chip }} --diff'
nix develop -c bbdev bebop-verilator --batch '--chip ${{ matrix.chip }} --test elf-tests --diff --clean-before'

- name: rushB batch
if: matrix.enable_rushb && matrix.run_bemu_elf_tests && matrix.run_bemu_pk_tests && matrix.run_verilator_batch_tests
Expand Down
84 changes: 59 additions & 25 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,15 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
prepare "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"
nix build
cd "${root}/bbdev"
nix develop -c true
cd "${root}/bebop"
nix develop -c true

- name: Install config
shell: zsh {0}
Expand Down Expand Up @@ -89,7 +96,9 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: DC area
Expand Down Expand Up @@ -155,7 +164,9 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: Chip UVM
Expand Down Expand Up @@ -183,6 +194,7 @@ jobs:
name: fpga-bitstream-${{ matrix.chip }}
needs: gate
runs-on: check
timeout-minutes: 720
strategy:
fail-fast: false
matrix:
Expand All @@ -207,7 +219,9 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: FPGA buildbitstream
Expand All @@ -217,9 +231,11 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
cd "${root}"
rm -rf "${root}"/bebop/build/"${{ matrix.chip }}"-*/
nix develop -c bbdev bebop-p2e --verilog '--chip ${{ matrix.chip }}'
nix develop -c bbdev bebop-p2e --buildbitstream '--chip ${{ matrix.chip }}'
for build_dir in "${root}"/bebop/build/"${{ matrix.chip }}"-*(N); do
rm -rf "${build_dir}"
done
nix develop -c bbdev bebop-p2e --verilog '--chip ${{ matrix.chip }} --diff'
nix develop -c bbdev bebop-p2e --buildbitstream '--chip ${{ matrix.chip }} --diff'
bits=("${root}"/bebop/build/"${{ matrix.chip }}"-*/fpgaCompDir/bitstream.bit(N))
if (( ${#bits} != 1 )); then
echo "ERROR: expected exactly 1 bitstream.bit for ${{ matrix.chip }}, got ${#bits}" >&2
Expand All @@ -246,30 +262,37 @@ jobs:
matrix:
include:
- chip: toy
run_fpga_check: true
run_fpga_elf: true
run_fpga_pk: true
- chip: pebble
run_fpga_check: true
run_fpga_elf: true
run_fpga_pk: true
- chip: goban
run_fpga_check: true
run_fpga_elf: true
run_fpga_pk: false
- chip: poly
run_fpga_check: true
run_fpga_elf: true
run_fpga_pk: false
- chip: multi-rocket
run_fpga_check: true
run_fpga_elf: true
run_fpga_pk: false
env:
BB_ROOT: ~/Code/buckyball
steps:
- name: Enter repo lock
if: matrix.run_fpga_check
if: matrix.run_fpga_elf || matrix.run_fpga_pk
shell: zsh {0}
run: |
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: FPGA check
if: matrix.run_fpga_check
if: matrix.run_fpga_elf || matrix.run_fpga_pk
shell: zsh {0}
run: |
set -euo pipefail
Expand All @@ -281,13 +304,21 @@ jobs:
printf '%s\n' "${bits[@]}" >&2
exit 1
fi
nix develop -c bbdev workload --build "--chip ${{ matrix.chip }}"
nix develop -c bbdev workload --tohex "--chip ${{ matrix.chip }}"
nix develop -c bbdev bebop-p2e --batch "--chip ${{ matrix.chip }} --bitstream ${bits[1]} --test elf-tests"
nix develop -c bbdev bebop-p2e --batch "--chip ${{ matrix.chip }} --bitstream ${bits[1]} --test pk-tests"

if [[ "${{ matrix.run_fpga_elf }}" == "true" ]]; then
nix develop -c bbdev compiler --build "--chip ${{ matrix.chip }}"
nix develop -c bbdev workload --build "--chip ${{ matrix.chip }}"
nix develop -c bbdev workload --tohex "--chip ${{ matrix.chip }}"
nix develop -c bbdev bebop-p2e --batch "--chip ${{ matrix.chip }} --bitstream ${bits[1]} --test elf-tests --diff"
fi

if [[ "${{ matrix.run_fpga_pk }}" == "true" ]]; then
nix develop -c bbdev kernel --build "--chip ${{ matrix.chip }}"
nix develop -c bbdev bebop-p2e --batch "--chip ${{ matrix.chip }} --bitstream ${bits[1]} --test pk-tests --diff"
fi

- name: Exit repo lock
if: always() && matrix.run_fpga_check
if: always() && (matrix.run_fpga_elf || matrix.run_fpga_pk)
shell: zsh {0}
run: |
set -euo pipefail
Expand All @@ -307,10 +338,10 @@ jobs:
model: lenet
- chip: pebble
model: mobilenet
- chip: pebble
model: resnet
- chip: pebble
model: yolo
# - chip: pebble
# model: resnet
# - chip: pebble
# model: yolo
env:
BB_ROOT: ~/Code/buckyball
steps:
Expand All @@ -320,7 +351,9 @@ jobs:
set -euo pipefail
root="${BB_ROOT/#\~/$HOME}"
source "${root}/.github/scripts/setproxy.sh"
bash "${root}/.github/scripts/ci_repo_lock.sh" \
cd "${root}"
git fetch --force --prune origin "${CHECKOUT_SHA}"
git show "${CHECKOUT_SHA}:.github/scripts/ci_repo_lock.sh" | bash -s -- \
enter "${CHECKOUT_SHA}" "${root}" "${CHECKOUT_REF}"

- name: Model build
Expand All @@ -333,6 +366,7 @@ jobs:
echo "ERROR: eval-performance requires a real model, got model=none" >&2
exit 1
fi
nix develop -c bbdev compiler --build "--chip ${{ matrix.chip }}"
nix develop -c bbdev workload --build "--chip ${{ matrix.chip }} --model ${{ matrix.model }}"
nix develop -c bbdev kernel --build "--chip ${{ matrix.chip }} --model ${{ matrix.model }}"

Expand Down
19 changes: 7 additions & 12 deletions arch/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ object protoJava extends JavaModule {
os.pwd / os.up / "bbdev" / "api" / "steps" / "config" / "scripts" / "proto"
}

def protoSources = T.sources {
Seq(PathRef(protoDir() / "chip.proto"))
}

def generatedSources = T {
val dir = protoDir()
val proto = dir / "chip.proto"
if (!os.exists(proto)) {
throw new Exception(s"missing chip.proto: $proto")
}
val proto = protoSources().head.path
os.proc("protoc", s"-I$dir", s"--java_out=${T.dest}", proto).call()
Seq(PathRef(T.dest))
}
Expand Down Expand Up @@ -53,14 +54,9 @@ object bank extends FrameworkModule {
override def moduleDeps = Seq(axis)
}

object cache extends FrameworkModule {
override def moduleRoot = frameworkRoot / "mem-core" / "cache"
override def moduleDeps = Seq(chi)
}

object coherence extends FrameworkModule {
override def moduleRoot = frameworkRoot / "mem-core" / "coherence"
override def moduleDeps = Seq(chi, cache)
override def moduleDeps = Seq(chi)
}

object rvv extends FrameworkModule {
Expand All @@ -75,7 +71,7 @@ object seed extends FrameworkModule {

object root_chip extends FrameworkModule {
override def moduleRoot = frameworkRoot / "root" / "root-chip"
override def moduleDeps = Seq(axis, chi, bank, coherence, cache)
override def moduleDeps = Seq(axis, chi, bank, coherence)
}

object root_core extends FrameworkModule {
Expand Down Expand Up @@ -109,7 +105,6 @@ object buckyball extends SbtModule { m =>
chi,
bank,
coherence,
cache,
rvv,
seed,
root_chip,
Expand Down
11 changes: 7 additions & 4 deletions arch/src/csrc/include/monitor/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ void dpi_bdb_set_clk(unsigned long long c);

// DPI-C function for instruction trace (itrace)
// Called from GlobalROB when instructions are allocated/issued/completed
void dpi_itrace(unsigned char is_issue, // 2 = alloc, 1 = issue, 0 = complete
unsigned int rob_id, unsigned int domain_id, unsigned int funct,
unsigned long long pc, unsigned long long rs1,
unsigned long long rs2, unsigned char bank_enable);
void dpi_itrace(unsigned int is_issue, // 2 = alloc, 1 = issue, 0 = complete
unsigned int hart_id_lo, unsigned int hart_id_hi,
unsigned int rob_id, unsigned int inst_id_lo,
unsigned int inst_id_hi, unsigned int domain_id,
unsigned int funct, unsigned int pc_lo, unsigned int pc_hi,
unsigned int rs1_lo, unsigned int rs1_hi, unsigned int rs2_lo,
unsigned int rs2_hi);

// DPI-C function for memory trace (mtrace)
// Called from MemBackend when read/write requests are made
Expand Down
Loading
Loading