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 Check Function that returns TRUE when PASSED #32

Closed
SkydiverTricky opened this issue Feb 15, 2019 · 5 comments
Closed

Comments

@SkydiverTricky
Copy link

SkydiverTricky commented Feb 15, 2019

It would be useful to have a check function in the scoreboard that returns a boolean. This way you can easily connect a signal to the function to allow quick debugging on a waveform. I have the following current workaround:

err_cnt   := GetAlertCount(sboard.GetAlertLogID);
sboard.check(act);
missmatch <= (GetAlertCount(sboard.GetAlertLogID) /= err_cnt), false after 1 ns;

I think it would be easier to simply write:

missmatch <= sboard.check(act), false after 1 ns;

It would also allow a testbench to take user controlled action on a missmatch.

@JimLewis
Copy link
Member

JimLewis commented Feb 18, 2019

Ok. I will add this to my todo list.

If you are just trying to track when an error occurs, you might check out if your simulator supports displaying variables within a protected type. WIthin the scoreboard package, the error count is kept in the
variable ErrCntVar : IntegerArrayPointerType := new IntegerArrayType'(1 => 0) ;

Similarly, if you want to track the overall error count for all errors, the AlertLogPkg on the DEV branch has a variable to do this:
variable ErrorCount : integer := 0 ;
variable AlertCount : AlertCountType := (0, 0, 0) ;

With these you should be able to use your simulator's jump to change capability to find the error location in the wave window.

Note that ErrorCount and AlertCount were added specifically for this functionality. Note it is the the DEV branch and I missed adding the "Var" suffix that I normally have for the other PT body variables, so the name may change when it goes to the Main branch.

Note if this capability is a superset of what you wanted let me know.

@SkydiverTricky
Copy link
Author

Thanks
My code lives inside a AXI bus sink BFM/checker entity, which is intended for use by users who may not be familiar with OSVVM or more advanced simulator/VHDL behaviour (most users have never seen a protected type before, let alone used one), so having a missmatch signal directly available on the waveform may be more obvious to them.

@JimLewis
Copy link
Member

Not hard to do. Just tedious to add the additional tests to support the overloading.

@JimLewis JimLewis changed the title Add Check Function to Scoreboard Scoreboard: Add Check Function that returns TRUE when PASSED May 9, 2020
@JimLewis JimLewis self-assigned this May 9, 2020
@JimLewis JimLewis added Agreed Agreed upon solution enhancement labels May 9, 2020
@JimLewis
Copy link
Member

JimLewis commented May 9, 2020

Resolution:
Overload Check so that it returns boolean to indicate PASS/FAIL status of check

@JimLewis JimLewis added Released in Dev Branch and removed Agreed Agreed upon solution enhancement labels May 15, 2020
@JimLewis
Copy link
Member

Released in 2020.05

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

No branches or pull requests

2 participants