Skip to content

Commit

Permalink
External Transactron (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk authored Nov 25, 2024
1 parent 7e82d32 commit 2abd9e9
Show file tree
Hide file tree
Showing 82 changed files with 9 additions and 12,819 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -114,9 +111,6 @@ jobs:
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -165,9 +159,6 @@ jobs:
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/deploy_gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -153,9 +150,6 @@ jobs:
git config --global --add safe.directory /__w/coreblocks/coreblocks
git submodule > .gitmodules-hash
- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -263,9 +257,6 @@ jobs:
git config --global --add safe.directory /__w/coreblocks/coreblocks
git submodule > .gitmodules-hash
- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -318,9 +309,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -353,9 +341,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive amaranth-stubs

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@
[submodule "test/external/riscof/riscv-arch-test"]
path = test/external/riscof/riscv-arch-test
url = https://github.com/riscv-non-isa/riscv-arch-test.git
[submodule "amaranth-stubs"]
path = amaranth-stubs
url = https://github.com/kuznia-rdzeni/amaranth-stubs.git
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Coreblocks is an experimental, modular out-of-order [RISC-V](https://riscv.org/s
* Simplicity. Coreblocks is an academic project, accessible to students.
It should be suitable for teaching essentials of out-of-order architectures.
* Modularity. We want to be able to easily experiment with the core by adding, replacing and modifying modules without changing the source too much.
For this goal, we designed a [transaction system](https://kuznia-rdzeni.github.io/coreblocks/Transactions.html) inspired by [Bluespec](http://wiki.bluespec.com/).
For this goal, we designed a transaction system called [Transactron](https://github.com/kuznia-rdzeni/transactron), which is inspired by [Bluespec](http://wiki.bluespec.com/).
* Fine-grained testing. Outside of the integration tests for the full core, modules are tested individually.
This is to support an agile style of development.

Expand All @@ -25,9 +25,6 @@ The core currently supports the full RV32I instruction set and several extension
Exceptions and some of machine-mode CSRs are supported, the support for interrupts is currently rudimentary and incompatible with the RISC-V spec.
Coreblocks can be used with [LiteX](https://github.com/enjoy-digital/litex) (currently using a [patched version](https://github.com/kuznia-rdzeni/litex/tree/coreblocks)).

The transaction system we use as the foundation for the core is well-tested and usable.
We plan to make it available as a separate Python package.

## Documentation

The [documentation for our project](https://kuznia-rdzeni.github.io/coreblocks/) is automatically generated using [Sphinx](https://www.sphinx-doc.org/).
Expand Down
1 change: 0 additions & 1 deletion amaranth-stubs
Submodule amaranth-stubs deleted from edb302
5 changes: 3 additions & 2 deletions coreblocks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ def elaborate(self, platform):

m.submodules.exception_information_register = self.exception_information_register

if self.connections.dependency_provided(FetchResumeKey()):
fetch_resume_fb, fetch_resume_unifiers = self.connections.get_dependency(FetchResumeKey())
fetch_resume = self.connections.get_optional_dependency(FetchResumeKey())
if fetch_resume is not None:
fetch_resume_fb, fetch_resume_unifiers = fetch_resume
m.submodules.fetch_resume_unifiers = ModuleConnector(**fetch_resume_unifiers)

m.submodules.fetch_resume_connector = ConnectTrans(fetch_resume_fb, self.frontend.resume_from_unsafe)
Expand Down
5 changes: 3 additions & 2 deletions coreblocks/frontend/fetch/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ def _():
expect_unstall_unsafe = Signal()
prev_stalled_unsafe = Signal()
dependencies = DependencyContext.get()
if dependencies.dependency_provided(FetchResumeKey()):
unifier_ready = DependencyContext.get().get_dependency(FetchResumeKey())[0].ready
fetch_resume = dependencies.get_optional_dependency(FetchResumeKey())
if fetch_resume is not None:
unifier_ready = fetch_resume[0].ready
else:
unifier_ready = C(0)

Expand Down
1 change: 0 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

```{eval-rst}
.. include:: modules-coreblocks.rst
.. include:: modules-transactron.rst
```
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ maxdepth: 3
home.md
assumptions.md
development-environment.md
transactions.md
scheduler/overview.md
shared-structs/implementation/rs-impl.md
shared-structs/rs.md
Expand Down
Loading

0 comments on commit 2abd9e9

Please sign in to comment.