Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skokvermon committed Nov 21, 2023
2 parents f8ff95e + fccffb5 commit fccb5c3
Show file tree
Hide file tree
Showing 77 changed files with 10,272 additions and 1,202 deletions.
69 changes: 56 additions & 13 deletions .ci/Memora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ artifacts:
outputs:
- build/axi_dw_upsizer-%.tested

axi_fifo-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_fifo.sv
- test/tb_axi_fifo.sv
outputs:
- build/axi_fifo-%.tested


axi_isolate-%:
inputs:
- Bender.yml
Expand Down Expand Up @@ -135,6 +149,32 @@ artifacts:
outputs:
- build/axi_iw_converter-%.tested

axi_lite_dw_converter-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_lite_dw_converter.sv
- test/tb_axi_lite_dw_converter.sv
outputs:
- build/axi_lite_dw_converter-%.tested

axi_lite_mailbox-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_lite_mailbox.sv
- test/tb_axi_lite_mailbox.sv
outputs:
- build/axi_lite_mailbox-%.tested

axi_lite_regs-%:
inputs:
- Bender.yml
Expand Down Expand Up @@ -174,19 +214,6 @@ artifacts:
outputs:
- build/axi_lite_to_axi-%.tested

axi_lite_mailbox-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_lite_mailbox.sv
- test/tb_axi_lite_mailbox.sv
outputs:
- build/axi_lite_mailbox-%.tested

axi_lite_xbar-%:
inputs:
- Bender.yml
Expand Down Expand Up @@ -258,6 +285,22 @@ artifacts:
outputs:
- build/axi_to_axi_lite-%.tested

axi_to_mem_banked-%:
inputs:
- Bender.yml
- include
- scripts/run_vsim.sh
- src/axi_pkg.sv
- src/axi_intf.sv
- src/axi_test.sv
- src/axi_demux.sv
- src/axi_to_detailed_mem.sv
- src/axi_to_mem.sv
- src/axi_to_mem_banked.sv
- test/tb_axi_to_mem_banked.sv
outputs:
- build/axi_to_mem_banked-%.tested

axi_xbar-%:
inputs:
- Bender.yml
Expand Down
53 changes: 19 additions & 34 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,26 @@ jobs:
runs-on: ubuntu-latest # will fail)
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Cache cargo registry
uses: actions/cache@v1
- name: Install Bender
uses: pulp-platform/pulp-actions/bender-install@v2
with:
path: ~/.cargo/registry
key: ubuntu-latest-cargo-registry-${{ hashFiles('.github/workflows/doc.yml') }}
version: 0.27.2

- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ubuntu-latest-cargo-index-${{ hashFiles('.github/workflows/doc.yml') }}

- name: Cache cargo binaries
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ubuntu-latest-cargo-binaries-${{ hashFiles('.github/workflows/doc.yml') }}

