intel / rohd-hcl

A hardware component library developed with ROHD.
https://pub.dev/packages/rohd_hcl
BSD 3-Clause "New" or "Revised" License
81 stars 23 forks source link

Multi-cycle divider improvements #139

Open desmonddak opened 1 week ago

desmonddak commented 1 week ago

Motivation

Some of the computations are using 2's complement where a 1's complement (inversion) based approach may be more efficient. This should be explored to see if you can save all those carry operations.

More corner cases for the divider would be good to have in the test suite. A test using a narrow divider might cover all corners. We could enhance the MultCycleDividerState to be an enum and perhaps use the ROHD-HCL FSM construct.

Desired solution

Create a narrow divider and see if we can cover all corners. If not, create a list of corner cases and cover them with short tests.

Try converting computations to use 1's complement and avoid the carries.

Alternatives considered

No response

Additional details

No response