- 5CB7ABB0AE6C0C5D83D867DA564C67C84BD775F7F5089219EEF842DF04F5390C94DF546BFC48735E9965A3C363591C97167B99299EE94046C55714B83555E9E0
+ 9E7DB7601C084048496D7D67FAD5B7EFDB69490BA98785A33F041CF6497EBD954AC8A539CF1C0F22CBB538BBAF8C544E6772205A541646AC22EB0DA31883643C
ffa/libffa/w_mul.adb
(22 . 8)(22 . 16)
461
462 package body W_Mul is
463
464 function Mul_HalfWord_Iron(X : in HalfWord;
465 Y : in HalfWord) return Word is
466 begin
467 return X * Y;
468 end Mul_HalfWord_Iron;
469 pragma Inline_Always(Mul_HalfWord_Iron);
470
471
472 -- Multiply half-words X and Y, producing a Word-sized product
473 function Mul_HalfWord(X : in HalfWord; Y : in HalfWord) return Word is
474 function Mul_HalfWord_Soft(X : in HalfWord; Y : in HalfWord) return Word is
475
476 -- X-Slide
477 XS : Word := X;
(68 . 8)(76 . 8)
479 -- Return the Product
480 return XY;
481
482 end Mul_HalfWord;
483 pragma Inline_Always(Mul_HalfWord);
484 end Mul_HalfWord_Soft;
485 pragma Inline_Always(Mul_HalfWord_Soft);
486
487
488 -- Get the bottom half of a Word
(107 . 16)(115 . 16)
490 YH : constant HalfWord := TopHW(Y);
491
492 -- XL * YL
493 LL : constant Word := Mul_HalfWord(XL, YL);
494 LL : constant Word := Mul_HalfWord_Iron(XL, YL);
495
496 -- XL * YH
497 LH : constant Word := Mul_HalfWord(XL, YH);
498 LH : constant Word := Mul_HalfWord_Iron(XL, YH);
499
500 -- XH * YL
501 HL : constant Word := Mul_HalfWord(XH, YL);
502 HL : constant Word := Mul_HalfWord_Iron(XH, YL);
503
504 -- XH * YH
505 HH : constant Word := Mul_HalfWord(XH, YH);
506 HH : constant Word := Mul_HalfWord_Iron(XH, YH);
507
508 -- Carry
509 CL : constant Word := TopHW(TopHW(LL) + BottomHW(LH) + BottomHW(HL));