Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 3.32 KB

README.md

File metadata and controls

59 lines (43 loc) · 3.32 KB

ANNOUNCEMENT June 17, 2021: As you may have noticed, this project has not been worked on for a while. That would be a correct assessment. There has been no progress for a number of reasons, mostly due to the authors having other priorities. That doesn't mean the idea has died or was tried and failed. The project may be revived at some point in the future.

WASM Metal

A bare metal physical implementation of WebAssembly. That's right, a WebAssembly CPU. Inspired in part by this amazing talk.

GUI Microarchitecture Simulator

View the live demo.

git clone https://github.com/lastmjs/wasm-metal.git
cd wasm-metal
npm install
npm start

Go to http://localhost:5000 in your web browser.

RTL Microarchitecture Simulator

Not implemented yet.

Loading Microarchitecture Implementation to FPGA

Not implemented yet.

Roadmap

  • Understand the WebAssembly ISA
  • Implement the mircoarchitecture in HTML/CSS/JavaScript
    • This will be a GUI simulator of the microarchitecture
    • This simulator will become the specification for the microarchitecture
    • It will allow us to quickly experiment with hardware configurations
    • It will allow us to iterate and learn how the microarchitecture should work
  • Implement the microarchitecture as an RTL design in an HDL
  • Simulate the RTL design
  • Test the implementation on an FPGA
  • Design the ASIC

Why is this a good idea?

  • Maybe it's not, but who cares
  • The world is moving to WebAssembly
  • Some of the biggest and potentially most world-changing projects are implementing their virtual machines as WebAssembly virtual machines (DFINITY, Ethereum)
  • The bytecode is being designed as a compilation target for low-level languages first
  • The bytecode is meant to execute at near-native speeds on a variety of underlying ISAs
  • Java processors already offer potential benefits, even being compilation targets for a high-level language
  • Cutting out the translation from WebAssembly to the underlying ISAs could provide efficiency benefits
  • We could get rid of WebAssembly virtual machines entirely, and replace them with WebAssembly physical machines
  • If all SIM cards are Java processors, imagine what WebAssembly processors could do. I'm betting that WebAssembly is a better bytecode than Java bytecode for what Java bytecode is doing with microcontrollers, so WebAssembly could take over all spaces that Java processors currently have

Prior art