Open marek-bauer opened 1 year ago
Integrating this functionality into the core might be nontrivial! And here is why.
If I understand the MulUnit
correctly, it already is capable of wide multiplication, but it isn't able to store both the low and high word of the same operation - as the FU interface doesn't allow this.
One might think that some support might be "hacked" into the MulUnit
, for example by remembering the previous operation, and not repeating the calculation when two fusible instructions enter the unit in sequence. But this is fragile, as the core is out-of-order and the fusible instructions might not be issued to the multiplication unit in the same order they were in the code.
According to RISC-V documentation:
Good idea would be to implement this optimization in our
mul_unit.py
. It should be a quite easy task good for getting familiar with Amaranth.