<?xml version="1.0" encoding="UTF-8"?>
<net name="Simple_Transmitter_2Phase" type="iopt-flow">
  <signal id="Ack" x="805" y="285" mode="input" type="boolean" min="0" max="1"/>
  <event id="Delay" x="530" y="385" mode="input"/>
  <signal id="Req" x="625" y="225" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="Available" x="320" y="285" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <place id="p017" x="625" y="145" 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="535" y="220" priority="0">
    <name off_x="-10" off_y="-10" text="t019"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t021" x="535" y="75" priority="0">
    <name off_x="-10" off_y="-10" text="t021"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <place id="p022" x="405" y="285" init_marking="1">
    <name off_x="-10" off_y="-10" text="AllowCom"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a030" type="read" source="p017" target="Req"/>
  <arc id="a047" type="read" source="p022" target="Available"/>
  <arc id="a039" type="normal" source="t019" target="p017"/>
  <arc id="a040" type="normal" source="p017" target="t021"/>
  <place id="p041" x="535" y="145" init_marking="1">
    <name off_x="-10" off_y="-10" text="Req-"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a042" type="normal" source="p041" target="t019"/>
  <arc id="a043" type="normal" source="t021" target="p041"/>
  <arc id="a044" type="normal" source="p022" target="t019"/>
  <arc id="a045" type="normal" source="p022" target="t021"/>
  <transition id="t046" x="530" y="285" priority="0">
    <name off_x="-10" off_y="-10" text="t046"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a048" type="normal" source="t046" target="p022"/>
  <operation id="o049" x="730" y="300" 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="590" y="285" 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="655" y="285" 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="a053" type="normal" source="p050" target="t046"/>
  <arc id="a054" type="read" source="Delay" target="t046"/>
  <arc id="a055" type="read" source="Ack" target="o049.Ack"/>
  <arc id="a056" type="read" source="o049.out" target="t051"/>
  <event id="Load" x="425" y="155" mode="input"/>
  <arc id="a032" type="read" source="Load" target="t021"/>
  <arc id="a033" type="read" source="Load" target="t019"/>
</net>
