ips: implementation of protocol stacks for embedded systems yan wang halmstad university, sweden the...
TRANSCRIPT
![Page 1: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/1.jpg)
IPS: Implementation of Protocol Stacks for Embedded Systems
Yan Wang
Halmstad University, Sweden
The Second Internal EPC Workshop
IPS, Halmstad University, Yan Wang
![Page 2: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/2.jpg)
Motivation
QoS
IPS, Halmstad University, Yan Wang
![Page 3: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/3.jpg)
Protocol Stacks for Embedded Systems
Me
mo
ry
Energy
Develop Time
• Challenges– Difficult to program – Resource constraints
• Main concerns– Computer resources awareness– Programming efficiency
• Opportunity– A potentially large payoff for
investing in a tool to support protocol stack implementations
IPS, Halmstad University, Yan Wang
![Page 4: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/4.jpg)
• A Domain Specific Language to facilitate Implementation of Protocol Stacks– Addressing the protocol
stack as a whole– Providing events & time
abstractions
• Evaluation– Performance of
compiled-code– Cost of development
process
IPS
OS/HW
IPS runtime system
IPS compiler
& other tools
Compiled C code
IPS source codeModular
architectureModular
architecture
Type system
Concurrency model
Memory management
Timer
IPS, Halmstad University, Yan Wang
Paddle
![Page 5: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/5.jpg)
PADDLE: Motivation
• Processing packets– Tedious and error-prone– Difficult to be related to the
specification– Hard to debug and modify
• Solution– Describe packets by
dependent types– Compile type description to
packet processing functions
IPS, Halmstad University, Yan Wang
Parserstruct Ipv4_p Ipv4parser
( u8_t * buf, int offset)
struct Ipv4_p Ipv4parser
( u8_t * buf, int offset)
01001011 01011011
... ...
0x04
0x11
... ...
0x04
0x11
... ...
![Page 6: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/6.jpg)
PADDLE: A Data Description Language
• Simple Packet Types
• Layered Packet Types
... ....
IPS, Halmstad University, Yan Wang
![Page 7: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/7.jpg)
The Generated Library
In-memory representation
Parsing function
Writing function
PADDLE program
PADDLE compiler
IPS, Halmstad University, Yan Wang
![Page 8: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/8.jpg)
Compact Packets
P_Type P_IDP_ IDP_Type Originator
addressOriginator address
We save two bytes
Byte Oriented Bit Oriented
IPS, Halmstad University, Yan Wang
![Page 9: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/9.jpg)
PADDLE
• The contributions of PADDLE:– A rich language for describing packets– A tool that generates packet processing functions– Operations for layering packets– Optimizations suitable for Sensor Networks
IPS, Halmstad University, Yan Wang
![Page 10: IPS: Implementation of Protocol Stacks for Embedded Systems Yan Wang Halmstad University, Sweden The Second Internal EPC Workshop IPS, Halmstad University,](https://reader036.vdocument.in/reader036/viewer/2022070308/551beaa9550346af588b6370/html5/thumbnails/10.jpg)
Thanks for your attention!
IPS, Halmstad University, Yan Wang