Sun Apr 7 10:32:47 EDT 2019

How to get used to large I->O functions

I think I needed an explanation about why some things seem messy.

Here's the thing: a lot of circuits have a criss-cross nature.  This
is an inherent feature of parallel circuits and is what carries their

However, wiring all this up is not easy.

So, a good approach seems to be the idea of configurable mux, where a
central object takes control words, and connects things together.

Two observations:

- This object abstracts a "web" behind a simple interface.

- The instantiation of this object necessarily takes this plethora of
  I/O lines.

So it is ok to bundle up all these lines into a single large
collection object (i.e. an environment).

I've been struggling with internalizing this.  Probably because I am
used to thinking in terms of "create connection", as opposed to having
everything be and I->O function.

So where does this bad intuition come from?  It comes from the
representation of circuits diagrams containing boxes connected with
lines.  But these "lines" are always directional!  And in a functional
representation, the line represented by the definition/use relation.

Why is this such an easy error to make?  Because those lines are
_physical_.  They are wires that can be seen on the circuit board as
well.  But what we don't see is that each wire has a direction.  So in
this case, the idea of a symmetrical wire is just plain wrong.  When
superimposing the direction, the diagram becomes a whole lot more
"messy", and it is clear that the boxes are just some arbitrary
grouping of things into large I to large O functions.

It is important to realize that a full circuit, e.g. an FPGA config,
is essentially a function that takes a large number of inputs and
produces a large number of outputs.  The composition then looks like
taking the large I, splitting it up, feeding it into a large number of
circuits, collecting the outputs of the large number of circuits and
pushing it out as a large O.

Summarized: there is a tension between:

- The desire for a simple I->O functional representation

- The boxes + wires view of circuits

The latter gets in the way.
It is intuition that has to be unlearned.