forked from riscv-software-src/riscv-tests
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Towards complete pulpv3 coverage #5
Open
phsauter
wants to merge
18
commits into
pulp-platform:xpulp-dev
Choose a base branch
from
phsauter:xpulp-dev
base: xpulp-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Modified the Makefile to support the new split Xpulpimg extension. Added the p.cnt instruction (part of bitops) to test the workflow for adding further instructions.
pulp_test_gen is a Python package written to simplify the process of creating future tests for (arithmetic) instructions. It abstracts the assembler macros and provides different classes based on the type of operands used in the instruction. In order to use it, one needs to create an inherited class from the correct type/class, set operand-limits and implement the operation. Then this new instruction-specific class can be used to manually add functional tests or generate a number of random tests. At the end the testflow can be written to an assembler file. gen_test_p_cnt.py serves as a rather simple example on how to use the package.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests.
The expected effects of endi, starti, count and counti are tested directly (they should write to CSR, CSR is read-back to check). Since setup and setupi immediately start a loop, this is not really possible. Therefore they are tested by using them in a small loop. This is not at all exhaustive. In the future more complicated setups/loops should be added.
Fixes a number of minor mistakes and improperly generated tests in untested classes of pulp_test_gen
- 1 register + 2 immediate operands (imm12, uimm5, uimm6, simm6) - 1 register + 2 uimm5 operands where previous value of destination register also matters (effectively as if it had 'src3')
Also adds new test-macros of last commit to pulp_test_gen.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests. The tests were successfully run against the Spike implementation and some generated assembly tests were manually verified.
This test did not yet run against the Spike implementation because xpulpbitrev is not an extension in gcc and xgap9 throws an error. The generated tests are partially verified by hand, additionally the first three are examples from the docs and they are correct. I am fairly certain the test is fine.
- Add to test_macro.h - Add to pulp_test_gen scripts
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests.
Added macros to perform zero-reg tests for instructions with only one source register, previously missing. Re-generated the instruction-tests to include zero-reg testing.
Makes the scripts a bit less verbose and clearer to read.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated test. Old tests for the previously implemented instructions were replaced.
The tests were automatically generated using pulp_test_gen. All include non-exhaustive checks of some common edge cases and a few dozen randomly generated tests.
All xpulpimg subsets in xpulpv3 are included in this encoding.h
This was referenced Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds tests that cover almost all instructions in pulpv3 (elw is missing).
This was done as a SoCDAML miniproject in summer 2022.
The entire project consists of changes to:
pulp-platform/riscv-opcodes#8
pulp-platform/riscv-isa-sim#3
pulp-platform/riscv-tests
All are necessary for the goal of having definitions (riscv-opcodes), a reference (riscv-isa-sim) and tests (risv-tests) for the pulpv3 instruction set.
Attached is a slide from the presentation of the project, it shows which instructions were added.
presentation.pdf