intel / rohd

The Rapid Open Hardware Development (ROHD) framework is a framework for describing and verifying hardware in the Dart programming language.
https://intel.github.io/rohd-website
BSD 3-Clause "New" or "Revised" License
374 stars 67 forks source link

LogicValue division with negative numbers doesn't work as expected #411

Closed mkorbel1 closed 1 year ago

mkorbel1 commented 1 year ago

Describe the bug

It appears that doing division on LogicValues with numbers that may be interpreted as negative can give unexpected and incorrect results.

See https://github.com/intel/rohd/pull/319/files#r1325020368

To Reproduce

8 / -2 should be -4, but it is 0.

Expected behavior

No response

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml

No response

Additional: Context

No response

mkorbel1 commented 1 year ago

Fixed in #319