Skip to content

Fixed random clock period generation #105

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RiceShelley
Copy link
Contributor

Issue:
When randomly generating clock periods old implementation would on occasion select a clock period that could not be represented by the resolution of the simulator causing the test to fail.

Fix:
Use Decimal class and strings to generate a random number with only N decimal places.

@RiceShelley RiceShelley force-pushed the rice/cocotb_random_clk_period_generation branch from 40b3229 to 9bf46e1 Compare July 21, 2025 20:10
@RiceShelley RiceShelley force-pushed the rice/cocotb_random_clk_period_generation branch from 9bf46e1 to 2aa04e0 Compare July 21, 2025 20:12
@RiceShelley RiceShelley requested review from gadfort and aolofsson July 21, 2025 20:35
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.

1 participant