The transmitters make use of Wube's high-tech circuit networks to omit a lot of checks that would otherwise be required to implement CSMA/CD (signals which are instantaneously transmitted, additive, perfectly synchronized, and absurdly parallel are *extremely* useful).
[local] I - Identifier - a Unique number assigned to each transmitter
[wire] I - sum of all active transmitter identifiers
C - Contend - Total number of transmitters currently in contention for the wire (used to lock out subsequent transmitters until all currently contending transmitters transmit)
T - Transmit - Number of transmitters currently transmitting (used for collision detection)
A - AverageID - Mathematical average of all active transmitter IDs from the preceding tick. (used to resolve collisions)
Transmitter IDs should be unique. Due to the use of integer math and not wanting to add extra combinators to compensate, all IDs should be set up in increments of at least 2.
The transmitter expects a pulsed command to initiate transmission. It expects the signal to be a held value (it may also be continuously updated while the transmitter is working).
Conceptually, the transmitter is designed as something resembling a simple state machine.
Code: Select all
IDLE: Wait for a "Send" command, then set state to "WAIT" WAIT: Wait for C=0 then set state to "SEND" SEND: Send [I C=1 T=1 SIGNAL] Set state to "CHECK" CHECK: Send [I C=1 T=1 SIGNAL] If C=1 set state to "IDLE" If I>=A and A>0 set state to "YIELD" YIELD: Send [C=1] If T=0 set state to "SEND"
The receiver watches the network for valid transmissions (indicated by 'T=1') and converts it into a single-tick pulse.
Basically, somewhere on the network, you'll need an arithmetic combinator which computes I/T and outputs it to A. Here is a blueprint that does that:
This design is a major improvement over an earlier unpublished design, which used random backoff, was a lot more complex and less efficient, and didn't work.
Update: I have re-arranged the transmitter combinators to be semi-rotationally-symmetric and put together a blueprint book: