-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support after delays on broadcast connections in C++ #553
Conversation
Codecov Report
@@ Coverage Diff @@
## master #553 +/- ##
============================================
+ Coverage 66.39% 66.41% +0.01%
- Complexity 3470 3474 +4
============================================
Files 132 132
Lines 22310 22311 +1
Branches 2885 2885
============================================
+ Hits 14812 14817 +5
Misses 6351 6351
+ Partials 1147 1143 -4
Continue to review full report at Codecov.
|
@@ -177,7 +177,7 @@ class ASTUtils { | |||
* if the port on the left or right of the connection involves a bank of reactors or a multiport. | |||
* @param connection The connection. | |||
*/ | |||
private static def boolean isWide(Connection connection) { | |||
static def boolean isMultiportConnection(Connection connection) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name isMultiportConnection for this method seems misleading because the connection may not involve any multiports and the method could still return true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found isWide
also not very clear, because it could be multiple individual connections in case of o1, o2 -> i1, i2
. Do you have a suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about isMultipleConnection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed it to hasMultipleConnections
, which seems better from a grammatical point of view.
@@ -0,0 +1,27 @@ | |||
target Cpp; | |||
|
|||
reactor Source { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at least the Source
reactor (but also a parametrized version of Sink
) can be imported for a bit of a more minimalistic design. This is by no means a critical issue though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, having better guidelines for writing tests and establishing a set of basic library reactors would be nice.
Currently, after delays do not work on broadcast connections (using the
(...)+
syntax). In part, this is because theiterated
property of the connection is not preserved in our AST transformation. I fixed this, so that the newly generated upstream connection is also iterated if the original connection was iterated. This solves the issue for C++. However, a similar test written in C still fails, and I haven't found out why. I will push the test that I have tobroadcast-after-c
based on this branch, and will open a separate issue.This PR also does a few cleanups and adds C++ tests.