Compute architecture
Last updated
Last updated
While for virtual processors the question of architecture is not as paramount as for physical one, and many just go with Von Neumann as a default choice, we have a few considerations here.
While polymorphic code can be very helpful for some tasks and programming styles, for our particular domain it’s advantages are hardly applicable. Treating code and data differently helps us greatly with proving and generally reduces complexity of our system. Additionally, switching from Harvard architecture to Von Neuman is possible in principle if we would need it, but switching in another direction is far more difficult. So we decided to start with Harvard Architecture.
On the other hand, separation between code and data still calls for different treatment. By default we have two sections allocated by assembler by default:
.text
- contains program bytecode and is read-only
.data
- contains program write-once data. We don’t need a dedicated segment for constants, as every written value can not be changed and initial values can be populated using %init
directive.