Difference between pages "UNIBUS" and "PDP-11 Memory Management"

From Computer History Wiki
(Difference between pages)
Jump to: navigation, search
m (See also: + memories)
 
(Control: minor error)
 
Line 1: Line 1:
{{wp-orig}}
+
[[PDP-11]]s which provide memory management use a standard '''PDP-11 Memory Management''' architecture. When memory management is enabled, the basic 64 Kbyte address space of the [[PDP-11 architecture]] is divided into 8 '''segments'''; each segment of the virtual address space can be assigned to any location in physical memory.
  
The '''UNIBUS''' (or '''Unibus''' - the capitalization style changed over time) was the earliest of two [[computer bus|bus]] technologies used with [[PDP-11]]s manufactured by [[Digital Equipment Corporation]]; it was first seen in the [[PDP-11/20]], in 1970. Later, early [[VAX]] systems from that company used the UNIBUS as an I/O bus.
+
Each segment can be set to any length between 0 bytes and 8 Kbtes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; this is to accomodate PDP-11 stacks, which typically grow down (from higher addresses to lower).
  
It was the only bus in most PDP-11 systems, and thus supported several capabilities: the ability of the processor to read and write main memory, and device registers; and the ability for devices to do [[DMA]] transfers to memory, and interrupt the CPU.
+
An additional enhancement is that instruction and data fetches can be set to go to separate 64 Kbyte address spaces, the so-called '''Split I+D space''' capability; this increases the memory available to the operating system, and each user, to 128 Kbytes.
  
It could exist on a cable (the original mode of operation), and later, within a backplane (in '[[Small Peripheral Controller]] (SPC)' or '[[Modified UNIBUS Device]] (MUD)' slots). Up to 20 nodes (devices) could be connected to a single UNIBUS segment; additional segments could be connected via a bus repeater.
+
(Since immediate operands and absolute addresses are stored contiguous with their instructions, fetches of them are considered to be instruction fetches, for the purposes of deciding which space to use for them.)
  
