Implementing a multiplier in 32 bit mips processor the result is 64 bits

Discussion in 'Programmer's Corner' started by sryzdn, Oct 22, 2017.

  1. sryzdn

    Thread Starter New Member

    Jun 1, 2014
    Hello all,

    I am designing a 32-bit mips process and I am now in the ALU part. I want to have a multiplier as one of the functions of the ALU, but it is obvious that the output of the multiplier is 64 bit.

    Does it mean tat I have to extend all my buses and ports to 64-bits, just because of this multiplier?

    I have enclosed the picture of the mips architecture.

  2. OBW0549

    Distinguished Member

    Mar 2, 2015
    No, you just split the result into two 32-bit words.
  3. AlbertHall

    AAC Fanatic!

    Jun 4, 2014
    Below is the description of the 8 bit PIC18F multiply instructions which do that split to handle the 16 bit product.
  4. WBahn


    Mar 31, 2012
    No, you just have two 32-bit pieces that get stored in two of the available 32-bit registers. But you do need to decide where you are going to park the results for all possible variations of the command, which leads to some design decisions. Do you want to be able to multiply the 32-bit value in any register by the 32-bit value in any other register? If so, where will your results go? Or do you want to require that the user load the 32-bits to be multiplied into two specific 32-bit registers, thus giving you the option of designing the hardware so that the results always go back into those same two 32-bit registers.

    You might look at how other processors handle this; you will likely discover that different processors make very different design choices. So you might see if you can learn the pros and cons of some of those alternatives and use that to guide your own efforts.