Skip to content
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

Peek and Poke API for aggregates is inconsistent and hard to use. #77

Open
chick opened this issue Jan 10, 2017 · 0 comments
Open

Peek and Poke API for aggregates is inconsistent and hard to use. #77

chick opened this issue Jan 10, 2017 · 0 comments
Assignees
Labels

Comments

@chick
Copy link
Contributor

chick commented Jan 10, 2017

The current tester API for aggregates needs lots of work.
Proposal:
Find a way to support Bundle and Vector Literals.

To fix or eliminate
Current poking of Vecs assigns values from an seq: IndexedSeq[BigInt] into the Vec in reverse order, i.e
for a Vec sized 10
vec(0) <= seq(9)
...
vec(9) <= seq(0)
Yet peeking from that Vec does not reverse the elements, peek and poke are asymmetric.
seq(0) <= vec(0), etc.
When poking bundles, the order seems to be correct, i.e. the first element of the seq goes into the first element of the bundle. The peek of a Bundle returns and Map of strings to BigInts, another asymmetry between peek and poke.

Users may have worked around this but it seems worth breaking the current API to fix it.
This all gets worse when Vecs and Bundles are nested.

Currently the users should write their own synthetic peek and poke routines and not use the existing API. Aggregate literals would seem to be the most elegant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant