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

Add peek functionality to the queue_pkg #812

Open
dalex78 opened this issue Apr 17, 2022 · 2 comments
Open

Add peek functionality to the queue_pkg #812

dalex78 opened this issue Apr 17, 2022 · 2 comments

Comments

@dalex78
Copy link
Contributor

dalex78 commented Apr 17, 2022

Objective:
Add a peek functionality to the queue_pkg: returns the element at the front the queue. It does not deletes the element in the queue (contrary to the already existing pop command).

Rational:
I intend to use this feature to improve the AXI(L) verification components (I understand from issue #726 that the development of VC is in stand-by, any news regarding that ?).

What has been done:

  • The peek functionality has been implemented here: peek_functionality
  • I have launched the following tests on Modelsim (Interl FPGA Starter Edition 2020.1): all run.py inside the vunit/vhdl architecture:

Remaining work: (if this feature is wanted/accepted by the community)

  • Launch all tests with tox on modelsim (currently doing that),
  • Test with other simulators,
  • Update the documentation

Additional remarks:

  • I think the codec_builder_pkg and queue_pkg files deserve a little bit of cleanup: more documentation, removing hard-coded values, etc (without breaking compatibility). I can work on that before doing a pull request, or it could be done at a later time.

This is my first (code) contribution, don't hesitate to give feedback.

@LarsAsplund
Copy link
Collaborator

Agree that a peek is useful. I thought about if when fixing #642. Note that we have something similar in com (

elsif run("Test peeking at messages in a mailbox") then
)

You're right, the facelift of all VCs has been on hold for a while. The last time I worked on it I presented the standard rules in the Gitter channel and the feedback was such that we can proceed. There is one thing that I will revisit and maybe do a bit differently. This is also a backward compatibility breaking update so it we need to be a bit more careful when deciding on when to introduce it.

I suggest you go ahead and make a PR of peek for queues.

@dalex78
Copy link
Contributor Author

dalex78 commented Apr 17, 2022

Corresponding PR: #814

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants