aboutsummaryrefslogtreecommitdiff
path: root/docs/driver_library_sequence.svg
blob: b1ac54caf19e9da8a00df16dc7bafd2e0b454d84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="942px" preserveAspectRatio="none" style="width:845px;height:942px;background:#FEFEFE;" version="1.1" viewBox="0 0 845 942" width="845px" zoomAndPan="magnify"><defs><filter height="300%" id="f105wwwd7nmw4q" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#0091BD" height="927.7813" style="stroke: #A80036; stroke-width: 1.0;" width="89" x="9" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="83" x="12" y="16.0669">Application</text><rect fill="#00C1DE" height="927.7813" style="stroke: #A80036; stroke-width: 1.0;" width="403" x="109" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="96" x="262.5" y="16.0669">Driver library</text><rect fill="#7D868C" height="927.7813" style="stroke: #A80036; stroke-width: 1.0;" width="320" x="514" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="95" x="626.5" y="16.0669">Kernel driver</text><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="816.0547" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="48.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="140.5" y="128.6953"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="212.5" y="436.8906"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="212.5" y="569.4219"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="114.3984" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="303.5" y="269.2266"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="461.5" y="716.9531"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="57.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="461.5" y="818.3516"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="545.5" y="157.8281"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="617.5" y="466.0234"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="617.5" y="598.5547"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="694.5" y="298.3594"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="783.5" y="746.0859"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="14" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="783.5" y="847.4844"/><rect fill="#FEFEFE" filter="url(#f105wwwd7nmw4q)" height="118.5313" style="stroke: #000000; stroke-width: 2.0;" width="649" x="13" y="398.625"/><rect fill="#FEFEFE" filter="url(#f105wwwd7nmw4q)" height="118.5313" style="stroke: #000000; stroke-width: 2.0;" width="649" x="13" y="531.1563"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="53" x2="53" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="145" x2="145" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="217" x2="217" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="308" x2="308" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="466" x2="466" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="550" x2="550" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="622" x2="622" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="699" x2="699" y1="58.4297" y2="893.4844"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="788" x2="788" y1="58.4297" y2="893.4844"/><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="23" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="30" y="43.1279">main()</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="23" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="30" y="912.4795">main()</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="113" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="120" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="113" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="120" y="912.4795">Device</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="188" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="195" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="188" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="195" y="912.4795">Buffer</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="271" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="278" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="271" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="278" y="912.4795">Network</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="425" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="432" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="425" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="432" y="912.4795">Inference</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="518" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="525" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="518" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="525" y="912.4795">Device</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="593" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="600" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="593" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="600" y="912.4795">Buffer</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="662" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="669" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="662" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="669" y="912.4795">Network</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="747" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="754" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#f105wwwd7nmw4q)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="747" y="892.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="754" y="912.4795">Inference</text><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="816.0547" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="48.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="140.5" y="128.6953"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="212.5" y="436.8906"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="212.5" y="569.4219"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="114.3984" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="303.5" y="269.2266"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="72.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="461.5" y="716.9531"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="57.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="461.5" y="818.3516"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="545.5" y="157.8281"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="617.5" y="466.0234"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="617.5" y="598.5547"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="694.5" y="298.3594"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="783.5" y="746.0859"/><rect fill="#FFFFFF" filter="url(#f105wwwd7nmw4q)" height="14" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="783.5" y="847.4844"/><path d="M89,73.4297 L89,98.4297 L198,98.4297 L198,83.4297 L188,73.4297 L89,73.4297 " fill="#FBFB77" filter="url(#f105wwwd7nmw4q)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M188,73.4297 L188,83.4297 L198,83.4297 L188,73.4297 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="88" x="95" y="90.4966">Create device</text><polygon fill="#A80036" points="128.5,124.6953,138.5,128.6953,128.5,132.6953,132.5,128.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="134.5" y1="128.6953" y2="128.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="53" x="65.5" y="123.6294">Device()</text><polygon fill="#A80036" points="533.5,153.8281,543.5,157.8281,533.5,161.8281,537.5,157.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="150.5" x2="539.5" y1="157.8281" y2="157.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="141" x="157.5" y="152.7622">open(&lt;device node&gt;)</text><polygon fill="#A80036" points="161.5,182.9609,151.5,186.9609,161.5,190.9609,157.5,186.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="155.5" x2="549.5" y1="186.9609" y2="186.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="167.5" y="181.895">file descriptor</text><polygon fill="#A80036" points="69.5,196.9609,59.5,200.9609,69.5,204.9609,65.5,200.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="144.5" y1="200.9609" y2="200.9609"/><path d="M176,213.9609 L176,238.9609 L436,238.9609 L436,223.9609 L426,213.9609 L176,213.9609 " fill="#FBFB77" filter="url(#f105wwwd7nmw4q)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M426,213.9609 L426,223.9609 L436,223.9609 L426,213.9609 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="239" x="182" y="231.0278">Create network, parse network model</text><polygon fill="#A80036" points="291.5,265.2266,301.5,269.2266,291.5,273.2266,295.5,269.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="297.5" y1="269.2266" y2="269.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="65.5" y="264.1606">Network(device, user_buffer, size)</text><polygon fill="#A80036" points="682.5,294.3594,692.5,298.3594,682.5,302.3594,686.5,298.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="313.5" x2="688.5" y1="298.3594" y2="298.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="154" x="320.5" y="293.2935">ioctl(NETWORK_CREATE)</text><polygon fill="#A80036" points="324.5,323.4922,314.5,327.4922,324.5,331.4922,320.5,327.4922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="318.5" x2="698.5" y1="327.4922" y2="327.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="330.5" y="322.4263">file descriptor</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="313.5" x2="355.5" y1="356.625" y2="356.625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="355.5" x2="355.5" y1="356.625" y2="369.625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="314.5" x2="355.5" y1="369.625" y2="369.625"/><polygon fill="#A80036" points="324.5,365.625,314.5,369.625,324.5,373.625,320.5,369.625" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="134" x="320.5" y="351.5591">Parse network model</text><polygon fill="#A80036" points="69.5,379.625,59.5,383.625,69.5,387.625,65.5,383.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="307.5" y1="383.625" y2="383.625"/><path d="M13,398.625 L90,398.625 L90,405.625 L80,415.625 L13,415.625 L13,398.625 " fill="#EEEEEE" style="stroke: #000000; stroke-width: 1.0;"/><rect fill="none" height="118.5313" style="stroke: #000000; stroke-width: 2.0;" width="649" x="13" y="398.625"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="28" y="411.6919">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="188" x="105" y="410.8354">[Allocate and fill IFM buffers]</text><polygon fill="#A80036" points="200.5,432.8906,210.5,436.8906,200.5,440.8906,204.5,436.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="206.5" y1="436.8906" y2="436.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="89" x="65.5" y="431.8247">Buffer(device)</text><polygon fill="#A80036" points="605.5,462.0234,615.5,466.0234,605.5,470.0234,609.5,466.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="222.5" x2="611.5" y1="466.0234" y2="466.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="141" x="229.5" y="460.9575">ioctl(BUFFER_CREATE)</text><polygon fill="#A80036" points="233.5,491.1563,223.5,495.1563,233.5,499.1563,229.5,495.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="227.5" x2="621.5" y1="495.1563" y2="495.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="239.5" y="490.0903">file descriptor</text><polygon fill="#A80036" points="69.5,505.1563,59.5,509.1563,69.5,513.1563,65.5,509.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="216.5" y1="509.1563" y2="509.1563"/><path d="M13,531.1563 L90,531.1563 L90,538.1563 L80,548.1563 L13,548.1563 L13,531.1563 " fill="#EEEEEE" style="stroke: #000000; stroke-width: 1.0;"/><rect fill="none" height="118.5313" style="stroke: #000000; stroke-width: 2.0;" width="649" x="13" y="531.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="28" y="544.2231">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="145" x="105" y="543.3667">[Allocate OFM buffers]</text><polygon fill="#A80036" points="200.5,565.4219,210.5,569.4219,200.5,573.4219,204.5,569.4219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="206.5" y1="569.4219" y2="569.4219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="89" x="65.5" y="564.356">Buffer(device)</text><polygon fill="#A80036" points="605.5,594.5547,615.5,598.5547,605.5,602.5547,609.5,598.5547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="222.5" x2="611.5" y1="598.5547" y2="598.5547"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="141" x="229.5" y="593.4888">ioctl(BUFFER_CREATE)</text><polygon fill="#A80036" points="233.5,623.6875,223.5,627.6875,233.5,631.6875,229.5,627.6875" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="227.5" x2="621.5" y1="627.6875" y2="627.6875"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="239.5" y="622.6216">file descriptor</text><polygon fill="#A80036" points="69.5,637.6875,59.5,641.6875,69.5,645.6875,65.5,641.6875" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="216.5" y1="641.6875" y2="641.6875"/><path d="M374,661.6875 L374,686.6875 L554,686.6875 L554,671.6875 L544,661.6875 L374,661.6875 " fill="#FBFB77" filter="url(#f105wwwd7nmw4q)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M544,661.6875 L544,671.6875 L554,671.6875 L544,661.6875 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="159" x="380" y="678.7544">Create and run inference</text><polygon fill="#A80036" points="449.5,712.9531,459.5,716.9531,449.5,720.9531,453.5,716.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="455.5" y1="716.9531" y2="716.9531"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="65.5" y="711.8872">Inference(network, ifm, ofm)</text><polygon fill="#A80036" points="771.5,742.0859,781.5,746.0859,771.5,750.0859,775.5,746.0859" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="471.5" x2="777.5" y1="746.0859" y2="746.0859"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="163" x="478.5" y="741.02">ioctl(INFERENCE_CREATE)</text><polygon fill="#A80036" points="482.5,771.2188,472.5,775.2188,482.5,779.2188,478.5,775.2188" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="476.5" x2="787.5" y1="775.2188" y2="775.2188"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="488.5" y="770.1528">file descriptor</text><polygon fill="#A80036" points="69.5,785.2188,59.5,789.2188,69.5,793.2188,65.5,789.2188" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="465.5" y1="789.2188" y2="789.2188"/><polygon fill="#A80036" points="449.5,814.3516,459.5,818.3516,449.5,822.3516,453.5,818.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="58.5" x2="455.5" y1="818.3516" y2="818.3516"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="121" x="65.5" y="813.2856">wait(file descriptor)</text><polygon fill="#A80036" points="771.5,843.4844,781.5,847.4844,771.5,851.4844,775.5,847.4844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="471.5" x2="777.5" y1="847.4844" y2="847.4844"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="118" x="478.5" y="842.4185">poll(file descriptor)</text><polygon fill="#A80036" points="482.5,857.4844,472.5,861.4844,482.5,865.4844,478.5,861.4844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="476.5" x2="787.5" y1="861.4844" y2="861.4844"/><polygon fill="#A80036" points="69.5,871.4844,59.5,875.4844,69.5,879.4844,65.5,875.4844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="63.5" x2="465.5" y1="875.4844" y2="875.4844"/><!--MD5=[aa4ced5da24ed5aa951387ff7db834b9]
@startuml

