[Libre-soc-bugs] [Bug 1155] O(n^2) multiplication REMAP mode(s)

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Dec 24 03:38:07 GMT 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1155

--- Comment #26 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #20)
> if all 4 options with zero or one axis selected are redundant, then we can
> save a bit and the encoding can be as follows:
> 
> 00 x + y
> 01 x + z
> 10 y + z
> 11 x + y + z
> 
> basically we remove the bit for z and set it to 1 if x or y are set,
> otherwise set z to 0 and x and y to 1.

this takes 1 nor gate, 1 not gate, and 2 or gates and saves 1 encoding bit -- I
think that's a good tradeoff:

 xi  yi
 |   |
 @---|-----+
 |   |     |
 |   @-----|----------+
 |   |     |          |
\-___-/    |          |
|     |    |          |
|     |    |          |
 \---/     |          |
   O       |          |
   |       |          |
   @-------|--- at ------|---+
   |       |   |      |   |
 \---/    \-___-/    \-___-/
  \ /     |     |    |     |
   O      |     |    |     |
   |       \---/      \---/
   |         |          |
   z         x          y

(In reply to Luke Kenneth Casson Leighton from comment #22)
> and complexify the encoding

i don't think it's enough to matter here since it can be expanded in parallel
with other parts such as checking the PO, thereby being unlikely to cause extra
latency, which is the part that matters -- total gate count is basically
unaffected and is secondary anyway.

(In reply to Jacob Lifshay from comment #19)
> we can take all the combinations that duplicate

I mostly meant just the 3 add-selection bits, i agree finding all possible
combinations is excessive, however I think not removing any redundancy when
it's easy to save a bit is excessive in the other direction.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list