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
    27
    0
    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.

    upload_2017-10-22_6-49-21.png
     
  2. OBW0549

    Distinguished Member

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

    AAC Fanatic!

    Jun 4, 2014
    8,060
    1,991
    Below is the description of the 8 bit PIC18F multiply instructions which do that split to handle the 16 bit product.
    upload_2017-10-22_16-3-36.png
     
  4. WBahn

    Moderator

    Mar 31, 2012
    24,454
    7,653
    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.
     
Loading...