[Oberon] Bug in multiplier?

Hellwig Geisse hellwig.geisse at mni.thm.de
Sun Mar 4 10:13:10 CET 2018

Hi all,

I'm trying to understand the RISC5 implementation and
stumbled over a corner case in unsigned multiplication.
What exactly is "Multiplier.v" supposed to compute in
case u=1 in the instruction (i.e., u=0 in Multiplier.v,
because of ".u(~u)" in the instantiation of the module)?

In NW's "The Design of a RISC Architecture and its
implementation with an FPGA" (revision 1.9.2015) I read
"..., and the MUL instruction with u set to 1 considers
the operands as unsigned numbers, yielding a 64-bit
unsigned product". So (1 << 31)*(1 << 31) should give
a result of (1 << 62). But when I feed the multiplier's
x and y inputs both with 0x80000000, the result is
0xC000000000000000 instead of 0x4000000000000000, at
least in my simulation of the module.

Am I missing something?


More information about the Oberon mailing list