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

WaitForLevel with Timeout, Add Signed Scoreboard #62

Merged
merged 12 commits into from
Jun 9, 2024

Conversation

klangthomas
Copy link
Contributor

@klangthomas klangthomas commented Jul 29, 2021

Came across an issue while writing a test for a FIFO. Testbench blocks because the FIFO is empty and I wait for a data available level.

Signed Scoreboard is implicitly available in Scoreboard_slv but we dont have to type cast ;)

klangthomas and others added 4 commits November 16, 2020 10:56
Similar to integer based scoreboard but better for
very large integers as integer is bounded to 32 bit
Comment on lines 2 to 12
-- File Name: ScoreBoardPkg_int.vhd
-- Design Unit Name: ScoreBoardPkg_int
-- Revision: STANDARD VERSION
--
-- Maintainer: Jim Lewis email: jim@synthworks.com
-- Contributor(s):
-- Jim Lewis email: jim@synthworks.com
--
--
-- Description:
-- Instance of Generic Package ScoreboardGenericPkg for integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the file header accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TbUtilPkg.vhd Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TbUtilPkg.vhd is overwritten by an older version (4 years old) of the file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like if I merge this it will remove the newer functionality from TbUtilPkg.vhd. How does this get handled?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klangthomas needs to either rebase his branch onto the latest main branch or merge the latest main branch into his branch. His modifications are 4 years old, and the proposed branch needs to be updated to the latest OSVVM release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I messed up, sorry. Will fix that maybe today. As I will no longer have access to this account by friday, I hope can manage this to merge correctly.

@JimLewis JimLewis changed the base branch from main to dev May 16, 2024 20:36
@klangthomas klangthomas requested a review from Paebbels May 22, 2024 11:01
@klangthomas
Copy link
Contributor Author

Messed up my commits here. Sorry about that!

@JimLewis
Copy link
Member

@Paebbels Looks good to me. Concur?

end if ;
end procedure WaitForLevelTimeout ;

procedure WaitForLevelTimeout ( signal A : in std_logic ; constant TimeOut : time; variable TimeOutReached : out boolean ; constant Polarity : std_logic := '1') is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call the parameter polarity, because an std_logic is not just 0 and 1. Especially as it checks for not 0 or not 1, which are 8 other values. The procedure is called WaitForLevel, so we should hand over the expected level. The existing WaitForLevel has already such a parameter.

I would prefer an overload with an additional timeout and timeoutReached parameter. WaitForBarrier is also overloaded.

@JimLewis JimLewis merged commit 096d7a3 into OSVVM:dev Jun 9, 2024
@JimLewis
Copy link
Member

I have updated your WaitForLevelTimeout as follows:

  procedure WaitForLevel ( signal A : in boolean;   constant TimeOut : time);
  procedure WaitForLevel ( signal A : in std_logic; constant TimeOut : time; constant Polarity : std_logic := '1');

  procedure WaitForLevel ( signal A : in boolean;   constant TimeOut : time; variable TimeOutReached : out boolean);
  procedure WaitForLevel ( signal A : in std_logic; constant TimeOut : time; variable TimeOutReached : out boolean; constant Polarity : std_logic := '1');
  alias WaitForLevelTimeOut is WaitForLevel [boolean, time, boolean] ;
  alias WaitForLevelTimeOut is WaitForLevel [std_logic, time, boolean, std_logic] ;

The aliases make it so your original naming will still work.

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

Successfully merging this pull request may close these issues.

None yet

3 participants