diff --git a/document/6-829-tinynet-presentation.pdf b/document/6-829-tinynet-presentation.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f8913b0e823e81456035149395a3b15b9105189c Binary files /dev/null and b/document/6-829-tinynet-presentation.pdf differ diff --git a/document/atsam-router-board.png b/document/atsam-router-board.png index ad969bf2f0492284d91f50ffc0eabbc8fe09364d..a92afdafd9b1aabf5140f36f100663c738ec29dd 100644 Binary files a/document/atsam-router-board.png and b/document/atsam-router-board.png differ diff --git a/document/coclocking.jpg b/document/coclocking.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ee9298d94ecb1fb47ec25c32d9c491ae55522e85 Binary files /dev/null and b/document/coclocking.jpg differ diff --git a/document/hardware-12_routers_tmp11945 b/document/hardware-12_routers_tmp11945 deleted file mode 100644 index 60afe5f659f818bb53880996db869e0810307ef8..0000000000000000000000000000000000000000 Binary files a/document/hardware-12_routers_tmp11945 and /dev/null differ diff --git a/document/hardware-12_routers_tmp242 b/document/hardware-12_routers_tmp242 deleted file mode 100644 index 49bd3e2aa8b74709a732b84831d66f5f7fac5ebf..0000000000000000000000000000000000000000 Binary files a/document/hardware-12_routers_tmp242 and /dev/null differ diff --git a/document/one-new-atsam-router.jpg b/document/one-new-atsam-router.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1a1e21f468acdfb30377b8878501b0034558a543 Binary files /dev/null and b/document/one-new-atsam-router.jpg differ diff --git a/document/one-xmega-switch.jpg b/document/one-xmega-switch.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d73788a3b6fab3f784448c506030147aade5c18e Binary files /dev/null and b/document/one-xmega-switch.jpg differ diff --git a/document/tinynet-presentation.indd b/document/tinynet-presentation.indd new file mode 100644 index 0000000000000000000000000000000000000000..f8255912b40b2bef77d9d5eea3476351fb88e980 Binary files /dev/null and b/document/tinynet-presentation.indd differ diff --git a/embedded/atsams70-tinyrouter/.vs/atsams70-tinyrouter/v14/.atsuo b/embedded/atsams70-tinyrouter/.vs/atsams70-tinyrouter/v14/.atsuo index 082ba7adaec048943c11ddd3c6d49720b54ec6ce..5c33ef60add0ec2a304dcd68e8864f8243a1caff 100644 Binary files a/embedded/atsams70-tinyrouter/.vs/atsams70-tinyrouter/v14/.atsuo and b/embedded/atsams70-tinyrouter/.vs/atsams70-tinyrouter/v14/.atsuo differ diff --git a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/application.c b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/application.c index b8e85419b84c92fa060e077ffd08d40a8488e680..455517e8e618ddb288a6b63baf77f0628ed4c267 100644 --- a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/application.c +++ b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/application.c @@ -27,7 +27,7 @@ void app_onpacket(packet_t p){ if(p.raw[6] == 1){ window = 0; // should kick off cycle } else { - window = 2; // should stop cycle + window = 6; // should stop cycle } default: pin_set(&stlb); diff --git a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/main.c b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/main.c index bb3cd35bfd0e95cd6eb357e4e9d5e975cce66115..d484774f906947ff9e188029eced7716c85c7a30 100644 --- a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/main.c +++ b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/main.c @@ -239,7 +239,7 @@ int main (void){ uint32_t beatTicker = 0; uint32_t packetTicker = 0; - window = 2; + window = 255; packetsend.raw[0] = P_STANDARD; packetsend.raw[1] = 12; // destination @@ -263,14 +263,16 @@ int main (void){ packetlooper = ports[i]->packet; packet_clean(&ports[i]->packet); // reset packet states ports[i]->haspacket = TP_NO_PACKET; + pin_clear(ports[i]->stlg); handle_packet(&packetlooper, i); + pin_set(ports[i]->stlg); packet_clean(&packetlooper); } } #if IS_HOME_PORT - if(window < 2){ - window ++; + while(window < 3){ + window ++; // and ack decrements if (in_table(packetsend.raw[1])) { send_on_bestport(&packetsend); } else { diff --git a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/tinyport.c b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/tinyport.c index fea0b12f4105cf1d5082e35bb61e80beb60bd2bc..6d757cd9bbdba597493750941b4cb9fadd9c549c 100644 --- a/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/tinyport.c +++ b/embedded/atsams70-tinyrouter/atsams70-tinyrouter/src/tinyport.c @@ -74,26 +74,37 @@ void tp_packetparser(tinyport_t *tp){ case TP_PACKETSTATE_OUTSIDE: // check if start, add 1st byte, change state // if not start, assume buffer depth data, update - if(data == P_STANDARD | data == P_STANDARD_FLOOD | data == P_ACK | data == P_ACK_FLOOD){ + pin_set(tp->stlb); + if((data == P_STANDARD) | (data == P_STANDARD_FLOOD) | (data == P_ACK) | (data == P_ACK_FLOOD)){ tp->packetstate = TP_PACKETSTATE_INSIDE; - tp->packet.raw[tp->packet.counter] = data; - tp->packet.counter ++; + tp->packet.raw[0] = data; + tp->packet.counter = 1; } else { tp->buffersize = data; } break; case TP_PACKETSTATE_INSIDE: - // writing to packet - // check for size byte - // check for end of packet w/ counter - // (counter is _current_ byte, is incremented at end of handle) - // when done, fill in fields for easy access in handling - tp->packet.raw[tp->packet.counter] = data; - tp->packet.counter ++; - if(tp->packet.counter >= tp->packet.raw[4]){ // check counter against packet size to see if @ end of packet - tp->haspacket = TP_HAS_PACKET; // this data is final byte, we have packet, this will be last tick in loop - tp->packetstate = TP_PACKETSTATE_OUTSIDE; // and we're outside again + // debug + pin_clear(tp->stlb); + // clears double arrivals? + if((data == P_STANDARD) | (data == P_STANDARD_FLOOD) | (data == P_ACK) | (data == P_ACK_FLOOD)){ + tp->packet.raw[0] = data; + tp->packet.raw[4] = 255; + tp->packet.counter = 1; + } else { + // writing to packet + // check for size byte + // check for end of packet w/ counter + // (counter is _current_ byte, is incremented at end of handle) + // when done, fill in fields for easy access in handling + tp->packet.raw[tp->packet.counter] = data; + tp->packet.counter ++; + if(tp->packet.counter >= tp->packet.raw[4]){ // check counter against packet size to see if @ end of packet + tp->haspacket = TP_HAS_PACKET; // this data is final byte, we have packet, this will be last tick in loop + tp->packetstate = TP_PACKETSTATE_OUTSIDE; // and we're outside again + pin_set(tp->stlb); + } } break; diff --git a/js/serialterminal.js b/js/serialterminal.js index d32333079216d00406410ecb248f6965ad268628..132fdd507e19a6d16023d32b1b98705de0acf84f 100644 --- a/js/serialterminal.js +++ b/js/serialterminal.js @@ -1,6 +1,3 @@ - -var debug = true; - //----------------------------------------- readline // command-line / terminal inputs are handled // just as inputs from web terminal @@ -23,9 +20,6 @@ rl.on('line', parseLineIn); var buf = Buffer.from([255,1,0,0,7,1,1]) function parseLineIn(data) { - if (debug) { - console.log("rl: parseLineIn: " + data); - } if(data == 'packet'){ data_out(buf); } else if(data.includes('packet')) { diff --git a/results/12node-rtt/results-rtt-511us.png b/results/12node-rtt/results-rtt-511us.png new file mode 100644 index 0000000000000000000000000000000000000000..1422cead48bbcee46035e5ffedd2e8da45aa3dd9 Binary files /dev/null and b/results/12node-rtt/results-rtt-511us.png differ