chipsalliance / chipsalliance/chisel

Manipulating Bundles in tests

Open
#1,364 2 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

**Type of issue**: feature request

**Impact**: unknown

**Development Phase**: request

**Other information**

I have run in an issue when trying to match data representation in testers and modules under tests. Here is what I have done:

- I have defined a Bundle, which represents an header of some kind, which I use in my module
- The interface to my module is a serialized interface, which manipulates UInt.

What I want to do know is to generate some meaningful headers in my tests, and then send them to the module. I have tried the following solutions:

- create a BundleLiterals, and then get the litOption/litValue -> not implemented
- create a BundleLiterals, and then use the asUInt macro, and use range selection in the UInt -> not working as it requires a Builder context

The only thing I can do for now is to generate a BigInt manually from the tests.

So the question is, how can I do this properly?

- version: `3.2.3`
- OS: `Linux laptop1143701 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the test scenario described with Bundle, BundleLiterals, litOption/litValue, asUInt, and UInt. The issue names no source files or tests, so locate the existing Bundle and tester APIs first; done means a documented or tested way to create meaningful bundle headers and send their serialized values to the module.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
embedded-iot, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.