chipsalliance / chipsalliance/chisel

[ChiselSim] ChiselEnum does not provide peek/poke methods and user-friendly API

Open
#4,208 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
4.8k
Forks
658
Avg merge
18h 59m
Merged PRs (30d)
14

Description

While rewriting some tests from chiseltest to ChiselSim, I've noticed ChiselEnum is not handled by the Peek/Poke API.

In a test with `c.io.inst.peek() should be(inst)` where `inst` is a `ChiselEnum.Type`, I get: `value peek is not a member of chiselv.Instruction.Type`.

The closest thing I could get to work is

```scala
c.io.inst.peekValue().asBigInt should be(inst.litValue)
```

Which is very convoluted and not user-friendly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.