News for hackers. Stuff that matters.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by CodesInChaos on Tuesday January 05, 2021 @07:37AM (#25644891)
Is there a quantification of "high performance"?

It will obviously be much lower than the IPC of an actual high performance CPU (modern x86-64), but how big is the difference? And how does it compare to typical mobile processors?

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by Symmetry on Tuesday January 05, 2021 @09:24AM (#25645763)
It seems broadly comparable to an ARM Cortex A9 in width and reorder depth but it seems to be using a lot more pipeline stages to do that. Probably that's because they had less engineer-years to invest in the design than ARM did. It looks like it's using pure automatic synthesis so the clock speed will tend to be lower on equivalent process nodes too. The big question is how accurate the prefetcher and branch predictors are. It's entirely possible for an 2 issue out of order core to be slower than 2 issue in order core if the later is significantly better at speculating.

Still, that's a good bit of work they should be proud for putting out there and I hope other people build on it.

EDIT: Oh, wait, they don't mention register renaming. Hmm, well, I guess no speculating over multiple iterations of a loop then.

EDIT2: No, the PDF the link mentions a rename unit. http://www.rsg.ci.i.u-tokyo.ac.jp/members/shioya/pdfs/Mashim...

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by NieDzejkob on Tuesday January 05, 2021 @07:44AM (#25644932)
I believe the closest measurement would be in Table VII on page 8 of the paper: http://www.rsg.ci.i.u-tokyo.ac.jp/members/shioya/pdfs/Mashim...
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by childintime on Tuesday January 05, 2021 @09:18AM (#25645714)
"In comparison to the BOOM, the RSD achieved 2.5-times higher DMIPS and 1.9-times higher DMIPS/MHz", which should be comparable to ARM cores around 4 years ago.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by Veedrac on Tuesday January 05, 2021 @10:16AM (#25646347)
Note that BOOM is now on v3[1], which claims to be 3.93 DMIPS/MHz, or about twice RSD.

[1] https://people.eecs.berkeley.edu/~krste/papers/SonicBOOM-CAR...

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by jhallenworld on Tuesday January 05, 2021 @09:56AM (#25646143)
RV32IM, 2.04 DMIPS/MHz, 95.3 MHz, 15K LUTs, 8K LUT FFs, 6 BRAMs on Zynq 7020.

I'm curious if this will work on Lattice ECP5- I'm not really sure if Synplify supports system verilog to the same degree as the Xilinx tools. ECP5 is interesting because it's a $10 FPGA..

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by mithro on Tuesday January 05, 2021 @06:31PM (#25652755)
FWIW Google is working on improving the support for SystemVerilog in open source tools.

On the developer tooling side, there is https://github.com/google/verible for linting, code formatting and code indexing.

On the actual compilation side with there are https://github.com/alainmarcel/Surelog and https://github.com/alainmarcel/UHDM which are then being coupled with open source tools like Yosys to allow targeting Xilinx 7 Series and Lattice ECP5 FPGA ICs with fully open source flows using fully open source FPGA tools like symbiflow.github.io

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by mhh__ on Tuesday January 05, 2021 @10:08AM (#25646252)
At a glance I think it would fit although I might be thinking of the bigger ECP5s which are in the same price bracket as some Zynqs
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by zurn on Tuesday January 05, 2021 @07:53AM (#25644987)
It's targeting small FPGAs, comparisons to full custom designs wouldn't be very fair.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by adwn on Tuesday January 05, 2021 @07:56AM (#25645002)
"high-performance" is relative, so they need to compare it to something at all.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by chungus_khan on Tuesday January 05, 2021 @08:12AM (#25645113)
I would imagine it is high-performance within its own domain: soft microprocessors. There isn't much danger of something like this being used outside of domains where it is relevant, so just calling it "high-performance" gets the message across fairly well to anyone who would actually need it.

I can't comment on how well it performs myself without testing it, but a quick skim of the paper reveals that it apparently performs well in comparison to its rival open-source out-of-order soft processor.

Comparing soft processors to other soft processors is fairly easy if they can both run on the same hardware, but comparing them to real silicon is inherently kind of meaningless, as they don't really compete at the moment, and the performance of the design in absolute terms will depend on the FPGA it is implemented on. Nonetheless, you could compare the raw numbers presented in the paper for curiosity's sake and see that indeed, it isn't very fast compared to modern silicon processors.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by adwn on Tuesday January 05, 2021 @08:30AM (#25645267)
Sorry, what I meant was: They need to present benchmark results (preferably against other soft-core processors, of course) to claim the "high-performance" attribute. A single row of a synthetic benchmark against only two other contenders is a little ... lacking.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by mhh__ on Tuesday January 05, 2021 @08:25AM (#25645227)
This has 5 backend pipelines, which I would say is getting there speed-wise. I think AMD Zen has 10 execution pipelines to play with, although the exact structure is usually not commented upon so I don't know how long they are.

It's 32 bit so it's not desktop-class necessarily but this should blow a microcontroller out of the sky, for scale.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by gchadwick on Tuesday January 05, 2021 @09:16AM (#25645688)
> This has 5 backend pipelines, which I would say is getting there speed-wise.

It's pretty easy to slap down pipelines. What is far harder is keeping them all fed and running without excessive stalling and bubbles whilst avoiding killing your max frequency and blowing through your area and power goals.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by londons_explore on Tuesday January 05, 2021 @09:04AM (#25645584)
If I understand correctly, most designs effectively #define the number of frontend and backend pipelines. That means you are free to make as many as you like, for as much performance as you like, but some parameters might scale very badly outside what the core was designed for. For example, I would imagine the number of gates and power use to go up to unfeasibly high levels above the quoted numbers.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by Symmetry on Tuesday January 05, 2021 @09:27AM (#25645807)
It's a bit harder than that. You have to worry about forwarding results from one pipeline to another bypassing the registers if you want to avoid having to deal with stalls waiting for results. The transistor cost of the bypass network grows as the square of the number of pipelines so it can be pretty significant, potentially being larger than the cost of the execution pipelines themselves.

Many modern designs aren't fully bypassed and involve clusters of pipelines to manage this. IBM's recent Power chips and Apple's ARM cores are particularly known to do this.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by sitkack on Tuesday January 05, 2021 @10:49AM (#25646726)
Does optimal pipeline topology vary with the specific workload or is more dependent on the instruction set semantics and result visibility?

Is this something that could be automatically optimized via simulation?

Is it something that could be made dynamic and shared across a bunch of schedulers so that cores could move between big/little during execution.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by Symmetry on Tuesday January 05, 2021 @10:53AM (#25646791)
It's highly dependent on both workload and instruction set.

I'm sure it could be automatically optimized in theory, even without the solution being AI complete, but I don't think we have any idea how to do it right now.

No, not unless you're reflashing an FPGA. You'd have better luck sharing subcores for threadlets I think.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by phkahler on Tuesday January 05, 2021 @09:03AM (#25645568)
I've been wondering if it could make sense to put a small ALU with each register (when they are not virtual/renamed but maybe then too?). This would allow instructions that use the destination register as a source to only use one read port, potentially allowing higher IPC. Has anyone looked into this and if so what did the analysis show?
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by jhallenworld on Wednesday January 06, 2021 @09:33AM (#25658064)
It has two integer pipes. This core is similar in performance to the dual-issue in-order Cortex-M7- also 2 DMIPS / MHz. I guess I view this core as a technology demonstration that you can have a practical (not too large, not too low MHz) out of order processor in an FPGA.

On the other hand, I think there is still space for a small in-order dual-issue FPGA RISC-V with 2 DMIPS / MHz performance.

Actually there is one:

https://opencores.org/projects/biriscv

1.9 DMIPS / MHz..

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by swiley on Tuesday January 05, 2021 @08:33AM (#25645295)
Do you really want pipelinning on a microcontroller though?
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by mhh__ on Tuesday January 05, 2021 @08:56AM (#25645517)
Why not? I think Cortex-M3 has a 3 stage pipeline, obviously I would not expect the 0.01$ chinese ones to have one.

It's worth saying here, that a big ooo CPU is pipelines differently to a small/old risc processor - even amongst discussions about compiler optimizations people still use terminology like pipeline stall, when a modern CPU has a pipeline that handles fetching an instruction window, finding dependencies, doing register renaming and execution, that pipeline is not like an old IF->IF->EX->MEM->WB - it won't stall in the same way a pentium 5 did. The execution pipes themselves have a more familiar structure.

Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by gmueckl on Tuesday January 05, 2021 @10:45AM (#25646674)
Not sure about Cortex-M3, but I can confirm that the Cortex-M4 has a pretty basic 3 stage in order pipeline that gets flushed on branches. So unless there are caches between the core and memory (I think some STM32 have that), that CPU is still trivially deterministic.
Re:An Open-Source FPGA-Optimized Out-of-Order RISC-V Soft Pr... by makapuf on Tuesday January 05, 2021 @04:39PM (#25651510)
Yes, m4 from stm have art accelerator (cache memory) which make them less deterministic (but much faster) for flash access. See https://www.st.com/en/microcontrollers-microprocessors/stm32...