distaff icon indicating copy to clipboard operation
distaff copied to clipboard

Add support for random access memory

Open bobbinth opened this issue 4 years ago • 0 comments

Currently, stack is the only place to store values. This is rather limiting, and can be improved by introducing random access memory. Adding RAM would require:

  1. Implementing ALT stack #19
  2. Limiting total constraint degree to 7. This can be achieved by splitting instructions into high-degree and low-degree instructions #18
  3. Implementing instruction mirroring
  4. Adding an extra register to store root of the RAM state
  5. Adding LOAD and STORE instructions to access RAM state register

Overall performance impact of the above changes would probably result in over 50% execution slowdown with instruction mirroring being the biggest driver.

bobbinth avatar Jun 07 '20 06:06 bobbinth