• Aucun résultat trouvé

To assign memory map terms

• Assign memory to a specific address range by typing:

map <range> <memory_type> <attribute>

<range> is an address range aligned on 256-byte boundaries (resolution is 256 bytes).

<memory_type> is as follows:

Type value Memory Assigned

eram Emulation RAM

erom Emulation ROM

tram Target System RAM

trom Target System ROM

grd Guarded memory

Mapping and Configuring Memory

<attribute> can be:

dp to indicate that this block is to reside in the special 4-Kbyte block of dual-ported emulation memory. (Dual-ported memory can be accessed by the host controller without the emulation monitor program, which means that your program executes uninterrupted during the access.)

dsi indicates that your system and emulation DSACKs should be interlocked. (The MC68030/MC68EC030 emulator also interlocks the STERM signals when you choose dsi.)

ci asserts the CIIN line to the MC68030/MC68EC030 for all addresses in this memory block, indicating that accesses to this block should not be cached. This attribute is available only on the MC68030/MC68EC030 emulator.

(Combine multiple attributes by separating them with commas, for example:

dp,dsi.)

You need to specify the location and type of various memory regions used by your programs and your target system. The emulator needs this information to:

• Orient buffers for data transactions with emulation memory and your target system memory.

• Reserve emulation memory blocks.

• Set the type of memory blocks so that configuration items such as write to ROM break will operate correctly.

The MC68020 and MC68030/MC68EC030 emulators have seven map terms. Your address specifications must begin and end on 256-byte boundaries. To specify an address beginning on a 256-byte boundary, enter an address ending in 00. To specify an address ending on a 256-byte boundary, enter an address ending in ff.

Because of the way the emulation memory system is designed, the amount of memory used by each map term corresponds to the nearest block size available, not the amount of memory needed by the absolute address range to be stored.

There is one 4 Kbyte block of dual-ported emulation memory. (Dual-ported means that the emulation controller can access memory locations without interfering with program execution). This block can be mapped by specifying the dp attribute after the map address and memory type specification. If you use a foreground monitor, the emulator reserves this block for the monitor code.

If you specify an address range less than 4K with the dp attribute, all 4K is allocated because that is the minimum block size for that memory. If you specify a

block size less than 4K and the dual-port memory is unmapped, the emulator uses that memory to more closely match the requested address range to the block size.

In the MC68020 emulator, the dual-port memory does not require wait states, even when you use the emulator at 33 MHz. Also, the dual-port memory is 16 bits wide.

In the MC68030/MC68EC030 emulator, the dual-port memory runs at maximum emulator speed. The dual-port memory in this emulator is 32 bits wide.

There are also two memory sockets on the probe. This memory is not dual-ported;

the monitor is used to read and write the locations when you display or modify memory. The bus width for this memory is 32 bits. You can install 256 Kbyte or 1 Mbyte emulator memory modules in these sockets for the following configurations.

Installation Memory slot 0** Memory slot 1** Blocks Available

1 256K 256K 4-64K, 2-128K

* Installation 2 is generally not recommended; it does not allocate blocks as well as Installation 3.

** If you look down at the component side of the probe with the cables leading towards you, memory slot 0 is to your left and memory slot 1 is to your right.

For each configuration, the “Blocks Available” indicate the minimum amount of memory that will be allocated if you specify a map term with that block size or less.

If you need to use emulation memory, you should examine your memory usage and install memory in the way that will maximize block usage. (See the examples on the next page.)

Mapping and Configuring Memory

If you specify the dsi attribute, the emulator waits for both the emulation memory data to become valid and your system DSACK to terminate an emulation memory cycle. This makes the bus cycle length identical to that of your target system, so that timing will be the same. If your target system does not return DSACK in the address range mapped to emulation memory, don’t use the dsi attribute, because the system will hang while waiting for your DSACK. (See “To Interlock Emulator and Target DSACKs for Monitor Cycles” for more information.) For the

MC68030/MC68EC030 emulator, your system STERM signal is also used for cycle termination if you specify the dsi attribute.

If you don’t specify the dsi attribute when you map a memory block, your target system DSACK and BERR signals (and STERM for the MC68030/MC68EC030) are ignored on accesses to that block.

If you specify the ci attribute (MC68030/MC68EC030 emulator only), the CIIN (cache inhibit input) line is asserted for accesses to that memory block. This prevents instructions or data from that memory block from being loaded into the processor cache memory. If you need to disable caching for all memory accesses, use the cf ce configuration item. See “To disable the processor cache memory” in this chapter.

If you want to add a term that overlaps address ranges with an existing term, you must either redefine or delete the existing term.

Some commands reset the memory mapper. These commands are: map -d *, cf mon, cf monaddr. You should configure the emulator before you map memory.

Otherwise, you will need to reenter the map commands.

Example Suppose you’re using the emulator in-circuit, and that there is a 12-byte I/O port at 1c000 hex in your target system. You have ROM in your system from 0 through ffff hex. Also, you want to use the dual-port emulation memory at 20000 hex:

R>map 1c000..1c0ff tram R>map 0..0ffff trom

R>map 20000..20fff eram dp

Remember that you must use the background monitor if you want to use the dual-port emulation memory to store your program.

The relationship between memory ranges and the block sizes of memory is easier to understand by looking at an example. Suppose you have Installation 1 from the table above. Then you enter the following map commands:

R>map 0..7fff eram R>map 20000..3f0ff eram R>map 40000..4ffff eram R>map 50000..500ff eram

If you haven’t used the dual-port emulation RAM, the first map term that will fit is assigned to that memory. In this example, that is the last term you defined (the range from 50000..500ff). The entire 4 Kbyte block is reserved even though you specified only a 256-byte range. Two 64K blocks and one 128K block are used from the other emulation memory, leaving two 64K blocks and one 128K block.

One of the 64K blocks is used for the first map term, but 32K of that block is unused and unavailable. The third term uses the other 64K block. The second term uses part of the 128K block, leaving the rest unavailable.

The mapper’s resolution is independent of the block allocation. In the above example, if you had map other grd and your program accessed 8000h, the emulator would do a break on access to guarded memory.

Mapping and Configuring Memory

Combinations of regular emulation memory and dual-port emulation memory may be confusing when you look at analysis displays. Assume that you have installation 3 from the table. Suppose you reset the map, and then mapped a range covering 260 Kbytes:

R>map 0..40fff eram

The emulator will allocate one 256K block from the emulation memory modules and will use the 4-Kbyte, dual-port memory for the rest of the range. Only one mapper term is created (without the dp attribute). In the MC68020, because the emulation memory modules are 32 bits wide and the dual-port memory is 16 bits wide, you will see a change from 32-bit to 16-bit fetches as the processor crosses the boundary between the two memory types.

You can use function codes when mapping memory. See “To Set the Function Code for Memory Loads” for examples.

Documents relatifs