<?xml version="1.0" encoding="UTF-8"?>
<net name="DataBuffer_Transmitter_2Phase" type="iopt-flow">
  <signal id="InData" x="110" y="590" mode="input" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <signal id="OutData" x="720" y="590" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="Available" x="955" y="540" mode="output" type="boolean" min="0" max="1" dynamic="none" frac="0" value="0"/>
  <signal id="IS1" x="370" y="500" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <event id="Load" x="130" y="130" mode="input"/>
  <operation id="o001" x="300" y="590" 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="370" y="590" 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="300" y="680" 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="370" y="680" 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="300" y="500" 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="1020" y="540" 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="1060" y="480" 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"/>
  <arc id="a149" type="read" source="Load" target="t147" view="symbolic"/>
  <transition id="t150" x="1060" y="605" 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="1100" y="540" 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="a004" type="read" source="p146" target="Available"/>
  <signal id="Buffer" x="1165" y="540" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <arc id="a006" type="read" source="p001" target="Buffer"/>
  <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="570" y="590" 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="665" y="590" 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="295" y="155" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="o023"/>
    <input off_x="-40" off_y="-24" name="Load" id="o023.Load" 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="Load"/>
        </operand>
        <text>1 WHEN (IS4[-1] = 0 AND Load)</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="Load"/>
          </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 ((Load) 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="Load"/>
          </operand>
          <operator type="and"/>
          <operand type="signal" idRef="IS4" delay="1"/>
          <operator type="equal"/>
          <operand type="signal" idRef="o024_K"/>
        </operand>
        <text>1 WHEN ((Load) AND IS4[-1] = o024_K)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="IS4" delay="1"/>
        <text>IS4[-1] OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <operation id="o024" x="85" y="160" 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="385" y="155" 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="a039" type="read" source="Available" target="o023.Available" view="symbolic"/>
  <arc id="a040" type="read" source="Load" target="o023.Load"/>
  <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="300" y="310" rot="0" shape="arrow" size="40">
    <name off_x="-35" off_y="-40" text="o023"/>
    <input off_x="-40" off_y="-24" name="t017" id="o044.t017" 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="t017"/>
          <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 (t017 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="t017"/>
          <operator type="and"/>
          <operand type="signal" idRef="IS5" delay="1"/>
          <operator type="equal"/>
          <operand type="signal" idRef="o024_K"/>
        </operand>
        <text>1 WHEN (t017 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="385" y="310" 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="Ack" x="695" y="310" mode="input" type="boolean" min="0" max="1"/>
  <event id="Delay" x="1035" y="310" mode="input"/>
  <signal id="Req" x="775" y="180" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <place id="p107" x="775" y="120" init_marking="0">
    <name off_x="-10" off_y="-10" text="Req+"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t108" x="670" y="120" priority="0">
    <name off_x="-10" off_y="-10" text="t019"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t109" x="880" y="120" priority="0">
    <name off_x="-10" off_y="-10" text="t020"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <operation id="o110" x="765" y="310" rot="0" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="o001"/>
    <input off_x="-16" off_y="0" name="Ack" id="o110.Ack" type="boolean" min="0" max="1" dynamic="all"/>
    <output off_x="16" off_y="0" name="out" id="o110.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="Ack"/>
            <operator type="equal"/>
            <operand type="literal" value="0"/>
            <operator type="and"/>
            <operand type="signal" idRef="Ack" delay="1"/>
            <operator type="equal"/>
            <operand type="literal" value="1"/>
          </operand>
          <operator type="or"/>
          <operand type="sub-expression">
            <operand type="signal" idRef="Ack"/>
            <operator type="equal"/>
            <operand type="literal" value="1"/>
            <operator type="and"/>
            <operand type="signal" idRef="Ack" delay="1"/>
            <operator type="equal"/>
            <operand type="literal" value="0"/>
          </operand>
        </operand>
        <text>1 WHEN ((Ack = 0 AND Ack[-1] = 1) OR (Ack = 1 AND Ack[-1] = 0))</text>
      </expression>
      <expression>
        <operand type="literal" value="0"/>
        <text>0</text>
      </expression>
    </output>
  </operation>
  <place id="p003" x="885" y="310" init_marking="0">
    <name off_x="-10" off_y="-10" text="AckRecieved"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t004" x="830" y="310" priority="0">
    <name off_x="-10" off_y="-10" text="t004"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t007" x="940" y="310" priority="0">
    <name off_x="-10" off_y="-10" text="t007"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p009" x="940" y="225" init_marking="1">
    <name off_x="-10" off_y="-10" text="AllowCom"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t017" x="775" y="225" priority="0">
    <name off_x="-10" off_y="-10" text="t017"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p037" x="775" y="60" init_marking="1">
    <name off_x="-10" off_y="-10" text="Req-"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a111" type="normal" source="t108" target="p107"/>
  <arc id="a112" type="normal" source="p107" target="t109"/>
  <arc id="a113" type="read" source="p107" target="Req"/>
  <arc id="a115" type="read" source="Ack" target="o110.Ack"/>
  <arc id="a116" type="read" source="o110.out" target="t004"/>
  <arc id="a117" type="normal" source="t004" target="p003"/>
  <arc id="a118" type="normal" source="p003" target="t007"/>
  <arc id="a119" type="normal" source="t007" target="p009"/>
  <arc id="a120" type="read" source="Delay" target="t007"/>
  <arc id="a122" type="read" source="t017" target="t108" c1_x="-30" c1_y="-5" c2_x="-10" c2_y="25"/>
  <arc id="a019" type="read" source="t017" target="t109" c1_x="30" c1_y="-10" c2_x="0" c2_y="35"/>
  <arc id="a123" type="normal" source="p009" target="t017"/>
  <arc id="a127" type="normal" source="p037" target="t108"/>
  <arc id="a128" type="normal" source="t109" target="p037"/>
  <arc id="a129" type="read" source="p001" target="t017" view="symbolic"/>
  <arc id="a130" type="read" source="t007" target="t150" view="symbolic"/>
  <arc id="a131" type="read" source="t017" target="o044.t017" view="symbolic"/>
</net>
