|
1 | | -# Shape changeable display |
| 1 | +# ShapeChangeable Display |
2 | 2 |
|
3 | | -## WIP |
| 3 | +## Overview |
| 4 | +This project is a reference implementation of the shapechangeable display. |
4 | 5 |
|
5 | | -## test of hardware |
6 | | -You can use example/\*.rs as test of hardware. |
7 | | -But be careful using efuse-write function. it is not recoverable after you execute it.(you can generate using generate.zsh) |
8 | | -<!-- But you should not use efuse.rs before --> |
| 6 | +## Usage |
| 7 | +### Prerequisites |
| 8 | +you should install tools following [ESP Book](https://esp-rs.github.io/book/introduction.html) |
9 | 9 |
|
10 | | -# documents |
11 | | -## Flit |
12 | | -Flit consists of 64 bits. Flit type is only four types, basic three types, head, body and tail, and irregular one type, nope flit. |
13 | | -A header of flit(packet) that need only head flit begin with H. |
14 | | -An ack flit (, which header is HAck) is generally sent by the system when it receive a flit. |
15 | | -Nope flit will used for timing adjustment. |
16 | | - |
17 | | -### HeadFlit |
18 | | -HeadFlit id is 0. |
19 | | - |
20 | | -FlitType(2) | LengthOfFlit(6) | Header(8) | SourceId(16) | DestinationId(16) | PacketId(8) | Checksum(8) |
21 | | -:--:|:--:|:--:|:--:|:--:|:--:|:--: |
22 | | -### Body and TailFlit |
23 | | - |
24 | | -FlitType(2) | FlitId(6) | Message(48) | Checksum(8) |
25 | | -:--:|:--:|:--:|:--: |
26 | | -### NopeFlit |
27 | | - |
28 | | - FlitType(2) | (undefined)(62) |
29 | | -:--:|:--: |
30 | | - |
31 | | -todo: flitId and length of flit is mod 6bit. |
32 | | - |
33 | | -## Packet |
34 | | -General packet, which means the packet have body and tail flit, has packetid, global sourceId, global destinationId and checksum like below. |
35 | | - |
36 | | - packetId(8) | checksum(8) | globalDestinationId(16) | globalDestinationId(16) | data(...) |
37 | | -:--:|:--:|:--:|:--:|:--: |
38 | | - |
39 | | -This means first body flit doesn't have any messages. |
40 | | - |
41 | | -## Network Protocol |
42 | | -Network Protocol must implement `network::protocol::Protocol` trait. |
43 | | - |
44 | | -## About Each Process and detail of Packets |
45 | | -This section explains processes and their packets. |
46 | | -Note that explanations of these packets is data region of Packet. |
47 | | - |
48 | | -### General case |
49 | | -If you want to use the library with other application, you use these packets. |
50 | | - |
51 | | -#### General ack |
52 | | -##### Explanation |
53 | | -If you want to make ack packet in system such as TCP, you can use this packet. |
54 | | -##### Implementation |
55 | | -Only head flit. |
56 | | -Header is `GeneralAck`, not `HAck`, which is used for the system flit. |
57 | | - |
58 | | -#### General data |
59 | | -##### Explanation |
60 | | -This library is not process this packet. |
61 | | -So, you should reshape it into any form you want. |
62 | | -##### Implementation |
63 | | -Header is `Data`. |
64 | | - |
65 | | -#### Error |
66 | | -##### Explanation |
67 | | -Flit error is mainly processed by the library, but packet error isn't. |
68 | | -So, you should handle with this packet. |
69 | | -This error may occur in checksum process of packet. |
70 | | -So, you should resend packet, but it's optional. |
71 | | -##### Implementation |
72 | | -Header is `Error`. |
73 | | - |
74 | | -### Making local network |
75 | | -These packets are used for making local network by system. |
76 | | -The process is this: |
77 | | -1. the system sent check connection packet periodically, and then, receive check connection. |
78 | | -2. If the system receive check connection packet, then sent request confirmed coordinate packet. |
79 | | -3. If the system receive sufficient number of confirm coordinate packets, the system can analyse coordinate. |
80 | | - |
81 | | -#### Check connection |
82 | | -##### Explanation |
83 | | -In this system, because unit of shapechangeable display is 4 nodes, these nodes connect each others. But, the unit should connect other units. This packet is used then firstly. |
84 | | -##### Implementation |
85 | | -Only head flit. This packet is broadcast but processed only in other local networks. |
86 | | -Header is `HCheckConnection`. |
87 | | - |
88 | | -#### Request confirmed coordinate |
89 | | -##### Explanation |
90 | | -Due to get global coordinate, you should access other nodes' coordinate. |
91 | | -##### Implementation |
92 | | -Only head flit. This packet is sent by broadcast. |
93 | | -Header is `HRequestConfirmedCoordinate` |
94 | | - |
95 | | -#### Reply for request confirmed coordinate |
96 | | -##### Explanation |
97 | | -this packet is reply for request confirmed coordinate packet. |
98 | | - |
99 | | -##### Implementation |
100 | | -When the system receive this packet, system will check the global source address of packet. |
101 | | -If it is sent from a node which is in the same local network and is not confirmed, the packet has information of nodes which is next to the node not in local network. Otherwise, the packet is only sent by confirmed node. |
102 | | - |
103 | | -Data form is like this: |
104 | | - |
105 | | -is confirmed(8) | id(16) | x(16) | y(16) | id(16) | ... |
106 | | -:--:|:--:|:--:|:--:|:--:|:--: |
107 | | - |
108 | | -Node that received this packet is in the same node as local |
109 | | -This packet is sent by broadcast. |
110 | | -Header is `ConfirmCoordinate` |
111 | | - |
112 | | -### Joining global network |
113 | | -Todo: These packets are used for making global network by system. |
114 | | - |
115 | | -#### Request join network |
116 | | -##### Explanation |
117 | | -##### Implementation |
118 | | - |
119 | | -#### Reply for request join network |
120 | | -##### Explanation |
121 | | -##### Implementation |
122 | | - |
123 | | -# Note |
124 | | -* a requirement of packet that has only headflit is that |
125 | | -** this data doesn't need to have a address that specify original source id, or this data is sent to just next node and this information is included in header. |
126 | | - |
127 | | -# todo |
128 | | -I put `todo:` in source file in detail. Others are below. |
129 | | -* Handle uart interruption |
130 | | -* Handle uart buffer overflow |
131 | | -* Use flit buffer |
| 10 | +### Run Example |
| 11 | +``` |
| 12 | +% cd shapechangeable-display |
| 13 | +% cargo espflash flash --monitor --release --example estimate_coordinate_tei |
| 14 | +``` |
0 commit comments