blob: a3b2a48c272957cfbde4bcabd8af4bb2570e28e0 [file] [log] [blame]
<?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="549px" preserveAspectRatio="none" style="width:805px;height:549px;background:#FEFEFE;" version="1.1" viewBox="0 0 805 549" width="805px" zoomAndPan="magnify"><defs><filter height="300%" id="f1kw7imlhutayc" 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="534.3203" style="stroke: #A80036; stroke-width: 1.0;" width="89" x="4" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="83" x="7" y="16.0669">Application</text><rect fill="#00C1DE" height="534.3203" style="stroke: #A80036; stroke-width: 1.0;" width="320" x="104" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="96" x="216" y="16.0669">Driver library</text><rect fill="#7D868C" height="534.3203" style="stroke: #A80036; stroke-width: 1.0;" width="368" x="426" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="95" x="562.5" y="16.0669">Kernel driver</text><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="422.5938" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="43.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="111.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="135.5" y="89.4297"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="252.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="207.5" y="229.9609"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="457.5" y="157.6953"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="126.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="457.5" y="259.0938"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="577.5" y="327.3594"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="577.5" y="453.8906"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="48" x2="48" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="140" x2="140" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="212" x2="212" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="289" x2="289" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="378" x2="378" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="462" x2="462" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="582" x2="582" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="659" x2="659" y1="58.4297" y2="500.0234"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="748" x2="748" y1="58.4297" y2="500.0234"/><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="18" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="25" y="43.1279">main()</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="18" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="25" y="519.0186">main()</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="108" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="115" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="108" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="115" y="519.0186">Device</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="183" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="190" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="183" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="190" y="519.0186">Buffer</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="252" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="259" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="252" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="259" y="519.0186">Network</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="337" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="344" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="337" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="344" y="519.0186">Inference</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="430" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="437" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="430" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="437" y="519.0186">Device</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="553" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="560" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="553" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="560" y="519.0186">Buffer</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="622" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="629" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="622" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="629" y="519.0186">Network</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="707" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="714" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#f1kw7imlhutayc)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="707" y="499.0234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="714" y="519.0186">Inference</text><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="422.5938" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="43.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="111.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="135.5" y="89.4297"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="252.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="207.5" y="229.9609"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="457.5" y="157.6953"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="126.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="457.5" y="259.0938"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="29.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="577.5" y="327.3594"/><rect fill="#FFFFFF" filter="url(#f1kw7imlhutayc)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="577.5" y="453.8906"/><polygon fill="#A80036" points="123.5,85.4297,133.5,89.4297,123.5,93.4297,127.5,89.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="53.5" x2="129.5" y1="89.4297" y2="89.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="53" x="60.5" y="84.4966">Device()</text><polygon fill="#FBFB77" filter="url(#f1kw7imlhutayc)" points="392,102.5625,392,127.5625,528,127.5625,528,112.5625,518,102.5625,392,102.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="518" x2="518" y1="102.5625" y2="112.5625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="528" x2="518" y1="112.5625" y2="112.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="115" x="398" y="119.6294">Open device node</text><polygon fill="#A80036" points="445.5,153.6953,455.5,157.6953,445.5,161.6953,449.5,157.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="145.5" x2="451.5" y1="157.6953" y2="157.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="141" x="152.5" y="152.7622">open(&lt;device node&gt;)</text><polygon fill="#A80036" points="156.5,182.8281,146.5,186.8281,156.5,190.8281,152.5,186.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="150.5" x2="461.5" y1="186.8281" y2="186.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="162.5" y="181.895">file descriptor</text><polygon fill="#A80036" points="64.5,196.9609,54.5,200.9609,64.5,204.9609,60.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="58.5" x2="139.5" y1="200.9609" y2="200.9609"/><polygon fill="#A80036" points="195.5,225.9609,205.5,229.9609,195.5,233.9609,199.5,229.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="53.5" x2="201.5" y1="229.9609" y2="229.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="89" x="60.5" y="225.0278">Buffer(device)</text><polygon fill="#A80036" points="445.5,255.0938,455.5,259.0938,445.5,263.0938,449.5,259.0938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="217.5" x2="451.5" y1="259.0938" y2="259.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="141" x="224.5" y="254.1606">ioctl(BUFFER_CREATE)</text><polygon fill="#FBFB77" filter="url(#f1kw7imlhutayc)" points="447,272.2266,447,297.2266,713,297.2266,713,282.2266,703,272.2266,447,272.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="703" x2="703" y1="272.2266" y2="282.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="713" x2="703" y1="282.2266" y2="282.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="245" x="453" y="289.2935">Create buffer and return file descriptor</text><polygon fill="#A80036" points="565.5,323.3594,575.5,327.3594,565.5,331.3594,569.5,327.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="467.5" x2="571.5" y1="327.3594" y2="327.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="51" x="474.5" y="322.4263">create()</text><polygon fill="#A80036" points="478.5,352.4922,468.5,356.4922,478.5,360.4922,474.5,356.4922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="472.5" x2="581.5" y1="356.4922" y2="356.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="484.5" y="351.5591">file descriptor</text><polygon fill="#A80036" points="228.5,381.625,218.5,385.625,228.5,389.625,224.5,385.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="222.5" x2="461.5" y1="385.625" y2="385.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="234.5" y="380.6919">file descriptor</text><polygon fill="#FBFB77" filter="url(#f1kw7imlhutayc)" points="507,398.7578,507,423.7578,654,423.7578,654,408.7578,644,398.7578,507,398.7578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="644" x2="644" y1="398.7578" y2="408.7578"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="654" x2="644" y1="408.7578" y2="408.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="126" x="513" y="415.8247">Memory map buffer</text><polygon fill="#A80036" points="565.5,449.8906,575.5,453.8906,565.5,457.8906,569.5,453.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="217.5" x2="571.5" y1="453.8906" y2="453.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="138" x="224.5" y="448.9575">mmap(file descriptor)</text><polygon fill="#A80036" points="228.5,464.0234,218.5,468.0234,228.5,472.0234,224.5,468.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="222.5" x2="581.5" y1="468.0234" y2="468.0234"/><polygon fill="#A80036" points="64.5,478.0234,54.5,482.0234,64.5,486.0234,60.5,482.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="58.5" x2="211.5" y1="482.0234" y2="482.0234"/><!--
@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
activate main
main -> ddev++: Device()
note over kdev
Open device node
end note
ddev -> kdev++: open(<device node>)
return file descriptor
return
main -> dbuf++: Buffer(device)
dbuf -> kdev++: ioctl(BUFFER_CREATE)
note over kbuf
Create buffer and return file descriptor
end note
kdev -> kbuf++: create()
return file descriptor
return file descriptor
note over kbuf
Memory map buffer
end note
dbuf -> kbuf++: mmap(file descriptor)
return
return
@enduml
PlantUML version 1.2017.15(Mon Jul 03 18:45:34 CEST 2017)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 11.0.11+9-Ubuntu-0ubuntu2.18.04
Operating System: Linux
OS Version: 5.4.0-73-generic
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>