skinparam backgroundColor #FEFEFE

box "Application" #0091BD
participant "main()" as main
end box

box "Driver library" #00C1DE
participant "Device" as ddev
participant "Buffer" as dbuf
participant "Network" as dnet
participant "Inference" as dinf
end box

box "Kernel driver" #7D868C
participant "Device" as kdev
participant "Buffer" as kbuf
participant "Network" as knet
participant "Inference" as kinf
end box

note over ddev
    Create device
end note
activate main
main -> ddev++: Device()
    ddev -> kdev++: open(<device node>)
    return file descriptor
return

note over dnet
    Create network, parse network model
end note

main -> dnet++: Network(device, user_buffer, size)
    dnet -> knet++: ioctl(NETWORK_CREATE)
    return file descriptor

    dnet -> dnet: Parse network model
return

loop Allocate and fill IFM buffers
    main -> dbuf++: Buffer(device)
        dbuf -> kbuf++: ioctl(BUFFER_CREATE)
        return file descriptor
    return
end loop

loop Allocate OFM buffers
    main -> dbuf++: Buffer(device)
        dbuf -> kbuf++: ioctl(BUFFER_CREATE)
        return file descriptor
    return
end loop

note over dinf
    Create and run inference
end note
main -> dinf++: Inference(network, ifm, ofm)
    dinf -> kinf++: ioctl(INFERENCE_CREATE)
    return file descriptor
return

main -> dinf++: wait(file descriptor)
    dinf -> kinf++: poll(file descriptor)
    return
return

@enduml

PlantUML version 1.2020.02(Sun Mar 01 11:22:07 CET 2020)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 11.0.20.1+1-post-Ubuntu-0ubuntu122.04
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>