DL11 — serial line, and the KW11 line clock
The DL11 is DEC’s single-line asynchronous serial interface, the card that
carries a PDP-11’s console terminal. QUniLator models the DL11-W (M7856): four
registers at 777560 — receiver status and buffer, transmitter status and
buffer — with the receiver interrupting at vector 60 and the transmitter at 64,
both at BR4. Its line runs on one of the BeagleBone’s UARTs, or over the
network. It is listed as DL11, of type slu_c.
A second line, DL11b, sits at 776500 with vectors 300 and 304, on the cape’s
UART1 (ttyS1) at 38400 baud, with errorbits off and break on.
The DL11-W carries a line clock as well, which QUniLator lists as a device of its
own: KW11, below.
What the machine sees
Section titled “What the machine sees”| Registers | RCSR 777560, RBUF 777562, XCSR 777564, XBUF 777566 |
| Interrupts | Receive at vector 60, transmit at 64, both BR4 |
| Receiver | One character. A character from the serial port or the network that arrives before the program has read the one before it overwrites it, and with errorbits on sets the overrun bit. A character from the web console waits until the program has read the one before it |
| Transmitter | One character at a time, paced at baudrate |
| Maintenance | XCSR bit 2 loops the transmitter back into the receiver |
| BREAK | A BREAK received on the line reads as a null character with the framing error bit set. Sending one takes break on and a serial port |
Using it
Section titled “Using it”Whether to enable it depends on the processor in the box. A processor with a
console line of its own — an 11/53, an 11/73 — already answers at 777560, so
DL11 stays disabled, and its console reaches the board through the external
console bridge on ttyS2 (see the machine settings).
A processor with no console line, such as the KDJ11-A, and the PDP-11
processors QUniLator emulates on a UniBone use DL11 as their console:
- Set External console to Off on the Machine screen. The bridge and
the DL11 cannot both hold
ttyS2: with the bridge holding it, enablingDL11answers withenabledstill false, and the log saysAnother process has locked the comport. - Enable
DL11withserialportatttyS2and notcp_role. A DL11 with neither a serial port it can open nor a network role refuses the enable.
The web console reaches DL11 on the WebSocket /ws/console/0, and DL11b on
/ws/console/1, alongside whatever is on the line itself.
A DL11 line can run over the network as well: set it to a TCP port, a
host:port to dial, or ws for a browser terminal, as described under
tcp_role. Both lines default to port 4200,
which they then share: a caller reaches whichever of them is free.
What has been verified
Section titled “What has been verified”- The DL11 has been the system console of a UniBone’s emulated PDP-11/34 and of a KDJ11-A on a QBone, which has no console line of its own.
Parameters
Section titled “Parameters”Settings
Section titled “Settings”What a configuration stores and an operator sets.
| Parameter | Short | Value | Default | What it is |
|---|---|---|---|---|
serialport | p | text | ttyS2 | Linux serial port: “ttyS1” or “ttyS2” |
baudrate | b | number | 9600 | Baudrate: 110, 300, … 38400 |
mode | m | text | 8N1 | Mode: 8N1, 7E1, … |
errorbits | eb | 0 or 1 | 1 | Enable error bits (M7856 SW4-7) |
break | brk | 0 or 1 | 1 | Enable BREAK transmission (M7856 SW4-1) |
tcp_role | tr | text | empty | TCP role: "" = use serial port, “listen”, “connect” or “websocket” |
tcp_host | th | text | empty | TCP connect-out target host (tcp_role=connect) |
tcp_port | tp | number | 4200 | TCP listen/connect port |
tcp_idle_timeout | ti | number, s | 0 | drop a silent TCP client after N seconds, 0 = never |
It also carries the parameters under parameters every card on the bus has.
In detail
Section titled “In detail”serialport, baudrate, mode
Section titled “serialport, baudrate, mode”The board’s UART the line drives while tcp_role is empty: ttyS2 is the cape’s UART2, ttyS1 its UART1. baudrate is a standard rate from 50 to 57600, and mode is data bits, parity and stop bits in three characters: 8N1, 7E1, 8O2. A port, rate or mode the board cannot open refuses the enable. All three are read when the device is enabled and are locked while it is. On a line carried over the network serialport is unused, mode sets the data bits the line carries, and baudrate sets the character time both directions are paced at.
errorbits
Section titled “errorbits”Switch SW4-7 on the M7856. On, a received character that had a framing or parity error, or arrived before the program read the one before it, sets the matching error bit in RBUF together with bit 15. Off, RBUF carries the character alone.
Switch SW4-1 on the M7856. On, the BREAK bit in XCSR holds the serial port’s transmit line spacing for as long as the program keeps it set, which is how a program sends BREAK; a TU58 needs it. A line carried over the network has no break condition to send.
tcp_role, tcp_host
Section titled “tcp_role, tcp_host”Carries the line over the network. listen accepts one client on tcp_port, speaking Telnet with RFC 2217; connect dials tcp_host:tcp_port and dials again when the connection drops; websocket carries the line on the board’s WebSocket /ws/serial/<device>/0, for a browser terminal. Empty, the line runs on serialport. The Configurations screen edits the three as one field: a bare port listens, host:port connects, ws is the browser terminal.
A line that is already on the network can be retuned while the device is enabled; the change takes effect at once and drops a connected client. Moving a line between the UART and the network takes disabling the device first.
tcp_port
Section titled “tcp_port”The port listen accepts on, or connect dials. Lines that listen on the same port share it: a caller reaches whichever of them is free, and is refused while all are busy. A port another program holds refuses the enable.
tcp_idle_timeout
Section titled “tcp_idle_timeout”Drops a client that has sent nothing for this many seconds, so a forgotten session does not hold the line. 0 keeps a client for as long as it stays connected. Read when the line opens.
The KW11 line clock
Section titled “The KW11 line clock”The KW11 is the line-time clock: it interrupts at mains frequency, 50 or 60
times a second, which is the tick an operating system keeps time by. Its one
register, LKS at 777546, has an interrupt enable (bit 6) and a monitor bit
(bit 7) that each tick sets and the program clears. It interrupts at vector 100,
BR6. It is listed as KW11, of type ltc_c.
Settings
Section titled “Settings”What a configuration stores and an operator sets.
| Parameter | Short | Value | Default | What it is |
|---|---|---|---|---|
Line clock frequency | freq | number | 50 | 50/60 Hz |
LTC input enable | ltc | 0 or 1 | 1 | 1 = enable update of LKS by LTC Input |
It also carries the parameters under parameters every card on the bus has.
In detail
Section titled “In detail”Line clock frequency
Section titled “Line clock frequency”The mains frequency the clock ticks at, 50 or 60 Hz; another value is accepted with a warning, and 0 is refused. Each tick sets LKS bit 7 and, with LKS bit 6 set, interrupts. Ticks the board delivers late are made up by the ones after them, which come at up to twice the rate until the count has caught up with real time. A change takes effect at the next tick.
LTC input enable
Section titled “LTC input enable”The clock input. Off, the clock stops ticking: LKS bit 7 stays clear and no interrupt comes.