So, I'm getting close to the completion of my main router/node thing, so i'll go ahead and describe how it works.
First of all, there's a 6 bit IP address and 2-bit port number in a header byte in the form of aa.bb.cc:dd
11 isn't used. I'm keeping things in groups of 3 for easier routing. Maybe i'll use 11 to broadcast to multiple locations, but for now it's undefined.
so, in a maxed out network, there would be 3*3*3 (27) unique addresses, with 3 ports for a client to use at each address. The intention is that a plot can have a unique IP address (or share it with a neighbouring one) with 3 device ports to share.
The nodes are going to be hardcoded with their location information, which is about 8 or so torches/repeaters placed on a decoder. Fairly straightforward to configure. This location information allows the nodes to pass data along the shortest path possible. Since data will always take the same path from A to B, you also don't have to worry about receiving packets out of order.
Each node has an internal buffer which holds a packet as it waits for the next node to be free, if it is busy. This is done by a simple handshake protocol, where the node send a REQ pulse to the destination, and will only start sending the data after it receives an ACK signal in return. Since each node is buffered, an example 16 node network at max congestion would be able to handle 16 packets simultaneously.
The data is routed by the nodes by looking at direct neighbours (mini decoder rom sorts that out):
If the data is already at the right node, it gets passed down a child node.
If the data is in the same group of 3 nodes, but not this one, the data is passed left or right to the correct one.
If the data needs to go somewhere outside this nodes scope, it promotes up to a parent node.
A packet can be variable length, anywhere between 2 and 10 bytes in multiples of 2. Metadata about the packet length is not required, as the node can tell when transmission is finished once the periodic 8 tick initiate line stops. (this is a line which is already required for 8 tick/byte serial transmission)
The transfer cable (1 way) consists of 2 serial transmission lines, 1 initiate line, 1 REQ line and 1 ACK line.
Packet layout:
A maximum sized 10 Byte packet would take 40 ticks to serialize in this system.
First of all, there's a 6 bit IP address and 2-bit port number in a header byte in the form of aa.bb.cc:dd
11 isn't used. I'm keeping things in groups of 3 for easier routing. Maybe i'll use 11 to broadcast to multiple locations, but for now it's undefined.
so, in a maxed out network, there would be 3*3*3 (27) unique addresses, with 3 ports for a client to use at each address. The intention is that a plot can have a unique IP address (or share it with a neighbouring one) with 3 device ports to share.
The nodes are going to be hardcoded with their location information, which is about 8 or so torches/repeaters placed on a decoder. Fairly straightforward to configure. This location information allows the nodes to pass data along the shortest path possible. Since data will always take the same path from A to B, you also don't have to worry about receiving packets out of order.
Each node has an internal buffer which holds a packet as it waits for the next node to be free, if it is busy. This is done by a simple handshake protocol, where the node send a REQ pulse to the destination, and will only start sending the data after it receives an ACK signal in return. Since each node is buffered, an example 16 node network at max congestion would be able to handle 16 packets simultaneously.
The data is routed by the nodes by looking at direct neighbours (mini decoder rom sorts that out):
If the data is already at the right node, it gets passed down a child node.
If the data is in the same group of 3 nodes, but not this one, the data is passed left or right to the correct one.
If the data needs to go somewhere outside this nodes scope, it promotes up to a parent node.
A packet can be variable length, anywhere between 2 and 10 bytes in multiples of 2. Metadata about the packet length is not required, as the node can tell when transmission is finished once the periodic 8 tick initiate line stops. (this is a line which is already required for 8 tick/byte serial transmission)
The transfer cable (1 way) consists of 2 serial transmission lines, 1 initiate line, 1 REQ line and 1 ACK line.
Packet layout:
Code:
Each [] is 8 bits
Serial Line A: [IP address + port num][D0][D2][D4][D6]
Serial Line B: [Return IP if required][D1][D3][D5][D7]
A maximum sized 10 Byte packet would take 40 ticks to serialize in this system.