[Libre-soc-dev] we need two XLENs
programmerjake at gmail.com
Fri Sep 9 07:02:18 BST 2022
On Thu, Sep 8, 2022 at 10:54 PM Luke Kenneth Casson Leighton
<lkcl at lkcl.net> wrote:
> On Fri, Sep 9, 2022 at 2:49 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
> > imho it's a waay better idea to have the two variables, a post-analysis isn't sufficient because of things like combined fp arithmetic and fp format conversion, (e.g. fsqrt with srcelwid=64 and destelwid=f16) where rounding correctly requires fsqrt to know what the actual destination format is, if it just rounds to f64 and then rounds again to f16, it'll give the wrong result in some cases.
> risk is: DLEN/SLEN start to bleed into pseudocode making a mess
> and freaking out OPF ISA WG.
yeah, that is a problem...how about we have XLEN = max(SLEN,DLEN), and
the inputs are implicitly SLEN-sized and the outputs are implicitly
DLEN-sized and if anything more complex than truncating/zero-extending
from/to XLEN is needed then you have to write that explicitly.
> FP ops drop down to functions where what happens behind the
> scenes can be over-ridden. FPMUL32 in helpers.py.
not all of them do...e.g. fcpsgn doesn't
More information about the Libre-soc-dev