<?xml version="1.0" encoding="UTF-8"?>
<net name="Data_Transmitter_2Phase" type="iopt-flow">
  <signal id="Ack" x="170" y="305" mode="input" type="boolean" min="0" max="1"/>
  <signal id="InData" x="255" y="400" mode="input" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <event id="Delay" x="660" y="305" mode="input"/>
  <signal id="OutData" x="570" y="400" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="Req" x="400" y="175" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="Available" x="660" y="220" mode="output" type="range" min="0" max="255" dynamic="type" frac="0"/>
  <signal id="InternalData" x="485" y="400" mode="internal" type="range" min="0" max="255" frac="0" value="0" dynamic="none"/>
  <place id="p017" x="400" y="115" 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="295" y="115" priority="0">
    <name off_x="-10" off_y="-10" text="t019"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <transition id="t020" x="505" y="115" priority="0">
    <name off_x="-10" off_y="-10" text="t020"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a024" type="normal" source="t019" target="p017"/>
  <arc id="a025" type="normal" source="p017" target="t020"/>
  <arc id="a030" type="read" source="p017" target="Req"/>
  <arc id="a043" type="read" source="InternalData" target="OutData"/>
  <operation id="o001" x="305" y="305" 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="o001.Ack" type="boolean" min="0" max="1" dynamic="all"/>
    <output off_x="16" off_y="0" name="out" id="o001.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>
  <arc id="a002" type="read" source="Ack" target="o001.Ack"/>
  <place id="p003" x="495" y="305" init_marking="0">
    <name off_x="-10" off_y="-10" text="AckReceived"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <transition id="t004" x="440" y="305" priority="0">
    <name off_x="-10" off_y="-10" text="t004"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a005" type="read" source="o001.out" target="t004"/>
  <arc id="a006" type="normal" source="t004" target="p003"/>
  <transition id="t007" x="565" y="305" priority="0">
    <name off_x="-10" off_y="-10" text="t007"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a008" type="normal" source="p003" target="t007"/>
  <place id="p009" x="565" y="220" init_marking="1">
    <name off_x="-10" off_y="-10" text="AllowCom"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a010" type="normal" source="t007" target="p009"/>
  <arc id="a014" type="read" source="Delay" target="t007"/>
  <arc id="a016" type="read" source="p009" target="Available"/>
  <transition id="t017" x="400" y="220" priority="0">
    <name off_x="-10" off_y="-10" text="t017"/>
    <comment off_x="-10" off_y="20" text="-"/>
  </transition>
  <arc id="a018" type="read" source="t017" target="t019" c1_x="-30" c1_y="-5" c2_x="-10" c2_y="25"/>
  <arc id="a019" type="read" source="t017" target="t020" c1_x="30" c1_y="-10" c2_x="0" c2_y="35"/>
  <arc id="a026" type="normal" source="p009" target="t017"/>
  <event id="Load" x="320" y="220" mode="input"/>
  <arc id="a023" type="read" source="Load" target="t017"/>
  <place id="p037" x="400" y="55" init_marking="1">
    <name off_x="-10" off_y="-10" text="Req-"/>
    <comment off_x="0" off_y="20" text="-"/>
  </place>
  <arc id="a038" type="normal" source="p037" target="t019"/>
  <arc id="a039" type="normal" source="t020" target="p037"/>
  <operation id="o023" x="400" y="400" rot="0" shape="arrow" size="32">
    <name off_x="-27" off_y="-32" text="o023"/>
    <input off_x="-32" off_y="-16" name="t017" id="o023.t017" type="event" dynamic="all"/>
    <input off_x="-32" off_y="0" name="InData" id="o023.InData" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <input off_x="-32" off_y="16" name="InternalData" id="o023.InternalData" type="range" min="0" max="255" dynamic="all" frac="0"/>
    <output off_x="32" off_y="0" name="out" id="o023.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="t017"/>
        </operand>
        <text>InData WHEN (t017)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="InternalData" delay="1"/>
        <text>InternalData[-1]</text>
      </expression>
    </output>
  </operation>
  <arc id="a009" type="read" source="InData" target="o023.InData"/>
  <arc id="a011" type="read" source="o023.out" target="InternalData"/>
  <arc id="a012" type="read" source="InternalData" target="o023.InternalData" view="symbolic"/>
  <arc id="a013" type="read" source="t017" target="o023.t017" view="symbolic"/>
</net>
