Next: Extending the design of
Up: Extending Sim286 to the
Previous: ELF Data Representation
The Implementation of Sim386
In this section, we present our design and implementation for the Sim386 simulator. Our design is an extension of the design of the Sim286 simulator.
Through subclassing, Sim386 increases extensibility over Sim286 and facilitates extension
of Sim386 to simulators for the Intel486 and Pentium processors. Sim386 simulates a subset of the features of the 80386 processor. These features are those inherited from Sim286 (virtual memory addressing, protection mechanism, segmentation, prefetching of instructions, and the real and protected modes of operation) and those added by the extensions in the current work (32 bit processing and ELF binary input). We also modified the user interface of Sim286 to take additional command line parameters to eliminate recompiling the simulator for different modes of operation.
First we describe, in section 3.1, the modifications made to the class framework of Sim286,
as shown in Figure 2.4, necessary for the features added in Sim386. Next, in section 3.2, we describe the modifications and additions that were necessary to convert Sim286 to 32-bit processing. We then explain how Sim286 was extended to include ELF binaries as input in section 3.3.
Figure:
The Extensions to the Sim286 framework. The classes shown in bold are new classes added in Sim386. The classes that are dashed show possible future extensions.
 |
Next: Extending the design of
Up: Extending Sim286 to the
Previous: ELF Data Representation
Michael L. Haungs
1998-09-21