From ea2452747676e702618041d5f1385b7cb95ceb9d Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sun, 8 Oct 2023 15:30:40 +0200 Subject: [PATCH 01/12] Make TransactionBase a Protocol. --- transactron/core.py | 27 +++++++++++++++++++++------ transactron/graph.py | 5 ++--- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/transactron/core.py b/transactron/core.py index c4c34f8cc..e9ab302da 100644 --- a/transactron/core.py +++ b/transactron/core.py @@ -2,7 +2,18 @@ from collections.abc import Sequence, Iterable, Callable, Mapping, Iterator from contextlib import contextmanager from enum import Enum, auto -from typing import ClassVar, NoReturn, TypeAlias, TypedDict, Union, Optional, Tuple +from typing import ( + ClassVar, + NoReturn, + TypeAlias, + TypedDict, + Union, + Optional, + Tuple, + TypeVar, + Protocol, + runtime_checkable, +) from graphlib import TopologicalSorter from typing_extensions import Self from amaranth import * @@ -38,6 +49,7 @@ TransactionScheduler: TypeAlias = Callable[["MethodMap", TransactionGraph, TransactionGraphCC, PriorityOrder], Module] RecordDict: TypeAlias = ValueLike | Mapping[str, "RecordDict"] TransactionOrMethod: TypeAlias = Union["Transaction", "Method"] +TransactionOrMethodBound = TypeVar("TransactionOrMethodBound", bound=Union["Transaction", "Method"]) class Priority(Enum): @@ -670,15 +682,20 @@ def elaborate(self, platform): return self.main_module -class TransactionBase(Owned): +@runtime_checkable +class TransactionBase(Owned, Protocol): stack: ClassVar[list[Union["Transaction", "Method"]]] = [] def_counter: ClassVar[count] = count() def_order: int defined: bool = False name: str + method_uses: dict["Method", Tuple[ValueLike, ValueLike]] + relations: list[RelationBase] + simultaneous_list: list[TransactionOrMethod] + independent_list: list[TransactionOrMethod] def __init__(self): - self.method_uses: dict[Method, Tuple[ValueLike, ValueLike]] = dict() + self.method_uses: dict["Method", Tuple[ValueLike, ValueLike]] = dict() self.relations: list[RelationBase] = [] self.simultaneous_list: list[TransactionOrMethod] = [] self.independent_list: list[TransactionOrMethod] = [] @@ -769,9 +786,7 @@ def _independent(self, *others: TransactionOrMethod) -> None: self.independent_list += others @contextmanager - def context(self, m: TModule) -> Iterator[Self]: - assert isinstance(self, Transaction) or isinstance(self, Method) # for typing - + def context(self: TransactionOrMethodBound, m: TModule) -> Iterator[TransactionOrMethodBound]: parent = TransactionBase.peek() if parent is not None: parent.schedule_before(self) diff --git a/transactron/graph.py b/transactron/graph.py index 2deaf24a0..4cd51d067 100644 --- a/transactron/graph.py +++ b/transactron/graph.py @@ -3,15 +3,14 @@ """ from enum import IntFlag -from abc import ABC from collections import defaultdict -from typing import Literal, Optional +from typing import Literal, Optional, Protocol from amaranth.hdl.ir import Elaboratable, Fragment from .tracing import TracingFragment -class Owned(ABC): +class Owned(Protocol): name: str owner: Optional[Elaboratable] From c60fa7c6e462ce6aca4b5ab3cbe2bc93f05309c5 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sun, 8 Oct 2023 15:48:36 +0200 Subject: [PATCH 02/12] Bump python --- .github/workflows/main.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d70ae121..348f04058 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,15 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'pip' + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --upgrade pip @@ -76,7 +85,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' cache: 'pip' cache-dependency-path: | requirements.txt @@ -105,7 +114,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' cache: 'pip' cache-dependency-path: | requirements.txt From f62e0c5eada42f22b7184ab4433caf7e965702b9 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sun, 8 Oct 2023 15:54:59 +0200 Subject: [PATCH 03/12] Bump python version for docs --- .github/workflows/benchmark.yml | 18 ++++++++++++++++++ .github/workflows/deploy_gh_pages.yml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e7a72d1af..b3548dea8 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -23,6 +23,15 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "pip" + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --upgrade pip @@ -84,6 +93,15 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "pip" + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --upgrade pip diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml index 210752f06..753d80ae1 100644 --- a/.github/workflows/deploy_gh_pages.yml +++ b/.github/workflows/deploy_gh_pages.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" cache: "pip" cache-dependency-path: | requirements.txt From a236098647cd2f07f1c2f7ba9ec0175e03701bc1 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Mon, 9 Oct 2023 19:26:42 +0200 Subject: [PATCH 04/12] Update dockerfiles. --- .github/workflows/benchmark.yml | 4 ++-- .github/workflows/main.yml | 2 +- docker/AmaranthSynthECP5.Dockerfile | 4 ++-- docker/Verilator.Dockerfile | 4 ++-- docker/riscv-toolchain.Dockerfile | 4 ++-- transactron/core.py | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b3548dea8..f5a34e06e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -14,7 +14,7 @@ jobs: name: Synthesis benchmarks runs-on: ubuntu-latest timeout-minutes: 40 - container: ghcr.io/kuznia-rdzeni/amaranth-synth:ecp5 + container: ghcr.io/kuznia-rdzeni/amaranth-synth-ecp5:2023.10.08_v steps: - uses: actions/checkout@v3 @@ -82,7 +82,7 @@ jobs: name: Run performance benchmarks runs-on: ubuntu-latest timeout-minutes: 60 - container: ghcr.io/kuznia-rdzeni/verilator:v5.008 + container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11 needs: build-perf-benchmarks steps: - name: Checkout diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 348f04058..16779db24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: name: Run regression tests runs-on: ubuntu-latest timeout-minutes: 10 - container: ghcr.io/kuznia-rdzeni/verilator:v5.008 + container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11 needs: build-regression-tests steps: - name: Checkout diff --git a/docker/AmaranthSynthECP5.Dockerfile b/docker/AmaranthSynthECP5.Dockerfile index 0e9809b8c..3b9326ccf 100644 --- a/docker/AmaranthSynthECP5.Dockerfile +++ b/docker/AmaranthSynthECP5.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:22.10 +FROM ubuntu:23.04 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - python3.10 python3-pip git yosys \ + python3.11 python3-pip git yosys lsb-release \ build-essential cmake python3-dev libboost-all-dev libeigen3-dev && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/Verilator.Dockerfile b/docker/Verilator.Dockerfile index ddb5925f7..64c60c5e4 100644 --- a/docker/Verilator.Dockerfile +++ b/docker/Verilator.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:22.10 +FROM ubuntu:23.04 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - python3.10 libpython3.10 python3-pip git \ + python3.11 libpython3.11 python3-pip git lsb-release \ perl perl-doc help2man make autoconf g++ flex bison ccache numactl \ libgoogle-perftools-dev libfl-dev zlib1g-dev && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/riscv-toolchain.Dockerfile b/docker/riscv-toolchain.Dockerfile index ec33ce01b..d35c604b9 100644 --- a/docker/riscv-toolchain.Dockerfile +++ b/docker/riscv-toolchain.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:22.10 +FROM ubuntu:23.04 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - autoconf automake autotools-dev curl python3 bc \ + autoconf automake autotools-dev curl python3 bc lsb-release \ libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \ bison flex texinfo gperf libtool patchutils zlib1g-dev \ libexpat-dev ninja-build git ca-certificates python-is-python3 && \ diff --git a/transactron/core.py b/transactron/core.py index e9ab302da..745b98b4d 100644 --- a/transactron/core.py +++ b/transactron/core.py @@ -49,7 +49,7 @@ TransactionScheduler: TypeAlias = Callable[["MethodMap", TransactionGraph, TransactionGraphCC, PriorityOrder], Module] RecordDict: TypeAlias = ValueLike | Mapping[str, "RecordDict"] TransactionOrMethod: TypeAlias = Union["Transaction", "Method"] -TransactionOrMethodBound = TypeVar("TransactionOrMethodBound", bound=Union["Transaction", "Method"]) +TransactionOrMethodBound = TypeVar("TransactionOrMethodBound", "Transaction", "Method") class Priority(Enum): From 82150d1e7aa46e04e5a2cefafce03aab338026bf Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Mon, 9 Oct 2023 19:56:50 +0200 Subject: [PATCH 05/12] Update riscv-toolchain. --- .github/workflows/benchmark.yml | 20 +------------------- .github/workflows/main.yml | 11 +---------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f5a34e06e..65338208d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -23,15 +23,6 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - cache: "pip" - cache-dependency-path: | - requirements.txt - requirements-dev.txt - - name: Install dependencies run: | python3 -m pip install --upgrade pip @@ -62,7 +53,7 @@ jobs: build-perf-benchmarks: name: Build performance benchmarks runs-on: ubuntu-latest - container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14 + container: ghcr.io/lekcyjna123/riscv-toolchain:2023.10.08_v steps: - name: Checkout uses: actions/checkout@v3 @@ -93,15 +84,6 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - cache: "pip" - cache-dependency-path: | - requirements.txt - requirements-dev.txt - - name: Install dependencies run: | python3 -m pip install --upgrade pip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16779db24..53ac38bea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: build-regression-tests: name: Build regression tests runs-on: ubuntu-latest - container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14 + container: ghcr.io/lekcyjna123/riscv-toolchain:2023.10.08_v steps: - name: Checkout uses: actions/checkout@v3 @@ -41,15 +41,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: | - requirements.txt - requirements-dev.txt - - name: Install dependencies run: | python3 -m pip install --upgrade pip From be694e73f9066391d0fa86fda4d14e84f94ca7c7 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Mon, 9 Oct 2023 20:02:25 +0200 Subject: [PATCH 06/12] Break system packages. --- .github/workflows/benchmark.yml | 8 ++++---- .github/workflows/deploy_gh_pages.yml | 2 +- .github/workflows/main.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 65338208d..5c23b6873 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -25,8 +25,8 @@ jobs: - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install -r requirements-dev.txt + python3 -m pip install --break-system-packages --upgrade pip + pip3 install --break-system-packages -r requirements-dev.txt - name: Synthesize run: PYTHONHASHSEED=0 ./scripts/synthesize.py --verbose --config ${{ matrix.config }} @@ -86,8 +86,8 @@ jobs: - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install -r requirements-dev.txt + python3 -m pip install --break-system-packages --upgrade pip + pip3 install --break-system-packages -r requirements-dev.txt - name: Generate Verilog run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml index 753d80ae1..d4207509f 100644 --- a/.github/workflows/deploy_gh_pages.yml +++ b/.github/workflows/deploy_gh_pages.yml @@ -34,7 +34,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --break-system-packages --upgrade pip pip3 install -r requirements-dev.txt - name: Build documentation diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 53ac38bea..4a5124871 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,8 +43,8 @@ jobs: - name: Install dependencies run: | - python3 -m pip install --upgrade pip - pip3 install -r requirements-dev.txt + python3 -m pip install --break-system-packages --upgrade pip + pip3 install --break-system-packages -r requirements-dev.txt - name: Generate Verilog run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full From 8ca2be3c085c3f356cc9e0e12ca7a548ec4ed54d Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 13:10:13 +0200 Subject: [PATCH 07/12] Add back setup python step. --- .github/workflows/benchmark.yml | 18 ++++++++++++++++++ .github/workflows/main.yml | 9 +++++++++ docker/riscv-toolchain.Dockerfile | 4 ++-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5c23b6873..31207d033 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -23,6 +23,15 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'pip' + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --break-system-packages --upgrade pip @@ -84,6 +93,15 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'pip' + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --break-system-packages --upgrade pip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4a5124871..7cc22e5a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,15 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + cache: 'pip' + cache-dependency-path: | + requirements.txt + requirements-dev.txt + - name: Install dependencies run: | python3 -m pip install --break-system-packages --upgrade pip diff --git a/docker/riscv-toolchain.Dockerfile b/docker/riscv-toolchain.Dockerfile index d35c604b9..e64e2bce1 100644 --- a/docker/riscv-toolchain.Dockerfile +++ b/docker/riscv-toolchain.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:23.04 +FROM ubuntu:23.10 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - autoconf automake autotools-dev curl python3 bc lsb-release \ + autoconf automake autotools-dev curl python3 python3-pip bc lsb-release \ libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \ bison flex texinfo gperf libtool patchutils zlib1g-dev \ libexpat-dev ninja-build git ca-certificates python-is-python3 && \ From f0068bfc7056fd347d8a44590227c7d032db6a30 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 13:38:10 +0200 Subject: [PATCH 08/12] Check if setup python without cache works. --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cc22e5a4..6e33361af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,10 +45,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.11' - cache: 'pip' - cache-dependency-path: | - requirements.txt - requirements-dev.txt - name: Install dependencies run: | From 283724f21182acc96c827d1a55a465f6587d139b Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 14:10:31 +0200 Subject: [PATCH 09/12] Change command to install requirements. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e33361af..7bf7bfd7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: - name: Install dependencies run: | python3 -m pip install --break-system-packages --upgrade pip - pip3 install --break-system-packages -r requirements-dev.txt + python3 -m pip install --break-system-packages -r requirements-dev.txt - name: Generate Verilog run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full From 662322cf255ae7593c4ebcc247cb339d76accb7b Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 14:27:01 +0200 Subject: [PATCH 10/12] Try to use venv instead of break-system-packages --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bf7bfd7c..994bd01d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,8 +48,10 @@ jobs: - name: Install dependencies run: | - python3 -m pip install --break-system-packages --upgrade pip - python3 -m pip install --break-system-packages -r requirements-dev.txt + python3 -m venv venv + source venv/bin/activate + python3 -m pip install --upgrade pip + python3 -m pip install -r requirements-dev.txt - name: Generate Verilog run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full From d3dc874678573d1ab9814aa8f4f53372dbaca18d Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 14:54:02 +0200 Subject: [PATCH 11/12] Yet another way to initialise python env --- .github/workflows/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 994bd01d9..9ba7073ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,12 +49,14 @@ jobs: - name: Install dependencies run: | python3 -m venv venv - source venv/bin/activate + . venv/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r requirements-dev.txt - name: Generate Verilog - run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full + run: | + . venv/bin/activate + PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full - uses: actions/download-artifact@v3 with: @@ -63,6 +65,7 @@ jobs: - name: Run tests run: | + . venv/bin/activate scripts/run_tests.py -a regression - name: Test Report From f0244f4f1b75e02949cf30647504a20e122aefef Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Sat, 14 Oct 2023 15:36:21 +0200 Subject: [PATCH 12/12] Move python update to separate PR. --- .github/workflows/benchmark.yml | 32 ++++++--------------------- .github/workflows/deploy_gh_pages.yml | 4 ++-- .github/workflows/main.yml | 22 +++++------------- docker/AmaranthSynthECP5.Dockerfile | 4 ++-- docker/Verilator.Dockerfile | 4 ++-- docker/riscv-toolchain.Dockerfile | 4 ++-- 6 files changed, 21 insertions(+), 49 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 31207d033..e7a72d1af 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -14,7 +14,7 @@ jobs: name: Synthesis benchmarks runs-on: ubuntu-latest timeout-minutes: 40 - container: ghcr.io/kuznia-rdzeni/amaranth-synth-ecp5:2023.10.08_v + container: ghcr.io/kuznia-rdzeni/amaranth-synth:ecp5 steps: - uses: actions/checkout@v3 @@ -23,19 +23,10 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: | - requirements.txt - requirements-dev.txt - - name: Install dependencies run: | - python3 -m pip install --break-system-packages --upgrade pip - pip3 install --break-system-packages -r requirements-dev.txt + python3 -m pip install --upgrade pip + pip3 install -r requirements-dev.txt - name: Synthesize run: PYTHONHASHSEED=0 ./scripts/synthesize.py --verbose --config ${{ matrix.config }} @@ -62,7 +53,7 @@ jobs: build-perf-benchmarks: name: Build performance benchmarks runs-on: ubuntu-latest - container: ghcr.io/lekcyjna123/riscv-toolchain:2023.10.08_v + container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14 steps: - name: Checkout uses: actions/checkout@v3 @@ -82,7 +73,7 @@ jobs: name: Run performance benchmarks runs-on: ubuntu-latest timeout-minutes: 60 - container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11 + container: ghcr.io/kuznia-rdzeni/verilator:v5.008 needs: build-perf-benchmarks steps: - name: Checkout @@ -93,19 +84,10 @@ jobs: # https://github.com/actions/runner/issues/2033 chown -R $(id -u):$(id -g) $PWD - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: | - requirements.txt - requirements-dev.txt - - name: Install dependencies run: | - python3 -m pip install --break-system-packages --upgrade pip - pip3 install --break-system-packages -r requirements-dev.txt + python3 -m pip install --upgrade pip + pip3 install -r requirements-dev.txt - name: Generate Verilog run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml index d4207509f..210752f06 100644 --- a/.github/workflows/deploy_gh_pages.yml +++ b/.github/workflows/deploy_gh_pages.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" cache: "pip" cache-dependency-path: | requirements.txt @@ -34,7 +34,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --break-system-packages --upgrade pip + python -m pip install --upgrade pip pip3 install -r requirements-dev.txt - name: Build documentation diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ba7073ec..4d70ae121 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: build-regression-tests: name: Build regression tests runs-on: ubuntu-latest - container: ghcr.io/lekcyjna123/riscv-toolchain:2023.10.08_v + container: ghcr.io/kuznia-rdzeni/riscv-toolchain:2023.05.14 steps: - name: Checkout uses: actions/checkout@v3 @@ -35,28 +35,19 @@ jobs: name: Run regression tests runs-on: ubuntu-latest timeout-minutes: 10 - container: ghcr.io/kuznia-rdzeni/verilator:v5.008-3.11 + container: ghcr.io/kuznia-rdzeni/verilator:v5.008 needs: build-regression-tests steps: - name: Checkout uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: Install dependencies run: | - python3 -m venv venv - . venv/bin/activate python3 -m pip install --upgrade pip - python3 -m pip install -r requirements-dev.txt + pip3 install -r requirements-dev.txt - name: Generate Verilog - run: | - . venv/bin/activate - PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full + run: PYTHONHASHSEED=0 ./scripts/gen_verilog.py --verbose --config full - uses: actions/download-artifact@v3 with: @@ -65,7 +56,6 @@ jobs: - name: Run tests run: | - . venv/bin/activate scripts/run_tests.py -a regression - name: Test Report @@ -86,7 +76,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.10' cache: 'pip' cache-dependency-path: | requirements.txt @@ -115,7 +105,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.10' cache: 'pip' cache-dependency-path: | requirements.txt diff --git a/docker/AmaranthSynthECP5.Dockerfile b/docker/AmaranthSynthECP5.Dockerfile index 3b9326ccf..0e9809b8c 100644 --- a/docker/AmaranthSynthECP5.Dockerfile +++ b/docker/AmaranthSynthECP5.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:23.04 +FROM ubuntu:22.10 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - python3.11 python3-pip git yosys lsb-release \ + python3.10 python3-pip git yosys \ build-essential cmake python3-dev libboost-all-dev libeigen3-dev && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/Verilator.Dockerfile b/docker/Verilator.Dockerfile index 64c60c5e4..ddb5925f7 100644 --- a/docker/Verilator.Dockerfile +++ b/docker/Verilator.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:23.04 +FROM ubuntu:22.10 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - python3.11 libpython3.11 python3-pip git lsb-release \ + python3.10 libpython3.10 python3-pip git \ perl perl-doc help2man make autoconf g++ flex bison ccache numactl \ libgoogle-perftools-dev libfl-dev zlib1g-dev && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/riscv-toolchain.Dockerfile b/docker/riscv-toolchain.Dockerfile index e64e2bce1..ec33ce01b 100644 --- a/docker/riscv-toolchain.Dockerfile +++ b/docker/riscv-toolchain.Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:23.10 +FROM ubuntu:22.10 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ - autoconf automake autotools-dev curl python3 python3-pip bc lsb-release \ + autoconf automake autotools-dev curl python3 bc \ libmpc-dev libmpfr-dev libgmp-dev gawk build-essential \ bison flex texinfo gperf libtool patchutils zlib1g-dev \ libexpat-dev ninja-build git ca-certificates python-is-python3 && \