You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the XlsTypeError for mismatched values in config() does not provide any information about the channel's direction. This may be misleading especially when the same type of value is used in channels with different directions and causes the error. In that case, the Mismatched elements within the type section is empty and the Overall type mismatch shows the same values on both sides of the error.
To Reproduce
To reproduce the problem, one can use the following DSLX code:
0007: data_r: chan<u32> in,
0008: data_s: chan<u32> out
0009: ) {
______^
0010: | (data_s, data_r)
0011: | }
|_____^ XlsTypeError: Return type of function body for 'Passthrough.config' did not match the annotated return type.
Mismatched elements within type:
Overall type mismatch:
(chan(uN[32])chan(uN[32]))
vs (chan(uN[32])chan(uN[32]))
0012: next(tok: token, state: ()) {
0013: let (tok, data) = recv(tok, data_r);
Error parsing and type checking DSLX source file: xls/examples/passthrough.x
Expected behavior
The XlsTypeError should include information about the channel types. The difference between channels with incorrect directions should be visible.
The text was updated successfully, but these errors were encountered:
rw1nkler
changed the title
XlsTypeError in config() is missing information about the channel directionXlsTypeError in config() is missing information about the channel direction
Apr 24, 2024
This PR adds a simple proc that forwards the received information from an input channel to an output channel. We found this particular proc surprisingly useful when testing various tools within the toolchain or when reporting bugs.
We used it in:
* #1415
* #1410
* #1392
* #1057
COPYBARA_INTEGRATE_REVIEW=#1416 from antmicro:passthrough 907a62b
PiperOrigin-RevId: 636954688
proppy
added
bug
Something isn't working or is incorrect
dslx
DSLX (domain specific language) implementation / front-end
labels
May 24, 2024
Describe the bug
Currently, the
XlsTypeError
for mismatched values inconfig()
does not provide any information about the channel's direction. This may be misleading especially when the same type of value is used in channels with different directions and causes the error. In that case, theMismatched elements within the type
section is empty and theOverall type mismatch
shows the same values on both sides of the error.To Reproduce
To reproduce the problem, one can use the following DSLX code:
Here is the returned error:
Expected behavior
The
XlsTypeError
should include information about the channel types. The difference between channels with incorrect directions should be visible.Additional context
config()
return types #1379The text was updated successfully, but these errors were encountered: