home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
pdp11
/
doc
/
csr.vector.paper
< prev
next >
Wrap
Text File
|
1994-07-27
|
34KB
|
932 lines
CSR AND VECTOR ADDRESS SELECTION
Presented to the Los Angeles Area RSX DECUS LUG on 10-Jan-84 by:
Alan E. Frisbie
Flying Disk Systems
Originally presented at the Spring '83 DECUS Symposium by:
Atlant G. Schmidt
Principal Engineer
PDP11 Engineering
Digital Equipment Corporation
SYNOPSIS:
Devices are assigned addresses on Digital's I/O busses based on
an orderly scheme. If the user follows this scheme, an operating
system can automatically determine what I/O devices are connected to
any given bus. If the user violates this addressing scheme, peculiar
results can occur (e.g., "Where's this 37th DMP11 that it's
complaining about?").
The discussion that follows is equally valid for the UNIBUS or
LSI-Bus (Q-Bus), and for PDP11's or VAX's.
HISTORY AND REASONING
When the PDP11 architecture was developed, a 4 kilo-word region
of the physical-address-space was allocated to contain all the I/O
registers. This was called the I/O PAGE. Even at that time, it was ___ ____
realized that this was a limited amount of space, thus making these
addresses valuable.
A similar situation existed at the other end of memory. Only
64. interrupt vectors existed between 000000(8) an 000377(8). Even
though the vector region was later expanded to 128. vectors
(000000(8) to 000777(8)), this remained prime real-estate.
Communications was the sticking point. A system could contain
no communications devices, or it could contain a great many. It was
CSR and Vector address selection Page 2
also impossible to predice the mix of devices which might be
attached. It would clearly be impossible to reserve enough fixed I/O
page and interrupt vector addresses to satisfy everyone's needs all
of the time.
Therefore, space was reserved only for very common devices.
These devices were assigned FIXED CSR ADDRESSES, generally in the _____ ___ _________
upper part of the I/O page. If anything answers at that fixed CSR
address, it is assumed to be a device of the type that is assigned
that fixed address. If nothing answers, that type of device is
assumed to be non-existent on this bus. Many of these devices were
also assigned FIXED INTERRUPT-VECTOR ADDRESSES in the lower part of _____ ________________ _________
the interrupt-vector space.
Meanwhile, a large region near the bottom of the I/O page was
reserved as the space to hold all those unpredictable communications
devices, as well as overflow from the fixed devices. This region of
addresses was named the FLOATING ADDRESS SPACE. A similar region of ________ _______ _____
the vector space was reserved for FLOATING INTERRUPT VECTORS. ________ _________ _______
Due to the limited number of interrupt vectors available, many
devices which have fixed CSR addresses must still employ a floating
interrupt vector address.
OPERATION
Within the floating address space, it is impossible to tell what
type of device we are addressing simply by considering its address.
After all, didn't we just say the devices can float around anywhere
in that space? Not quite.
Devices addressed within the floating address space must be
placed in a SPECIFIC ORDER. All the DJ11's must come first, followed
by all the DH11's, followed by all the DQ11's, etc.
"Fine", you say, "but how do I know when the DJ's stop and the
DH's start?
Firstly, the first DJ11 msut be addressed at the very bottom of
the floating address space (760010(8)). That is our reference point.
The offset of 10 octal from the start of the I/O page is for memory
sizing and to guarantee non-existant memory (NXM) errors from DMA
devices (to avoid having them accidentally write all over your I/O
page).
Secondly, all the DJ11's must be addressed contiguously. There
can be no gaps between the end of one DJ's register block and the
start of the next DJ's. This holds true for all additional devices
in the floating address space. Exception: This assumes modulo 10(8)
address blocks. Example of the exception: If a device only has 3
registers, there will be a gap of 1 word before the start of the next
device of that class.
CSR and Vector address selection Page 3
Finally, at the end of the DJ11 block, there must be a 1-word
gap in the address space (i.e., instead of another DJ11, there is an
unused location). This lets the software know that it's time to stop
counting DJ's and time to start counting DH's. Enough additional
words must also be left unused to bring you to the first valid
address for the next group of devices. For example, DH's must start
on a 20(8) boundary. If the DJ gap ends up at 760020(8), the words
between 760022(8) and 760036(8) (inclusive) are also left unused.
The first DH11 is then placed at 760040(8).
This gap must follow each device group EVEN IF THERE WERE NO
EXISTENT DEVICES IN THAT GROUP. Translation: Even if you have no
DJ11's, you must leave the DJ gap so that the software can know that
it should advance to the DH group.
FLOATING ADDRESS GROUP ORDER
Listed below is the address assignment order for floating device
groups. This called the PRIORITY RANKING FOR FLOATING ADDRESSES. ________ _______ ___ ________ _________
This list is added to from time to time.
DJ11
DH11
DQ11
DU11
DUP11
LK11
DMC11
DZ11
KMC11
LPP11
VMV21
VMV31
DWR70
RL11
LPA11-K
KW11-C
<Reserved>
RX211
DR11-W
DR11-B*
DMP11
DPV11
ISB11
DMV11
DEUNA
UDA50
DMF32
KMS11
VS100
*Please read the note carefully
CSR and Vector address selection Page 4
Note that the first controller of some of these devices is
assigned a fixed address. Only the 2nd through Nth controllers go to
the floating address space. The DR11-B is a special case: The first
DR11-B occupies a fixed CSR address and fixed vector. The second
DR11-B occupies a fixed CSR address but floating vector. Subsequent
DR11-B's float both their CSR address and vector.
FLOATING VECTORS
While more devices are assigned to the floating vector space,
this represents an easier problem for some operating systems to
handle. These operating systems locate a device in the floating
address space (and thus know its type). They then force an interrupt
from the device and note which location it vectored through. RSTS/E
is an example of such a system. You only need to be sure that
vectors are uniquely assigned (no devices share the same vector).
Other operating systems calculate floating vectors similarly to
floating addresses and expect that their calculations will be born
out. For these systems, you must take care and assign vectors in the
right order. No gaps are needed, since the vectors aren't used to
distinguish groups of devices.
FLOATING VECTOR GROUP ORDER
Listed below is the assignment order for floating vectors. This
is called the PRIORITY RANKING FOR FLOATING VECTORS. This list is ________ _______ ___ ________ _______
added to from time to time. Please read an entire column from top to
bottom before advancing to the next column.
DC11 or TU58 DQ11 LPA11-K
KL11, DL11-A, -B KW11-W IP11, IP300
DP11 DU11 KW11-C
DM11-A DUP11 RX11, RX211
DN11 DV11 DR11-W
DM11-B LK11 DR11-B*
DH Modem Ctl DWUN DMP11
DR11-A DMC11 DPV11
DR11-C DMR11 ML11
PR611 DZ11, DZS11 ISB11
PP611 DZ32 DMV11
LPD11 KMC11 DEUNA
DT07 LPP11 UDA50
DX11 VMV21 DMF32
DL11-C, -D, -E VMV31 KMS11
DJ11 VTV01 PCL11-B
DH11 DWR70 VS100
GT40, VSV11 RL11
LPS11 TS11, TU80
* Please read the note under 'FLOATING ADDRESS GROUP ORDER'
CSR and Vector address selection Page 5
EXCEPTIONS AND SUMMARY
The CSR and vector address assignment method described in this
document is the standard method used by Digital Equipment Corporation
and is expected by the auto-sizing algorithms in DEC's software. If
you are ready, willing, and able (!) to over-ride the auto-sizing
algorithms, you may choose a different addressing method.
Perhaps you have a development system with oodles of hardware on
it. It demands a certain addressing scheme. Meanwhile, your
production machines may have little or none of this special hardware.
It would be convenient to assign I/O at the same addresses in all of
your machines (thus simplifying documentation, etc.). In this case,
it probably makes sense to choose to over-ride the system's
auto-sizing. By way of example, how many DZ11's have you seen
addressed at 760100(8), regardless of what else is on the system?
UNIBUS ADDRESS SPACE -- I
+--------------------+
777776 | |
+-- --+
| I/O |
+-- --+
| |
~~~ ~~~
4 K W ( 8 K B )
~~~ ~~~
| Space |
+-- --+
760000 | |
+--------------------+
757776 | |
+-- --+
| Memory |
+-- --+
| |
~~~ ~~~
1 2 4 K W ( 2 4 8 K B )
~~~ ~~~
| |
+-- --+
| Space |
+-- --+
000000 | |
+--------------------+
UNIBUS ADDRESS SPACE -- II
~~~ ~~~
| |
+-- --+
| P r o g r a m |
+-- --+
| S p a c e |
+-- --+
001000 | |
+--------------------+
000776 | |
+-- --+
| V e c t o r |
+-- --+
| |
~~~ ~~~
~~~ ~~~
| Space |
+-- --+
000000 | |
+--------------------+
RESERVED LOCATIONS
~~~ ~~~
| |
+-- --+
| |
+-- --+
760010 | | <------- Start of Floating
+--------------------+ Address Space
| . . . . . . . . . | <------+
+-- . . . . . . --+ |
| . . . . . . . . . | | Reserved to DEC
+-- . . . . . . --+ |--- to guarantee
| . . . . . . . . . | | N X M
+-- . . . . . . --+ |
760000 | . . . . . . . . . | <-------
+--------------------+
Vectors -- I
A Vector:
For PDP11's
+--------------------+
000302 | P S W |
+-- --+
000300 | P C |
+--------------------+
For VAX's
+--------------------+
000302 | Hi P C |
+-- --+
000300 | Low PC + Info |
+--------------------+
Vectors -- II
Typical Assignment:
~~~ ~~~
|__ __|
000330 |____________________|
|__ D J 2 (T) : __|
|____________________|
|__ D J 2 (R) : __|
000320 |____________________|
|__ D J 1 (T) : __|
|____________________|
|__ D J 1 (R) : __|
000310 |____________________|
|__ D J 0 (T) : __|
|____________________|
|__ D J 0 (R) : __|
000300 |____________________|
|__ __|
| |
~~~ ~~~
NATURAL BOUNDARIES - I
1 Word Boundaries -- Hypothetical device 'XX"
~~~ ~~~
| |
+-- --+
760030 | |
+--------------------+
| X X 7 : |
+--------------------+
| X X 6 : |
+--------------------+
| X X 5 : |
+--------------------+
760020 | X X 4 : |
+--------------------+
| X X 3 : |
+--------------------+
| X X 2 : |
+--------------------+
| X X 1 : |
+--------------------+
760010 | X X 0 : |
+--------------------+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
760000 | . . . . . . . . . |
+--------------------+
Note: This is not a valid configuration for auto-configuration.
NATURAL BOUNDARIES - II
2 Word Boundaries -- DN11 Auto-dialer
~~~ ~~~
| |
+-- --+
760030 | |
+--------------------+
| |
+-- D N 3 : --+
| |
+--------------------+
| |
+-- D N 2 : --+
760020 | |
+--------------------+
| |
+-- D N 1 : --+
| |
+--------------------+
| |
+-- D N 0 : --+
760010 | |
+--------------------+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
760000 | . . . . . . . . . |
+--------------------+
Note: This is not a valid configuration for auto-configuration.
NATURAL BOUNDARIES - III
4 Word Boundaries -- DZ11 Multiplexer
~~~ ~~~
| |
+-- --+
760030 | |
+--------------------+
| |
+-- --+
| |
+-- D Z 1 : --+
| |
+-- --+
760020 | |
+--------------------+
| |
+-- --+
| |
+-- D Z 0 : --+
| |
+-- --+
760010 | |
+--------------------+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
| . . . . . . . . . |
+-- . . . . . . --+
760000 | . . . . . . . . . |
+--------------------+
Note: This is not a valid configuration for auto-configuration.
NATURAL BOUNDARIES -- IV
8 Word Boundaries -- DH11 Multiplexer
~~~ ~~~
|__ __|
760060 |____________________|
|__ __|
|__ __|
|__ __|
760050 |__ D H 1 : __|
|__ __|
|__ __|
|__ __|
760040 |____________________|
|__ __|
|__ __|
|__ __|
760030 |__ D H 0 : __|
|__ __|
|__ __|
|__ __|
760020 |____________________|
|__ __|
|__ __|
|__ __|
760010 |____________________|
|__ . . . . . . . __|
|__ . . . . . . __|
|__ . . . . . . . __|
760000 |____________________|
N o t e c h a n g e o f s c a l e ! ! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
NATURAL BOUNDARIES -- V
Misconfiguring a DH11
Okay Bad Okay ____ ___ ____
~~~ ~~~ ~~~ ~~~ ~~~ ~~~
|_ _| |_ _| |_ _|
760060 |_ _| |_ _| |_____________|
|_ _| |_ _| |_ Silo Stat _|
|_ _| |_ _| |_ Break _|
|_ _| |_ _| |_ B A R _|
760050 |_ _| |_____________| |_ Byte Ct _|
|_ _| |_ Cur Adr _| |_ Cur Adr _|
|_ _| |_ L P R _| |_ L P R _|
|_ _| |_ Rcvd Char _| |_ Rcvd Char _|
760040 |_____________| |____S_C_R____| |____S_C_R____| _ _ _ _ _ _
|_ Silo Stat _| |_ Silo Stat _| |_ _|
|_ Break _| |_ Break _| |_ _|
|_ B A R _| |_ B A R _| |_ _|
760030 |_ Byte Ct _| |___Byte_Ct___| |_ _| ____ __
|_ Cur Adr _| |_ _| |_ _|
|_ L P R _| |_ _| |_ _|
|_ Rcvd Char _| |_ _| |_ _|
760020 |____S_C_R____| |_____________| |_____________| _ _ _
|_ _| |_ _| |_ _|
|_ _| |_ _| |_ _|
|_ _| |_ _| |_ _|
760010 |_____________| |_____________| |_____________|
|_ . . . . . _| |_ . . . . . _| |_ . . . . . _|
|_ . . . . _| |_ . . . . _| |_ . . . . _|
|_ . . . . . _| |_ . . . . . _| |_ . . . . . _|
760000 |_____________| |_____________| |_____________|
Even though the addressing jumpers allow you to set the DH11
to smaller boundaries, logic within the DH11 requires that it
be set to an address lying on an octaword boundary.
Failure to do so causes the register groups to 'leapfrog' to
funny addresses.
GAPS -- I
2 DJ11's and at least one DH11
~~~ ~~~
|__ __|
|__ __|
760060 |____________________|
|__ __|
|__ __|
|__ __|
760050 |__ D H 0 : __|
|__ __|
|__ __|
|__ __|
760040 |____________________| <-- Next possible
|__ / / / / / / / __| DH address
|__ / / / / / / __|
|____________________|
760030 |____________________| <-- DJ Gap
|__ __|
|__ D J 1 : __|
|__ __|
760020 |____________________|
|__ __|
|__ D J 0 : __|
|__ __|
760010 |____________________|
|__ . . . . . . . __|
|__ . . . . . . __|
|__ . . . . . . . __|
760000 |____________________|
GAPS -- II
3 DJ11's and at least one DH11
~~~ ~~~
|__ __|
|__ __|
760100 |____________________|
|__ __|
|__ __|
|__ __|
760070 |__ D H 0 : __|
|__ __|
|__ __|
|__ __|
760060 |____________________| <-- Next possible
|__ __| DH address
|__ / / / / / / __|
|__ / / / / / / __|
760050 |__ __|
|__ / / / / / / __|
|__ / / / / / / __|
|____________________|
760040 |____________________| <-- DJ Gap
|__ __|
|__ D J 2 : __|
|__ __|
760030 |____________________|
|__ __|
|__ D J 1 : __|
|__ __|
760020 |____________________|
|__ __|
|__ D J 0 : __|
|__ __|
760010 |____________________|
|__ . . . . . . . __|
|__ . . . . . . __|
|__ . . . . . . . __|
760000 |____________________|
GAPS -- III
No DJ11's and at least two DH11's
~~~ ~~~
|__ __|
|__ __|
760060 |____________________|
|__ __|
|__ __|
|__ __|
760050 |__ D H 1 : __|
|__ __|
|__ __|
|__ __|
760040 |____________________|
|__ __|
|__ __|
|__ __|
760030 |__ D H 1 : __|
|__ __|
|__ __|
|__ __|
760020 |____________________| <-- Next possible
|__ / / / / / / __| DH address
|__ / / / / / / __|
|____________________|
760010 |____________________| <-- DJ Gap
|__ . . . . . . . __|
|__ . . . . . . __|
|__ . . . . . . . __|
760000 |____________________|
GAPS -- IV
3 DJ11's, no DH11's and at least one DQ11
~~~ ~~~
|__ __|
|__ __|
760100 |____________________|
|__ __|
|__ D Q 0 : __|
|__ __|
760070 |____________________| <-- Next possible
|__ / / / / / / __| DQ address
|__ / / / / / / __|
|____________________|
760060 |____________________| <-- Next possible
|__ __| DH address --
|__ / / / / / / __| DH Gap
|__ / / / / / / __|
760050 |__ __|
|__ / / / / / / __|
|__ / / / / / / __|
|____________________|
760040 |____________________| <-- DJ Gap
|__ __|
|__ D J 2 : __|
|__ __|
760030 |____________________|
|__ __|
|__ D J 1 : __|
|__ __|
760020 |____________________|
|__ __|
|__ D J 0 : __|
|__ __|
760010 |____________________|
|__ . . . . . . . __|
|__ . . . . . . __|
|__ . . . . . . . __|
760000 |____________________|
GAPS -- V
Why your first DZ11 is at 760100
(No DJ's, DH's, DQ's, DU's, DUP's, LK's, or DMC's)
~~~ ~~~
760110 |____________________|
| |
| D Z 0 : |
| |
760100 |____________________| <-- Next possible
|__ / / / / / / __| DZ address
|__ / / / / / / __|
|____________________|
760070 |____________________| <-- Next possible
|__ / / / / / / __| DMC address --
|__ / / / / / / __| DMC Gap
|____________________|
760060 |____________________| <-- Next possible
|__ / / / / / / __| LK address --
|__ / / / / / / __| LK Gap
|____________________|
760050 |____________________| <-- Next possible
|__ / / / / / / __| DUP address --
|__ / / / / / / __| DUP Gap
|____________________|
760040 |____________________| <-- Next possible
|__ / / / / / / __| DU address --
|__ / / / / / / __| DU Gap
|____________________|
760030 |____________________| <-- Next possible
|__ / / / / / / __| DQ address --
|__ / / / / / / __| DQ Gap
|____________________|
760020 |____________________| <-- Next possible
|__ / / / / / / __| DH address --
|__ / / / / / / __| DH Gap
|____________________|
760010 |____________________| <-- Next possible
|__ . . . . . . . __| DJ address --
|__ . . . . . . __| DJ Gap
|__ . . . . . . . __|
760000 |____________________|
USING VMS SYSGEN TO CONFIGURE A PDP-11 SYSTEM
One of the most useful tools available to the PDP-11
configuration person is the VAX/VMS SYSGEN utility. SYSGEN has all
of the autoconfiguration rules built into it for all Floating Unibus ________
devices, both VAX and PDP-11. It also knows about any of the
fixed-CSR and vector devices that can be put on a VAX Unibus. Thus,
SYSGEN knows about the RK611 (RK07) and RL11 (RL02), but not the
RK05.
The best part is that to get a listing of CSR's and vectors, you
need not be a privileged VMS user -- any random user can do it. Full
information is in the VMS Utilities manual, but the following example
is all you really need:
$ run sys$system:sysgen
SYSGEN> help configure
CONFIGURE
Prompts by "DEVICE>" and accepts UNIBUS device names. Output is
the set of CSR and vector addresses that AUTOCONFIGURE will use.
Form of input:
device[[,n],p] (Default n = 1, p = 0)
where n is the number of devices on the UNIBUS being
configured and p is the optional number of devices
on all previous UNIBUS in a mulitple UNIBUS system.
Note that p does not affect the addresses generated,
only the device names.
Additional information available:
Qualifiers
/INPUT = <file-spec> (D=SYS$INPUT)
/OUTPUT = <file-spec> (D=SYS$OUTPUT) /NORESET
SYSGEN> configure
DEVICE> rl11
DEVICE> dh11
DEVICE> tu58
DEVICE> dmc11,2
DEVICE> dz11
DEVICE> ^Z
Device: TU58 Name: DDA CSR: 776500 Vector: 300* Support: yes
Device: DH11 Name: YHA CSR: 760020* Vector: 310* Support: no
Device: DMC11 Name: XMA CSR: 760110* Vector: 320* Support: yes
Device: DMC11 Name: XMB CSR: 760120* Vector: 330* Support: yes
Device: DZ11 Name: TTA CSR: 760140* Vector: 340* Support: yes
SYSGEN> ^Z
$