aboutsummaryrefslogtreecommitdiff
path: root/docs/multinpu.svg
diff options
context:
space:
mode:
Diffstat (limited to 'docs/multinpu.svg')
-rw-r--r--docs/multinpu.svg95
1 files changed, 95 insertions, 0 deletions
diff --git a/docs/multinpu.svg b/docs/multinpu.svg
new file mode 100644
index 0000000..bc3b6b0
--- /dev/null
+++ b/docs/multinpu.svg
@@ -0,0 +1,95 @@
+<?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="1073px" preserveAspectRatio="none" style="width:958px;height:1073px;background:#EEEBDC;" version="1.1" viewBox="0 0 958 1073" width="958px" zoomAndPan="magnify"><defs><filter height="300%" id="f161eqf8p7fyeb" 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="#00C1DE" height="1058.5859" style="stroke: #A80036; stroke-width: 1.0;" width="89" x="118" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="83" x="121" y="16.0669">Application</text><rect fill="#FF6B00" height="1058.5859" style="stroke: #A80036; stroke-width: 1.0;" width="220" x="218" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="288" y="16.0669">Tensorflow</text><rect fill="#95D600" height="1058.5859" style="stroke: #A80036; stroke-width: 1.0;" width="110" x="506.5" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="104" x="509.5" y="16.0669">Ethos-U driver</text><rect fill="#FFC700" height="1058.5859" style="stroke: #A80036; stroke-width: 1.0;" width="171" x="776.5" y="4"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="72" x="826" y="16.0669">Hardware</text><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="200.9609"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="286.2266"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="407.4297"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="824.7578"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="867.8906"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="950.1563"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="916.8594" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="242.5" y="89.4297"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="873.7266" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="353.5" y="118.5625"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="341" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="147.6953"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="248.9297" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="517.6953"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="161.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="561.5" y="583.9609"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="182.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="795.625"/><rect fill="#EEEBDC" filter="url(#f161eqf8p7fyeb)" height="312.8672" style="stroke: #000000; stroke-width: 2.0;" width="734.5" x="64" y="162.8281"/><rect fill="#EEEBDC" filter="url(#f161eqf8p7fyeb)" height="153.3359" style="stroke: #000000; stroke-width: 2.0;" width="565" x="74" y="315.3594"/><rect fill="#EEEBDC" height="97.0703" style="stroke: none; stroke-width: 1.0;" width="565" x="74" y="371.625"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="162" x2="162" y1="58.4297" y2="1024.2891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="247" x2="247" y1="58.4297" y2="1024.2891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="358" x2="358" y1="58.4297" y2="1024.2891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="561.5" x2="561.5" y1="58.4297" y2="1024.2891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="820.5" x2="820.5" y1="58.4297" y2="1024.2891"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="906.5" x2="906.5" y1="58.4297" y2="1024.2891"/><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="132" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="139" y="43.1279">main()</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="57" x="132" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="43" x="139" y="1043.2842">main()</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="47" x="222" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="33" x="229" y="43.1279">TFLu</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="47" x="222" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="33" x="229" y="1043.2842">TFLu</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="147" x="283" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="133" x="290" y="43.1279">Ethos-U custom op</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="147" x="283" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="133" x="290" y="1043.2842">Ethos-U custom op</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="54" x="532.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="539.5" y="43.1279">Driver</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="54" x="532.5" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="539.5" y="1043.2842">Driver</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="76" x="780.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="62" x="787.5" y="43.1279">Cortex-M</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="76" x="780.5" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="62" x="787.5" y="1043.2842">Cortex-M</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="69" x="870.5" y="23.1328"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="877.5" y="43.1279">Ethos-U</text><rect fill="#FEFECE" filter="url(#f161eqf8p7fyeb)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="69" x="870.5" y="1023.2891"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="55" x="877.5" y="1043.2842">Ethos-U</text><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="200.9609"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="286.2266"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="407.4297"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="824.7578"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="53.2656" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="867.8906"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="14.1328" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="157.5" y="950.1563"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="916.8594" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="242.5" y="89.4297"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="873.7266" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="353.5" y="118.5625"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="341" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="147.6953"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="248.9297" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="517.6953"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="161.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="561.5" y="583.9609"/><rect fill="#FFFFFF" filter="url(#f161eqf8p7fyeb)" height="182.6641" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="556.5" y="795.625"/><polygon fill="#A80036" points="230.5,85.4297,240.5,89.4297,230.5,93.4297,234.5,89.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="162.5" x2="236.5" y1="89.4297" y2="89.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="51" x="169.5" y="84.4966">Invoke()</text><polygon fill="#A80036" points="341.5,114.5625,351.5,118.5625,341.5,122.5625,345.5,118.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="252.5" x2="347.5" y1="118.5625" y2="118.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="36" x="259.5" y="113.6294">Eval()</text><polygon fill="#A80036" points="544.5,143.6953,554.5,147.6953,544.5,151.6953,548.5,147.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="363.5" x2="550.5" y1="147.6953" y2="147.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="370.5" y="142.7622">ethosu_reserve_driver()</text><rect fill="none" height="312.8672" style="stroke: #000000; stroke-width: 2.0;" width="734.5" x="64" y="162.8281"/><polygon fill="#EEEEEE" points="64,162.8281,141,162.8281,141,169.8281,131,179.8281,64,179.8281,64,162.8281" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="32" x="79" y="175.895">loop</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="159" x="156" y="175.0386">[Find and reserve driver]</text><polygon fill="#A80036" points="178.5,196.9609,168.5,200.9609,178.5,204.9609,174.5,200.9609" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="200.9609" y2="200.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="134" x="184.5" y="196.0278">ethosu_mutex_lock()</text><polygon fill="#A80036" points="544.5,211.0938,554.5,215.0938,544.5,219.0938,548.5,215.0938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="215.0938" y2="215.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="566.5" x2="608.5" y1="244.2266" y2="244.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="608.5" x2="608.5" y1="244.2266" y2="257.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="567.5" x2="608.5" y1="257.2266" y2="257.2266"/><polygon fill="#A80036" points="577.5,253.2266,567.5,257.2266,577.5,261.2266,573.5,257.2266" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="213" x="573.5" y="239.1606">ethosu_find_and_reserve_driver()</text><polygon fill="#A80036" points="178.5,282.2266,168.5,286.2266,178.5,290.2266,174.5,286.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="286.2266" y2="286.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="150" x="184.5" y="281.2935">ethosu_mutex_unlock()</text><polygon fill="#A80036" points="544.5,296.3594,554.5,300.3594,544.5,304.3594,548.5,300.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="300.3594" y2="300.3594"/><rect fill="none" height="153.3359" style="stroke: #000000; stroke-width: 2.0;" width="565" x="74" y="315.3594"/><polygon fill="#EEEEEE" points="74,315.3594,138,315.3594,138,322.3594,128,332.3594,74,332.3594,74,315.3594" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="19" x="89" y="328.4263">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="121" x="153" y="327.5698">[Found free driver]</text><polygon fill="#FBFB77" filter="url(#f161eqf8p7fyeb)" points="493,337.4922,493,362.4922,625,362.4922,625,347.4922,615,337.4922,493,337.4922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="615" x2="615" y1="337.4922" y2="347.4922"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="625" x2="615" y1="347.4922" y2="347.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="111" x="499" y="354.5591">Return free driver</text><line style="stroke: #000000; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="74" x2="639" y1="372.625" y2="372.625"/><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="131" x="79" y="382.8354">[No driver available]</text><polygon fill="#A80036" points="178.5,403.4297,168.5,407.4297,178.5,411.4297,174.5,407.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="407.4297" y2="407.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="169" x="184.5" y="402.4966">ethosu_semaphore_take()</text><polygon fill="#FBFB77" filter="url(#f161eqf8p7fyeb)" points="84,420.5625,84,445.5625,236,445.5625,236,430.5625,226,420.5625,84,420.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="226" x2="226" y1="420.5625" y2="430.5625"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="236" x2="226" y1="430.5625" y2="430.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="131" x="90" y="437.6294">Block on semaphore</text><polygon fill="#A80036" points="544.5,456.6953,554.5,460.6953,544.5,464.6953,548.5,460.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="460.6953" y2="460.6953"/><polygon fill="#A80036" points="374.5,484.6953,364.5,488.6953,374.5,492.6953,370.5,488.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="368.5" x2="560.5" y1="488.6953" y2="488.6953"/><polygon fill="#A80036" points="544.5,513.6953,554.5,517.6953,544.5,521.6953,548.5,517.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="363.5" x2="550.5" y1="517.6953" y2="517.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="102" x="370.5" y="512.7622">ethosu_invoke()</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="905" x2="895" y1="546.8281" y2="542.8281"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="566.5" x2="906" y1="546.8281" y2="546.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="230" x="573.5" y="541.895">Configure NPU and trigger inference</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="566.5" x2="613.5" y1="571.0938" y2="571.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="613.5" x2="613.5" y1="571.0938" y2="584.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="572.5" x2="613.5" y1="584.0938" y2="584.0938"/><polygon fill="#A80036" points="582.5,580.0938,572.5,584.0938,582.5,588.0938,578.5,584.0938" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="82" x="578.5" y="566.0278">wait_for_irq()</text><polygon fill="#FBFB77" filter="url(#f161eqf8p7fyeb)" points="454,602.0938,454,627.0938,664,627.0938,664,612.0938,654,602.0938,454,602.0938" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="654" x2="654" y1="602.0938" y2="612.0938"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="664" x2="654" y1="612.0938" y2="612.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="189" x="460" y="619.1606">Driver sleeping waiting for IRQ</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="820.5" x2="830.5" y1="657.2266" y2="653.2266"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="820.5" x2="906" y1="657.2266" y2="657.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="21" x="837.5" y="652.2935">IRQ</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="571.5" x2="581.5" y1="686.3594" y2="682.3594"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="571.5" x2="819.5" y1="686.3594" y2="686.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="132" x="588.5" y="681.4263">ethosu_irq_handler()</text><polygon fill="#FBFB77" filter="url(#f161eqf8p7fyeb)" points="450,699.4922,450,724.4922,669,724.4922,669,709.4922,659,699.4922,450,699.4922" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="659" x2="659" y1="699.4922" y2="709.4922"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="669" x2="659" y1="709.4922" y2="709.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="198" x="456" y="716.5591">Driver woken up by IRQ handler</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="571.5" x2="613.5" y1="744.625" y2="744.625"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="613.5" x2="613.5" y1="744.625" y2="757.625"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="566.5" x2="613.5" y1="757.625" y2="757.625"/><polygon fill="#A80036" points="576.5,753.625,566.5,757.625,576.5,761.625,572.5,757.625" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="374.5,762.625,364.5,766.625,374.5,770.625,370.5,766.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="368.5" x2="560.5" y1="766.625" y2="766.625"/><polygon fill="#A80036" points="544.5,791.625,554.5,795.625,544.5,799.625,548.5,795.625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="363.5" x2="550.5" y1="795.625" y2="795.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="151" x="370.5" y="790.6919">ethosu_release_driver()</text><polygon fill="#A80036" points="178.5,820.7578,168.5,824.7578,178.5,828.7578,174.5,824.7578" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="824.7578" y2="824.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="134" x="184.5" y="819.8247">ethosu_mutex_lock()</text><polygon fill="#A80036" points="544.5,834.8906,554.5,838.8906,544.5,842.8906,548.5,838.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="838.8906" y2="838.8906"/><polygon fill="#A80036" points="178.5,863.8906,168.5,867.8906,178.5,871.8906,174.5,867.8906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="867.8906" y2="867.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="167" x="184.5" y="862.9575">ethosu_semaphore_give()</text><polygon fill="#FBFB77" filter="url(#f161eqf8p7fyeb)" points="8,881.0234,8,906.0234,314,906.0234,314,891.0234,304,881.0234,8,881.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="304" x2="304" y1="881.0234" y2="891.0234"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="314" x2="304" y1="891.0234" y2="891.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="285" x="14" y="898.0903">Wake up threads blocking on the semaphore</text><polygon fill="#A80036" points="544.5,917.1563,554.5,921.1563,544.5,925.1563,548.5,921.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="921.1563" y2="921.1563"/><polygon fill="#A80036" points="178.5,946.1563,168.5,950.1563,178.5,954.1563,174.5,950.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="172.5" x2="555.5" y1="950.1563" y2="950.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="150" x="184.5" y="945.2231">ethosu_mutex_unlock()</text><polygon fill="#A80036" points="544.5,960.2891,554.5,964.2891,544.5,968.2891,548.5,964.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="162.5" x2="550.5" y1="964.2891" y2="964.2891"/><polygon fill="#A80036" points="374.5,974.2891,364.5,978.2891,374.5,982.2891,370.5,978.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="368.5" x2="560.5" y1="978.2891" y2="978.2891"/><polygon fill="#A80036" points="263.5,988.2891,253.5,992.2891,263.5,996.2891,259.5,992.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="257.5" x2="357.5" y1="992.2891" y2="992.2891"/><polygon fill="#A80036" points="173.5,1002.2891,163.5,1006.2891,173.5,1010.2891,169.5,1006.2891" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="167.5" x2="246.5" y1="1006.2891" y2="1006.2891"/><!--
+@startuml
+
+skinparam backgroundColor #EEEBDC
+
+box "Application" #00C1DE
+participant "main()" as app
+end box
+
+box "Tensorflow" #FF6B00
+participant "TFLu" as tflu
+participant "Ethos-U custom op" as custom
+end box
+
+box "Ethos-U driver" #95D600
+participant "Driver" as driver
+end box
+
+box "Hardware" #FFC700
+participant "Cortex-M" as cortexm
+participant "Ethos-U" as ethosu
+end box
+
+app -> tflu++: Invoke()
+ tflu -> custom++: Eval()
+ custom -> driver++: ethosu_reserve_driver()
+ loop Find and reserve driver
+ driver -> app++: ethosu_mutex_lock()
+ return
+
+ driver -> driver: ethosu_find_and_reserve_driver()
+
+ driver -> app++: ethosu_mutex_unlock()
+ return
+
+ alt Found free driver
+ note over driver
+ Return free driver
+ end note
+ else No driver available
+ driver -> app++: ethosu_semaphore_take()
+ note over app
+ Block on semaphore
+ end note
+ return
+ end
+ end loop
+ return
+
+ custom -> driver++: ethosu_invoke()
+ driver -\\ ethosu: Configure NPU and trigger inference
+
+ driver -> driver++: wait_for_irq()
+ note over driver
+ Driver sleeping waiting for IRQ
+ end note
+
+ ethosu -\\ cortexm: IRQ
+ cortexm -\\ driver: ethosu_irq_handler()
+
+ note over driver
+ Driver woken up by IRQ handler
+ end note
+ return
+ return
+
+ custom -> driver++: ethosu_release_driver()
+ driver -> app++: ethosu_mutex_lock()
+ return
+
+ driver -> app++: ethosu_semaphore_give()
+ note over app
+ Wake up threads blocking on the semaphore
+ end note
+ return
+
+ driver -> app++: ethosu_mutex_unlock()
+ return
+ return
+ 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.10+9-Ubuntu-0ubuntu1.18.04
+Operating System: Linux
+OS Version: 5.4.0-70-generic
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file