
SYM53C895 Modes
2-21
When a dword is accessed, no repositioning of the individual bytes is
necessary since dwords are addressed by the address of the least
signicant byte. SCRIPTS always uses dwords in 32-bit systems, so
compatibility is maintained between systems using different byte
orientations. When less than a dword is accessed, individual bytes must
be repositioned. Internally, the SYM53C895 adjusts the byte control logic
of the DMA FIFO and register decodes to access the appropriate byte
lanes. The registers always appear on the same byte lane, but the
address of the register is repositioned.
Big and little endian mode selection has the most effect on individual
byte access. Internally, the SYM53C895 adjusts the byte control logic of
the DMA FIFO and register decodes to enable the appropriate byte lane.
The registers always appear on the same byte lane, but the address of
the register is repositioned.
Data to be transferred between system memory and the SCSI bus
always starts at address zero and continues through address ‘n’. No byte
ordering exists in the chip. The rst byte in from the SCSI bus goes to
address 0, the second to address 1, etc. Going out onto the SCSI bus,
address zero is the rst byte out on the SCSI bus, address 1 is the
second byte, etc. The only difference is that in a little endian system,
address 0 is on byte lane 0, and in big endian mode address 0 is on byte
lane 3.
Correct SCRIPTS are generated if the SCRIPTS compiler is run on a
system that has the same byte ordering as the target system. Any
SCRIPTS patching in memory must patch the instruction with the byte
ordering that the SCRIPTS processor expects.
Software drivers for the SYM53C895 should access registers by their
logical name (that is, SCNTL0) rather than by their address. The logical
name should be equated to the register big endian address in big endian
mode (SCNTL0 = 0x03), and its little endian address in little endian
mode (SCNTL0 = 0x00). In this way, no change occurs to the software
when moving from one mode to the other; only the equate statement
setting the operating modes needs to be changed.
Addressing of registers from within a SCRIPTS instruction is
independent of bus mode. Internally, the SYM53C895 always operates in
little endian mode.