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

Scoreboard: Add Default value to flush, or add new flush procedure to empty scoreboard #33

Closed
SkydiverTricky opened this issue Feb 19, 2019 · 2 comments

Comments

@SkydiverTricky
Copy link

SkydiverTricky commented Feb 19, 2019

I would like to empty all expected data from a scoreboard. For example, when a reset occurs in the middle of a test, it might be appropriate to just empty all queues in the scoreboard and start again.

I previously used this, but it is not appropriate because it destroys all the configured IDs and any other config:

queue_reset_proc : process(axi_reset)
  begin
    if axi_reset = '1' then
      sboard.Deallocate;
      sboard.Initialize;
    end if;
  end process;

You could use the following, but using the flush procedure seems more appropriate:

queue_reset_proc : process(axi_reset)
    variable dump    : axi_if'subtype;
  begin
    if axi_reset = '1' then
      while not sboard.empty loop
        dump  := sboard.pop;
      end loop;
    end if;
  end process;

@JimLewis
Copy link
Member

Have you tried:
sboard.Flush(sboard.GetItemCount) ;

Easy to add, but given the above, do you still want it? Indexed scoreboards keep their own item count, so those would also be simple. Tagged scoreboards probably require a little more work and may warrant the overloading.

@SkydiverTricky
Copy link
Author

Makes sense. Ill get this closed.

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