Re:XiangShan – open-source high performance RISC-V processor
by ge96 on Thursday January 02, 2025 @03:45PM
(#42578669)
why so much ram?
[ Parent
| on HN ]
Re:XiangShan – open-source high performance RISC-V processor
by chrsw on Thursday January 02, 2025 @04:12PM
(#42578975)
64GB of RAM isn't that much for full chip simulation of a "high performance" CPU.
Re:XiangShan – open-source high performance RISC-V processor
by ge96 on Thursday January 02, 2025 @05:03PM
(#42579429)
yeah I'm super ignorant here, wondering, say you simulated this, could you run a VM OS against it? What kind of scale it it, personal computer or server (i7/xeon)?
Or you just use it to compile programs against it?
edit: I did skim the readme, I saw verilog makes me think FPGA
Re:XiangShan – open-source high performance RISC-V processor
by chrsw on Thursday January 02, 2025 @05:46PM
(#42579835)
You could simulate this on an FPGA platform, those aren't going to be cheap to hold a large design. Usually by running simulations on a PC you're just running very specific test cases.
I've run CPU simulations on machines with 64GB of RAM before and it took several hours just to get to single-user shell in Linux. Different CPU design and computer, but the point is it's not something you'd typically use interactively.
Re:XiangShan – open-source high performance RISC-V processor
by ge96 on Thursday January 02, 2025 @06:12PM
(#42580076)
Interesting do it actually runs that's cool vs. a hyper visor which idk the difference but yeah
Re:XiangShan – open-source high performance RISC-V processor
by brucehoult on Friday January 03, 2025 @01:44AM
(#42583184)
If you're simulating a complex CPU's HDL in Verilator then think in terms of single digit thousands of instructions per second. Vs single digit billions of instructions per second when it's made into an SoC.
i.e. on the order of a million times slower than the final product.
On an FPGA you might get 20 to 50 million instructions per second, only 100 times slower than the final SoC product. But for a large modern OoO design you'll need an FPGA costing $15000 (for a VCU118) or even more.
Re:XiangShan – open-source high performance RISC-V processor
by IshKebab on Thursday January 02, 2025 @05:34PM
(#42579715)
That's a pretty huge amount of RAM even for a high performance core. The medium performance cores I've simulated use more like 300MB.
I suspect it is the Scala compilation that requires all the RAM rather Verilator or the simulator.
Re:XiangShan – open-source high performance RISC-V processor
by chrsw on Thursday January 02, 2025 @05:47PM
(#42579849)
Maybe, I've never used Scala before. But in my experience simulations are way more resource intensive than compilation.
Re:XiangShan – open-source high performance RISC-V processor
by EastonMan on Monday January 06, 2025 @08:31AM
(#42610403)
No, the RAM is mainly used by verilator partitioning simulation logic to multiple threads. The Scala part (Chisel -> FIRRTL) runs pretty happy with a few gigs of RAM.
Re:XiangShan – open-source high performance RISC-V processor
by sdbbp on Friday January 03, 2025 @12:17AM
(#42582717)
That's the HDL, and not the inherent design complexity.
Re:XiangShan – open-source high performance RISC-V processor
by camel-cdr on Friday January 03, 2025 @01:38AM
(#42583157)
The 64GB is for compilation. simulating does take almost no RAM. I can have 12 seperate instances simulating at once and take less than 2GB:
Re:XiangShan – open-source high performance RISC-V processor
by tormeh on Friday January 03, 2025 @09:26AM
(#42585909)
Compiling the chip, right, not the code?
Re:XiangShan – open-source high performance RISC-V processor
by camel-cdr on Friday January 03, 2025 @10:48AM
(#42586655)
yes
Re:XiangShan – open-source high performance RISC-V processor
by chrsw on Friday January 03, 2025 @02:14PM
(#42588591)
Wow, it's surprising to me there's a huge difference and in that direction. I always used to increasing resource requirements for synthesis->P&R->logic simulation->full chip simulation. I guess times have changed since I worked on chip design.