RV32I/RV64I is small enough for FPGA designs. :-)
For most scalar FPGA soft processors, reducing the register file depth from 32 to 16 entries saves nothing. In modern FPGAs, the min depth of LUT RAM is 32 entries (Xilinx RAM32M16, Altera MLAB, for example), and the various block RAMs are much deeper still.
But consider an area optimized design with a (multicycle) reduced width datapath. An 8b implementation might keep its 16 32b registers in a (single LUT delay) 64x8b LUT-RAM (e.g. Xilinx RAM64M8).
Multithreading? A 2-threaded RV32E core could fit both hart’s register contexts in a 32-entry LUT RAM; and 64 (vs. 32) contexts might fit in a 1Kx32b BRAM.
A 16-entry reg file could reduce the complexity of register metadata for microarchitectures that track things about registers. But then again these cores are not usually so area-constrained.
In summary, a 16 register ISA variant might have some utility, but let us not advance it on the basis of FPGA soft processor frugality or enablement.
(A hypothetical RV16 (XLEN=16) is another matter.)
Cheers,
Jan Gray | Gray Research LLC | Bellevue, WA
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit
https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/346a7770-9c76-442d-b1cb-11715cd8d5b4%40groups.riscv.org.
Hi Jan,
I guess, my question is: How about an extension that uses only “compressed” instructions?
In detail:
I agree that reducing the register file depth from 32 to 16 is not of much use for FPGAs. I tried to say the same thing in my initial post.
However, what are the use cases for a reduced register file depth? For ASICs? How much cost savings due to a reduced area could you have in relation to chip packaging, verification, ...? My uneducated guess is: not much. If this is wrong, please correct me. If this is true, why would the community develop and maintain compiler support for 16 registers? What is the purpose of RV32E (embedded)?
IMHO, a reduced number of registers has another advantage: With 16 registers, it is easier to design a 16bit “compressed only” ISA based on the C extension.
Regarding FPGAs:
Due to the FPGA overhead, the costs for resources/area are much higher than for ASIC. There are a lot of use cases, where a softcore with a 16 bit ISA is sufficient. However, there is a lot of fragmentation. There is no 16bit ISA softcore with a large community behind it.
> (A hypothetical RV16 (XLEN=16) is another matter.)
Does it have to be another matter? If RV32E was “compressed-only”, RV16 could be binary-code compatible.
Best regards,
Lars
Hi Jan,
I guess, my question is: How about an extension that uses only “compressed” instructions?
In detail:
I agree that reducing the register file depth from 32 to 16 is not of much use for FPGAs. I tried to say the same thing in my initial post.
However, what are the use cases for a reduced register file depth? For ASICs? How much cost savings due to a reduced area could you have in relation to chip packaging, verification, ...? My uneducated guess is: not much. If this is wrong, please correct me. If this is true, why would the community develop and maintain compiler support for 16 registers? What is the purpose of RV32E (embedded)?
IMHO, a reduced number of registers has another advantage: With 16 registers, it is easier to design a 16bit “compressed only” ISA based on the C extension.
Regarding FPGAs:
Due to the FPGA overhead, the costs for resources/area are much higher than for ASIC. There are a lot of use cases, where a softcore with a 16 bit ISA is sufficient. However, there is a lot of fragmentation. There is no 16bit ISA softcore with a large community behind it.
> (A hypothetical RV16 (XLEN=16) is another matter.)
Does it have to be another matter? If RV32E was “compressed-only”, RV16 could be binary-code compatible.
Best regards,
Lars
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/8528b6de-890b-4cd0-be0a-c3cbdc147184%40groups.riscv.org.
Hi,IMHO, RV32I is small enough for ASIC designs. Reduced number of registers provides not much benefits for ASIC designs. RV32E could prove useful for FPGAs. Here, registers could be implemented in block ram. Required is a "compressed only; 16bit-only" instruction set with compiler support. This might or might not go hand in hand with a reduced number of registers in order to enable reduced bit widths of instructions. The "compressed only" instruction set might consist of current C instructions. An option with 16bit data bus should provide the same results as 32 bit data bus with 16bit data types. In particular, the binary code of the compiler should be identical.
Thanks @all for the information and feedback. There is some critique in this post. So I want to say beforehand that I appreciate the work that people spent on the ISA. The RV32I and 64 standards are good things to have. A motivational small talk for FPGAs is at the end of this post.
I wonder, if RV32E could bring benefits to FPGA softcores in comparison to RV32I. Yet, I don’t know the impact of the reduced register file depth.
Calling RV32E in its current form “a reduced version of RV32I designed for embedded systems” (quote from spec) is misleading and wrong from the perspective of a typical embedded engineer:
. Merely reducing the number of registers from 32 to 16 has no significant benefit for typical SoCs (as I mentioned before).
. It has no benefit for the growing number of FPGA designs with soft core (if registers are implemented in some sort of RAM).
. No improvement of RV32E regarding code size, on the contrary.
Currently, RV32E is not RV32 for embedded. RV32E is RV32 for ASIC. The difference is that today, “embedded” is much more than “a-single-Flipflop-costs-alot-ASIC”. 8Bit-MCU development is a niche already.
IHMO, the open source RISC-V organization should/could have an official stance on softcores: Should softcores use RV32I and nothing more optimized for softcores is planed or will ever be accepted? In terms of standard, this is still much better than what we had before. Surly, (size-optimized) softcores should not use the current RV32Embedded.
Limitation sounds like a bad thing, but having RV32E as well as RV32EC, is fragmentation. Another option or another extension would already be a third version. Can RISC-V do better?
I understand that the C extension was not meant to be used standalone. IMHO, some 16-bit dominated instruction set should be based on the frozen C extension.
Ideas:
a. Make the C extension mandatory for RV32E
b1. Reduce the number of 32bit instructions for RV32E
b2. Could be ok to replace one 32bit instruction with two 16bit instructions?
b3. Add instructions to RV32E that extent the C extension
c. Could there be a RV16 (XLEN=16) that has only a few 32bit instructions?
d. Only allow 16 bit instructions in RV32E
Motivation small talk:
Today, FPGAs are more useful for open-source, security, small business than ASICs. The number of FPGA designs with CPU will always be larger than those of ASIC designs. My guess is that this ratio is growing in favor of FPGAs.
The silicon is getting cheaper and silicon verification needs to be done only once per FPGA, not per design. However, the overhead due to the additional FPGA layer is large. This overhead will be less relevant in the future but is still an issue today in terms of cost. Many applications do not need 32 bit.
Best regards,
Lars
Thanks @all for the information and feedback. There is some critique in this post. So I want to say beforehand that I appreciate the work that people spent on the ISA. The RV32I and 64 standards are good things to have. A motivational small talk for FPGAs is at the end of this post.
I wonder, if RV32E could bring benefits to FPGA softcores in comparison to RV32I. Yet, I don’t know the impact of the reduced register file depth.
Calling RV32E in its current form “a reduced version of RV32I designed for embedded systems” (quote from spec) is misleading and wrong from the perspective of a typical embedded engineer:
. Merely reducing the number of registers from 32 to 16 has no significant benefit for typical SoCs (as I mentioned before).
. It has no benefit for the growing number of FPGA designs with soft core (if registers are implemented in some sort of RAM).
. No improvement of RV32E regarding code size, on the contrary.
Currently, RV32E is not RV32 for embedded. RV32E is RV32 for ASIC. The difference is that today, “embedded” is much more than “a-single-Flipflop-costs-alot-ASIC”. 8Bit-MCU development is a niche already.
IHMO, the open source RISC-V organization should/could have an official stance on softcores: Should softcores use RV32I and nothing more optimized for softcores is planed or will ever be accepted? In terms of standard, this is still much better than what we had before. Surly, (size-optimized) softcores should not use the current RV32Embedded.
Limitation sounds like a bad thing, but having RV32E as well as RV32EC, is fragmentation. Another option or another extension would already be a third version. Can RISC-V do better?
I understand that the C extension was not meant to be used standalone. IMHO, some 16-bit dominated instruction set should be based on the frozen C extension.
Ideas:
a. Make the C extension mandatory for RV32E
b1. Reduce the number of 32bit instructions for RV32E
b2. Could be ok to replace one 32bit instruction with two 16bit instructions?
b3. Add instructions to RV32E that extent the C extension
c. Could there be a RV16 (XLEN=16) that has only a few 32bit instructions?
d. Only allow 16 bit instructions in RV32E
Motivation small talk:
Today, FPGAs are more useful for open-source, security, small business than ASICs. The number of FPGA designs with CPU will always be larger than those of ASIC designs. My guess is that this ratio is growing in favor of FPGAs.
The silicon is getting cheaper and silicon verification needs to be done only once per FPGA, not per design. However, the overhead due to the additional FPGA layer is large. This overhead will be less relevant in the future but is still an issue today in terms of cost. Many applications do not need 32 bit.
Best regards,
Lars
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/61b5da49-2c61-46ac-ad77-40ca0e6e0762%40groups.riscv.org.
Thanks @all for the information and feedback. There is some critique in this post. So I want to say beforehand that I appreciate the work that people spent on the ISA.
Limitation sounds like a bad thing, but having RV32E as well as RV32EC, is fragmentation. Another option or another extension would already be a third version. Can RISC-V do better?
In my experience, this observation is very often true, but not always so. In a simpler world, RV32E would not exist, but it does because there is actual demand for it.
so looking at the "fragmentation" in the "embedded" arena, this is *very deliberate* and *by design*. it allows implementors to cherry-pick features that will make-or-break profitability (or even whether the product can do the job at all, such as fitting into a cost-competitive FPGA).
On Wednesday, July 17, 2019 at 9:50:21 AM UTC+2, andrew wrote:In my experience, this observation is very often true, but not always so. In a simpler world, RV32E would not exist, but it does because there is actual demand for it.I appreciate that profiteers of a reduced register file depth have the resources to drive the RISC-V standard forward. Nothing wrong with that. It is also fine to leave RV32E as it is in order to provide the flexibility that those use cases might need. But if so, let's not call this the "embedded version." At least, it fooled me.
On Wednesday, July 17, 2019 at 10:03:15 AM UTC+2, lkcl wrote:so looking at the "fragmentation" in the "embedded" arena, this is *very deliberate* and *by design*. it allows implementors to cherry-pick features that will make-or-break profitability (or even whether the product can do the job at all, such as fitting into a cost-competitive FPGA).There is already too much cherry-pick. There are a lot of cores without license fee that can be used for ASIC and FPGA. In contrast, RISC-V is a standard and has a big community. There is no point in having a core so specialized that you need to maintain all the required environment yourself. You can already have that w/o RISC-V. Contributers have no interest in having their preferred version slowly die off due to a lack of compatibility or due to a lack of interest by the community (all the small contributions, in particular compiler). At least one of the two is required.Best regards,Lars
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/d6aa3995-29dc-4c7a-8305-906eb6bbc53d%40groups.riscv.org.
On Wednesday, July 17, 2019 at 9:50:21 AM UTC+2, andrew wrote:In my experience, this observation is very often true, but not always so. In a simpler world, RV32E would not exist, but it does because there is actual demand for it.I appreciate that profiteers of a reduced register file depth have the resources to drive the RISC-V standard forward. Nothing wrong with that. It is also fine to leave RV32E as it is in order to provide the flexibility that those use cases might need. But if so, let's not call this the "embedded version." At least, it fooled me.
so looking at the "fragmentation" in the "embedded" arena, this is *very deliberate* and *by design*. it allows implementors to cherry-pick features that will make-or-break profitability (or even whether the product can do the job at all, such as fitting into a cost-competitive FPGA).There is already too much cherry-pick.
There are a lot of cores without license fee that can be used for ASIC and FPGA. In contrast, RISC-V is a standard
and has a big community. There is no point in having a core so specialized that you need to maintain all the required environment yourself.
You can already have that w/o RISC-V. Contributers have no interest in having their preferred version slowly die off due to a lack of compatibility or due to a lack of interest by the community (all the small contributions, in particular compiler).
Guy
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CALo5CZxOOLMuwfoMKadUtqynJk_rqtDWUC219OSMpUCObrP%2Bug%40mail.gmail.com.
On Wed, Jul 17, 2019 at 2:15 AM Guy Lemieux <glem...@vectorblox.com> wrote:I believe we can create a new version that represents "FPGA economy"
or just "FPGA optimized". (Yes, there are some of us discussing such a
beast.) Since E and F are already taken... we need a new letter or set
of letters. Perhaps S for soft processor? Other letters that appear to
be available: H, O, R, U, W, X and Y.H and U are taken by the privileged architecture; X is custom; Y is reserved... R for Reconfigurable? :-)
-> reg-reg instruction with rs2==17
I'd like to propose the following for RV32E (whilst retaining 32E or RVC16 as super-low end use cases):
(1) In addition to low end embedded, also target high end super-threaded or even GPU-like architectures
On Fri, Aug 16, 2019 at 3:13 PM Xan Phung <xan....@gmail.com> wrote:
> (1) RV32E by definition will never be able to run RV32I binaries as it has fewer registers.
The plan for the EABI is to make all of the upper 16 registers saved
registers, so that RV32I and RV32E code will be ABI compatible, and
code compiled for RV32E can run on RV32I without problem.
> (2) The big question is whether RV32I will always be a super-set of RV32E, and I believe there are already significantly progressed proposals to RV32EC that will break this as well.
A while ago there were plans to redefine the FP compressed
instructions for RV32E because RV32E did not allow FP support. But
since then this restriction has been removed, and RV32E does allow FP,
and hence the FP compressed instructions can no longer be redefined
for RV32E.
i am sure that if it had been publicly discussed, the concern would have been raised that by making that decision, it penalises those implementors that do *not* want FP in RV32E.
We do not intend to support hardware floating-point with the RV32E subset. The savings from reduced register count become negligible in the context of a hardware floating-point unit, and we wish to reduce the proliferation of ABIs.
RV32E can be combined with all current standard extensions. Defining the F, D, and Q exten- sions as having a 16-entry floating point register file when combined with RV32E was considered but decided against. To support systems with reduced floating-point register state, we intend to define a “Zfinx” extension that makes floating-point computations use the integer registers, removing the floating-point loads, stores, and moves between floating point and integer registers.
Apologies if you meant the GCC maintainers, because yes, this does mean ABI changes.
Best,
Dan Petrisko
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/148bb967-2c65-47aa-ba6e-669043272ac7%40groups.riscv.org.
i am sure that if it had been publicly discussed, the concern would have been raised that by making that decision, it penalises those implementors that do *not* want FP in RV32E.To clarify, the change was that RV32EF is a valid configuration, whereas it was illegal before. Implementors are free to use RV32E for a softfloat ABI.
From spec 2.2:We do not intend to support hardware floating-point with the RV32E subset. The savings from reduced register count become negligible in the context of a hardware floating-point unit, and we wish to reduce the proliferation of ABIs.Now the change to the latest spec:RV32E can be combined with all current standard extensions. Defining the F, D, and Q exten- sions as having a 16-entry floating point register file when combined with RV32E was considered but decided against. To support systems with reduced floating-point register state, we intend to define a “Zfinx” extension that makes floating-point computations use the integer registers, removing the floating-point loads, stores, and moves between floating point and integer registers.
To further define what I mean by "differentiated from RV32I as much as possible" (below), I would still try to do this within the RISC V compiler and C library infrastructure as much as possible
ie:(1) There would be no binary compatibility between RV32I and RV32E,(2) Hence opcodes of RV32E and RV32I will diverge increasingly over time,
> (2) The big question is whether RV32I will always be a super-set of RV32E, and I believe there are already significantly progressed proposals to RV32EC that will break this as well.
A while ago there were plans to redefine the FP compressed
instructions for RV32E because RV32E did not allow FP support. But
since then this restriction has been removed, and RV32E does allow FP,
and hence the FP compressed instructions can no longer be redefined
for RV32E.