-
Notifications
You must be signed in to change notification settings - Fork 70
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
Optional interleaving / deinterleaving in Axis #62
base: master
Are you sure you want to change the base?
Optional interleaving / deinterleaving in Axis #62
Conversation
Where the dut may output interleaved transactions, the current sink returns frames delimited by tlast, but contvain data from multiple transactions. This commit adds an opt in paramater which allows transactions to be sorted, prior to insertion in the rx queue. This causes recv() / read() calls to return frames containing deinterleaved transations, with the return order determined by occurance of tlast within each transaction. If tlast is not presence, this has no effect
@alexforencich Another feature for your consideration. I think its generally applicable and useful, hence the upstream PR. |
I think this is a really good idea, and I think it should probably be extended by supporting interleaving on the source side as well. I'm thinking it might make sense to have an interleave depth parameter as well, default 1 probably, to control the interleaving on TX and check and warn on RX if the depth is exceeded. I also think it would make sense to be able to specify any combination of tid, tdest, and tuser for interleaving/de-interleaving. So perhaps replace the default value with an empty set or list, then the interleaving can be specified as something like Also I have run in to problems before with pre-allocating for all possible ID values, so I think it makes sense to do something similar to the AXI models, where the storage is dynamically allocated based on the IDs that are active at a given point in time. And this is probably going to be required anyway when multiple signals are used, anyway. I'm thinking you can do something simple like use |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #62 +/- ##
==========================================
- Coverage 75.96% 75.79% -0.17%
==========================================
Files 23 23
Lines 3703 3719 +16
Branches 600 608 +8
==========================================
+ Hits 2813 2819 +6
- Misses 614 618 +4
- Partials 276 282 +6 ☔ View full report in Codecov by Sentry. |
The thought occurred to me, but the implementation was less obvious. I'll give it some thought. |
Well, we can set the source-side interleaving aside for now and just implement de-interleaving on the receive side. |
@alexforencich Sorry for the huge delay here. Have updated to generalise over |
Adds interleaving support to
AxisStreamSource
. Packets may be interleaved ontid
,tdest
, the combination, or neither. The suggestion oftuser
was ignored, because I don't believe that is semantically well defined. The maximum interleave depth canbe set, to limit the number of concurrent packets streams.
AxisStreamSink
andAxisStreamMonitor
can deinterleave streams, an return packets onrecv
ordered bytlast
occurance on packets in the stream.The implementation maintains a single concurrent queue, but maintains a set of in-flight frames in the
_run
implmentation of each class.