rohd icon indicating copy to clipboard operation
rohd copied to clipboard

SimpleClockGenerator doesnt work with period of 1

Open awmoore-intel opened this issue 9 months ago • 1 comments

Describe the bug

Listening on a posedge of the clock when clock period is 1 loops forever but never advances time. I'm thinking 1 is not allowed? Perhaps throw an error.

Code and output in the picture. Image

To Reproduce

No response

Expected behavior

No response

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml


Additional: Context

No response

awmoore-intel avatar Feb 25 '25 12:02 awmoore-intel

Good catch, thanks!

We should probably document the behavior more clearly here and decide more explicitly what to do for 1, odd numbers in general, and definitely illegal numbers (0, negative), with exceptions thrown for any not supported.

mkorbel1 avatar Feb 25 '25 17:02 mkorbel1