Skip to content

Ensure loop does not go forever in RNG#461

Open
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
pat-rogers:rng_polling_pr
Open

Ensure loop does not go forever in RNG#461
pat-rogers wants to merge 1 commit intoAdaCore:masterfrom
pat-rogers:rng_polling_pr

Conversation

@pat-rogers
Copy link
Copy Markdown
Contributor

@pat-rogers pat-rogers commented Mar 28, 2026

the loop that checks for data ready is otherwise potentially infinite. not seen in practice, but no need to allow it.

@pat-rogers pat-rogers changed the title Ensure loop does not go forever Ensure loop does not go forever in RNG Mar 28, 2026
Comment on lines +62 to +65
Max_Attempts : constant := 1000;
-- The above is arbitrary. It needs to be long enough that normal
-- behavior will not be flagged. Longer than that is fine. The point
-- is to not hang forever.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

According to the documentation the RNG is guaranteed to be filled every 40 RNG clock cycles. Do we have an idea of how many iterations we could do within these 40 clock cycles?

@pat-rogers
Copy link
Copy Markdown
Contributor Author

pat-rogers commented Apr 14, 2026 via email

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.

2 participants