rohd
rohd copied to clipboard
SimpleClockGenerator doesnt work with period of 1
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.
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
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.