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

Fixes for LogicValue operation bugs related to size, sign, math, and comparison #319

Closed ganewto closed 1 year ago

ganewto commented 1 year ago

Description & Motivation

Adds two tests for wide bitvector comparisons. Adds a fix for one of them. The remaining problem is that shifting a 1 into the signed position and then converting to bigint results in a negative number regardless.

Related Issue(s)

Fix #299

Testing

Created two tests that do comparisons. One just breaks the length check. The other puts a 1 in the sign location just before conversion to BigInt (the fix for the first).

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

The change is in the core logic comparison operation so more tests may be needed.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No

quekyj commented 1 year ago

Maybe update your Related Issue to verb Fix to allow auto close of issue 299 once the pull request being merged.

E.g.

Related issue(s)

Fix #299

ganewto commented 1 year ago

I made a one-line change that fixes the original test. I haven't made tests for the other observations on the 64-bit boundary,