% -*- Mode:Text -*- 

\chapter{\STEP\ box}\sectlabel{box}

\section{Overview}\sectlabel{box-overview}

As explained in the \AR\ (see \AR: \extref{block}, \extref{sector}), when a
three-dimensional torus is flattened onto three-dimensional space, eight
separate \emph{strands} of the torus are brought together. A \cam\ box is
responsible for simulating the activity of a \cam\ \emph{block}, i.e., a
sector-size window cutting through all eight strands (cf.\ \fig{4strand}).
The entire torus can then be simulated by arraying in a straightforward way
an appropriate number of boxes in the three dimensions of ordinary physical
space.\footnote
	{Note that while the eight strands that run
through the boxes are interconnected so as to yield the topology of a
torus, the physical array of boxes forms an ordinary {\em
parallelepiped}: opposite faces don't have to be brought together!}

Even though the canonical relationship between the eight modules contained in
a box is that of strands of a flattened 3-torus, it is possible to configure
a box for other relationships between modules; this can be done by some
extent by purely software means, and to an ever greater extent by
substituting a custom backplane for the standard one.

\medskip

Besides the resources directly devoted to the simulation (site-data
transport and interaction), a \cam\ system makes uses of other
resources (e.g., clock distribution, communication with the host) that
must somehow be distributed and interconnected in an indefinitely
expandible way within the same geometric framework as the blocks.  It
is natural to lump such resources on a per-block basis and incorporate
one lump in each box. Thus, while the module represents the smallest
repetitive unit of \cam\ from a functional viewpoint, in physical
terms it is the box that represents the smallest repetitive
unit---from which an arbitrarily large \cam\ system can be built by
mere juxtaposition and nearest-neighbor interconnection.

\medskip

Physically, a \cam\ box is a roughly cubical enclosure containing a regulated
power supply and a motherboard with eight slots---for up to eight \cam\
modules. Additional circuitry on a per-box basis is present on a separate
\tdf{box interface} board (called \tdf{video board} when also populated with
video interface circuitry). \fig{box} shows a simplified view of a box's
contents, with backplane, 8 modules, and box interface/video board. The
landing places of box-to-box links between modules are shown. (In units
consisting of just few boxes, only some of the \tsy{X}, \tsy{Y} and \tsy{Z
glue} links may be realized as discrete cables, while the other links are
embedded in the backplane.)

\figtwocol[!p]{backplane}{\psfig{file=fig/logic-backplane.ps}}{Simplified view
of the \step\ box backplane. Solid boxes denote connectors.}

\figonecol{box}{\psfig{file=fig/logic-box.ps}}{A \step\ box with backplane, 8
modules, and box interface/video board. Connectors and cabling for the
latter board differ from those for the modules and are not shown.}

As outlined in \sect{box-array}, a box is the source or destination of three
classes of signals, namely \emph{glue} signals, which travel between boxes
(\sect{interbox}), \emph{\bus} signals, through which the boxes ultimately
communicate with the host, and \emph{data stream} signals (data flywheel and
display), which allow external equipment to have real-time access to the
box's internal data stream.

The signals of each class are grouped into one or more \tdf{ports} according
to their geographical destination. Thus, the glue signals are divided into
six glue ports according to which of the six adjacent boxes they connect
to. Each port, in turn, is physically represented by one or more
\tdf{connectors} into which cables may be plugged. (For convenience, also
configuration and test signals are grouped together and brought to
connectors.) \fig{backplane} gives a simplified view of the backplane, showing
the individual connectors and their groupings as ports.  Many of the port
connectors are just through-the-board extensions of connectors on the
modules.  In the figure, each vertical alignment corresponds to a backplane
slot: one for the box interface/video board, and eight for the eight modules.
Each horizontal alignment corresponds to a different type of function: local
bus, \bus\ root and branch ports, display data, data flywheel, glue.  The
small connectors associated with the glue ports are for clock-phase feedback
between adjacent boxes.

\medskip

Communication between a \step\ unit and the outside world (including the host
and optional \io\ devices such as \vga\ monitors, video cameras, and video
monitors) goes through \tdf{ports} located on a \tdf{backpanel} (\appnd{cage}). 

(A backpanel acts as an extension of a backplane. In a
multibox unit, the backpanel associated with backplane 0 carries the
port that communicates with the host, and is mandatory; the other backpanels
are optional.)

As shown in \fig{io cables}, a backpanel port is connected to the
appropriate position of the backplane by an \tdf{internal cable}; an
\tdf{external cable} is used to connect the port to the appropriate \io\
device.

\figonecol{io cables}{\psfig{file=fig/io-cables.ps}}{\Cam-8 input/output:
backpanel ports, internal cables, and external cables.}


\section{Glue ports}\sectlabel{glue-ports}

Each module contributes to its box six glue connectors (\tsy{XM glue}
through \tsy{ZP glue}; cf.\ \fig{sector} and \fig{box}) for
bidirectional communication between adjacent sectors. On the box, each
\emph{glue port} brings together a set of eight homologous connectors
(one from each module), so that, for instance, the eight \tsy{XM
glue} connectors come together as the box's \tsy{XM glue} port
(\fig{backplane}).  Each glue port has, in addition, a small
connector with two signals (\tsy{Clock Phase In} and \tsy{Clock
Phase Out}), handled by the motherboard circuitry, which
exchange clock phase information between the local clock masters
(\cf{clock-sync}) of adjacent boxes.

Thus, between the \tsy{XP glue} port of a box and the \tsy{XM glue}
port of the box next to it in the positive $x$ direction there will
run 128 bidirectional glue lines (16 layers times 8 strands)
plus 2 clock-phase lines, for a total of 130 signal lines.

\medskip

Note that the six physical directions \tsy{XM}, \tsy{XP}, \ldots,
\tsy{ZP} are distinct from the six \emph{logical} directions, denoted
by $x_-$, $x_+$, \ldots, $z_+$, which refer to the orientation of an
individual strand. Typically, the \tsy{XM glue} port will be configured as
an $x_-$ port by four of the modules in a box, and as an $x_+$ port by
the remaining four (cf.\ \fig{}). A more general
remapping of logical ports to physical ports is possible; for instance,
when the three-dimensional array of modules is configured as a pleated
two-dimensional array (\sect{}), a \tsy{Z} port may be used to
carry $y$ information.

On each of the external faces of the parallelepiped---where a box is
not mated to an adjacent box---four of the strands double back on the
other four via the glue signals. For example, on an \tsy{XM} face,
the four \tsy{XM glue} signals that carry $x_-$ information (cf.\ \fig{})
for a certain layer will fold back onto the corresponding four {\sym
XM glue} signals that carry $x_+$ information. This is done by a passive
shorting plug or by an internal multiplexer (\cf{}).  In a similar
way, a \tsy{Clock Phase Out} signal that emerges from an external
face of the parallelepiped is looped back into the corresponding {\sym
Clock Phase In} pin.


\section{Data flywheel ports}\sectlabel{flywheel-ports}

On each \chip, real-time (``on-the-fly'') access to the internal data
stream is provided by two taps on this stream, namely \tsy{Data
Flywheel Output} and \tsy{Data Flywheel Input} (\sect{flywheel}). On
the module, these sixteen outputs and sixteen inputs are brought
together on a \tsy{Data Flywheel} connector (\fig{box}) together
with the appropriate timing signals. In turn, this connector
is passed through to the motherboard as a \tsy{Data flywheel} port,
for a total of eight such ports (\fig{backplane}).

\medskip

Data flywheel access is optional, and is provided for
advanced experimentation, custom applications, attachment of custom
hardware, specialized display or analysis needs, and in-depth testing
and diagnostics. 

As implemented in the standard \cam\ box described here, the {\sym
Data flywheel} ports are meant to provide direct real-time access to
simulation data from any one module of a \cam\ machine, or at most a few
modules: it would be physically impractical to connect external
equipment to all modules at once. On the other hand, using specially
designed boxes, it would be feasible to use the \tsy{Data Flywheel}
connectors to add an external ``coprocessor'' to each module or group
of modules.


\section{Display port}\sectlabel{display-port}

A separate \tsy{Display} tap (\sect{flywheel-pins}, \sect{}) on each
\chip's internal data stream extracts data intended for real-time
video display. On a module, these sixteen signals are brought out to
the \tsy{Display bus} connector (\fig{box}).  On the backplane,
the sixteen \sym{Display} signals are bussed across the eight
modules of a box (\cf{local-bus}); only one module at a time will have
its tri-state bus drivers enabled.

On the video board, the \tsy{Display} data are optionally smapled-and-held by
a frame buffer. Then they are sent through a downloadable video palette,
resulting in \rgb\ data at a rate compatible with a \vga\ monitor.  Together
with horizontal and vertical sync signals, also generated by the video board,
one obtains a complete \vga\ output.

A parallel path with slightly different processing 
(which turns 60 frames/sec to 30 frames/sec with two interlaced field
per frame) generates video output (composite or S/VHS) for either
\ntsc\ or \pal.

\section{\bus\ ports}\sectlabel{bus-ports}

A box also acts as a relay for \emph{\bus} signals (\sect{}), receiving
the \bus\ via a \tsy{\bus\ root} connector on the motherboard and
fanning it out to up to three adjacent boxes (in the \tsy{XP}, {\sym
YP}, and \tsy{ZP} directions) via the \tsy{\bus\ branch} connectors
(\fig{backplane}). Since \bus\ relaying is done by the modules of
behalf of the box, there are on the motherboard eight connectors (one
on each module slot) available for the \tsy{\bus\ branch} function,
with the potential for fanning the \bus\ out to eight boxes.  However,
no more than three of these connectors are used, since \bus\
distribution is organized on a three-dimensional tree basis
(\cf{box-array}).


\section{Local bus}\sectlabel{local-bus}

Besides relaying the \bus\ to other boxes via the \tsy{\bus\ branch}
ports, the motherboard also conditions and distributes the \bus\
signals to the eight modules. This is done through a \tdf{local bus}
(see \fig{backplane}), which also distributes the clock and
perform a number of miscellaneous functions.


