[Libre-soc-dev] we need two XLENs

Luke Kenneth Casson Leighton lkcl at lkcl.net
Sat Sep 10 12:54:30 BST 2022


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68

On Fri, Sep 9, 2022 at 3:57 PM Richard Wilbur <richard.wilbur at gmail.com> wrote:

> The infamous double round?

not a problem: as i said, the function which implements the
FP operation is hidden and may perform the necessary
rounding without poisoning the specification pseudocode.

please see the pseudocode
https://libre-soc.org/openpower/isa/fparith/

A-Form

   fadds FRT,FRA,FRB (Rc=0)
    fadds. FRT,FRA,FRB (Rc=1)

Pseudo-code:

    FRT <- FPADD32(FRA, FRB)

this is first redefined to FPADDHALF and it is the function FPADDHALF
that becomes directly responsible for performing the correct and required
rounding *BEHIND THE SCENES*.

we absolutely cannot have

  IF XLEN==64 then do one thing
  ELSE IF XLEN == 32 then do something else
  ELSE IF OTHER BULLSHIT

the ISA WG will freak out.  *hiding* the overridden meanings
behind functions on the other hand will keep simplicity for
Scalar implementors especially those not in the least bit
interested in XLEN.

l.



More information about the Libre-soc-dev mailing list