Conversation
|
As I mentioned on Gitter, combining the |
|
I think the Python 2.7 AppVeyor GHDL version is out of date. I had to get some GHDL bugs fixed for this package to work, so GHDL needs to be up to date. |
|
I do not mind merging the features into one packages as long as the documentation is updated accordingly. It would be easier to review your changes if the merge into a single package was first done without any changes and then the changes could be reviewed separately on top of the single packege. Now it just look like a new file was added and the old ones removed. |
Separate pkg and body; Add overloaded functions
71232ce to
d0b87a3
Compare
|
I rewrote the history to better show the changes. Commit 2afaa7a is the most significant one. That commit introduces all major changes. |
|
I am ok with the changes, I like that there is encapsulation of push and pop and that a record is used to protect from protocol mismatch in VC when new fields are added in the future. It just needs to pass Travis CI and the documentation needs to be updated. |
|
Yes, I plan to add tests. I just wanted to get some feedback before continuing. I'll mark it as a draft to make that clear. |
|
Well, never mind. It looks like you can't go from ready back to draft. At least not yet. I'll work on finishing this soon. |
| constant expected_last : in boolean := false; | ||
| constant msg : in string := ""); | ||
|
|
||
| -- Overload sync functions |
There was a problem hiding this comment.
I think you should provide as_sync functions to support that design pattern as well.
There was a problem hiding this comment.
What is the purpose of sync_handle_t? Right now it's just an alias for actor_t. Is it supposed to be a hook for future modifications? Right now, an actor function would be sufficient for sync_pkg as well, but I guess it's not quite as future proof. Is that the motivation?
There was a problem hiding this comment.
Yes, that is the motivation. We try to make our public interface somewhat future-proof to avoid breaking backwards compatibility.
| constant stream : in stream_slave_t; | ||
| constant delay : in delay_length); | ||
|
|
||
| -- Overload com funtions |
There was a problem hiding this comment.
I think you should provide helper function to get the actor form the handles such that all com functionality becomes available while not accessing private fields of the handles
There was a problem hiding this comment.
Yes, I agree. After our conversation in Gitter, I realized that it's a much more general solution than overloading, even if it's not quite as clean when writing code.
| end record; | ||
|
|
||
| -- Create a new stream master object | ||
| impure function new_stream_master |
There was a problem hiding this comment.
I've started to think about best practices for VC/VCIs and I think they will include:
- Allow the user to specify actor. This allows for greater control when integrating the VC
- Allow the user to specify a logger and create a local checker based on that. Again it's about greater control for the integrator
Have a look at AXI stream for examples
There was a problem hiding this comment.
Good idea about a logger. I'll add access to both in this interface.
| if msg_type = stream_pop_msg then | ||
| exit; | ||
| else | ||
| unexpected_msg_type(msg_type); |
There was a problem hiding this comment.
Use the local logger as the second parameter, see comment below
|
I haven't forgotten about this. There are two issues. One, I realized that I frequently (mis?)use stream_pkg as a way to push std_ulogic_vectors around without having to write or copy/paste a bunch of procedures. That actually covers a lot of use cases for me. However, the stream VCI ought to represent a generalized stream interface, not just be a collection of convenience procedures. I think my changes were more aimed at my own use cases. Maybe I can think of a new VC package that would cover my needs in that regard. Two, I want to see the outcome of #520 before I update further. |
Just because of this reason, I've been thinking about FIFO VCs. I think this is a quite common use case and I'd love to have some kind of quick reference describing the alternatives provided by VUnit. E.g.:
Note that:
@bradleyharden, @LarsAsplund, am I forgetting/misunderstanding anything here? Does the FIFO VC make sense to you as a sweet spot between users (mis?)using stream_pkg and 'being forced' to use AXI Stream?
If it sounds good to you, I'm all in with creating a FIFO VC.
Agree. |
See the first commit message for the major changes.
I haven't added any tests yet. But to be fair, the stream package never had any tests to begin with.