7 ms·
BOOM v2: an open-source out-of-order RISC-V core
- openasocket 9y agoFor those that want to read the original BOOM paper first, I'll save you a bit of time: https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-167.html https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-...
- microcolonel 9y agoHighlights: The version of BOOM in the paper (two years ago) had the same IPC as a Cortex-A15 in half the die area on a process node two generations older while using compiler ports which were immature at the time (and still probably have plenty of room to improve). Most impressively of all, it was designed and developed by three people (Chris Celio, David A. Patterson, Krste Asanović), two of whom (David and Krste) were not primarily focused on it.
- _chris_ 9y agoHi, author here. Just to point out to others (and to be fair to the A15), IPC is just one part of the final performance equation. =)
- microcolonel 9y agoChris, I worked hard to get you on that pedestal, don't go jumping off. ;- ) Fair enough, you didn't reach the same frequencies, but that's what the other 1.4mm² and the process shrink are for. ARM[v7] maybe does a little bit more per instruction, what with those conditions and 14+ character non-mnemonic mnemonics; but ultimately instruction counts should be pretty close, right? Update: also probably SIMD[or vectors], breakpoints, more interesting memory management, the handling of bizarre FP corner cases, maybe power management[high frequency dvfs? :- )], and other things go in that additional 1.4mm².
- _chris_ 9y ago> Chris, I worked hard to get you on that pedestal, don't go jumping off. ;- ) O:-) > ARM[v7] maybe does a little bit more per instruction, what with those conditions and 14+ character non-mnemonic mnemonics; but ultimately instruction counts should be pretty close, right? Great question. I just so happen to have written a tech report on this very topic! https://arxiv.org/abs/1607.02318 https://arxiv.org/abs/1607.02318 Basically, performance should be identical between ARMv8 and RISC-V, given the RISC-V core implements macro-op fusion to combine things like pair loads together.
- microcolonel 9y ago> Great question. I just so happen to have written a tech report on this very topic! https://arxiv.org/abs/1607.02318 https://arxiv.org/abs/1607.02318 . > Basically, performance should be identical between ARMv8 and RISC-V, given the RISC-V core implements macro-op fusion to combine things like pair loads together. Yeah, I drew my conclusions from your papers. :- ) I really should diversify my sources, I bring nothing to this exchange.
- wmf 9y agoWasn't that comparison totally rigged by omitting a bunch of stuff (e.g. SIMD) from the BOOM core that wasn't used by a particular benchmark?
- _chris_ 9y agoI was using Coremark in that report, which is what ARM used to market their cores. The 32b ARMv7 cores have NEON SIMD, but I believe no FMAs, whereas BOOM is 64b and includes double-precision FMA units. Also there's no current RISC-V extension for SIMD or vector ops, so I didn't maliciously "omit" things to "totally rig" the comparison. But even running SPECint is not going to fire up the SIMD unit.
- pertymcpert 9y agoUhhh yes ARMv7 NEON has vector FMAs. SPEC with modern compilers will definitely use SIMD, utilization on hot regions is variable but it's definitely beneficial.
- adrian_b 9y agoNot all ARMv7 have FMA, only the newer models. Models with FMA: Cortex-M4, Cortex-M7, Cortex-A5, Cortex-A7, Cortex-A15, Cortex-A17. I do not remember which Cortex-R have FMA. Models without FMA: Cortex-A8, Cortex-A9.
- tuxguy 9y agohttps://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-167.pdf https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-...
- gok 9y agoSo is anyone designing RISC-V cores without using Chisel? :)
- PhilWright 9y agoYes, I am about 2/3rds of the way through designing and building a single cycle, modified Harvard architecture, RV32E CPU. You can check it out here... https://hackaday.io/project/18491-worlds-first-32-bit-homebrew-cpu https://hackaday.io/project/18491-worlds-first-32-bit-homebr... Although a projected speed of 1Mhz and the size might exclude it from your own project!
- gok 9y agoI meant more like... just using straight Verilog, but very impressive!
- dnautics 9y agoI'm not sure I would recommend using straight verilog for something of that magnitude. I do know that some folks that used Perl to assemble verilog into a computer chip, but they regretted the engineering debt that came with it (and the hire they made that instituted that decision).
- senatorobama 9y ago> Perl to assemble verilog into a computer chip This is absurdly common.
- rjsw 9y agoThere is PicoRV32 [1]. [1] https://github.com/cliffordwolf/picorv32 https://github.com/cliffordwolf/picorv32
- cbHXBY1D 9y agoYep and there's https://github.com/SpinalHDL/VexRiscv https://github.com/SpinalHDL/VexRiscv But admittedly, SpinalHDL is basically Chisel.
- bogomipz 9y agoI apologize if this is a silly question but is there the possibility that this chip might see consumer availability outside of do-it-yourself FPGA implementations?
- wmf 9y agoAnything is possible, but it sure looks like everybody is working on microcontrollers and nobody is even trying to ship real cores.
- zik 9y agoThat's just because microcontrollers are cheaper and easier to produce. It's going to take someone with deep pockets to make a desktop competitive RISC-V processor.
- tyingq 9y agoLowrisc.org is between those two extremes. Nothing shipping yet though.
- vanjoe 9y agoNvidia had a presentation at the risc-v workshop a few years back. I think they are building chips with it. Nothing the regular programmer sees though I don't think
- bogomipz 9y agoThanks!
- legulere 9y agoThe privileged ISA is still a draft and is supposed to be finished later in this year. The privileged ISA is needed to support operating systems. There are projects out there targeting this kind of processors, for instance lowRISC.
- 9y ago
- dnautics 9y agoObviously the "given a sufficiently sophisticated compiler" joke applies, but it seems like the out-of-order optimization is computationally challenging. Now that we have more sophisticated programming languages (and more sophisticated versions of old programming languages) shouldn't that be done at compile time as a one-time (power, time) cost instead of a recurrent cost across all computing (which will inevitably duplicate effort)? Can someone explain to me why this should be done on metal? (besides that it's always been done like that since the late 90s)
- rjsw 9y agoLet us know when you have written your "sufficiently smart compiler" It is hard, see here [1]. [1] https://en.wikipedia.org/wiki/Itanium https://en.wikipedia.org/wiki/Itanium
- dnautics 9y agoyeah I acknowledged that joke, but if you don't think that, for example, say LLVM is light-years ahead of GCC in implementing plugins that let you do various forms of optimization, you're crazy. It stands to reason that further architectural developments will make things even better than what we have now. Nowithstanding the fact that your answer is totally unhelpful: I thought about it for a second and I think the answer is basically that if you have a multithreading cores and you're pending on the results of another operation, then you can't necessarily know what optimizations you can do ahead of time because you don't know what other threads are resident on your core, which will affect the on-the-fly reorganization.
- rjsw 9y agoOther people have pointed out that Itanium is the most recent example of a project that expected to be able to write a really smart compiler for an in-order CPU and failed. If you can write better LLVM plugins then I'm sure Intel and HP will be happy to throw lots of money in your direction.
- 9y ago
- phkahler 9y agoNo numbers. They report a 20 percent REDUCTION in IPC in exchange for an undisclosed increase in clock speed (or is that implicit in the Fo4?). I assume v3 will make the improvements hinted at to bring IPC back up while maintaining clock speed. Anyway the original BOOM paper had lots of real data on IPC in comparison to commercial cores and also gave the actual BOOM clock speed. It's not clear to me where BOOM is going from this paper. Perhaps they're holding off until the conference? Maybe they don't actually have silicon to test yet? I'd like to see their ideas on macro-op fusion implemented in BOOM. That should give a decent IPC increase too.
- _chris_ 9y agoHi phkahler! This is just a short workshop report with a focus on the microarchitecture (edit: oh! and the report mentions a 24% reduction in clock period). Unfortunately, some conferences have very strict pre-publication rules that prevent me from disclosing everything that I'd like to talk about. Regarding benchmarking though, there is another CARRV workshop paper (coming up in October) that will be reporting some hard performance numbers of BOOM. =) And I'd love to implement macro-op fusion, but I have too many bigger fish to fry right now. Pull requests accepted though. ;)
- exikyut 9y ago> Unfortunately, some conferences have very strict pre-publication rules. That's fine. I'm not sure if this is embargoed too, but: when can we start asking detailed questions and/or looking for new papers?
- _chris_ 9y agoYah, you can ask questions, I might just have to give evasive answers ;). This tech report itself isn't embargoed or I wouldn't have posted it. The pre-publication issue is the scope of what I could cover in this tech report was relatively narrow.
- phkahler 9y agoIf your goal is to build anticipation or excitement in advance of the conference you're doing a mighty fine job!
- phkahler 9y agoThe multi-ported register file is said to be one of the big challenges. I wonder if it would be useful to split it into two or 3 identical copies (like the guy doing the 74xx TTL version). This would allow the different copies to be located closer to execution units, but would require the write data to travel further. So many tradeoffs...
- _chris_ 9y agoSadly no. You would still have to broadcast the 3 write ports to each copy, so "being closer" doesn't actually work out.
- deepnotderp 9y agoI think his point is that reading is faster, and the savings from the quadratic cost of the register file might still be useful, a la the DEC Alpha.
- phkahler 9y agoBut each copy would only have 2 read ports instead of 6, and those 2 would feed directly into a single execution unit. The routing within each register file would be simplified. It's a local vs global routing tradeoff. I don't know if it would be better, but my suspicion is that it might.
- crest 9y agoSome Alpha AXP cores used a split register file and the register renaming logic took care of the synchronisation.
- userbinator 9y agoHow will it perform relative to other ISAs, given that RISC-V is basically a slight variant of the MIPS --- the other "academic ISA" that probably received as much if not more attention and hype as RISC-V does today? Not long ago, a 4-way OoO MIPS fared poorly against ARM and x86: https://www.extremetech.com/extreme/188396-the-final-isa-showdown-is-arm-x86-or-mips-intrinsically-more-power-efficient https://www.extremetech.com/extreme/188396-the-final-isa-sho... It would be interesting to see that comparison performed again on more recent ARM and x86, as well as real RISC-V silicon.
- _chris_ 9y agoThe ISA is going to have close to zero impact on a processor's performance. I actually wrote up another tech report on this topic (https://arxiv.org/abs/1607.02318 https://arxiv.org/abs/1607.02318). In short, you can rely on macro-op fusion to dynamically fuse some idioms that show up as instructions in other ISAs, like load-pair.
- monocasa 9y agoWouldn't relying on macro op fusion increase i$ pressure?
- _chris_ 9y agoNo. The beauty of RISC-V is it has a compressed extension with 2-byte forms of the most common instructions. The average instruction size is 3.0 bytes on SPECint workloads. That's even better than x86. So instead of creating a 4-byte "load-pair" instruction (or having to fuse two 4-byte loads), you can fuse two 2-byte loads into a single "load-pair" micro-op. Same performance, same code density, but a cleaner ISA (since not everybody wants the complexity of implementing load-pair).
- rixed 9y agoRegarding that extremetech benchmark: how can you not normalize to same node size if you are interested in the ISA? Shouldn't any ISA at 22nm basically be more power efficient than one at 90nm?
- ece 9y agoHow does this compare to rocketchip and other RISC-V cores? Which is easiest to get started on with an FPGA? From my looking, rocketchip seems like it is seeing the most active development in open source, but I would love to see a comparison of all open RISC-V cores.
- _chris_ 9y agoBOOM is a core that fits into the rocketchip SoC ecosystem. Or said another way, BOOM wears rocketchip's skin. :D [i.e., caches, memory system, uncore, test harnesses...] Default rocketchip uses the Rocket core, which is a single-issue in-order core. If things are going well, a two-wide BOOM is 50% to 100% faster than Rocket [as measured using SPECint and Coremark]. If you want to get started, I'd recommend starting with rocketchip/sifive dev boards (they provide ready-to-go FPGA images). Rocketchip has a company supporting it, it's open-source, and it will boot Linux (if you use the RV64G version). But it's a very complex code base, so if you want to hack the RTL, it will be a steep learning curve. If you just want to play with smaller, easier to grok cores, you can find some ready-to-go FPGA cores like picorv32. That's targeting high-frequency FPGA softcore applications and is a multi-cycle design (trading off IPC for higher frequencies).
- ece 9y agoThanks for the info. I will have to start with the picorv32 (RV32IM) or Rocket Chip itself and see what will fit on my Papilio board. If I wanted to hack on RTL and a toolchain, is the GCC port or LLVM port easier to start with? There seem to be a couple of LLVM ports... I will go with LLVM-RISCV with RocketChip. Also, any plans of an async RISC-V implementation?
- _chris_ 9y agoThe gcc port is mature and has been upstreamed. The LLVM port is still a work-in-progress. I know there's been at least one talk presenting some thesis work on an clock-less RISC-V design at an early RISC-V workshop, but I'm not aware of any in-progress implementations.
- lifeisstillgood 9y agoCan I ask a very dumb question - is there a (simple) roadmap to some kind of open hardware nirvana - ie general purpose chip design that can be created on fabs 2 generations old (I think that's one of the features here) Things like - we still need to do X to this design - we still don't have Y I would be interested in how close or far we are from dropping things like IntelME and other nice things to have
- _chris_ 9y agoInteresting question! I think the FOSSi community (behind LibreCores and ORConf) are probably the most aware of what that road map is and helping us get there. One of the issues is that cores are fun to build, but are only one piece of the puzzle (guilty!). So there are lots of FPGA-targeting softcores, but fewer cache coherent high-performance multi-level cache systems, for example. I'm hoping that SiFive's TileLink protocol helps shore up the ecosystem, which is a high performance free and open bus standard. Some other gaps are devices, drivers, graphics, crypto-engines, more open-source testing/verification infrastructure... it's an exciting time for OSHW!