{"id":13646790,"url":"https://github.com/chipsalliance/riscv-vector-tests","last_synced_at":"2025-04-06T05:15:38.640Z","repository":{"id":126984194,"uuid":"561373593","full_name":"chipsalliance/riscv-vector-tests","owner":"chipsalliance","description":"Unit tests generator for RVV 1.0","archived":false,"fork":false,"pushed_at":"2025-03-19T16:50:42.000Z","size":459,"stargazers_count":79,"open_issues_count":7,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T04:03:01.637Z","etag":null,"topics":["generator","riscv","rvv","spike","testsuite"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chipsalliance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-03T14:51:50.000Z","updated_at":"2025-03-19T16:51:02.000Z","dependencies_parsed_at":"2023-06-19T14:32:49.889Z","dependency_job_id":"ce436360-8f3c-48ed-9718-5659843390f9","html_url":"https://github.com/chipsalliance/riscv-vector-tests","commit_stats":null,"previous_names":["ksco/riscv-vector-tests"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipsalliance%2Friscv-vector-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipsalliance%2Friscv-vector-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipsalliance%2Friscv-vector-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chipsalliance%2Friscv-vector-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chipsalliance","download_url":"https://codeload.github.com/chipsalliance/riscv-vector-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174412,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","riscv","rvv","spike","testsuite"],"created_at":"2024-08-02T01:03:06.112Z","updated_at":"2025-04-06T05:15:38.619Z","avatar_url":"https://github.com/chipsalliance.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# RISC-V Vector Tests Generator\n\n## About\n\nThis repository hosts unit tests generator for the RISC-V vector extension.\n\n## Features\n\n- Similar to [riscv-tests](https://github.com/riscv-software-src/riscv-tests), simple and easy to use\n- Self-verification by default, Co-simulator friendly\n- User-mode and machine-mode binaries\n- TestFloat3 integration\n- Support RV32 and RV64\n- Test SEW from e8 to e64\n- Test LMUL from mf8 to m8\n- Support VLEN from 64 to 4096\n- Support varies sub-extensions: Zvfh, Zvbb, Zvbc, Zvkg, Zvkned, Zvknha, Zvksed and Zvksh\n- Configurable, see `make help`\n\n## Limitations\n\n- All the tests are per instruction, and it is done more or less in the same fashion\n- Lack of tail/mask agnostic support (i.e. ta/ma)\n- Lack of fault-only-first testing\n- Lack of vstart testing\n- Lack of register group overlap testing\n- ... and more\n\nOverall, there are no coverage statistics or guarantees.\n\n## How it works\n\nThe Spike simulator is known as the RISC-V gold standard simulator, and although we don't know how Spike is tested, it does fully support the V extension. So we added [a custom special instruction](https://github.com/ksco/riscv-vector-tests/blob/6a23892a5ab0cc72f4867cc95186b3528c99c2a0/pspike/pspike.cc#L20) to Spike, and for any test, let it automatically generate a reference result for that test. This way, we generate tests for all instructions almost automatically. Under this framework, all we have to do is write a [simple config file for each instruction](configs/).\n\n## Prerequisite\n\n1. `riscv64-unknown-elf-gcc` with RVV 1.0 support\n2. The Spike simulator\n3. Golang 1.19+\n4. `riscv-pk` if you need to generate user-mode binaries\n\n## Cloning\n\nThis repository uses the `riscv-test-env` repository as a submodule.\n\n```\ngit clone --recurse-submodules https://github.com/chipsalliance/riscv-vector-tests\n```\n\n## How to use\n\n```\nmake all -j$(nproc)\n```\n\n\u003e If you have problems compiling, please refer to the build steps in [build-and-test.yml](.github/workflows/build-and-test.yml).\n\nAfter `make all`, you will find all the generated tests in `out/v[vlen]x[xlen][mode]/bin/stage2/`.\n\nFor more advanced options, run `make help`.\n\n\u003e Note: [single/single.go](single/single.go) generates tests directly from stage 1, suitable for targets with co-simulators (or simply use `TEST_MODE=cosim` if you're lazy).\n\n### Nix package\n\nThis repository also provides a nix derivation with the following output provided:\n\n- `${riscv-vector-test}/bin/*`: Generator binaries\n- `${riscv-vector-test}/include/*`: Necessary headers for runtime usage\n- `${riscv-vector-test}/configs/*`: Necessary runtime configs\n\n## License\n\nThis project uses third-party projects, and the licenses of these projects are attached to the corresponding directories.\n\nThe code for this project is distributed under the Apache License Version 2.0.\n\nThe “RISC-V” trade name is a registered trademark of RISC-V International.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipsalliance%2Friscv-vector-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchipsalliance%2Friscv-vector-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchipsalliance%2Friscv-vector-tests/lists"}