<?xml version="1.0" encoding="UTF-8"?>
<net name="DataBuffer_Receiver_2Phase" type="iopt-flow">
  <signal id="InData" x="720" y="595" mode="input" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <signal id="OutData" x="1330" y="595" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="IS1" x="980" y="505" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <operation id="o001" x="910" y="595" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="o001"/>
    <input off_x="-32" off_y="-16" name="IS4" id="o001.IS4" type="range" dynamic="all" min="0" max="255" frac="0"/>
    <input off_x="-32" off_y="0" name="InData" id="o001.InData" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="IS2" id="o001.IS2" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o001.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="InData"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS4"/>
          <operator type="equal"/>
          <operand type="literal" value="2"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="2"/>
        </operand>
        <text>InData WHEN (IS4 = 2 AND IS4[-1] &lt;&gt; 2)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS2" delay="1"/>
        <text>IS2[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <signal id="IS2" x="980" y="595" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <arc id="a005" type="read" source="o001.out" target="IS2"/>
  <operation id="o006" x="910" y="685" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="o001"/>
    <input off_x="-32" off_y="-16" name="IS4" id="o006.IS4" type="range" dynamic="all" min="0" max="255" frac="0"/>
    <input off_x="-32" off_y="0" name="InData" id="o006.InData" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="IS3" id="o006.IS3" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o006.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="InData"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS4"/>
          <operator type="equal"/>
          <operand type="literal" value="3"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="3"/>
        </operand>
        <text>InData WHEN (IS4 = 3 AND IS4[-1] &lt;&gt; 3)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS3" delay="1"/>
        <text>IS3[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <signal id="IS3" x="980" y="685" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <arc id="a009" type="read" source="o006.out" target="IS3"/>
  <arc id="a016" type="read" source="IS2" target="o001.IS2" view="symbolic"/>
  <arc id="a017" type="read" source="IS3" target="o006.IS3" view="symbolic"/>
  <operation id="o092" x="910" y="505" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="o001"/>
    <input off_x="-32" off_y="-16" name="IS4" id="o092.IS4" type="range" dynamic="all" min="0" max="255" frac="0"/>
    <input off_x="-32" off_y="0" name="InData" id="o092.InData" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="IS1_B" id="o092.IS1_B" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o092.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="InData"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS4"/>
          <operator type="equal"/>
          <operand type="literal" value="1"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="1"/>
        </operand>
        <text>InData WHEN (IS4 = 1 AND IS4[-1] &lt;&gt; 1)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS1_B" delay="1"/>
        <text>IS1_B[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a093" type="read" source="o092.out" target="IS1"/>
  <arc id="a094" type="read" source="IS1" target="o092.IS1_B" view="symbolic"/>
  <place id="p146" x="190" y="600" init_marking="3">
    <name off_x="-10" off_y="-10" text="Available"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t147" x="250" y="540" priority="0">
    <name off_x="-10" off_y="-10" text="t147"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a148" type="normal" source="p146" target="t147"/>
  <transition id="t150" x="250" y="665" priority="0">
    <name off_x="-10" off_y="-10" text="t150"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a153" type="normal" source="t150" target="p146"/>
  <place id="p001" x="310" y="600" init_marking="0">
    <name off_x="-10" off_y="-10" text="Buffer"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a002" type="normal" source="t147" target="p001"/>
  <arc id="a003" type="normal" source="p001" target="t150"/>
  <arc id="a007" type="read" source="InData" target="o001.InData"/>
  <arc id="a008" type="read" source="InData" target="o092.InData" c1_x="15" c1_y="-50" c2_x="0" c2_y="0"/>
  <arc id="a010" type="read" source="InData" target="o006.InData" c1_x="0" c1_y="50" c2_x="0" c2_y="0"/>
  <operation id="o011" x="1180" y="595" rot="0" shape="arrow" size="48">
    <name off_x="-43" off_y="-48" text="o011"/>
    <input off_x="-48" off_y="-32" name="IS5" id="o011.IS5" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="-16" name="IS1" id="o011.IS1" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="0" name="IS2" id="o011.IS2" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="16" name="IS3" id="o011.IS3" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-48" off_y="32" name="IS0" id="o011.IS0" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="48" off_y="0" name="out" id="o011.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="IS1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS5"/>
          <operator type="equal"/>
          <operand type="literal" value="1"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="1"/>
        </operand>
        <text>IS1 WHEN (IS5 = 1 AND IS5[-1] &lt;&gt; 1)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS2"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS5"/>
          <operator type="equal"/>
          <operand type="literal" value="2"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="2"/>
        </operand>
        <text>IS2 WHEN (IS5 = 2 AND IS5[-1] &lt;&gt; 2)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS3"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS5"/>
          <operator type="equal"/>
          <operand type="literal" value="3"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="diff"/>
          <operand type="literal" value="3"/>
        </operand>
        <text>IS3 WHEN (IS5 = 3 AND IS5[-1] &lt;&gt; 3)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS0" delay="1"/>
        <text>IS0[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a012" type="read" source="IS1" target="o011.IS1" c2_x="-67" c2_y="6" c1_x="45" c1_y="0"/>
  <arc id="a013" type="read" source="IS2" target="o011.IS2"/>
  <arc id="a014" type="read" source="IS3" target="o011.IS3" c1_x="50" c1_y="0" c2_x="-67" c2_y="-6"/>
  <signal id="IS0" x="1275" y="595" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <arc id="a018" type="read" source="o011.out" target="IS0"/>
  <arc id="a020" type="read" source="IS0" target="OutData"/>
  <arc id="a022" type="read" source="IS0" target="o011.IS0" view="symbolic"/>
  <operation id="o023" x="905" y="160" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="WritePointer"/>
    <input off_x="-40" off_y="-24" name="t042" id="o023.t042" type="event" dynamic="all"/>
    <input off_x="-40" off_y="-8" name="Available" id="o023.Available" type="boolean" min="0" max="1" dynamic="all" frac="0"/>
    <input off_x="-40" off_y="8" name="o024_K" id="o023.o024_K" type="range" min="3" max="3" dynamic="all"/>
    <input off_x="-40" off_y="24" name="IS4" id="o023.IS4" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="40" off_y="0" name="out" id="o023.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
          <operator type="and"/>
          <operand type="signal" idRef="t042"/>
        </operand>
        <text>1 WHEN (IS4[-1] = 0 AND t042)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS4" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="sub-expression">
            <operand type="signal" idRef="t042"/>
          </operand>
          <operator type="and"/>
          <operand type="sub-expression">
            <operand type="signal" idRef="IS4" delay="1"/>
            <operator type="diff"/>
            <operand type="signal" idRef="o024_K"/>
          </operand>
        </operand>
        <text>IS4[-1] + 1 WHEN ((t042) AND (IS4[-1] &lt;&gt; o024_K))</text>
      </expression>
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="sub-expression">
            <operand type="signal" idRef="t042"/>
          </operand>
          <operator type="and"/>
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="equal"/>
          <operand type="signal" idRef="o024_K"/>
        </operand>
        <text>1 WHEN ((t042) AND IS4[-1] = o024_K)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS4" delay="1"/>
        <text>IS4[-1]</text>
      </expression>
    </output>
  </operation>
  <operation id="o024" x="695" y="165" constant="3" rot="0" shape="rect" size="20" locked="true">
    <name off_x="-15" off_y="-5" text="3"/>
    <output off_x="20" off_y="0" name="K" id="o024.K" type="range" min="3" max="3" dynamic="none">
      <expression>
        <text>3</text>
        <operand type="literal" value="3"/>
      </expression>
    </output>
  </operation>
  <signal id="IS4" x="995" y="160" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <arc id="a033" type="read" source="o023.out" target="IS4"/>
  <arc id="a037" type="read" source="IS4" target="o023.IS4" view="symbolic"/>
  <arc id="a038" type="read" source="o024.K" target="o023.o024_K"/>
  <arc id="a041" type="read" source="IS4" target="o092.IS4" view="symbolic"/>
  <arc id="a042" type="read" source="IS4" target="o001.IS4" view="symbolic"/>
  <arc id="a043" type="read" source="IS4" target="o006.IS4" view="symbolic"/>
  <operation id="o044" x="910" y="315" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="ReadPointer"/>
    <input off_x="-40" off_y="-24" name="t087" id="o044.t087" type="event" dynamic="all"/>
    <input off_x="-40" off_y="8" name="o024_K" id="o044.o024_K" type="range" min="3" max="3" dynamic="all"/>
    <input off_x="-40" off_y="24" name="IS5" id="o044.IS5" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="40" off_y="0" name="out" id="o044.out" type="range" min="0" max="255" dynamic="type" frac="0">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
        </operand>
        <operator type="and"/>
        <operand type="literal" value="1"/>
        <operator type="equal"/>
        <operand type="literal" value="2"/>
        <text>1 WHEN ((IS5[-1] = 0) AND 1 = 2)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS5" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="t087"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="diff"/>
          <operand type="signal" idRef="o024_K"/>
        </operand>
        <text>IS5[-1] + 1 WHEN (t087 AND IS5[-1] &lt;&gt; o024_K)</text>
      </expression>
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="t087"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="equal"/>
          <operand type="signal" idRef="o024_K"/>
        </operand>
        <text>1 WHEN (t087 AND IS5[-1] = o024_K)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS5" delay="1"/>
        <text>IS5[-1]</text>
      </expression>
    </output>
  </operation>
  <arc id="a045" type="read" source="o024.K" target="o044.o024_K" c1_x="65" c1_y="5" c2_x="-85" c2_y="2"/>
  <signal id="IS5" x="995" y="315" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <arc id="a047" type="read" source="o044.out" target="IS5"/>
  <arc id="a048" type="read" source="IS5" target="o044.IS5" view="symbolic"/>
  <arc id="a052" type="read" source="IS5" target="o011.IS5" c1_x="75" c1_y="0" c2_x="-52" c2_y="2"/>
  <signal id="NewData" x="485" y="675" mode="output" type="boolean" min="0" max="1" dynamic="none" frac="0" value="0"/>
  <event id="Release" x="400" y="680" mode="input"/>
  <arc id="a067" type="read" source="Release" target="t150" view="symbolic"/>
  <place id="p084" x="400" y="535" init_marking="1">
    <name off_x="-10" off_y="-10" text="p084"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t087" x="485" y="535" priority="0">
    <name off_x="-10" off_y="-10" text="t087"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a089" type="normal" source="p084" target="t087"/>
  <transition id="t090" x="400" y="600" priority="0">
    <name off_x="-10" off_y="-10" text="t090"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p092" x="485" y="600" init_marking="0">
    <name off_x="-10" off_y="-10" text="p092"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </place>
  <arc id="a095" type="normal" source="t090" target="p084"/>
  <arc id="a096" type="normal" source="t087" target="p092"/>
  <arc id="a097" type="normal" source="p092" target="t090"/>
  <arc id="a098" type="read" source="p092" target="NewData"/>
  <arc id="a099" type="read" source="Release" target="t090"/>
  <arc id="a100" type="read" source="t087" target="o044.t087" view="symbolic"/>
  <arc id="a101" type="read" source="p001" target="t087" view="symbolic"/>
  <event id="Delay" x="355" y="310" mode="input"/>
  <signal id="Ack" x="350" y="175" mode="output" type="boolean" min="0" max="1" dynamic="none" frac="0" value="0"/>
  <signal id="Req" x="115" y="385" mode="input" type="boolean" min="0" max="1"/>
  <transition id="t034" x="225" y="120" priority="0">
    <name off_x="-10" off_y="-10" text="t034"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t035" x="475" y="120" priority="0">
    <name off_x="-10" off_y="-10" text="t035"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p036" x="350" y="120" init_marking="0">
    <name off_x="-10" off_y="-10" text="Ack+"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t042" x="350" y="230" priority="0">
    <name off_x="-10" off_y="-10" text="t042"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t044" x="405" y="385" priority="0">
    <name off_x="-10" off_y="-10" text="t044"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p045" x="475" y="385" init_marking="0">
    <name off_x="-10" off_y="-10" text="p045"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </place>
  <operation id="o056" x="255" y="385" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="o056"/>
    <input off_x="-16" off_y="0" name="Req" id="o056.Req" type="boolean" min="0" max="1" dynamic="all"/>
    <output off_x="16" off_y="0" name="out" id="o056.out" type="range" min="-32768" max="32767" dynamic="type" frac="0">
      <expression>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="sub-expression">
            <operand type="signal" idRef="Req"/>
            <operator type="equal"/>
            <operand type="literal" value="0"/>
            <operator type="and"/>
            <operand type="signal" idRef="Req" delay="1"/>
            <operator type="equal"/>
            <operand type="literal" value="1"/>
          </operand>
          <operator type="or"/>
          <operand type="sub-expression">
            <operand type="signal" idRef="Req"/>
            <operator type="equal"/>
            <operand type="literal" value="1"/>
            <operator type="and"/>
            <operand type="signal" idRef="Req" delay="1"/>
            <operator type="equal"/>
            <operand type="literal" value="0"/>
          </operand>
        </operand>
        <text>1 WHEN ((Req = 0 AND Req[-1] = 1) OR (Req = 1 AND Req[-1] = 0))</text>
      </expression>
      <expression>
        <operand type="literal" value="0"/>
        <text>0 OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <place id="p060" x="475" y="230" init_marking="0">
    <name off_x="-10" off_y="-10" text="p060"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </place>
  <transition id="t072" x="475" y="310" priority="0">
    <name off_x="-10" off_y="-10" text="t072"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p040" x="345" y="60" init_marking="1">
    <name off_x="-10" off_y="-10" text="Ack-"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a168" type="normal" source="t034" target="p036"/>
  <arc id="a169" type="normal" source="p036" target="t035"/>
  <arc id="a039" type="read" source="p036" target="Ack"/>
  <arc id="a170" type="read" source="t042" target="t034" c2_x="0" c2_y="55" c1_x="0" c1_y="0"/>
  <arc id="a171" type="read" source="t042" target="t035" c2_x="0" c2_y="55" c1_x="0" c1_y="0"/>
  <arc id="a051" type="normal" source="p045" target="t072"/>
  <arc id="a172" type="normal" source="t044" target="p045"/>
  <arc id="a055" type="read" source="Delay" target="t072"/>
  <arc id="a057" type="read" source="Req" target="o056.Req"/>
  <arc id="a058" type="read" source="o056.out" target="t044"/>
  <arc id="a062" type="normal" source="p060" target="t042"/>
  <arc id="a075" type="normal" source="t072" target="p060"/>
  <arc id="a181" type="normal" source="p040" target="t034"/>
  <arc id="a182" type="normal" source="t035" target="p040"/>
  <arc id="a187" type="read" source="t042" target="t147" view="symbolic"/>
  <arc id="a188" type="read" source="t042" target="o023.t042" view="symbolic"/>
  <arc id="a189" type="read" source="p146" target="t042" view="symbolic"/>
</net>
