User's Manual

PMAC User Manual
262 Writing a Host Communications Program
Binary
1 1 1 1 1 1
Hex
3 F
Therefore, we write $3F from the VME host computer (master) into VMEbus location $7FA121 after
PMAC is powered up or reset.
At this point, the starting address of DPRAM is fully specified. However, check two more register
locations in the PMAC memory to make sure they have appropriate values. Location X:$078B must have
a value of $E0 to enable the DPRAM chip installed on the PMAC VME and modify the value in location
X:$078C (the address width register) by adding $80 to the existing value. For this example, the PMAC
register values would be:
PMAC Address Value
X:$0783 $39
X:$0784 $04
X:$0785 $00
X:$0786 $7F
X:$0787 $A0
X:$0788 $02
X:$0789 $A1
X:$078A $10
X:$078B $E0
X:$078C $90
Note:
This dynamic addressing scheme provides the capability for addressing up to 1M
byte of DPRAM in 16K byte blocks, by changing the value of base + $121 on the
fly. However, PMAC VME currently utilizes only a single 16 Kbyte block (8K x
16), so the base + $121 register only has to be written to once every time PMAC is
powered up or reset.
The shaded registers above contained the values changed (from previous example) to enable DPRAM. A
simple write command followed by a SAVE command to PMAC will put these values into their
appropriate registers and make them permanent:
WX$0783,$39,$4,$0,$7F,$A0,$02,$A1,$10,$E0,$90
SAVE
Remember that these values must be saved with the SAVE command and then the card reset (with the
$$$ command, the INIT/ input line pulled low, or power cycled) before these new values will take effect.
After writing $3F to $7FA121 (base + $121), the dual ported RAM is ready to be used. See the PMAC
Dual-Ported RAM User Manual for more information.
Talking to PMAC VME through the Mailbox Registers
Communicating with PMAC over the VME bus is different from talking over the RS232/422 port. When
reading and writing to PMAC VME over the VME bus, make use of the 16 mailbox registers. Mailbox
registers are simply a set of 16 8-bit registers which are addressable from the VME bus beginning at the
base address of the PMAC VME card plus 1. That is, if a PMAC base address of $7FA000 is selected,
the first mailbox register (mailbox register #0) can be accessed at location $7FA001. The second mailbox
register (mailbox register #1) is located $7FA003, the third at $7FA005, and so on up to $7FA01F for the
16th mailbox register (mailbox register #15). The mailbox registers are located at odd addresses
beginning with the base address plus one of PMAC.