microwatt icon indicating copy to clipboard operation
microwatt copied to clipboard

Multiply corner case

Open LarsAsplund opened this issue 4 years ago • 3 comments

This PR adds a test configuration for the multiply pipeline depth corner case (depth = 1).

LarsAsplund avatar Jun 11 '21 21:06 LarsAsplund

Why is testing the multiplier code with depth=1 an interesting or useful thing to do?

Really the only reason for having the depth configurable is to give synthesizers more cycles to work with in case that can reduce resource usage or help to make timing. For particular tools and targets we replace the generic multiplier with code optimized for a specific platform, for example xilinx-mult.vhdl for the Artix-7, and that code has a non-configurable latency.

paulusmack avatar Jun 18 '21 09:06 paulusmack

@paulusmack The main reason was actually to show how coverage can be increased by letting VUnit configurations test over a range of different generic value. This was a good example since the code didn't support the full range supported by the natural typed depth generic. Rather than fixing the root cause I simply changed the type to positive and made sure that the new corner case worked. This gives us more confidence that anyone trying to change the pipeline depth will be successful in doing so.

LarsAsplund avatar Jun 21 '21 20:06 LarsAsplund

@LarsAsplund can you please rebase so it's easier to see the enhancements in this PR?

umarcor avatar Jul 21 '21 21:07 umarcor

The multiplier stuff is all quite different now, and this hasn't been updated in over two years, so I'm closing it.

paulusmack avatar Sep 19 '23 06:09 paulusmack