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

Non-stream signal reversibility #23

Open
johanpel opened this issue Mar 10, 2020 · 0 comments
Open

Non-stream signal reversibility #23

johanpel opened this issue Mar 10, 2020 · 0 comments
Labels
🐬 specification Item related to the specification

Comments

@johanpel
Copy link
Member

Currently, it is allowed to specify a reverse signal on the Stream node.
It would be nice to also allow reverse signals on signals that are not streams.

It seems more logical to me that reverse should be a property of a group and union field, as "reverse" is always relative to something else.

Since at the type level, interface modes are (obviously) not exposed, it must be relative to something else within a Logical"Stream"Type, and thus it can only be another group or union field.

If such a group or union element with a reversed field is streamed, the "synthesis" algorithms probably need to be adjusted to create new streams for those specific fields.

Example of a Streamlet Definition File with:

Streamlet dolphin {
  x : out Stream<Group<a: rev Bits<1>, b: Bits<1>>>
}

Would result in two streams: x.a going out and x.b coming in, both having the same properties of the parent stream.

For unions, if the first field is reversed, e.g.:

Streamlet triggerfish {
  y : out Stream<Union<a: rev Bits<1>, b: Bits<1>>>
}

Not entirely sure but I think this should result in two streams:

y.(tag & b) going out and may not assume y.a. will send something before sending the tag.
y.a coming in.

@mbrobbel mbrobbel added the 🐬 specification Item related to the specification label Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐬 specification Item related to the specification
Projects
None yet
Development

No branches or pull requests

2 participants