• The interpreter library provides only one automatic way of properly filling the
erric_t structure needed for execution—by reading from an executable file.
Functions to simplify filling the structure or to fill it from memory were considered, but not implemented to achieve the maximum flexibility.
First caveat one may encounter is differences between listed ERRIC architecture
and the one implemented within the simulator. However, the interpreter library is
easily modifiable to accommodate for any revision of ERRIC. Please refer to the
Appendix 2 for the internal description of the library.
Another important aspect to keep in mind is that software was developed and
tested primarily on little-endian machines, since big-endian machines are not particularly popular now.
However, to make reading memory dumps and manual debugging easier, it was
decided to simulate Big Endianness for virtual ERRIC machine. This introduces
some difficulties to understand code snippets, which, however, helps make this code
endianness-independent.
20.5.2 Extensibility
As mentioned before, the machine code interpreter is implemented as a library. This
allows other developers to build various kinds of user interfaces that may provide
additional features independently of the library or use the library to execute ERRIC
machine instructions directly.
One of the executable format files was also designed with extensibility in mind -
assembly compilers and interpreters can take advantage of the empty space possible
by the format to insert additional data needed for them.
The library is open-source, meaning that anyone can contribute to its development and expand the functionality.
20.5.3 Machine Code File Formats
During the implementation process, capability for interpreter library to read and
understand different file formats was added, along with two of those file formats—
simpler one and flexible one.
The formats specify the following information in the file header:
• File format version
• How much data (i.e. not code) is there, or where it starts and where it ends
• How much code is there (right after data block), or where it starts and where it
ends
298
20 ERRIC Machine Code Simulator
Précédent

- 305/315

Suivant