-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tuple argument in __call__ causes fault error #154
Comments
Fault supports poking/expecting on tuples using either tuple syntax, e.g Is the Peak compiled circuit encoding the tuple as a magma Bits? If so, then the above feature won't work since fault will think it's just a BitVector, so you would need to use some encoder to poke the tuple |
Confirmed, it looks like the magma circuit uses an assembled type, @cdonovick any thoughts on the best way to support this? The assembled type has access to the assembler that presumably could be used to encode the input value. The main concern is whether fault should build support in for this, or if Peak should define a sub-class of fault's tester that extends the value logic to support these assembled types. We may need to reorganize fault to make this kind of extension easier. |
@leonardt, I think it depends how much you want fault to support MagmaAssembledADT. I personally think that being able to use arbitrary ADTs in magma/fault independent of peak would be very useful. But defining a peak-based fault tester also seems reasonable. |
Arbitrary ADT support would require a core ADT type in magma, right now MagmaAssembledADT doesn't use a core magma type by design (it uses the type protocol instead). Perhaps we can add a way to convert constant values to type protocol API, maybe this will work with "get_magma_value" (we can try constructing a value using the type of the port, then call get_magma_value to get a corresponding magma const) |
I've added a test case to test_magma.py on fault_tuple_bug that uses a call function like this:
There seem to be multiple options for how to assign a value to "inputs" in fault.
None of these options are currently working. It seems like these features just need to be implemented in fault, but which options seems like the best way to do this?
The text was updated successfully, but these errors were encountered: