From cd4844be5402a56da3936f1c30d602321f5f3f1c Mon Sep 17 00:00:00 2001 From: Meinhard Kissich Date: Fri, 1 Mar 2024 09:29:24 +0100 Subject: [PATCH 1/5] Workflows: move to GitHub-hosted runners --- .github/workflows/impl.yml | 30 +++---- .github/workflows/lint.yml | 14 +--- .github/workflows/setup-oss-cad/action.yml | 4 +- .../setup-riscv-toolchain/action.yml | 24 ++++++ .github/workflows/setup-sail/action.yml | 31 ++++++++ .github/workflows/track_area.yml | 19 +++-- .github/workflows/verif.yml | 79 ++++++++----------- Makefile | 5 ++ dv/fazyrv/riscof_fazyrv.py | 2 +- sim/Makefile | 2 +- 10 files changed, 122 insertions(+), 88 deletions(-) create mode 100644 .github/workflows/setup-riscv-toolchain/action.yml create mode 100644 .github/workflows/setup-sail/action.yml diff --git a/.github/workflows/impl.yml b/.github/workflows/impl.yml index 9eaf1f2..a5922cd 100644 --- a/.github/workflows/impl.yml +++ b/.github/workflows/impl.yml @@ -5,14 +5,16 @@ on: [push, pull_request] jobs: impl_ice40: name: iCE40 Reference Implementation - runs-on: prunner + runs-on: ubuntu-latest steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-02/oss-cad-suite-linux-x64-20240202.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v3 + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 + with: + version: '2024-02-02' + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -26,11 +28,6 @@ jobs: fusesoc library add fazyrv . fusesoc library add fsoc . - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad - with: - from_url: ${{ env.oss_url }} - - name: Run implementation run: | make report.soc.all TARGET_ARCH=ice40 @@ -38,14 +35,16 @@ jobs: impl_ecp5: name: ECP5 Reference Implementation - runs-on: prunner + runs-on: ubuntu-latest steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-02/oss-cad-suite-linux-x64-20240202.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v3 + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 + with: + version: '2024-02-02' + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -59,11 +58,6 @@ jobs: fusesoc library add fazyrv . fusesoc library add fsoc . - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad - with: - from_url: ${{ env.oss_url }} - - name: Run implementation run: | make report.soc.all TARGET_ARCH=ecp5 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6413e4a..af8c069 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,19 +3,9 @@ name: Lint FazyRV on: [push, pull_request] jobs: - lint_slang: - name: Lint using slang - runs-on: prunner - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Linting with slang - run: make SLANG=/tools/slang/build/bin/slang lint.slang - lint_svlint: name: Lint using svlint - runs-on: prunner + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 @@ -24,4 +14,4 @@ jobs: run: sudo snap install svlint - name: Linting with svlint - run: make lint.svlint + run: make lint.svlint >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/setup-oss-cad/action.yml b/.github/workflows/setup-oss-cad/action.yml index ecd3327..ff009fe 100644 --- a/.github/workflows/setup-oss-cad/action.yml +++ b/.github/workflows/setup-oss-cad/action.yml @@ -11,13 +11,13 @@ runs: - id: cache-oss-cad uses: actions/cache@v3 with: - path: oss-cad-suite + path: .oss-cad-suite key: oss-cad-suite-${{ runner.os }}-${{ inputs.from_url }} - shell: bash if: steps.cache-oss-cad.outputs.cache-hit != 'true' run: | - wget -q -O - ${{ inputs.from_url }} | tar -zx + wget -q -O - ${{ inputs.from_url }} | tar -zx --transform "s/oss-cad-suite/.oss-cad-suite" - shell: bash run: echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH \ No newline at end of file diff --git a/.github/workflows/setup-riscv-toolchain/action.yml b/.github/workflows/setup-riscv-toolchain/action.yml new file mode 100644 index 0000000..bbba76d --- /dev/null +++ b/.github/workflows/setup-riscv-toolchain/action.yml @@ -0,0 +1,24 @@ +name: Build RISC-V riscv-gnu-toolchain + +runs: + using: composite + steps: + - id: cache-riscv-gnu-toolchain + uses: actions/cache@v3 + with: + path: .riscv-gnu-toolchain + key: riscv-gnu-toolchain-${{ runner.os }} + + - shell: bash + if: steps.cache-riscv-gnu-toolchain.outputs.cache-hit != 'true' + run: | + mkdir -p .riscv-gnu-toolchain + cd .riscv-gnu-toolchain + wget -q -O - https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.09.27/riscv32-elf-ubuntu-22.04-gcc-nightly-2023.09.27-nightly.tar.gz | tar -zx --transform "s/riscv/riscv32/" + cd .. + + - shell: bash + run: | + echo "$(pwd)/.riscv-gnu-toolchain/riscv32/bin" >> $GITHUB_PATH + + diff --git a/.github/workflows/setup-sail/action.yml b/.github/workflows/setup-sail/action.yml new file mode 100644 index 0000000..1efaef4 --- /dev/null +++ b/.github/workflows/setup-sail/action.yml @@ -0,0 +1,31 @@ +name: Build sail-riscv + +runs: + using: composite + steps: + - id: cache-sail-riscv + uses: actions/cache@v3 + with: + path: .sail + key: sail-riscv-${{ runner.os }} + + - shell: bash + if: steps.cache-sail-riscv.outputs.cache-hit != 'true' + run: | + mkdir -p .sail + git clone --recursive https://github.com/rems-project/sail-riscv.git + cd sail-riscv + git checkout tags/0.5 + sudo apt install -y opam build-essential libgmp-dev z3 pkg-config zlib1g-dev + opam init + opam switch create 4.06.1 + eval $(opam config env) + opam install -y sail + make + ARCH=RV32 make + cp -r c_emulator/* ../.sail/ + cd .. + + - shell: bash + run: echo ".sail" >> $GITHUB_PATH + diff --git a/.github/workflows/track_area.yml b/.github/workflows/track_area.yml index 28b03ef..d0ea3c8 100644 --- a/.github/workflows/track_area.yml +++ b/.github/workflows/track_area.yml @@ -1,20 +1,24 @@ name: Track area demand in readme -on: [push, pull_request] +on: + push: + branches: + - dev + pull_request: jobs: evaluate: name: Run synthesis and upload plot - runs-on: prunner + runs-on: ubuntu-latest steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/$(date -d "yesterday" "+%Y-%m-%d")/oss-cad-suite-linux-x64-$(date -d "yesterday" "+%Y%m%d").tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 + - uses: actions/setup-python@v5 with: python-version: '3.10' @@ -31,11 +35,6 @@ jobs: - name: Actions checkout uses: actions/checkout@v3 - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad - with: - from_url: ${{ env.oss_url }} - - name: Run implementation run: make track.sizes.synth COMMIT=$(git rev-parse --short "$GITHUB_SHA") diff --git a/.github/workflows/verif.yml b/.github/workflows/verif.yml index 8a24f48..25afe39 100644 --- a/.github/workflows/verif.yml +++ b/.github/workflows/verif.yml @@ -5,26 +5,26 @@ on: [push, pull_request] jobs: rvtests: name: Run rvtests - runs-on: prunner + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' + + - name: gcc + uses: ./.github/workflows/setup-riscv-toolchain - name: RISC-V Tests - run: make report.riscvtests.all TOOLCHAIN_PREFIX=/tools/riscv/rv32i/bin/riscv32-unknown-elf- + run: make report.riscvtests.all TOOLCHAIN_PREFIX=riscv32-unknown-elf- riscof: name: Run RISCOF tests - runs-on: prunner + runs-on: ubuntu-latest needs: rvtests steps: - name: Checkout repository @@ -45,36 +45,36 @@ jobs: fusesoc library add fazyrv . fusesoc library add fsoc . - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' + + - name: gcc + uses: ./.github/workflows/setup-riscv-toolchain + + - name: sail + uses: ./.github/workflows/setup-sail - name: RISCOF run: | make riscof.prepare - make riscof.all PATH="/tools/riscv/rv32i/bin/:/tools/sail-riscv/c_emulator/:$PATH" + make riscof.all cov_insn: name: Cover insn checks - runs-on: prunner + runs-on: ubuntu-latest needs: rvtests steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' - name: cov.8 run: make fv.rvformal.cov.insn.8 @@ -84,21 +84,18 @@ jobs: cov_reg: name: Cover reg checks - runs-on: prunner + runs-on: ubuntu-latest needs: rvtests steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' - name: cov.8 run: make fv.rvformal.cov.reg.8 @@ -108,21 +105,18 @@ jobs: bmc_insn: name: BMC insn checks - runs-on: prunner + runs-on: ubuntu-latest needs: rvtests steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' - name: bmc.8 run: make fv.rvformal.bmc.insn.8 @@ -132,21 +126,18 @@ jobs: bmc_reg: name: BMC reg checks - runs-on: prunner + runs-on: ubuntu-latest needs: rvtests steps: - - name: OSS-CAD-Suite version - run: echo "oss_url=https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-02-26/oss-cad-suite-linux-x64-20240226.tgz" >> $GITHUB_ENV - - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive - - name: OSS CAD Suite - uses: ./.github/workflows/setup-oss-cad + - name: oss-cad-suite + uses: YosysHQ/setup-oss-cad-suite@v3 with: - from_url: ${{ env.oss_url }} + version: '2024-02-02' - name: bmc.8 run: make fv.rvformal.bmc.reg.8 diff --git a/Makefile b/Makefile index 8bdf3b7..f46b80a 100644 --- a/Makefile +++ b/Makefile @@ -174,6 +174,11 @@ riscof.run.%: $(SRC_DESIGN) $(SRC_SYNTH) # workaround using the tmp.txt file riscof.all: $(addprefix riscof.run., $(RVTESTS_PARAMS)) + @if [ -z $$(find $(SUMMARY_DIR_RISCOF) -name "*.log") ]; then \ + echo "Error: No *.log files found"; \ + exit 1; \ + fi + @for log_file in $(wildcard $(SUMMARY_DIR_RISCOF)/*.log); do \ if [ $$(cat "$$log_file") != "0" ]; then \ echo "Error: $$log_file RICOF failed"; \ diff --git a/dv/fazyrv/riscof_fazyrv.py b/dv/fazyrv/riscof_fazyrv.py index 198d389..efd222d 100644 --- a/dv/fazyrv/riscof_fazyrv.py +++ b/dv/fazyrv/riscof_fazyrv.py @@ -239,7 +239,7 @@ def runTests(self, testList): # for debug purposes if you would like stop the DUT plugin after compilation, you can # comment out the lines below and raise a SystemExit - objcopy_run = f'riscv64-unknown-elf-objcopy -O binary {elf} {fname}.bin' + objcopy_run = f'riscv32-unknown-elf-objcopy -O binary {elf} {fname}.bin' utils.shellCommand(objcopy_run).run(cwd=test_dir) self.makehex(f"{test_dir}/{fname}.bin", f"{test_dir}/{fname}.hex") diff --git a/sim/Makefile b/sim/Makefile index 7b698a5..d2bc5e0 100644 --- a/sim/Makefile +++ b/sim/Makefile @@ -36,7 +36,7 @@ firmware/firmware.bin: firmware/firmware.elf chmod -x $@ firmware/firmware.elf: $(FIRMWARE_OBJS) $(TEST_OBJS) firmware/sections.lds - $(TOOLCHAIN_PREFIX)gcc -Os -mabi=ilp32 -march=rv32im -ffreestanding -nostdlib -o $@ \ + $(TOOLCHAIN_PREFIX)gcc -Os -mabi=ilp32 -march=rv32i -ffreestanding -nostdlib -o $@ \ -Wl,--build-id=none,-Bstatic,-T,firmware/sections.lds,-Map,firmware/firmware.map,--strip-debug \ $(FIRMWARE_OBJS) $(TEST_OBJS) -lgcc chmod -x $@ From 9cff04b893ace6c5ebf389dff350fe60bea57bbe Mon Sep 17 00:00:00 2001 From: Meinhard Kissich Date: Fri, 1 Mar 2024 09:52:37 +0100 Subject: [PATCH 2/5] Remove unused workflow part --- .github/workflows/setup-oss-cad/action.yml | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/setup-oss-cad/action.yml diff --git a/.github/workflows/setup-oss-cad/action.yml b/.github/workflows/setup-oss-cad/action.yml deleted file mode 100644 index ff009fe..0000000 --- a/.github/workflows/setup-oss-cad/action.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Download OSS CAD Suite - -inputs: - from_url: - description: 'latest release cached' - required: true - -runs: - using: composite - steps: - - id: cache-oss-cad - uses: actions/cache@v3 - with: - path: .oss-cad-suite - key: oss-cad-suite-${{ runner.os }}-${{ inputs.from_url }} - - - shell: bash - if: steps.cache-oss-cad.outputs.cache-hit != 'true' - run: | - wget -q -O - ${{ inputs.from_url }} | tar -zx --transform "s/oss-cad-suite/.oss-cad-suite" - - - shell: bash - run: echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH \ No newline at end of file From 5c5d2736a7dfe975f94f16cea0f817403fa320f9 Mon Sep 17 00:00:00 2001 From: meiniKi Date: Fri, 1 Mar 2024 08:54:46 +0000 Subject: [PATCH 3/5] Automated area tracking --- doc/area.svg | 358 +++++++++++++++++++++++++++------------------------ doc/area.txt | 20 +++ 2 files changed, 212 insertions(+), 166 deletions(-) diff --git a/doc/area.svg b/doc/area.svg index 95c14fc..8ea50cc 100644 --- a/doc/area.svg +++ b/doc/area.svg @@ -6,7 +6,7 @@ - 2024-02-28T18:35:38.128048 + 2024-03-01T08:54:26.539176 image/svg+xml @@ -43,7 +43,7 @@ L 326.600697 110.749091 L 326.600697 101.619021 L 115.2 101.619021 z -" clip-path="url(#p075588c6a1)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - - + @@ -152,11 +152,11 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -188,11 +188,11 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -234,11 +234,11 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -288,11 +288,11 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -329,11 +329,11 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -376,16 +376,16 @@ z +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - - + @@ -393,11 +393,11 @@ L 0 2 +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -405,11 +405,11 @@ L 177.992286 17.28 +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -417,11 +417,11 @@ L 219.85381 17.28 +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -429,11 +429,11 @@ L 261.715334 17.28 +" clip-path="url(#pf3470015b6)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -528,12 +528,12 @@ z - - + @@ -768,7 +768,7 @@ z - + @@ -790,7 +790,7 @@ z - + @@ -818,7 +818,7 @@ z - + @@ -840,7 +840,7 @@ z - + @@ -868,7 +868,7 @@ z - + @@ -890,7 +890,7 @@ z - + @@ -918,7 +918,7 @@ z - + @@ -959,8 +959,8 @@ L 337.170732 17.28 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - + + + - - - - - - - - + + + + + + + + @@ -1407,28 +1454,28 @@ z " style="fill: #ffffff"/> - - - +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> - + +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> + + + +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> - +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> - +" clip-path="url(#pd9278a2565)" style="fill: #696969"/> +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1493,11 +1540,11 @@ L 348.269268 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1513,11 +1560,11 @@ L 382.256519 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1533,11 +1580,11 @@ L 416.243769 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1553,11 +1600,11 @@ L 450.231019 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1573,11 +1620,11 @@ L 484.218269 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1593,11 +1640,11 @@ L 518.20552 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1645,11 +1692,11 @@ z +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1657,11 +1704,11 @@ L 365.262893 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1669,11 +1716,11 @@ L 399.250144 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1681,11 +1728,11 @@ L 433.237394 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1693,11 +1740,11 @@ L 467.224644 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1705,11 +1752,11 @@ L 501.211895 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1717,11 +1764,11 @@ L 535.199145 17.28 +" clip-path="url(#pd9278a2565)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1740,56 +1787,56 @@ L 569.186395 17.28 - + - + - + - + - + - + - + - + @@ -1815,8 +1862,8 @@ L 570.24 17.28 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - @@ -1889,23 +1915,23 @@ z - - - - - - - - + + + + + + + + - + - + diff --git a/doc/area.txt b/doc/area.txt index 67f11b0..ee96b2f 100644 --- a/doc/area.txt +++ b/doc/area.txt @@ -98,3 +98,23 @@ fsoc, iCE40 Number of LUT-4 (latest update: a5ef093) ******************************************** 498 4-MIN-BRAM **************************************************** 585 8-MIN-BRAM_DP_BP ******************************************************** 622 8-MIN-BRAM +FazyRV, iCE40 Number of LUT-4 (latest update: 9cff04b) +------------------------------------------------------------------------------- +******************************* 283 1-MIN-BRAM_DP_BP +******************************** 291 1-MIN-BRAM +********************************** 311 2-MIN-BRAM +*********************************** 319 2-MIN-BRAM_DP_BP +**************************************** 366 4-MIN-BRAM_DP_BP +***************************************** 373 4-MIN-BRAM +******************************************************* 500 8-MIN-BRAM +******************************************************** 505 8-MIN-BRAM_DP_BP +fsoc, iCE40 Number of LUT-4 (latest update: 9cff04b) +------------------------------------------------------------------------------- +******************************** 361 1-MIN-BRAM_DP_BP +*********************************** 390 2-MIN-BRAM_DP_BP +************************************ 410 1-MIN-BRAM +*************************************** 439 2-MIN-BRAM +**************************************** 445 4-MIN-BRAM_DP_BP +******************************************** 498 4-MIN-BRAM +**************************************************** 585 8-MIN-BRAM_DP_BP +******************************************************** 622 8-MIN-BRAM From c3d9af1cc0c9894e01231c4272763c52354532e5 Mon Sep 17 00:00:00 2001 From: Meinhard Kissich Date: Fri, 1 Mar 2024 18:49:34 +0100 Subject: [PATCH 4/5] Workflow: fix sail path, improve RISCOF error recognition Follow sail build instr. from RISCOF doc --- .github/workflows/setup-sail/action.yml | 17 +++++++---------- Makefile | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/setup-sail/action.yml b/.github/workflows/setup-sail/action.yml index 1efaef4..dcce805 100644 --- a/.github/workflows/setup-sail/action.yml +++ b/.github/workflows/setup-sail/action.yml @@ -12,20 +12,17 @@ runs: - shell: bash if: steps.cache-sail-riscv.outputs.cache-hit != 'true' run: | - mkdir -p .sail - git clone --recursive https://github.com/rems-project/sail-riscv.git - cd sail-riscv - git checkout tags/0.5 + git clone --recursive https://github.com/rems-project/sail-riscv.git .sail sudo apt install -y opam build-essential libgmp-dev z3 pkg-config zlib1g-dev - opam init - opam switch create 4.06.1 + opam init -y --disable-sandboxing + opam switch create ocaml-base-compiler.4.06.1 + opam install sail -y eval $(opam config env) - opam install -y sail - make + cd .sail + git checkout tags/0.5 ARCH=RV32 make - cp -r c_emulator/* ../.sail/ cd .. - shell: bash - run: echo ".sail" >> $GITHUB_PATH + run: echo "$(pwd)/.sail/c_emulator" >> $GITHUB_PATH diff --git a/Makefile b/Makefile index f46b80a..23eb12e 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ riscof.run.%: $(SRC_DESIGN) $(SRC_SYNTH) export RISCOF_RFTYPE=$(RF) riscof testlist --config=dv/config.ini --suite=riscv-arch-test/riscv-test-suite/ --env=riscv-arch-test/riscv-test-suite/env riscof run --no-browser --config=dv/config.ini --suite=riscv-arch-test/riscv-test-suite/ --env=riscv-arch-test/riscv-test-suite/env 2>&1 | tee $(SUMMARY_DIR_RISCOF)/tmp.txt - @ ! grep -q "Failed" $(SUMMARY_DIR_RISCOF)/tmp.txt + @ ! grep -q -e "Failed" -e "ERROR" $(SUMMARY_DIR_RISCOF)/tmp.txt @echo $$? > $(SUMMARY_DIR_RISCOF)/$*.log @rm $(SUMMARY_DIR_RISCOF)/tmp.txt # riscof exit code does not report failures, see Issue #102 From f36356ca8ed2ac3824e563c64446d21e9af31473 Mon Sep 17 00:00:00 2001 From: meiniKi Date: Fri, 1 Mar 2024 17:51:08 +0000 Subject: [PATCH 5/5] Automated area tracking --- doc/area.svg | 284 +++++++++++++++++++++++---------------------------- doc/area.txt | 20 ++++ 2 files changed, 149 insertions(+), 155 deletions(-) diff --git a/doc/area.svg b/doc/area.svg index 8ea50cc..8ef5f70 100644 --- a/doc/area.svg +++ b/doc/area.svg @@ -6,7 +6,7 @@ - 2024-03-01T08:54:26.539176 + 2024-03-01T17:50:55.623000 image/svg+xml @@ -43,7 +43,7 @@ L 326.600697 110.749091 L 326.600697 101.619021 L 115.2 101.619021 z -" clip-path="url(#pf3470015b6)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: #696969"/> +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - - + @@ -152,11 +152,11 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -188,11 +188,11 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -234,11 +234,11 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -288,11 +288,11 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -329,11 +329,11 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -376,16 +376,16 @@ z +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - - + @@ -393,11 +393,11 @@ L 0 2 +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -405,11 +405,11 @@ L 177.992286 17.28 +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -417,11 +417,11 @@ L 219.85381 17.28 +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -429,11 +429,11 @@ L 261.715334 17.28 +" clip-path="url(#pcc1303c81c)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -528,12 +528,12 @@ z - - + @@ -768,7 +768,7 @@ z - + @@ -790,7 +790,7 @@ z - + @@ -818,7 +818,7 @@ z - + @@ -840,7 +840,7 @@ z - + @@ -868,7 +868,7 @@ z - + @@ -890,7 +890,7 @@ z - + @@ -918,7 +918,7 @@ z - + @@ -959,8 +959,8 @@ L 337.170732 17.28 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + + - - - - - - - - - - + + + + + + + + @@ -1459,7 +1433,7 @@ L 559.669965 99.336503 L 559.669965 90.206434 L 348.269268 90.206434 z -" clip-path="url(#pd9278a2565)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: #696969"/> +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1540,11 +1514,11 @@ L 348.269268 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1560,11 +1534,11 @@ L 382.256519 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1580,11 +1554,11 @@ L 416.243769 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1600,11 +1574,11 @@ L 450.231019 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1620,11 +1594,11 @@ L 484.218269 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1640,11 +1614,11 @@ L 518.20552 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1692,11 +1666,11 @@ z +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1704,11 +1678,11 @@ L 365.262893 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1716,11 +1690,11 @@ L 399.250144 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1728,11 +1702,11 @@ L 433.237394 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1740,11 +1714,11 @@ L 467.224644 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1752,11 +1726,11 @@ L 501.211895 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1764,11 +1738,11 @@ L 535.199145 17.28 +" clip-path="url(#p464ded1852)" style="fill: none; stroke-dasharray: 3.7,1.6; stroke-dashoffset: 0; stroke: #b0b0b0"/> - + @@ -1787,56 +1761,56 @@ L 569.186395 17.28 - + - + - + - + - + - + - + - + @@ -1862,8 +1836,8 @@ L 570.24 17.28 " style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/> - - + + - - - - - - - - + + + + + + + + - + - + diff --git a/doc/area.txt b/doc/area.txt index ee96b2f..9db27c9 100644 --- a/doc/area.txt +++ b/doc/area.txt @@ -118,3 +118,23 @@ fsoc, iCE40 Number of LUT-4 (latest update: 9cff04b) ******************************************** 498 4-MIN-BRAM **************************************************** 585 8-MIN-BRAM_DP_BP ******************************************************** 622 8-MIN-BRAM +FazyRV, iCE40 Number of LUT-4 (latest update: c3d9af1) +------------------------------------------------------------------------------- +******************************* 283 1-MIN-BRAM_DP_BP +******************************** 291 1-MIN-BRAM +********************************** 311 2-MIN-BRAM +*********************************** 319 2-MIN-BRAM_DP_BP +**************************************** 366 4-MIN-BRAM_DP_BP +***************************************** 373 4-MIN-BRAM +******************************************************* 500 8-MIN-BRAM +******************************************************** 505 8-MIN-BRAM_DP_BP +fsoc, iCE40 Number of LUT-4 (latest update: c3d9af1) +------------------------------------------------------------------------------- +******************************** 361 1-MIN-BRAM_DP_BP +*********************************** 390 2-MIN-BRAM_DP_BP +************************************ 410 1-MIN-BRAM +*************************************** 439 2-MIN-BRAM +**************************************** 445 4-MIN-BRAM_DP_BP +******************************************** 498 4-MIN-BRAM +**************************************************** 585 8-MIN-BRAM_DP_BP +******************************************************** 622 8-MIN-BRAM