Expanded Memory:
A Brief Description

Applies to: GCC-1750 Version 1.0.
Last updated: Friday May 03, 2002.

SUMMARY

Like other members of the GCC family, GCC-1750 uses 32-bit byte addresses to refer to locations in target memory. The fact that the 1750 is a 16-bit word addressed architecture is only relevant for instructions and data objects that contain relative or absolute addresses, and the linker handles these cases as part of its usual fixup processing. On the 1750A, addresses computed at run-time will always be 16-bit word addresses. For the 1750B, which supports 16-bit and 24-bit addresses, the linker will make 16-bit or 24-bit fixups as appropriate.

In GCC-1750 expanded memory is an option. The default code generation and linking model is uses 64K words of memory shared by instructions and data.

For targets where code and data are separate, then using default code generation, the linker can build an application with 64K words of instructions and a further 64K words of data. The compiler will clearly separate instruction addresses from data addresses, and the linker will locate both code and data starting from address zero. Note that the hardware must provide one extra bit of address to make this scheme work. (i.e. 17-bit addressing)

Long Calls

For targets that have the 1750 memory management capability, the compiler can generate long calls and long returns instead of the default SJS and URS instructions. The long instructions are actually BEX instructions and are handled by the run-time system. Like the default 64K model, this expanded memory model limits the data that is directly accessible to 64K words. The instruction space is greatly expanded, to 1M word on the 1750A and 8M words on the 1750B.

The indirect calls are much less efficient than a simple SJS instruction, but are only used for calls to external functions. Calls to static functions always use the SJS mechanism even with expanded memory.

Addresses

For the 1750B, the long address instructions may be used to access data in any memory location. To load a long literal address, use the LLIM (pseudo) instruction.

There are several forms of expanded address as follows:

bulletThe GCC address, which is a 32-bit byte address.
bulletThe 1750’s internal address, which comprises a 16-bit word address and either 4 or 8 bits from the SW register that form the most significant bits of a 20 or 24 bit long address.
bulletThe 1750B long address, which is 24 bits in size and which directly addresses the physical memory bypassing any memory management unit.

In GCC-1750, the default setting for the memory management tables results in a direct mapping of instruction addresses from the logical space to the physical space. In other words it is as if the memory management unit was bypassed.

Multi-Program Solution

Where a program is too big to fit into 64K words, it may be possible to split the program into two or more separate programs that can each run its own 64K address state. One address state, address state zero, may be used for device drivers and other system code, while other address states can contain application code. In the absence of a time-sharing run-time system, only one application may run at a time, but this may be how the software works anyway.

In a future version of our 1750 products, we may offer a kernel that allows up to 15 separate application programs to run in parallel, and communicate using the BEX mechanism.

 

Updated May 11, 2005
Copyright XGC Software