<?xml version="1.0" encoding="UTF-8"?>
<net name="SimpleBuffer_Transmitter_2Phase" type="iopt-flow">
  <signal id="Ack" x="895" y="185" mode="input" type="boolean" min="0" max="1"/>
  <event id="Delay" x="660" y="115" mode="input"/>
  <signal id="Req" x="575" y="355" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="Available" x="360" y="135" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <place id="p017" x="490" y="355" init_marking="0">
    <name off_x="-10" off_y="-10" text="Req+"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t019" x="490" y="275" priority="0">
    <name off_x="-10" off_y="-10" text="t019"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t021" x="465" y="190" priority="0">
    <name off_x="-10" off_y="-10" text="t021"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a030" type="read" source="p017" target="Req"/>
  <operation id="o049" x="790" y="195" rot="-180" shape="arrow" size="16">
    <name off_x="-11" off_y="-16" text="o049"/>
    <input off_x="16" off_y="0" name="Ack" id="o049.Ack" type="boolean" min="0" max="1" dynamic="all"/>
    <output off_x="-16" off_y="0" name="out" id="o049.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="1"/>
            <operator type="and"/>
            <operand type="signal" idRef="Ack" delay="1"/>
            <operator type="equal"/>
            <operand type="literal" value="0"/>
          </operand>
          <operator type="or"/>
          <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>
        </operand>
        <text>1 WHEN ((Ack = 1 AND Ack[-1] = 0) OR (Ack = 0 AND Ack[-1] = 1))</text>
      </expression>
      <expression>
        <operand type="literal" value="0"/>
        <text>0 OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <place id="p050" x="580" y="185" init_marking="0">
    <name off_x="-10" off_y="-10" text="AckReceived"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t051" x="660" y="185" priority="0">
    <name off_x="-10" off_y="-10" text="t051"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a052" type="normal" source="t051" target="p050"/>
  <arc id="a055" type="read" source="Ack" target="o049.Ack"/>
  <arc id="a056" type="read" source="o049.out" target="t051"/>
  <transition id="t028" x="310" y="190" priority="0">
    <name off_x="-10" off_y="-10" text="t028"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p029" x="375" y="190" init_marking="0">
    <name off_x="-10" off_y="-10" text="Buffer"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a032" type="normal" source="t028" target="p029"/>
  <arc id="a033" type="normal" source="p029" target="t021"/>
  <transition id="t045" x="435" y="275" priority="0">
    <name off_x="-10" off_y="-10" text="t045"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a046" type="read" source="t021" target="t045"/>
  <arc id="a047" type="read" source="t021" target="t019"/>
  <arc id="a049" type="normal" source="t045" target="p017"/>
  <arc id="a050" type="normal" source="p017" target="t019"/>
  <event id="Load" x="215" y="190" mode="input"/>
  <arc id="a002" type="read" source="Load" target="t028"/>
  <signal id="BufferSize" x="130" y="145" mode="input" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <operation id="o004" x="225" y="135" rot="0" shape="arrow" size="24">
    <name off_x="-19" off_y="-24" text="o004"/>
    <input off_x="-24" off_y="-8" name="p029" id="o004.p029" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-24" off_y="8" name="BufferSize" id="o004.BufferSize" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="24" off_y="0" name="out" id="o004.out" type="boolean" min="0" max="1" dynamic="type" frac="0">
      <expression>
        <operand type="signal" idRef="p029"/>
        <operator type="less"/>
        <operand type="signal" idRef="BufferSize"/>
        <text>p029 &lt; BufferSize</text>
      </expression>
    </output>
  </operation>
  <arc id="a005" type="read" source="BufferSize" target="o004.BufferSize"/>
  <arc id="a006" type="read" source="p029" target="o004.p029" view="symbolic"/>
  <arc id="a007" type="read" source="o004.out" target="t028" c1_x="26" c1_y="0" c2_x="0" c2_y="0"/>
  <arc id="a008" type="read" source="o004.out" target="Available"/>
  <place id="p009" x="435" y="355" init_marking="1">
    <name off_x="-10" off_y="-10" text="Req-"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a010" type="normal" source="p009" target="t045"/>
  <arc id="a011" type="normal" source="t019" target="p009"/>
  <transition id="t012" x="580" y="115" priority="0">
    <name off_x="-10" off_y="-10" text="t012"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p013" x="465" y="115" init_marking="1">
    <name off_x="-10" off_y="-10" text="AllowCom"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a014" type="normal" source="p050" target="t012"/>
  <arc id="a015" type="normal" source="t012" target="p013"/>
  <arc id="a016" type="normal" source="p013" target="t021"/>
  <arc id="a017" type="read" source="Delay" target="t012"/>
  <signal id="Buffer" x="375" y="270" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <arc id="a023" type="read" source="p029" target="Buffer"/>
</net>
