Skip to content

Implemented RV64F extension.#18

Draft
doushe821 wants to merge 91 commits into
ProteusLab:masterfrom
doushe821:master
Draft

Implemented RV64F extension.#18
doushe821 wants to merge 91 commits into
ProteusLab:masterfrom
doushe821:master

Conversation

@doushe821

Copy link
Copy Markdown
Collaborator

Implementation of RV64F extension in Protea DSL (unit tests included). Some changes in ADL files to fix possible bugs and make rv64F integration possible. More detailed info will be provided in proposal comments

Draft pull request to see all the differences and be able to write proposals faster.

doushe821 and others added 30 commits March 10, 2026 20:22
TODO: 1. softfloat lib integration
2. Emition
3. Tests
That's it
Also improved builder and encoding. Also integration of softfloat is questionable and I might have to look for better solution.

TODO:
1. Finish builder
2. Implement Emitter.
3. Test.
Optional: search for better building method. Current one is ugly, but it might be the optimal one, since softfloat doesn't provide cmake for some reason.
DONE:
1. Extra encoding formats needed for RV64F instructions.
2. Added some helper functions in scope.rb and cpp_gen.rb
3. Added emition of RV64F instrs.
TODO:
1. Need to fix types for floating point temporaries.
2. Write tests.
3. Might need to refactor dsl implementation of this extension. Most methods can be generalized by adding their size as an attribute. It goes even further for Conversion instructions, because they all can be merged into one isntruction with 4 attributes. But this might become tidious in debug phase, so in my opinion, tests first, and then this changes.
TODO:
1. Do neg correctly.
2. Add rounding mode everywhere, for that I also need to change cpu_state emitter a bit.
3. Move most fp-relateed functions in separate module of emitter.
4. Tests.
…ions, added NaN checks that do not use isNaN from softfloat.
Also fixed a small bug in decorder, also started to write proposals (getting ready for mr)
uslsteen and others added 30 commits June 16, 2026 12:20
* In addition to the previous map section, we propose ordered operand list
with specific map sections per-operand
* Introduced per-operand Decode Snippets instead of the previous one
* Introduced separarte snippets codegen module
* Removed string-driven programming in operand definition
* Operands was applied in "RISC-V/encoding.rb" description
[DSL] Integrated softfloat

Also improved builder and encoding. Also integration of softfloat is questionable and I might have to look for better solution.

TODO:
1. Finish builder
2. Implement Emitter.
3. Test.
Optional: search for better building method. Current one is ugly, but it might be the optimal one, since softfloat doesn't provide cmake for some reason.

[DSL] Naive emition is in progress
DONE:
1. Extra encoding formats needed for RV64F instructions.
2. Added some helper functions in scope.rb and cpp_gen.rb
3. Added emition of RV64F instrs.
TODO:
1. Need to fix types for floating point temporaries.
2. Write tests.
3. Might need to refactor dsl implementation of this extension. Most methods can be generalized by adding their size as an attribute. It goes even further for Conversion instructions, because they all can be merged into one isntruction with 4 attributes. But this might become tidious in debug phase, so in my opinion, tests first, and then this changes.

[Emitter] Minor progress in fixing type issues

Safety commit

[Emitter] Described typing for almost all instructions.

TODO:
1. Do neg correctly.
2. Add rounding mode everywhere, for that I also need to change cpu_state emitter a bit.
3. Move most fp-relateed functions in separate module of emitter.
4. Tests.

[DSL] Added factorization over rounding mode, fixed min/max/neg functions, added NaN checks that do not use isNaN from softfloat.

[Tests][Decoder] Added unit tests for rv64f.

Also fixed a small bug in decorder, also started to write proposals (getting ready for mr)

[MR] Added more proposal comments

[MR]  Reverted codestyle changes

[MR] Separated fp-related functions from the rest of the dsl
TODO: 1. softfloat lib integration
2. Emition
3. Tests
That's it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants