Files
lab-rv32i-freertos-c-isr-se…/doc/assets/a5-flow.svg
T

40 lines
12 KiB
XML

<?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="422.8188px" preserveAspectRatio="none" style="width:906px;height:422px;" version="1.1" viewBox="0 0 906 422" width="906.9032px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="386.5772" x="259.3001" y="18.2405">A5 FLOW — ISR wakes waiter before interrupted stimulus continues</text><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="31.0642" x2="31.0642" y1="51.7198" y2="390.5411"/><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="193.72" x2="193.72" y1="51.7198" y2="390.5411"/><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="266.2033" x2="266.2033" y1="51.7198" y2="390.5411"/><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="507.3826" x2="507.3826" y1="51.7198" y2="390.5411"/><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="636.8169" x2="636.8169" y1="51.7198" y2="390.5411"/><line style="stroke: #A80036; stroke-width: 0.862895493767977; stroke-dasharray: 5.0,5.0;" x1="691.1793" x2="691.1793" y1="51.7198" y2="390.5411"/><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="48.3221" x="6.9032" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="36.2416" x="12.9434" y="42.3746">waiter</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="48.3221" x="6.9032" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="36.2416" x="12.9434" y="405.33">waiter</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="66.443" x="160.93" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="54.3624" x="166.9703" y="42.3746">semaphore</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="66.443" x="160.93" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="54.3624" x="166.9703" y="405.33">semaphore</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="60.4027" x="236.0019" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="48.3221" x="242.0422" y="42.3746">stimulus</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="60.4027" x="236.0019" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="48.3221" x="242.0422" y="405.33">stimulus</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="54.3624" x="480.6328" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="42.2819" x="486.6731" y="42.3746">Hazard3</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="54.3624" x="480.6328" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="42.2819" x="486.6731" y="405.33">Hazard3</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="30.2013" x="622.1477" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="18.1208" x="628.1879" y="42.3746">ISR</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="30.2013" x="622.1477" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="18.1208" x="628.1879" y="405.33">ISR</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="60.4027" x="660.9779" y="26.7228"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="48.3221" x="667.0182" y="42.3746">verifier</text><rect fill="#EDF6FA" height="24.1341" style="stroke: #2B6F8E; stroke-width: 1.2943432406519655;" width="60.4027" x="660.9779" y="389.6782"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="48.3221" x="667.0182" y="405.33">verifier</text><polygon fill="#8295A0" points="183.7967,74.1281,192.4257,77.5797,183.7967,81.0313,187.2483,77.5797" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="31.0642" x2="188.9741" y1="77.5797" y2="77.5797"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="102.6846" x="37.1045" y="73.4118">02 take / Blocked</text><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="266.2033" x2="302.4449" y1="101.7138" y2="101.7138"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="302.4449" x2="302.4449" y1="101.7138" y2="112.9314"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="267.0662" x2="302.4449" y1="112.9314" y2="112.9314"/><polygon fill="#8295A0" points="275.6951,109.4799,267.0662,112.9314,275.6951,116.383,272.2435,112.9314" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="102.6846" x="272.2435" y="97.546">03 before trigger</text><polygon fill="#8295A0" points="497.4593,133.614,506.0882,137.0656,497.4593,140.5171,500.9108,137.0656" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="266.2033" x2="502.6366" y1="137.0656" y2="137.0656"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="96.6443" x="272.2435" y="132.8977">IO_SET_IRQ bit 5</text><polygon fill="#8295A0" points="626.8936,157.7481,635.5225,161.1997,626.8936,164.6512,630.3452,161.1997" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="507.814" x2="632.0709" y1="161.1997" y2="161.1997"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="108.7248" x="513.8543" y="157.0318">04 MEI / xISRStack</text><polygon fill="#8295A0" points="517.3058,181.8822,508.6769,185.3338,517.3058,188.7854,513.8543,185.3338" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="512.1285" x2="636.3854" y1="185.3338" y2="185.3338"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="90.604" x="522.4832" y="181.1659">05 clear source</text><polygon fill="#8295A0" points="203.6433,206.0163,195.0144,209.4679,203.6433,212.9195,200.1918,209.4679" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="198.466" x2="636.3854" y1="209.4679" y2="209.4679"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="126.8456" x="208.8207" y="205.3">06 give / xHPW=pdTRUE</text><polygon fill="#8295A0" points="40.5561,230.1504,31.9271,233.602,40.5561,237.0536,37.1045,233.602" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="35.3787" x2="636.3854" y1="233.602" y2="233.602"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="108.7248" x="45.7335" y="229.4341">portYIELD_FROM_ISR</text><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="31.0642" x2="67.3058" y1="257.7361" y2="257.7361"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="67.3058" x2="67.3058" y1="257.7361" y2="268.9537"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="31.9271" x2="67.3058" y1="268.9537" y2="268.9537"/><polygon fill="#8295A0" points="40.5561,265.5022,31.9271,268.9537,40.5561,272.4053,37.1045,268.9537" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="151.0067" x="37.1045" y="253.5682">07 runs; stimulus_after=0</text><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="31.0642" x2="67.3058" y1="293.0878" y2="293.0878"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="67.3058" x2="67.3058" y1="293.0878" y2="304.3055"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="31.9271" x2="67.3058" y1="304.3055" y2="304.3055"/><polygon fill="#8295A0" points="40.5561,300.8539,31.9271,304.3055,40.5561,307.7571,37.1045,304.3055" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="66.443" x="37.1045" y="288.92">self-delete</text><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="266.2033" x2="302.4449" y1="328.4396" y2="328.4396"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="302.4449" x2="302.4449" y1="328.4396" y2="339.6572"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="267.0662" x2="302.4449" y1="339.6572" y2="339.6572"/><polygon fill="#8295A0" points="275.6951,336.2057,267.0662,339.6572,275.6951,343.1088,272.2435,339.6572" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="229.5302" x="272.2435" y="324.2717">08 resumes after trigger; waiter_ran=1</text><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="691.1793" x2="727.4209" y1="363.7913" y2="363.7913"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="727.4209" x2="727.4209" y1="363.7913" y2="375.009"/><line style="stroke: #8295A0; stroke-width: 0.862895493767977;" x1="692.0422" x2="727.4209" y1="375.009" y2="375.009"/><polygon fill="#8295A0" points="700.6711,371.5574,692.0422,375.009,700.6711,378.4606,697.2196,375.009" style="stroke: #8295A0; stroke-width: 0.862895493767977;"/><text fill="#000000" font-family="DejaVu Sans Mono" font-size="10.3547" lengthAdjust="spacingAndGlyphs" textLength="199.3289" x="697.2196" y="359.6235">09 order + stacks + mcause = PASS</text><!--MD5=[283b6878b42e96fdb773b7d99201fe8a]
@startuml
scale max 900*520
skinparam backgroundColor transparent
skinparam shadowing false
skinparam defaultFontName "DejaVu Sans Mono"
skinparam defaultFontSize 12
skinparam sequenceParticipantBorderColor #2b6f8e
skinparam sequenceParticipantBackgroundColor #edf6fa
skinparam sequenceArrowColor #8295a0
title A5 FLOW — ISR wakes waiter before interrupted stimulus continues
participant waiter
participant semaphore
participant stimulus
participant Hazard3
participant ISR
participant verifier
waiter -> semaphore : 02 take / Blocked
stimulus -> stimulus : 03 before trigger
stimulus -> Hazard3 : IO_SET_IRQ bit 5
Hazard3 -> ISR : 04 MEI / xISRStack
ISR -> Hazard3 : 05 clear source
ISR -> semaphore : 06 give / xHPW=pdTRUE
ISR -> waiter : portYIELD_FROM_ISR
waiter -> waiter : 07 runs; stimulus_after=0
waiter -> waiter : self-delete
stimulus -> stimulus : 08 resumes after trigger; waiter_ran=1
verifier -> verifier : 09 order + stacks + mcause = PASS
@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: 25.0.4-ea+4-1-Debian
Operating System: Linux
Default Encoding: UTF-8
Language: en
Country: null
--></g></svg>