Home IoT AcqRel’s Factorio Yosys Venture Places a Totally-Practical RISC-V Core within the Widespread Sandbox Recreation

AcqRel’s Factorio Yosys Venture Places a Totally-Practical RISC-V Core within the Widespread Sandbox Recreation

0
AcqRel’s Factorio Yosys Venture Places a Totally-Practical RISC-V Core within the Widespread Sandbox Recreation

[ad_1]

Pseudonymous tinkerer “AcqRel” has taken the sport Factorio to a dramatic new conclusion: the power to compile and run a soft-core RISC-V processor in-game, due to a backend connecting it to the Yosys open synthesis suite.

“Ever performed Factorio and thought ‘I want my manufacturing unit had a RISC-V core,'”developer Frans Skarman writes of the trouble, in a Mastodon publish which introduced the undertaking to our consideration. “Introducing Factorio Yosys! It is a undertaking of a pal of mine not on Mastodon, so all credit score to him. He constructed a full Yosys backend for Factorio that may now compile a RISC-V core.”

A Yosys backend for the sport Factorio permits HDL initiatives to be imported — as much as and together with a working RISC-V processor. (📹: Frans Skarman)

Unveiled throughout a crowdfunding marketing campaign in 2013 and formally launched in 2020, Wube Software program’s Factorio sees the participant constructing, managing, and automating a manufacturing unit in an effort to construct and launch a rocket — after which the sport is taken into account overwhelmed, although can nonetheless be performed as a sandbox. Quite a lot of in-game applied sciences could be researched to help with the mission, although microprocessors implementing the RISC-V structure aren’t often amongst them.

Within the case of Factorio Yosys, the sport is linked to the free and open Yosys synthesis suite that in flip can ingest {hardware} design language (HDL) initiatives — together with a useful 32-bit RISC-V soft-core processor. “On the technical facet, it is a tremendous spectacular undertaking,” Skarman says. “He formally verified components of the movement and it does an entire bunch of optimizations to make the circuits surprisingly compact. It additionally labored on the primary strive with this RISC-V core! (I discovered extra bugs within the core than he did within the compiler :D)”

The instrument helps any Yosys-compatible HDL, permitting for different {hardware} to be outlined — like this snake recreation. (📹: Frans Skarman)

Efficiency, as you may anticipate, could be a problem: with the sport locked to a most framerate of 60 frames per second, the processor runs at simply 1.82Hz — although this may be accelerated, Skarman notes, by uncapping the sport’s framerate. “And, in fact, that is arbitrary HDL,” Skarman provides, “so you are able to do different cool stuff [like] a working snake recreation!”

Extra info is out there in Skarman’s Mastodon thread, whereas AcqRel’s supply code has been printed on Sourcehut underneath an unspecified license.

[ad_2]