The Multiply Unit (MLU) executes multiplication operations: MUL, MULH, MULHSU and MULHU.
Inputs to the MLU are instructions from the Dispatch Unit or data reads from the Register File. The single MLU in the Kelvin core can service instructions from any of the four instruction lanes, but only one command is dispatched in any cycle.
Outputs of the MLU are writes to the Register file.
Figure 1 shows the inputs and outputs to and from the MLU.
Figure 1: Mlu interfaces
Note: There are 4 instances of each of these signals (one for each instruction lane).
Signal Name | Type | Description |
---|---|---|
req.valid | Bool | If the command if valid. |
req.op | The function to execute. | |
req.addr | UInt(5) | The RegFile address to write the result to. |
req.ready | Bool (output) | If the command is accepted. Used in a ready-valid hand-shake. |
rs1.valid | Bool | If there is a valid rs1 read this cycle. Only used for assertions. |
rs1.data | UInt(32) | The rs1 data read from the RegFile. |
rs2.valid | Bool | If there is a valid rs1 read this cycle. Only used for assertions. |
rs2.data | UInt(32) | The rs2 data read from the RegFile. |
Signal Name | Type | Description |
---|---|---|
rd.valid | Bool | If the command if valid. |
rd.addr | UInt(5) | The RegFile address to write the result to. |
rd.data | UInt(32) | The computation result to write to RegFile. |
rd.ready | Bool | If the write result is accepted by the RegFile. Used in a ready-valid hand-shake. |
The MLU is a three stage pipeline, with the following stages:
A waveform showing a typical interaction with the waveform can be found in Figure 2:
Figure 2: Mlu waveform.