- name: Install Bender and Morty
- name: Install Morty
run: |
rustup update stable --no-self-update && rustup default stable
if ! $(which bender); then
cargo install bender --version 0.23.1
fi
if ! $(which morty); then
cargo install --git https://github.com/zarubaf/morty --rev 4855119c1378d45d9ac35cfa525725d2786e68f3
fi
shell: bash
sudo mkdir -p /tools/morty && sudo chmod 777 /tools/morty
cd /tools/morty && curl --proto '=https' --tlsv1.2 https://pulp-platform.github.io/morty/init -sSf | bash -s -- 0.9.0
echo "PATH=/tools/morty:$PATH" >> ${GITHUB_ENV}
- name: Build documentation
run: |
mkdir -p docs
cp doc/axi_demux.png docs/module.axi_demux.png
cp doc/svg/axi_id_remap_table.svg docs/axi_id_remap_table.svg
morty -I include -I $(bender path common_cells)/include src/*.sv -d docs
shell: bash

Expand All @@ -74,14 +58,15 @@ jobs:
echo "DOC_TARGET=$DOC_TARGET" >> $GITHUB_ENV
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@releases/v3
uses: JamesIves/github-pages-deploy-action@v4
if: >
github.event_name == 'push'
|| github.event.pull_request.head.repo.full_name == github.repository
(github.event_name == 'push'
|| github.event.pull_request.head.repo.full_name == github.repository) &&
github.ref == 'refs/heads/master'
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs # The folder the action should deploy.
TARGET_FOLDER: ${{ env.DOC_TARGET }}
CLEAN: true # remove files from `TARGET_FOLDER` that are not in `FOLDER`
token: ${{ secrets.GH_PAGES }}
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: ${{ env.DOC_TARGET }}
clean: true # remove files from `TARGET_FOLDER` that are not in `FOLDER`
# (`rsync --delete`)
83 changes: 12 additions & 71 deletions .github/workflows/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,22 @@
name: Retrieve CI result from GitLab
name: Internal CI
on:
push:
branches-ignore:
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway)
- v** # such branch names conflict with tags
pull_request:
branches-ignore:
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway)
- v** # such branch names conflict with tags
workflow_dispatch:

jobs:
gitlab-ci:
if: github.repository == 'pulp-platform/axi' # do not run this job on forks (because Gitlab CI
runs-on: ubuntu-latest # will not trigger on forks)
timeout-minutes: 190
runs-on: ubuntu-latest
timeout-minutes: 310
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check Gitlab CI
uses: pulp-platform/pulp-actions/gitlab-ci@v2
# Skip on forks or pull requests from forks due to missing secrets.
if: github.repository == 'pulp-platform/axi' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
with:
persist-credentials: false
# Checkout pull request HEAD commit instead of merge commit, because CI runs against HEAD
# commit.
ref: ${{ github.event.pull_request.head.sha }}

- name: Wait for synchronization (every 5 minutes)
run: |
while [ $(($(date -d "+1 minute" +%-M) % 5)) -ne 0 ]; do
# "+1 minute" because if the current minute is divisible by 5, we likely already missed
# the synchronization.
sleep 10
done
sleep 90 # the minute above plus 30 seconds to leave some time for the synchronization
shell: bash

- name: Obtain CI result
run: |
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
BRANCH_NAME="$GITHUB_HEAD_REF"
elif [ "$GITHUB_EVENT_NAME" == "push" ]; then
if echo $GITHUB_REF | grep -qE '^refs/heads'; then
BRANCH_NAME="$(echo $GITHUB_REF | cut -d '/' -f3-)"
else
echo "Error: Could not derive branch name from ref '$GITHUB_REF'!"
exit 1
fi
else
echo "Error: Unsupported event: '$GITHUB_EVENT_NAME'!"
exit 1
fi
while true; do
resp="$(curl --fail --silent --show-error \
https://akurth.net/usrv/ig/shields/pipeline/akurth/axi/$BRANCH_NAME)"
if [ $? -ne 0 ]; then
echo "Error: Failed to obtain CI status!"
exit 1
fi
status="$(echo $resp | jq -r .message)"
if [ "$status" == "passing" ]; then
sha="$(echo $resp | jq -r .sha)"
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
github_sha="$(cat "$GITHUB_EVENT_PATH" | jq -r .pull_request.head.sha)"
else
github_sha="$GITHUB_SHA"
fi
if [ "$sha" == "$github_sha" ]; then
echo "CI passed."
exit 0
else
echo "Error: CI passed, but on a different SHA: '$sha'!"
exit 1
fi
elif [ "$status" == "running" ]; then
echo "CI is running, waiting .."
else
echo "Error: Unknown or failing status: '$status'!"
exit 1
fi
sleep 10
done
shell: bash
domain: iis-git.ee.ethz.ch
repo: github-mirror/axi
token: ${{ secrets.GITLAB_TOKEN }}
poll-count: 1800
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
/build
/Bender.lock
/Bender.local
*.log
*.wlf
43 changes: 35 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
SYNOPSYS_DC: synopsys-2019.12 dc_shell -64bit
SYNOPSYS_DC: synopsys-2022.03 dcnxt_shell

before_script:
- export PATH=~/.cargo/bin:$PATH
Expand Down Expand Up @@ -28,7 +28,7 @@ vsim:
fi
parallel:
matrix:
- VSIM_VER: ['10.7b', '10.7e', '2020.1', '2021.1']
- VSIM_VER: ['10.7b', '2022.3']

synopsys_dc:
stage: build
Expand All @@ -39,6 +39,18 @@ synopsys_dc:
$CI_PROJECT_DIR/.gitlab-ci.d/memora_retry.sh insert synopsys_dc
fi
fuse_xsim:
stage: build
allow_failure: true
timeout: 5 minutes
script:
- bender sources
- /usr/local/anaconda3/bin/python3 -m pip install fusesoc --user
- mkdir fusesoc && cd fusesoc
- $HOME/.local/bin/fusesoc library add axi ..
- $HOME/.local/bin/fusesoc core list
- vitis-2022.1-zr $HOME/.local/bin/fusesoc run --tool xsim --target sim --no-export pulp-platform.org::axi:$(cat ../VERSION | sed s/-/./g)

.run_vsim: &run_vsim
stage: test
script:
Expand All @@ -61,7 +73,7 @@ synopsys_dc:
fi
parallel:
matrix:
- VSIM_VER: ['10.7b', '10.7e', '2020.1', '2021.1']
- VSIM_VER: ['10.7b', '2022.3']

axi_addr_test:
<<: *run_vsim
Expand Down Expand Up @@ -93,6 +105,11 @@ axi_dw_upsizer:
variables:
TEST_MODULE: axi_dw_upsizer

axi_fifo:
<<: *run_vsim
variables:
TEST_MODULE: axi_fifo

axi_isolate:
<<: *run_vsim
variables:
Expand All @@ -103,6 +120,16 @@ axi_iw_converter:
variables:
TEST_MODULE: axi_iw_converter

axi_lite_dw_converter:
<<: *run_vsim
variables:
TEST_MODULE: axi_lite_dw_converter

axi_lite_mailbox:
<<: *run_vsim
variables:
TEST_MODULE: axi_lite_mailbox

axi_lite_regs:
<<: *run_vsim
variables:
Expand All @@ -118,11 +145,6 @@ axi_lite_to_axi:
variables:
TEST_MODULE: axi_lite_to_axi

axi_lite_mailbox:
<<: *run_vsim
variables:
TEST_MODULE: axi_lite_mailbox

axi_lite_xbar:
<<: *run_vsim
variables:
Expand All @@ -148,6 +170,11 @@ axi_to_axi_lite:
variables:
TEST_MODULE: axi_to_axi_lite

axi_to_mem_banked:
<<: *run_vsim
variables:
TEST_MODULE: axi_to_mem_banked

axi_xbar:
<<: *run_vsim
variables:
Expand Down
Loading

0 comments on commit fccb5c3

Please sign in to comment.