Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Chiseltest fails with None.get on zero-width literal #553

Closed
hutch31 opened this issue Aug 17, 2022 · 2 comments
Closed

Chiseltest fails with None.get on zero-width literal #553

hutch31 opened this issue Aug 17, 2022 · 2 comments

Comments

@hutch31
Copy link

hutch31 commented Aug 17, 2022

When running a test with a Bundle with zero-width elements, a fatal None.get error message is reported.

This Scastie reproduces the issue:
https://scastie.scala-lang.org/hutch31/lV9nKmAWRluQ4YTPI2EZ0A/10

@jackkoenig reported that:
I think the issue is that chisel3 or chiseltest is unable to handle unspecified fields in the Bundle literal (DontCare's don't have a litValue which is why you're seeing a None.get). Now because pool is zero-width, you can't specify it because then it doesn't exist and you'll get a different error (an assertion failure that should give a nicer error message)

@kammoh
Copy link
Contributor

kammoh commented Aug 17, 2022

I’ve been facing the sane issue and came up with the following workaround: #552
Implicit/automatic handling of zero-width data would definitely look cleaner, but I don’t know of a clean and reliable way that works across all backends.

@ekiwi
Copy link
Collaborator

ekiwi commented Jan 11, 2023

This should be fixed now with: 7d98ab5

@ekiwi ekiwi closed this as completed Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants