[Libre-soc-bugs] [Bug 324] create POWER9 DIV pipeline

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Jun 19 21:22:46 BST 2020


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

--- Comment #30 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #28)
> > only the functions in the operator module work this way.  the above is not
> > how python works.  or, if it is, it's literally the first time i've heard
> > about it in 20 years!
> 
> no, what I posted is exactly how python works, assuming the trunc_div
> function which you copied to soc.git earlier today is in scope (apparently
> that wasn't obvious):

not at all :)  i simply committed it and moved rapidly on with the focus on the
parser and pywriter :)

thank you for pointing it out: i'm with you now.

> https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/decoder/helpers.py;
> h=ef6610e5c89d7d0e0316c216bf51faf8486f46df;hb=HEAD#l13
> 
> 
> result from python repl:
> 
> ...
> >>> trunc_div(MyClass(), 123)
> trunc_div: MyClass / 123
> 0
> >>> trunc_div(MyClass(), MyClass())
> trunc_div: MyClass / MyClass
> 0
> >>> trunc_div(456, MyClass())
> rtrunc_div: 456 / MyClass
> 0
> >>>

ok.  right.  so this would be merging some of the functionality and
responsibility
of the (future-needed) class i mentioned (something like
Power9SimpleVSelectableInt)
with something that's inspired by how operator.{xxx} work.

at the moment the functions are called from parser.py, they're assumed to be
SelectableInts(), those SelectableInts are assumed to function as integers
not as Power9SimpleVCompatibleSelectableInt.

we do very much need to move this on very quickly.  can we leave the discussion
of future work related to SimpleV for another time?

unless you can see a way in which not having a Power9CompatibleSelectableInt
class would be a major blocker to achieving the (extremely close) Oct 2020
tapeout deadline?

for example, overflow exceptions.  actually, even there, i see no reason why we
should
need a special Power9CompatibleSelectableInt for that: it should be possible to
simply 
catch the exception and drop a flag into the SelectableInt.

decoder/isa/caller.py could watch for that and set the overflow bits in XER if
it was required to do so.

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


More information about the libre-soc-bugs mailing list