TheRekz 0 Newbie Poster

I am asked to add a madd(multiply and add) instruction to the standard single cycle datapath. I am quite confused on how to achieve this... any idea? Below is the description..

Description:
The 32-bit word value in GPR rs is multiplied by the 32-bit word value in GPR rt, treating both operands as signed
values, to produce a 64-bit result. The product is added to the 64-bit concatenated values of HI and LO.. The most significant
32 bits of the result are written into HI and the least signficant 32 bits are written into LO. No arithmetic
exception occurs under any circumstances.

I know that I first must multiply the two value in the register, but then should I have another ALU in order for me to add it to the HI and LO register? Also I only have a 32 bit ALU and the result of the multiplication is 64.. so how do I deal with this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.