Mill Computing, Inc. Forums The Mill Architecture Scratchpad design decision Reply To: Scratchpad design decision

Thomas D
Post count: 21

I’ve been plotting to write a belt virtual machine and thinking about its consequences. I think that for virtual machines, the stack machine will always rule due to ease of programming (that is, it is an easy target because the compiler doesn’t care how deep a computation goes, it just keeps dropping things on the stack and the machine takes care of it).

The questions I have are probably proprietary, but here goes:
How did you decide on a 32 entry belt (for Gold, and 8 entry belt for Tin)?
Why a scratchpad instead of a second (slower) belt?
How was the size of the scratchpad decided on?

I’ve been tossing around two ideas of alternative to a scratchpad. One is to have four belts, with the opcode deciding which belt the result drops onto (and all four belts addressable for inputs). (That sounds horribly complicated for hardware, but easy for a VM). The second is adding a second (and maybe third) belt that results are moved onto, forming a hierarchy of gradually slower belts. As you’ve probably thought of these ideas, what gotchas am I not seeing?