chipsalliance / chipsalliance/riscv-vector-tests

how to write configs of custom tests for a new insn

Open
#70 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
118
Forks
40
PR merge metrics
No merged PRs in 30d

Description

I'm not very familiar with Go. Right now, I have a custom instruction and I want to use this project to automatically generate test cases for it.
I know I need to create a config file like `configs/xxx.toml` for my new instruction, but I'm not exactly sure how to write it.

I looked at an example:

```toml
name = "vwadd.vv"
format = "vd,vs2,vs1,vm"

[tests]
base = [
[0x0, 0x0],
[0x1, 0x2],
[0x3, 0xf]
]
sew8 = [
[0xf8, 0x00],
[0xf8, 0x08],
[0x7f, 0x00],
[0x7f, 0x07],
[0x7f, 0x01],
[0xff, 0x00],
[0xff, 0xff]
]
```
The part I don't really get is what the numbers under the [tests] section mean.
How are they used when generating the actual test cases?
Could you help me understand that?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the example in configs/xxx.toml, especially the [tests] section, and trace how its values are used when generating actual test cases. Document what the numbers represent, how the base and sew8 entries differ, and how someone should configure a new instruction.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.