OpenCores
Issue List
Wrong Mult Product #162
Closed firefalcon opened this issue almost 13 years ago
firefalcon commented almost 13 years ago

When performing signed multiplication, the result according to the specification is truncated from 64 (possible) to 32 bits. The overflow flag in SR is set when the sign of the result (32-bit version)is incorrect. The OR1200 currently truncates to 32-bits then performs sign correction on the result while still throwing the overflow flag.

jeremybennett commented almost 13 years ago
<p> Hi Matthew </p> <p> Just to confirm. This is a bug in the RTL? What does Or1ksim do? </p> <p> Jeremy </p> <p> -- <br /> Tel: +44 (1590) 610184<br /> Cell: +44 (7970) 676050<br /> SkypeID: jeremybennett<br /> Email: <a href="mailto:jeremy.bennett@embecosm.com">jeremy.bennett@embecosm.com</a><br /> Web: <a href="http://www.embecosm.com">www.embecosm.com</a> </p>
firefalcon commented almost 13 years ago

I thought it was this line in the RTL: result = a31 ^ b31 ? ~mul_prod_r31:0 + 32'd1 : mul_prod_r31:0;

but new Software tests show that the result is correct. After looking at how the data flows though the mult_mac file, it appears that the signs are being converted multiple times. I think this is just a redundancy issue that stekern will fix when he does his review of the file.

jeremybennett commented almost 13 years ago
<p> Transferred to OpenRISC bugzilla (<a href="http://bugzilla.opencores.org/show_bug.cgi?id=39">Bug 39</a>). </p> <p> Marking closed in this bugtracker. </p>
marcus.erlandsson was assigned almost 13 years ago
jeremybennett closed this almost 13 years ago

Assignee
marcus.erlandsson
Labels
Bug