Specifications

EPC-8A Hardware Reference
46
for these bits. 2Dh = 00101101b
Bit 3 (Address Modifier bit 5) = 1
Bit 2 (Address Modifier bit 4) = 0
Bit 1 (Address Modifier bit 2) = 1
Bit 0 (Address Modifier bit 1) = 0
Thus, 8151h should be set to 1100 1010 or CAh.
1. Map the address.
Add the A16 address to the “E page” address
Addr
segment:offset + A16 address
2. Read the data.
Data
value pointed to by Addr
C code for Example 1
#define WORD unsigned short
#define LWORD unsigned long
WORD addr; /* 16-bit A16 address */
WORD data;
WORD far * wptr;
outp(0x8102,(inp(0x8102)|2));/* set VME E-page enable access bit */
outp(0x8151,0xCA); /* Set address modifier to A16 supervisory
access */
wptr = (WORD far *) (0xE0000000L + addr);
data = *wptr; /* Read through window */
Example #2
Example #2 performs a byte (8-bit) write into the VMEbus A32 space. Here the upper 16
bits of the VME address need to be stored in the appropriate registers.
1. Set the VME E-page enable bit in Register 8102h.
2. Set register 8150h with the value corresponding to the 8 high-order address bits.
3. Determine the correct address modifier for A32 supervisory access.
4. Calculate the value and set register 8151h as follows:
Bits 7 & 6 VME address bits 23–22
Bit 5 BORD = 0
Bit 4 IACK = 0
Bits 3–0 Bit 3 (Address Modifier bit 5)
Bit 2 (Address Modifier bit 4)
Bit 1 (Address Modifier bit 2)
Bit 0 (Address Modifier bit 1)
VMEbus Address bits 31–24 WA31–24
VME WA23–22 BORD IACK AM5 AM4 AM2 AM1