User`s manual

In a system using a V/360 (Agilent E1480) controller, for example, the base
address of the configuration registers is computed as:
C000
16
+ (LADDR * 64)
16
or
49,152 + (LADDR * 64)
where C000
16
(49,152) is the starting location of the register addresses,
LADDR is the AFG’s logical address, and 64 is the number of address bytes
in A16 per VXI device.
The AFG’s factory set logical address is 80. If this address is not changed,
the base address of the AFG’s configuration registers in A16 is:
C000
16
+ (80 * 64)
16
C000
16
+ 1400
16
= D400
16
or (decimal)
49,152 + (80 * 64)
49,152 + 5120 = 54,272
Given the base address and number of the Offset Register (06 in Figure C-1),
the base address of the operational registers in A24 can be determined as in the
following program.
Reading the Offset Register
10 ASSIGN @Afg to 1680 !Path from V/360 to AFG via VXI backplane
20 COM @Afg,Base_addr
30 CALL A24_offset
40 END
50 !
60 SUB A24_offset
70 A24_offset: !Subprogram which determines the base address for
80 !the AFG registers in A24 address space.
90 COM @Afg,Base_addr
100 CONTROL 16,25;2 !access A16 space with READIO and WRITEIO
110 A16_addr=DVAL("D400",16) !convert A16 base address to decimal number
120 Offset=READIO(-16,A16_addr+6) !read AFG offset register
130 Base_addr=Offset*256 !multiply offset for 24-bit address
140 SUBEND
As mentioned, multiplying the value of the Offset Register by 256 (or
100
16
) converts the 16-bit register value to a 24-bit address.
486 Register-Based Programming Appendix C