-
Notifications
You must be signed in to change notification settings - Fork 2
rtl: HW Generation with new VIAM from Frontend #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1691656
rtl: Make the RTL generator use new VIAM elements
linushdot 4ba6538
rtl: Allow HW generation from MiA definition alone
linushdot 829b98c
chore: Fix shell script EOL on Windows
linushdot da4f0e8
rtl: Reenable RISC-V instruction tests
linushdot aa577a6
rtl: Test subsets of the RISCV instruction set
linushdot 484275b
rtl: Simulation Memory Model
linushdot 104fd2b
rtl: Emit RVFI signals for verification
linushdot da12ac3
rtl: Revert changes to matching compute IPG nodes
linushdot bc5d4e7
rtl: Change RISCV instruction tests to use ElfSim
linushdot c1e23ea
rtl: Add new simplification rules
linushdot f65e11a
rtl: Add spec for three and single stage MiA
linushdot 667386c
frontend: Cache visited ISA definitions
linushdot de0fe65
test: Make common tests run on windows
linushdot 55e8888
chore: Reorganize MiA spec files, frontend tests
linushdot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // SPDX-FileCopyrightText : © 2026 TU Wien <vadl@tuwien.ac.at> | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import "../rv32i"::RV32I | ||
| import "../rv32im"::RV32IM | ||
|
|
||
| import "../rv64i"::RV64I | ||
| import "../rv64im"::RV64IM | ||
|
|
||
| model Isa() : Id = {RV32I} // invoke vadl -m "Isa=RV64I" for 64 bit arch | ||
|
|
||
| /** | ||
| * Single stage MiA description. | ||
| * | ||
| * Placing the whole instruction behavior in a single pipeline stage may require the stage to | ||
| * take more than one cycle for execution. In this case an implementation could share resources | ||
| * between the execution steps (which our hardware generation currently does not do). | ||
| */ | ||
| micro architecture SingleStage implements $Isa = { | ||
|
|
||
| stage ISS -> ( ) = { | ||
| let instr = decode( fetchNext ) in // fetch next instruction from memory and decode | ||
| instr.write | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // SPDX-FileCopyrightText : © 2026 TU Wien <vadl@tuwien.ac.at> | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| import "../rv32i"::RV32I | ||
| import "../rv32im"::RV32IM | ||
|
|
||
| import "../rv64i"::RV64I | ||
| import "../rv64im"::RV64IM | ||
|
|
||
| model Isa() : Id = {RV32I} // invoke vadl -m "Isa=RV64I" for 64 bit arch | ||
|
|
||
| /** | ||
| * Three stage MiA description. | ||
| * | ||
| * This models a pipeline with stages Instruction Fetch, Instruction Decode and Execute following | ||
| * the design of the Wildcat educational processor. | ||
| * | ||
| * Schoeberl, M. (2025). Wildcat: Educational RISC-V Microprocessors. arXiv. | ||
| * http://arxiv.org/abs/2502.20197 | ||
| */ | ||
| micro architecture ThreeStage implements $Isa = { | ||
|
|
||
| stage IF -> ( fr : FetchResult ) = { | ||
| fr := fetchNext // fetch next instruction from memory (or cache) | ||
| } | ||
|
|
||
| stage ID -> ( ir : Instruction ) = { | ||
| let instr = decode( IF.fr ) in { // decode the fetch packet, gives an Instruction | ||
| // if ( instr.unknown ) then | ||
| // raise invalidInstruction // raise an invalid instruction exception | ||
| instr.address( @X ) // compute addresses to access register file X | ||
| instr.read( @X ) // read from the X register file | ||
| instr.read( @PC ) // read from the PC | ||
| ir := instr // stage output is the Instruction ir | ||
| } | ||
| } | ||
|
|
||
| stage EX -> ( ir : Instruction ) = { | ||
| let instr = ID.ir in { | ||
| instr.write // write PC | ||
| ir := instr | ||
| } | ||
| } | ||
| } |
20 changes: 13 additions & 7 deletions
20
sys/risc-v/rv64imFive.vadl → sys/risc-v/mia/rv_5stage.vadl
linushdot marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
sys/risc-v/rv64imFiveMul.vadl → sys/risc-v/mia/rv_5stage_mul.vadl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.