The UNIBUS contained 16 data lines, and 18 address lines; the 18 address lines allowed the addressing of a maximum of 256 KBytes. Typically, the top 8 KBytes of address space was reserved for the registers of the memory mapped IO devices used in the [[PDP-11 architecture]]. (The limit of 18 address lines was to prove a severe handicap in the later phases of the UNIBUS' operational life.)
+
If any instruction causes a fault (i.e. an attempt to perform a memory operation which cannot be completed, because of the settings of the memory management - e.g. an attempt to write into a segment set as 'read only'), execution of the instruction is aborted, and a memory managemen [[trap]] occurs.
  
The bus was completely asynchronous, allowing a mixture of fast and slow devices. It allowed the overlapping of arbitration (selection of the next ''bus master'') while the current bus master was still performing data transfers.
+
===Simplified subset===
  
The design deliberately minimized the amount of redundant logic required in the system. For example, a system always contained more slave devices than master devices, so most of the complex logic required to implement asynchronous data transfers was forced into the relatively few master devices. For interrupts, only the ''interrupt-fielding processor'' needed to contain the complicated timing logic.
+
A number of the smaller PDP-11's (notably the [[PDP-11/40]], [[PDP-11/34]] and [[PDP-11/23]]) only provide a limited subset of the standard memory management facilities. In these machines, there is no support for Split I+D, and no Supervisor mode (just Kernel and User).
  
The end result was that most I/O controllers could be implemented with very simple logic; most of the critical logic was later implemented as a custom MSI IC.
+
Also, there is no SSR1 register (below), which can make re-starting instructions which cause a fault laborious (the fault-handling code has to decipher the instruction and effectively simulate its operation, to work out which registers need to be 'backed out'), and in some cases impossible (e.g. instructions which auto-increment the same register several times).
  
==Technical details==
+
==Registers==
  
Two control lines (C0 and C1) allowed the selection of four different data transfer cycle types in normal master/slave cycles:
+
The memory management is entirely controlled by groups of registers in the CPU (unlike many virtual memory systems, which use page tables held in main memory, and cached in the CPU).
  
* DATI (Data In, a read)
+
===Control===
* DATIP (Data In/Pause, the first portion of a Read-Modify-Write operation. A DATO or DATOB operation completes this.)
 
* DATO (Data Out, a word write)
 
* DATOB (Data Out/Byte, a byte write)
 
  
During an interrupt cycle, a fifth style of transfer was used to convey an ''interrupt vector'' from the interrupting device to  the ''interrupt-fielding processor''.
+
There are four registers which control the overall operation of the Memory Management Unit:
  
===Lines===
+
{| class="wikitable"
 +
! Address !! Name !! Function
 +
|-
 +
| 777572 || SSR0 || Control and status
 +
|-
 +
| 777574 || SSR1 || Register increment/descrement record
 +
|-
 +
| 777576 || SSR2 || Virtual address associated with the fault (usually the instruction address)
 +
|-
 +
| 777516 || SSR3 || D-space enable/disable (per mode)
 +
|}
 +
 
 +
SSR0 contains control bits (e.g. enabling memory management) and status bits (e.g. information about memory operations which caused a memory management fault, and the segment involved).
  
The UNIBUS is usually described as containing 56 lines. In its initial BC11A cable instantiation, the UNIBUS was composed of 72 wires (2 standard DEC board edge connectors, with 36 lines per connector); when not counting the power and ground lines, this was reduced to the canonical 56.
+
SSR1 contains information about register modifications performed during the course of an instruction, to allow those modifications to be 'backed out' if the instruction needs to be restarted after a memory management fault.
  
Among the UNIBUS signals are:
+
SSR2 contains the address of the instruction which caused the memory management fault.
  
* BR4-BR7 - Bus (Interrupt) Requests at priorities 4 (lowest) through 7 (highest)
+
SSR3 contains bits to enable Split I+D in the three modes; on machines which have [[UNIBUS map]]s, the enable for it is also here.
* BG4-BG7 - Bus (Interrupt) Grants at priorities 4 (lowest) through 7 (highest)
 
* NPR    - Non Processor (DMA) Request
 
* NPG    - Non Processor (DMA) Grant
 
* MSYNC  - Master Sync
 
* SSYNC  - Slave Sync
 
* BBSY    - Bus Busy
 
* SACK    - Selection Acknowledge
 
* PA, PB  - Parity control
 
* C0, C1  - Cycle Control
 
  
==Cables==
+
===PARs and PDRs===
  
For many years, the cable used to carry the UNIBUS from one backplane to another was the BC11A cable, a pair of wide (3-3/4 inch) white flexible printed circuit flat cables, separated by a thin foam layer, with small printed circuit boards with edge connector fingers on each end of the cable. The latter plugged into 'UNIBUS In' and 'UNIBUS out' slots in backplanes. The flat cables actually contained 64 connectors each; every other trace was grounded, to prevent [[cross-talk]] between the signal lines.
+
Each segment (48 in total; 8 each Instruction and Data, for the three different modes) is described by a pair of registers, a Page Descriptor Register (PDR) and a Page Address Register (PAR).
  
DEC later developed a series of cards (the M9014, an [[DEC card form factor|extended height dual card]], and the M9042 short dual card) which plug into the same slots, and contain three 2x20 headers for 40-conductor flat cables (known as H854 cables in DEC parlance); a pair of these, and three cables, perform the same role as a BC11A cable. Both of these cards use the [[UNIBUS H854 header pinout|same header pinout]], so they may be used interchangeably.
+
The PAR contains the base physical address for the segment (in units of 0100/64. bytes). On machines which have only [[UNIBUS]] memory (e.g. PDP-11/40, [[PDP-11/45]], etc) these registers are 12 bits long, since the maximum amount of physical memory on these machines is 248 Kbytes. On machines which support up to 4 MBytes of physical memory (e.g. [[PDP-11/70]], [[PDP-11/44]], PDP-11/23, etc), they are 16 bits long.  
  
==Pinout==
+
The PDR contains the segment's length, along with the direction of growth, the access control field (read/only, read/write, etc), a 'dirty' bit (maintained by the hardware), etc.
 +
 
 +
When split I+D is not enabled in any mode, a single 64 Kbyte address space is provided, using only the I-space registers for that mode.
 +
 
 +
The addresses of the PAR/PDR sets are:
  
The following table gives the pinout for the flat cable form and SPC slot form. Pins are identified in the [[DEC card form factor#Edge connector contact identification|standard DEC manner]]; there are two connectors, A and B; pins on the component side are 1, those on the solder side are 2. Pins are identified by the '[[DEC alphabet]]', A-V, with G, I, O and Q dropped.
 
 
 
{| class="wikitable"
 
{| class="wikitable"
! Signal !! Assertion !! Termination !! Cable Pin !! SPC Pin
+
! Address !! Name !! Function
|-
 
| colspan="5" style="text-align:center;" | Initialization and Shutdown
 
|-
 
| DC LO || L || Slow || BF2 || CN1
 
 
|-
 
|-
| AC LO || L || Slow || BF1 || CV1
+
| 772200 || SISD0 || Supervisor I-Space PDR #0
 
|-
 
|-
| INIT || L || Fast || AA1 || DL1
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| colspan="5" style="text-align:center;" | Arbitration
+
| 772216 || SISD7 || Supervisor I-Space PDR #7
 
|-
 
|-
| NPR || L || Fast || AS2 || FJ1
+
| 772220 || SDSD0 || Supervisor D-Space PDR #0
 
|-
 
|-
| BR7 || L || Fast || AT2 || DD2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| BR6 || L || Fast || AU2 || DE2
+
| 772236 || SDSD7 || Supervisor D-Space PDR #7
 
|-
 
|-
| BR5 || L || Fast || BC1 || DF2
+
| 772240 || SISA0 || Supervisor I-Space PAR #0
 
|-
 
|-
| BR4 || L || Fast || BD2 || DH2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| NPG || H || Grant || AU1 || In-CA1; Out-CB1
+
| 772256 || SISA7 || Supervisor I-Space PAR #7
 
|-
 
|-
| BG7 || H || Grant || AV1 || In-DK2; Out-DL2
+
| 772260 || SDSA0 || Supervisor D-Space PAR #0
 
|-
 
|-
| BG6 || H || Grant || BA1 || In-DM2; Out-DN2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| BG5 || H || Grant || BB1 || In-DP2; Out-DR2
+
| 772276 || SDSA7 || Supervisor D-Space PAR #7
 
|-
 
|-
| BG4 || H || Grant || BE2 || In-DS2; Out-DT2
+
| 772300 || KISD0 || Kernel I-Space PDR #0
 
|-
 
|-
| SACK || L || Fast || AR2 || FT2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| colspan="5" style="text-align:center;" | Addressing
+
| 772316 || KISD7 || Kernel I-Space PDR #7
 
|-
 
|-
| A00 || L || Fast || BH2 || EH2
+
| 772320 || KDSD0 || Kernel D-Space PDR #0
 
|-
 
|-
| A01 || L || Fast || BH1 || EH1
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A02 || L || Fast || BJ2 || EF1
+
| 772336 || KDSD7 || Kernel D-Space PDR #7
 
|-
 
|-
| A03 || L || Fast || BJ1 || EV2
+
| 772340 || KISA0 || Kernel I-Space PAR #0
 
|-
 
|-
| A04 || L || Fast || BK2 || EU2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A05 || L || Fast || BK1 || EV1
+
| 772356 || KISA7 || Kernel I-Space PAR #7
 
|-
 
|-
| A06 || L || Fast || BL2 || EU1
+
| 772360 || KDSA0 || Kernel D-Space PAR #0
 
|-
 
|-
| A07 || L || Fast || BL1 || EP2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A08 || L || Fast || BM2 || EN2
+
| 772376 || KDSA7 || Kernel D-Space PAR #7
 
|-
 
|-
| A09 || L || Fast || BM1 || ER1
+
| 777600 || UISD0 || User I-Space PDR #0
 
|-
 
|-
| A10 || L || Fast || BN2 || EP1
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A11 || L || Fast || BN1 || EL1
+
| 777616 || UISD7 || User I-Space PDR #7
 
|-
 
|-
| A12 || L || Fast || BP2 || EC1
+
| 777620 || UDSD0 || User D-Space PDR #0
 
|-
 
|-
| A13 || L || Fast || BP1 || EK2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A14 || L || Fast || BR2 || EK1
+
| 777636 || UDSD7 || User D-Space PDR #7
 
|-
 
|-
| A15 || L || Fast || BR1 || ED2
+
| 777640 || UISA0 || User I-Space PAR #0
 
|-
 
|-
| A16 || L || Fast || BS2 || EE2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| A17 || L || Fast || BS1 || ED1
+
| 777656 || UISA7 || User I-Space PAR #7
 
|-
 
|-
| colspan="5" style="text-align:center;" | Data
+
| 777660 || UDSA0 || User D-Space PAR #0
 
|-
 
|-
| D00 || L || Fast || AC1 || CS2
+
| colspan="2" style="text-align:center;" | ...
 
|-
 
|-
| D01 || L || Fast || AD2 || CR2
+
| 777676 || UDSA7 || User D-Space PAR #7
|-
 
| D02 || L || Fast || AD1 || CU2, FE2%
 
|-
 
| D03 || L || Fast || AE2 || CT2, FL1%
 
|-
 
| D04 || L || Fast || AE1 || CN2, FN2%
 
|-
 
| D05 || L || Fast || AF2 || CP2, FF1%
 
|-
 
| D06 || L || Fast || AF1 || CV2, FF2%
 
|-
 
| D07 || L || Fast || AH2 || CM2, FH1%
 
|-
 
| D08 || L || Fast || AH1 || CL2, FK1%
 
|-
 
| D09 || L || Fast || AJ2 || CK2
 
|-
 
| D10 || L || Fast || AJ1 || CJ2
 
|-
 
| D11 || L || Fast || AK2 || CH1
 
|-
 
| D12 || L || Fast || AK1 || CH2
 
|-
 
| D13 || L || Fast || AL2 || CF2
 
|-
 
| D14 || L || Fast || AL1 || CE2
 
|-
 
| D15 || L || Fast || AM2 || CD2
 
|-
 
| colspan="5" style="text-align:center;" | Control
 
|-
 
| C0 || L || Fast || BU2 || EJ2
 
|-
 
| C1 || L || Fast || BT2 || EF2
 
|-
 
| PA || L || Fast || AM1 || CC1
 
|-
 
| PB || L || Fast || AN2 || CS1
 
|-
 
| BBSY || L || Fast || AP2 || FD1
 
|-
 
| MSYN || L || Fast || BV1 || EE1
 
|-
 
| INTR || L || Fast || AB1 || FM1
 
|-
 
| SSYN || L || Fast || BU1 || EJ1, FC1%
 
|-
 
| colspan="5" style="text-align:center;" | Power
 
|-
 
| Ground || N/A || N/A || AB2
 
|-
 
| Ground || N/A || N/A || AC2 || xC2
 
|-
 
| Ground || N/A || N/A  || AN1
 
|-
 
| Ground || N/A || N/A  || AP1
 
|-
 
| Ground || N/A || N/A  || AR1
 
|-
 
| Ground || N/A || N/A  || AS1
 
|-
 
| Ground || N/A || N/A  || AT1 || xT1
 
|-
 
| Ground || N/A || N/A  || AV2
 
|-
 
| Ground || N/A || N/A  || BB2
 
|-
 
| Ground || N/A || N/A  || BC2
 
|-
 
| Ground || N/A || N/A  || BD1
 
|-
 
| Ground || N/A || N/A  || BE1
 
|-
 
| Ground || N/A || N/A  || BT1
 
|-
 
| Ground || N/A || N/A  || BV2
 
|-
 
| +5 ||  N/A || N/A || AA2 || xA2
 
|-
 
| +5 || N/A || N/A  || BA2
 
|-
 
| -15 || N/A || N/A || N/A || xB2 (except 1A, 1B, 4A, 4B)
 
 
|}
 
|}
 
Entries of the form 'xYN' mean that that is available on all 4 [[DEC card form factor#Edge connector contact identification|connectors]] (A, B, C and D) in each slot.
 
 
% For forward compatibility, use the first pin rather than the second
 
 
== See also ==
 
 
* [[Extended UNIBUS]]
 
* [[Small Peripheral Controller]]
 
* [[Modified UNIBUS Device]]
 
* [[UNIBUS memories]]
 
* [[QBUS]]
 
  
 
{{PDP-11}}
 
{{PDP-11}}
 
[[Category:Bus Architectures]]
 

Revision as of 00:12, 16 August 2016

PDP-11s which provide memory management use a standard PDP-11 Memory Management architecture. When memory management is enabled, the basic 64 Kbyte address space of the PDP-11 architecture is divided into 8 segments; each segment of the virtual address space can be assigned to any location in physical memory.

Each segment can be set to any length between 0 bytes and 8 Kbtes, in 0100 (64.) byte increments. Segments can grow either up from their base address, or down; this is to accomodate PDP-11 stacks, which typically grow down (from higher addresses to lower).

An additional enhancement is that instruction and data fetches can be set to go to separate 64 Kbyte address spaces, the so-called Split I+D space capability; this increases the memory available to the operating system, and each user, to 128 Kbytes.

(Since immediate operands and absolute addresses are stored contiguous with their instructions, fetches of them are considered to be instruction fetches, for the purposes of deciding which space to use for them.)

If any instruction causes a fault (i.e. an attempt to perform a memory operation which cannot be completed, because of the settings of the memory management - e.g. an attempt to write into a segment set as 'read only'), execution of the instruction is aborted, and a memory managemen trap occurs.

Simplified subset

A number of the smaller PDP-11's (notably the PDP-11/40, PDP-11/34 and PDP-11/23) only provide a limited subset of the standard memory management facilities. In these machines, there is no support for Split I+D, and no Supervisor mode (just Kernel and User).

Also, there is no SSR1 register (below), which can make re-starting instructions which cause a fault laborious (the fault-handling code has to decipher the instruction and effectively simulate its operation, to work out which registers need to be 'backed out'), and in some cases impossible (e.g. instructions which auto-increment the same register several times).

Registers

The memory management is entirely controlled by groups of registers in the CPU (unlike many virtual memory systems, which use page tables held in main memory, and cached in the CPU).

Control

There are four registers which control the overall operation of the Memory Management Unit:

Address Name Function
777572 SSR0 Control and status
777574 SSR1 Register increment/descrement record
777576 SSR2 Virtual address associated with the fault (usually the instruction address)
777516 SSR3 D-space enable/disable (per mode)

SSR0 contains control bits (e.g. enabling memory management) and status bits (e.g. information about memory operations which caused a memory management fault, and the segment involved).

SSR1 contains information about register modifications performed during the course of an instruction, to allow those modifications to be 'backed out' if the instruction needs to be restarted after a memory management fault.

SSR2 contains the address of the instruction which caused the memory management fault.

SSR3 contains bits to enable Split I+D in the three modes; on machines which have UNIBUS maps, the enable for it is also here.

PARs and PDRs

Each segment (48 in total; 8 each Instruction and Data, for the three different modes) is described by a pair of registers, a Page Descriptor Register (PDR) and a Page Address Register (PAR).

The PAR contains the base physical address for the segment (in units of 0100/64. bytes). On machines which have only UNIBUS memory (e.g. PDP-11/40, PDP-11/45, etc) these registers are 12 bits long, since the maximum amount of physical memory on these machines is 248 Kbytes. On machines which support up to 4 MBytes of physical memory (e.g. PDP-11/70, PDP-11/44, PDP-11/23, etc), they are 16 bits long.

The PDR contains the segment's length, along with the direction of growth, the access control field (read/only, read/write, etc), a 'dirty' bit (maintained by the hardware), etc.

When split I+D is not enabled in any mode, a single 64 Kbyte address space is provided, using only the I-space registers for that mode.

The addresses of the PAR/PDR sets are:

Address Name Function
772200 SISD0 Supervisor I-Space PDR #0
...
772216 SISD7 Supervisor I-Space PDR #7
772220 SDSD0 Supervisor D-Space PDR #0
...
772236 SDSD7 Supervisor D-Space PDR #7
772240 SISA0 Supervisor I-Space PAR #0
...
772256 SISA7 Supervisor I-Space PAR #7
772260 SDSA0 Supervisor D-Space PAR #0
...
772276 SDSA7 Supervisor D-Space PAR #7
772300 KISD0 Kernel I-Space PDR #0
...
772316 KISD7 Kernel I-Space PDR #7
772320 KDSD0 Kernel D-Space PDR #0
...
772336 KDSD7 Kernel D-Space PDR #7
772340 KISA0 Kernel I-Space PAR #0
...
772356 KISA7 Kernel I-Space PAR #7
772360 KDSA0 Kernel D-Space PAR #0
...
772376 KDSA7 Kernel D-Space PAR #7
777600 UISD0 User I-Space PDR #0
...
777616 UISD7 User I-Space PDR #7
777620 UDSD0 User D-Space PDR #0
...
777636 UDSD7 User D-Space PDR #7
777640 UISA0 User I-Space PAR #0
...
777656 UISA7 User I-Space PAR #7
777660 UDSA0 User D-Space PAR #0
...
777676 UDSA7 User D-Space PAR #7