Category: Embedded Development

Plain Servo Example

I will use the next days to wrap up a working version of the VM so I can test code footprint and performance. What I expect is actually quite high overall performance. Each instruction will be significantly slower than an ARM instruction -probably in the region of 1:1000, so I am hoping for an instruction…

Read the full article

VM – New Object Descriptor

I drafted this new Object Descriptor. What I do here is heavy bit-fiddling that I in general will not recommend. We will be reading this from Flash that is 2-3 times slower than SRAM, but I think this will be ok since these extensions will not be used often. E=1 means we have extensions. The…

Read the full article

VM – Dropping the stack

Do I actually need a separate stack in the VM? The current draft use 2 memory areas – one for variables and one for the stack. This is influenced by legacy CPU design. But. the reality is that Plain do not allow dynamic memory so the variable area is static size and can be estimated…

Read the full article

VM – Raise

The introduction of the 32 bit Object Descriptor bloat the instruction set, but we currently only have 12 high-level instructions left in the VM – This is Assign, Call, Decode, Encode, End, Exit, For, If, NOP, Raise, While and Switch. Just for the record – this is actual instructions, not keywords supported by the Assembler syntax. I…

Read the full article

VM – New Stack

The previous stack design was to store only data descriptors on the stack – not data itself. The side-effect of this is that everything becomes global data. The alternative to pass a copy also have a side effect if I pass an object + passing an auto-decided combination of data and references is not nice…

Read the full article

VM – Object Index

The new Object Descriptor. Notice that we now offset data rather than indexing into an array. This illustration show how a Assign would look like with a 32 bit Object Descriptor. We don’t need a descriptor on TIX since the type will follow math rules. The fields marked yellow are those who expand from 16 bit…

Read the full article

VM – Objects

Implementing an Object Index to replace the current 32 bit register array can be done in at least two ways. Firstly I need to use a SRAM buffer to hold objects rather than the current 32 bit register array, and I need to replace the 16 bit index in the Data Descriptor with a 16…

Read the full article

VM – Call & Raise

Obsolete 21.feb.2017 – New design. The Call & Raise instructions are identical in design, it is only the op-code that differs. I re-use the extended length option from Assign and add an array of 32 bit Data Descriptors to define the parameters. Moving on I have several unsolved design questions with the VM: One is…

Read the full article