User’s Guide
21020285 D
Chapter 8 Details of Usage
Byte and Word Swapping
Page 8 - 3
Byte and Word
Swapping
The RF3880 adapter is flexible enough to allow you to request Byte Swapping,
Word Swapping, or both, during transfers of command structures.
This section will first give you some examples to explain why the swapping
feature is offered to you, then provide a perspective on implementation with
the RF3880 for both Command Structures used by the RF3880 (which the
adapter can swap) and data (which needs special software if swapping is
necessary).
Need for
Swapping
The memory architecture of your system depends on the type of processor you
are using. There are several major manufacturers that each use different
arrangements of bytes, words, and double-words in memory. The two most
common formats are: Intel and Motorola. Their differences are illustrated in
the example below:
Example of Memory Differences
If you were to define the following variables in a program:
char byte[] = “test”;
int word[2] = {0x0102, 0x0304};
double dword = 0xAABBCCDD;
They would appear this way in memory (beginning at location n) for each
respective format:
Essentially the two processors store a string of bytes in the same order.
However, the bytes that make up word and double-word information are stored
in an order opposite to each other:
The RF3880 adapter must correctly access the command structures for either
type of processor.
Throughout this manual, the Parameter and Status Blocks that make up the
command structures are represented double-word wide, in Motorola ordering.
If you have an Intel processor, you will need to translate these displays to your
format. The following example will help explain this.
variable
Byte # of memory
Intel Order
Motorola Order
byte
n
t
e
s
t
t
e
s
t
word
n + 4
02
01
04
03
01
02
03
04
dword
n + 8
DD
CC
BB
AA
AA
BB
CC
DD
Table 108: Variations in Intel and Motorola Memory
Processor Type
Byte of word or
double-word
Order in memory
Motorola
LSB*
stored in highest memory address
MSB*
stored in lowest memory address
Intel
LSB
stored in lowest memory address
MSB
stored in highest memory address
Table 109: Explanation of Memory Storage Differences
Summary of Contents for Rimfire 3880
Page 1: ...Rimfire 3880 SCSI Host Bus Adapter User s Guide Ciprico Inc Publication No 21020285 D...
Page 2: ......
Page 4: ...21020285 D User s Guide...
Page 25: ...2 H a r d w a r e E s s e n t i a l s...
Page 42: ...21020285 D User s Guide Chapter 2 Hardware Essentials Page 2 18 Descriptions of Port Usage...
Page 43: ...3 H a r d w a r e I n s t a l l a t i o n...
Page 59: ...4 C o m m a n d O p e r a t i o n...
Page 85: ...5 I n i t i a t o r M o d e P a s s t h r o u g h C o m m a n d s...
Page 103: ...6 T a r g e t M o d e P a s s t h r o u g h C o m m a n d s...
Page 125: ...7 B o a r d c o n t r o l C o m m a n d s...
Page 175: ...8 D e t a i l s o f U s a g e...
Page 193: ...A E r r o r C o d e s...
Page 201: ...B C a b l e s a n d C o n n e c t o r s...
Page 206: ...21020285 D User s Guide Appendix B Cables and Connectors Page B 6 VMEbus Connector Pinouts...
Page 207: ...C S p e c i f i c a t i o n s...
Page 210: ...21020285 D User s Guide Appendix C Specifications Page C 4 Specifications...
Page 211: ...D D e f a u l t s...
Page 216: ...21020285 D User s Guide Appendix D Defaults Page D 6 HardwareDefaults...
Page 217: ...E D e s i g n D i f f e r e n c e s...
Page 229: ......
Page 230: ...21020285 D...