User's Manual

PMAC User Manual
Writing a Host Communications Program 259
Address Modifier Do Not Care Bits
This register (X:$0784) simply states which bits of the address modifier are don't care bits. In other
words, this tells which bits of the AM are ignored. The factory default of $04 tells PMAC to ignore bit 2
(value of 4) of the AM, so for example, it will recognize both $39 and $3D as valid 24-bit AMs. There
should be no reason to change this from the default.
Address Modifiers Commonly Used With PMAC VME
Address Modifier Function
$29 A16 16-bit addressing
$39 A24 24-bit addressing
$09 A32 32-bit addressing
PMAC Base Address Bits
The base address for PMAC VME is split into three values since there are three registers (X:$0785 -
$0787) here to contain the base address. The first register holds address bits A31 through A24, the
second holds bits A23 through A16, and the last holds bits A15 through A8 (the A8 bit must be 0).
Address bits A7 through A0 of the base address are not specified, and therefore are taken to be all 0. If
the base address in hex is written, it is easy to figure out which address bits are A31 - A24, etc.
Interrupt Level
When PMAC VME acknowledges the receipt of a command (valid or invalid) and/or has data to be read
by the host computer (or master), typically it generates (asserts) an interrupt on the VME bus. This
register (X:$0788) tells what interrupt level (from 1 to 7) will be used by PMAC. The factory default is a
value of $02 for interrupt level 2. Therefore, when the host detects an interrupt on interrupt level 2,
PMAC generated this interrupt. Be aware that the interrupt must be serviced or acknowledged by the host
computer before PMAC withdraws its interrupt assertion.
Interrupt Vector Number
When an interrupt is generated by PMAC VME, the host computer will also read an interrupt vector
which is sent with the interrupt. PMAC will send one of two interrupt vectors with each interrupt
generated, indicating a particular condition. The factory default is a value of $A1, which means PMAC
will send either an $A0 or $A1 interrupt vector every time it generates an interrupt. However, when does
PMAC send an $A0 vector and when does PMAC send an $A1 vector? We know that PMAC generates
an interrupt on the VME bus every time it has data to send, whether it is only one character (like a
linefeed <LF> character) or several characters (like the current position of a motor).
In this example (using the factory default), an $A0 vector will be sent every time PMAC receives a set of
characters from the mailbox registers, whether it is a partial or full command line. This is the PMAC way
of acknowledging the receipt of a command line such as: I100=1<CR> or #1J+<CR>. An $A1
vector will be sent if there is data waiting to be read by the host. For example, if asking PMAC for the
value of a P-variable or asking to list a program in the PMAC memory, PMAC will generate an interrupt
accompanied by an $A1 vector indicating that there is data to be read in its mailbox registers. (A detailed
example of how to read and write to the mailbox registers is given in subsequent sections.)
Dual-Ported RAM Base Address
The dual-ported RAM, if used, has a different base address from that of the mailbox. This register
(X:$078A) is where specify address bits A23 through A20 of the dual ported RAM (DPRAM) starting
address. The first four bits of this register specify A23-A20 of the base address. The low four bits of this
register should be set to 0. For example, if the base address of the DPRAM is $780000, this register would
be set to $70, where the 7 in the high four bits of the byte represents the 7 in bits 23-20 of the base address.
If using A32 32-bit addressing, address bits A24-A31 of the DPRAM are the same as for the mailbox
base address, as specified in X:$0785.