-
Notifications
You must be signed in to change notification settings - Fork 17
Add VectorFIFOF module #35
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
Conversation
8af82c8 to
001feaf
Compare
|
Can you add a header comment to this file (with copyright and license info), similar to what's in Also, the rules need to have the attribute I also think it'd be good to put a comment on the module saying what the method scheduling relationships are (or rather, what you expect them to be). I think the use of wires means that With those three changes, I'd be willing to merge it. However, I'd really prefer that the design not use wires, and put everything in the method actions -- both for formal cleanliness and to avoid unintentional freedoms in the method scheduling. But I don't want to make too much work for you (and this contrib repo can be a little loose), so as long as there are comments and attributes, I'm OK accepting it. |
001feaf to
71f33ad
Compare
|
I pushed an updated branch that I believe addresses all of the |
|
Thank you! Although, I wasn't expecting such a dramatic change to the module -- are you OK with the current form (power of two requirement, vector isn't in order)? (I hadn't realized that the earlier version was shifting the elements on dequeue. I assume that either architecture is valid, but maybe the new one is better? Although I don't have a sense of how big the logic is for computing the valid bit for the vector elements in this version.) Was there a reason you chose to use Or arguably make it a proviso, so that it is detected earlier: The comment says that The comment also says that You can see the scheduling by synthesizing the module with a wrapper like this: and then if you run BSC with the flag The computation of |
71f33ad to
3b3ee85
Compare
|
Thanks for all the feedback and insight. I pushed another attempt at |
The VectorFIFOF module has a FIFOF interface for enqueuing and dequeuing data. It also provides a method, which returns a Vector of Maybe entries, to access all entries in the queue simultaneously.
3b3ee85 to
9e7df36
Compare
|
The schedule is back to being extremely permissive. For example, the clear method is allowed to sequence before the enq and deq methods, but the behavior inside the module is that the clear method happens last: if both enq and clear are asserted, the count is 0, not 1. The permissive schedule on the FIFO allows an enqueuing rule to execute after a clearing rule; if those rules are also keeping state relative to each other, then it will become out of sync with the FIFO state. I'm not opposed to accepting the current design (if the comment is improved to clarify the module's behaviors and where the schedule is more permissive) but I'd suggest tightening the schedule, if you're OK with that? If nothing else, you could insert uses of (Note that I've illustrated the scheduling that I think is important here (following the explicit schedule given for the import of
The |
|
If you're OK with these changes, I can push them to the PR (rather than you having to do it), since I've already made the changes locally. I can also add a test of the schedule to the testsuite. |
|
Those changes sound fine to me. Feel free to use what you have |
The VectorFIFOF module has a FIFOF interface for enqueuing and dequeuing data. It also provides a method, which returns a Vector of Maybe entries, to access all entries in the queue simultaneously.