diff --git a/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr01.pdf b/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr01.pdf deleted file mode 100644 index 6e97d1000f7e3bf7a6e1218db9d90cb2349a3ffa..0000000000000000000000000000000000000000 Binary files a/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr01.pdf and /dev/null differ diff --git a/README.md b/README.md index 4c2247d59b776c1a5359ba47622d0156f8bac89d..02c5b9aa1d0fc6bce1d0c2e0b558eb16c7f8bdad 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,90 @@ # tinynets -## Working! +# Protocol Rules -Currently: +## Addressing + - 10-bit address + - Assigned in software (not baked in) + - Can be location-based (e.g. first five MSBs correspond to x, last 5 correspond to y) -### Jake - - +## Packet Structure +Standard: | 255 | Dest. | # Edges | Src. | # Bytes | Payload … | CRC | +ACK: | 254 | Dest. | # Edges | Src. | CRC +Buffer Depth: | Empty buffer space [0, 253] | -### Nick - - +## Routing Rules -### Dougie - - +On Packet Received: +```swift +if packet is standard: + if LUT does not already have source address: + add entry to LUT + if I am destination: + process data in packet + else: + increment hop count + if LUT has destination address: + send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports + else: + send packet to all ports as standard flood +elseif packet is ack: + if LUT does not already have source address: + add entry to LUT + if I am destination: + process acknowledgement + else: + increment hop count + if LUT has destination address: + send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports + else: + send packet to all ports as ack flood +elseif packet is standard flood: + if LUT does not already have source address: + add entry to LUT + if I am destination: + process data in packet + else: + if I have seen this packet before: + return + increment hop count + if LUT has destination address: + send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports + else: + send packet to all ports +elseif packet is ack flood + if LUT does not already have source address: + add entry to LUT + if I am destination: + process acknowledgement + else: + if I have seen this packet before: + return + increment hop count + if LUT has destination address: + send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports + else: + send packet to all ports +else: + write buffer depth to LUT +``` -### Patrick - - +## Routing Table -## Hardware +The routing table (or lookup table, LUT) consists of rows of: +Port | Destination | Hopcount | Current port buffer size +This is different from standard Ethernet routing tables because it includes the current port buffer size as part of the table entry, allowing for a more robust cost function for use in the path planning algorithm. + +## Buffer Depth Updates +Send buffer depth on all ports every q seconds, and every time a packet leaves or arrives + +# Hardware  -## Reading +See /circuit +See /embedded + +# Reading #### Networked Control Systems Ethernet in Networked Control, advantages and drawbacks. diff --git a/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr01.pdf b/document/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr01.pdf similarity index 100% rename from 6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr01.pdf rename to document/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr01.pdf diff --git a/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr02.pdf b/document/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr02.pdf similarity index 100% rename from 6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr02.pdf rename to document/6-829_project-jr_dk_ns_pw_Tiny_Nets_proposal_dr02.pdf diff --git a/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr02.pdf b/document/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr02.pdf similarity index 100% rename from 6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr02.pdf rename to document/6-829_project-jr_dk_ns_pw_Tiny_Nets_report_1_dr02.pdf diff --git a/protocol.md b/protocol.md deleted file mode 100644 index 4cbfc99570417846fd0c93462e6eb9bafecde8ee..0000000000000000000000000000000000000000 --- a/protocol.md +++ /dev/null @@ -1,10 +0,0 @@ -# Rules - -// to be filled in from gdoc - -## Packet: - -## Lookup Table: - -## Switch: - diff --git a/testmd.md b/testmd.md deleted file mode 100644 index bd049fe6114142572b52bd08e5afd18871891edc..0000000000000000000000000000000000000000 --- a/testmd.md +++ /dev/null @@ -1,52 +0,0 @@ -```swift -if packet is standard: - if LUT does not already have source address: - add entry to LUT - if I am destination: - process data in packet - else: - increment hop count - if LUT has destination address: - send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports - else: - send packet to all ports as standard flood -elseif packet is ack: - if LUT does not already have source address: - add entry to LUT - if I am destination: - process acknowledgement - else: - increment hop count - if LUT has destination address: - send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports - else: - send packet to all ports as ack flood -elseif packet is standard flood: - if LUT does not already have source address: - add entry to LUT - if I am destination: - process data in packet - else: - if I have seen this packet before: - return - increment hop count - if LUT has destination address: - send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports - else: - send packet to all ports -elseif packet is ack flood - if LUT does not already have source address: - add entry to LUT - if I am destination: - process acknowledgement - else: - if I have seen this packet before: - return - increment hop count - if LUT has destination address: - send packet to port which minimizes C(hops, buffer) = hops + \lambda*buffer over all ports - else: - send packet to all ports -else: - write buffer depth to LUT -```