blob: 53ed8b02554c3581c434cb6e122ea95e980a0eea [file] [log] [blame]
Kristofer Jonsson0c79f892021-06-02 17:15:57 +02001<?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="832px" preserveAspectRatio="none" style="width:1288px;height:832px;background:#FEFEFE;" version="1.1" viewBox="0 0 1288 832" width="1288px" zoomAndPan="magnify"><defs><filter height="300%" id="fhqhey4ocrvwe" 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="817.6484" style="stroke: #A80036; stroke-width: 1.0;" width="89" x="60" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="83" x="63" y="16.0669">Application</text><rect fill="#00C1DE" height="817.6484" style="stroke: #A80036; stroke-width: 1.0;" width="320" x="151" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="96" x="263" y="16.0669">Driver library</text><rect fill="#7D868C" height="817.6484" style="stroke: #A80036; stroke-width: 1.0;" width="591" x="473" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="95" x="721" y="16.0669">Kernel driver</text><rect fill="#E5ECEB" height="817.6484" style="stroke: #A80036; stroke-width: 1.0;" width="159" x="1118" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="153" x="1121" y="16.0669">Cortex-M application</text><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="705.9219" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="99.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="296.3281" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="420.5" y="173.9609"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="266.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="420.5" y="499.2891"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="216.7969" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="504.5" y="557.5547"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="253.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="731.5" y="203.0938"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="155.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="922.5" y="271.3594"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="222.9297" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="922.5" y="528.4219"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="927.5" y="723.2188"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="97.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="1020.5" y="300.4922"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="1020.5" y="640.9531"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="104" x2="104" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="187" x2="187" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="259" x2="259" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="336" x2="336" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="425" x2="425" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="509" x2="509" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="581" x2="581" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="736" x2="736" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="927" x2="927" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="1025" x2="1025" y1="58.4297" y2="783.3516"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="1197" x2="1197" y1="58.4297" y2="783.3516"/><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="74" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="81" y="43.1279">main()</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="74" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="81" y="802.3467">main()</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="155" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="162" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="155" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="162" y="802.3467">Device</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="230" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="237" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="230" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="237" y="802.3467">Buffer</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="299" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="306" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="299" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="306" y="802.3467">Network</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="384" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="391" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="384" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="391" y="802.3467">Inference</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="477" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="484" y="43.1279">Device</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="477" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="47" x="484" y="802.3467">Device</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="552" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="559" y="43.1279">Buffer</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="55" x="552" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="41" x="559" y="802.3467">Buffer</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="699" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="706" y="43.1279">Network</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="71" x="699" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="706" y="802.3467">Network</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="886" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="893" y="43.1279">Inference</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="886" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="65" x="893" y="802.3467">Inference</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="65" x="991" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="998" y="43.1279">Mailbox</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="65" x="991" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="998" y="802.3467">Mailbox</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="1127" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="123" x="1134" y="43.1279">Message process</text><rect fill="#FEFECE" filter="url(#fhqhey4ocrvwe)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="1127" y="782.3516"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="123" x="1134" y="802.3467">Message process</text><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="705.9219" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="99.5" y="68.4297"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="296.3281" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="420.5" y="173.9609"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="266.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="420.5" y="499.2891"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="216.7969" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="504.5" y="557.5547"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="253.0625" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="731.5" y="203.0938"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="155.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="922.5" y="271.3594"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="222.9297" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="922.5" y="528.4219"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="927.5" y="723.2188"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="97.5313" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="1020.5" y="300.4922"/><rect fill="#FFFFFF" filter="url(#fhqhey4ocrvwe)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="1020.5" y="640.9531"/><polygon fill="#FBFB77" filter="url(#fhqhey4ocrvwe)" points="8,73.4297,8,143.4297,198,143.4297,198,83.4297,188,73.4297,8,73.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="188" x2="188" y1="73.4297" y2="83.4297"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="198" x2="188" y1="83.4297" y2="83.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="88" x="14" y="90.4966">Create device</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="97" x="14" y="105.6294">Create network</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="169" x="14" y="120.7622">Allocate and fill IFM buffers</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="131" x="14" y="135.895">Allocate OFM buffers</text><polygon fill="#A80036" points="408.5,169.9609,418.5,173.9609,408.5,177.9609,412.5,173.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="109.5" x2="414.5" y1="173.9609" y2="173.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="116.5" y="169.0278">Inference(network, ifm, ofm)</text><polygon fill="#A80036" points="719.5,199.0938,729.5,203.0938,719.5,207.0938,723.5,203.0938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="430.5" x2="725.5" y1="203.0938" y2="203.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="282" x="437.5" y="198.1606">ioctl(INFERENCE_CREATE, network, ifm, ofm)</text><polygon fill="#FBFB77" filter="url(#fhqhey4ocrvwe)" points="862,216.2266,862,241.2266,989,241.2266,989,226.2266,979,216.2266,862,216.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="979" x2="979" y1="216.2266" y2="226.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="989" x2="979" y1="226.2266" y2="226.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="106" x="868" y="233.2935">Create inference</text><polygon fill="#A80036" points="910.5,267.3594,920.5,271.3594,910.5,275.3594,914.5,271.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="741.5" x2="916.5" y1="271.3594" y2="271.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="162" x="748.5" y="266.4263">create(network, ifm, ofm)</text><polygon fill="#A80036" points="1008.5,296.4922,1018.5,300.4922,1008.5,304.4922,1012.5,300.4922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="932.5" x2="1014.5" y1="300.4922" y2="300.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="69" x="939.5" y="295.5591">inference()</text><polygon fill="#FBFB77" filter="url(#fhqhey4ocrvwe)" points="848,313.625,848,353.625,1199,353.625,1199,323.625,1189,313.625,848,313.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="1189" x2="1189" y1="313.625" y2="323.625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="1199" x2="1189" y1="323.625" y2="323.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="330" x="854" y="330.6919">Write inference request to queue in shared memory</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="58" x="854" y="345.8247">Send IRQ</text><polygon fill="#A80036" points="1185.5,379.8906,1195.5,383.8906,1185.5,387.8906,1189.5,383.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="1030.5" x2="1191.5" y1="383.8906" y2="383.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="138" x="1037.5" y="378.9575">INFERENCE_REQUEST</text><polygon fill="#A80036" points="943.5,394.0234,933.5,398.0234,943.5,402.0234,939.5,398.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="937.5" x2="1024.5" y1="398.0234" y2="398.0234"/><polygon fill="#A80036" points="752.5,423.0234,742.5,427.0234,752.5,431.0234,748.5,427.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="746.5" x2="926.5" y1="427.0234" y2="427.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="758.5" y="422.0903">file descriptor</text><polygon fill="#A80036" points="441.5,452.1563,431.5,456.1563,441.5,460.1563,437.5,456.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="435.5" x2="735.5" y1="456.1563" y2="456.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="447.5" y="451.2231">file descriptor</text><polygon fill="#A80036" points="120.5,466.2891,110.5,470.2891,120.5,474.2891,116.5,470.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="114.5" x2="424.5" y1="470.2891" y2="470.2891"/><polygon fill="#A80036" points="408.5,495.2891,418.5,499.2891,408.5,503.2891,412.5,499.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="109.5" x2="414.5" y1="499.2891" y2="499.2891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="35" x="116.5" y="494.356">wait()</text><polygon fill="#A80036" points="910.5,524.4219,920.5,528.4219,910.5,532.4219,914.5,528.4219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="430.5" x2="916.5" y1="528.4219" y2="528.4219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="437.5" y="523.4888">poll()</text><polygon fill="#A80036" points="525.5,553.5547,515.5,557.5547,525.5,561.5547,521.5,557.5547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="519.5" x2="1196.5" y1="557.5547" y2="557.5547"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="148" x="531.5" y="552.6216">INFERENCE_RESPONSE</text><polygon fill="#FBFB77" filter="url(#fhqhey4ocrvwe)" points="292,570.6875,292,610.6875,722,610.6875,722,580.6875,712,570.6875,292,570.6875" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="712" x2="712" y1="570.6875" y2="580.6875"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="722" x2="712" y1="580.6875" y2="580.6875"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="409" x="298" y="587.7544">Inference response is handled by the IRQ bottom handler thread</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="303" x="298" y="602.8872">Message is read from queue in shared memory</text><polygon fill="#A80036" points="1008.5,636.9531,1018.5,640.9531,1008.5,644.9531,1012.5,640.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="514.5" x2="1014.5" y1="640.9531" y2="640.9531"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="39" x="521.5" y="636.02">read()</text><polygon fill="#A80036" points="525.5,651.0859,515.5,655.0859,525.5,659.0859,521.5,655.0859" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="519.5" x2="1024.5" y1="655.0859" y2="655.0859"/><polygon fill="#FBFB77" filter="url(#fhqhey4ocrvwe)" points="744,668.0859,744,693.0859,1107,693.0859,1107,678.0859,1097,668.0859,744,668.0859" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="1097" x2="1097" y1="668.0859" y2="678.0859"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="1107" x2="1097" y1="678.0859" y2="678.0859"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="342" x="750" y="685.1528">Inference response handler unlocks the polling thread</text><polygon fill="#A80036" points="915.5,719.2188,925.5,723.2188,915.5,727.2188,919.5,723.2188" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="514.5" x2="921.5" y1="723.2188" y2="723.2188"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="135" x="521.5" y="718.2856">inference_response()</text><polygon fill="#A80036" points="525.5,733.3516,515.5,737.3516,525.5,741.3516,521.5,737.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="519.5" x2="921.5" y1="737.3516" y2="737.3516"/><polygon fill="#A80036" points="441.5,747.3516,431.5,751.3516,441.5,755.3516,437.5,751.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="435.5" x2="926.5" y1="751.3516" y2="751.3516"/><polygon fill="#A80036" points="120.5,761.3516,110.5,765.3516,120.5,769.3516,116.5,765.3516" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="114.5" x2="424.5" y1="765.3516" y2="765.3516"/><!--
2@startuml
3
4skinparam backgroundColor #FEFEFE
5
6box "Application" #0091BD
7participant "main()" as main
8end box
9
10box "Driver library" #00C1DE
11participant "Device" as ddev
12participant "Buffer" as dbuf
13participant "Network" as dnet
14participant "Inference" as dinf
15end box
16
17box "Kernel driver" #7D868C
18participant "Device" as kdev
19participant "Buffer" as kbuf
20participant "Network" as knet
21participant "Inference" as kinf
22participant "Mailbox" as kmbox
23end box
24
25box "Cortex-M application" #E5ECEB
26participant "Message process" as cmsg
27end box
28
29activate main
30
31note over main
32 Create device
33 Create network
34 Allocate and fill IFM buffers
35 Allocate OFM buffers
36end note
37
38main -> dinf++: Inference(network, ifm, ofm)
39 dinf -> knet++: ioctl(INFERENCE_CREATE, network, ifm, ofm)
40 note over kinf
41 Create inference
42 end note
43
44 knet -> kinf++: create(network, ifm, ofm)
45 kinf -> kmbox++: inference()
46 note over kmbox
47 Write inference request to queue in shared memory
48 Send IRQ
49 end note
50
51 kmbox -> cmsg: INFERENCE_REQUEST
52 return
53 return file descriptor
54 return file descriptor
55return
56
57main -> dinf++: wait()
58 dinf -> kinf++: poll()
59
60 cmsg -> kdev++: INFERENCE_RESPONSE
61 note over kdev
62 Inference response is handled by the IRQ bottom handler thread
63 Message is read from queue in shared memory
64 end note
65
66 kdev -> kmbox++: read()
67 return
68
69 note over kinf
70 Inference response handler unlocks the polling thread
71 end note
72
73 kdev -> kinf++: inference_response()
74 return
75 deactivate cmsg
76
77 return
78return
79
80@enduml
81
82PlantUML version 1.2017.15(Mon Jul 03 18:45:34 CEST 2017)
83(GPL source distribution)
84Java Runtime: OpenJDK Runtime Environment
85JVM: OpenJDK 64-Bit Server VM
86Java Version: 11.0.11+9-Ubuntu-0ubuntu2.18.04
87Operating System: Linux
88OS Version: 5.4.0-73-generic
89Default Encoding: UTF-8
90Language: en
91Country: US
92--></g></svg>