Hi David,
>>>>> On Tue, 28 Mar 2017 08:23:07 -0700 (PDT), David Horner <
ds2h...@gmail.com> said:
| Considering logarithmic number system encoding raised for me the extent of the
| "lesser precision" encoding guarantee.
| Given that transforming the internal representation back to IEEE format is very
| expensive, using the "store single in double" afforded a means to NaN wrapper
| it.
The real problem with the NaN wrapper scheme was not knowing whether
the value was a NaN-double or a wrapped-single until first use, and
there being nothing to stop software doing something different on
second use (e.g., FLD x; FADD.S z,x,y; FADD.D w,x,z).
| And given that a RISCV design intent is to support novel and experimental
| implementation, I was quite interested to see how this would play out.
| Not as well for LNS it seems, but fortunately RISCV is open to non-standard
| extensions that can accommodate.
The proposed encoding scheme still has the property that a sequence of
pure transfer instructions of at least the desired width must preserve
the original bit pattern, so LNS numbers can be loaded/stored/FMV-ed
etc without corruption. Similarly, any <=FLEN-bit wide value can be
losslessly encoded/decoded using the same logic that a regular FP
load/store uses, so LNS operations are also supportable in the
microarchitecture albeit it not that efficiently.
This does show how using internal recoding works against using
existing load/store/transfer instructions on FP registers when holding
other datatypes - but I'd argue choosing IEEE memory representation
internally biases against floating-point types. I trace the problem
to the decision in the standard to not handle gradual underflow by
using variable-position rounding but instead the subnormal encoding we
have now.
Other extensions can always define additional architectural registers,
which can share the physical rename pool with FP registers (e.g., BOOM
shares one pool of physical registers between int and fp regs). With
appropriate config/disable instructions, even the "architecturally
committed" set of physical registers can be freed.
The vector extension gets around these issues by being explicit about
the type held, and would be where I'd assume most novel data types get
implemented, with FP scalar arguments coming from f registers and
other "arbitrary/uninterpreted-bit-pattern" scalar arguments coming
from x registers.
| With the "precision folding" and redefinition of the float operations to relax
| (and define) "mixed operations" there is no need for precision tracking, and no
| illegal behaviour.
| It may still be desirable to warn when "mixed operations" occur, but the
| motivation is lessened for RISCV hardware targets.
| Implementation of such warning shifts to compiler (et al) and debug support.
| As with LNS, this decision is not ideal for all possibilities, but it is now
| internally consistent and practical.
| Even more so, this development process worked to discover and reconcile
| disparate views.
| I expect that the two prevalent worldviews apparent in these discussions "ISA
| formalizing a conceptual model" and "ISA defining machine operation" were
| bridged mostly without a conscious awareness, and in some cases not yet
| satisfactorily.
| I appreciate being able to be a part of this process, and anticipate
| involvement in the document revision.
Thanks for all your help!
Krste
| On Tuesday, 28 March 2017 07:57:30 UTC-4, krste wrote:
| Adding list back (my mistake).
| The recoded format uses an extra exponent bit internally, so all
| representable numbers are stored normalized.
| But this is never visible externally.
| Krste
| 1c61b431-d755-48a7-be27-9bd45b465a81%
40groups.riscv.org.