Host independent emulator software architecture - in reference to the HP 64700 Series emulators - technical

Hewlett-Packard Journal, Dec, 1988 by William A. Fischer, Jr.

To handle the varying complexities of processor addresses, the concept of an address object was developed. An address object is a processor-specific structure that represents a location in the processor's address space. The address object structure contains all the pertinent information about that processor's address (see Fig. 4). The generic firmware never handles a specific address type but instead only passes pointers to these address objects. The lower-level processor-specific drivers interpret the address, translating ASCII string to address object, address object to ASCII string, address object to physical address, physical address to address object, or program counter to address object as appropriate. Adding an integer to an address object is another lower-level driver function.

Data

Data sizes also between processors. The MC68000 can access data lengths of 1, 2, or 4-byte words. The Intel 8086 can access data as 1 or 2 bytes but the data must be displayed in a swapped order compared with the MC68000. Since most processors access data as multiples of single bytes, data input and display are handled generically as an array of bytes. The ordering of the byte data for display and interpretation is left up to the processor-specific functions to specify for the particular processor being emulated.

It is also important to control the type of cycle that is used to access the data. The 8086, for example, can access data as bytes or words, and it may be necessary for peripheral devices to see the proper type of data access. The mode (mo) command is used to select the access mode for data. The options of this command are processor-specific and are handled in the drivers that access the data. These processor-specific access modes are defined in one of the processor-specific tables.

Similarly, it is important to display the data in the form that is most understandable to the user. Typical ways of displaying data are in bytes, words, or mnemonics. Again, the mode command is used to set the default for these processor-specific attributes. Alternatively, commands such as memory (m) and search memory (ser) permit the user to input an override option to change the display mode for that command and the default.

Registers

Every processor has its own set of registers. The register names vary, as do their lengths and functions. In addition, the registers may be read only, write only, or read-write. Some can reside in memory and others in I/O space.

Processor-specific tables are created for each emulator that fully define the valid register names, sizes, read/write status, and register grouping information.

Configuration

Each emulator requires a different set of configuration parameters. These configure the emulation hardware to provide the type of functionality that the user wants. Users need to decide if they want to use the target system clock or the internal emulation clock, or they might need to switch between a foreground monitor and a background monitor (see article, page 45). These configuration parameters are extremely important for normal functionality, and provide the flexibility for an emulator to work in a wide variety of target systems.


 

BNET TalkbackShare your ideas and expertise on this topic

Please add your comment:

  1. You are currently: a Guest |
  2.  

Basic HTML tags that work in comments are: bold (<b></b>), italic (<i></i>), underline (<u></u>), and hyperlink (<a href></a)

advertisement
Click Here
CXO UnpluggedSmart Business interviews on BNET

See and hear how senior level executives across the Asia Pacific are developing smart business ideas across a variety of sectors. The focus is on the future, and on how businesses need to evolve.

advertisement
  • Click Here
  • Click Here
  • Click Here
advertisement

Content provided in partnership with Thompson Gale