<?xml version="1.0" encoding="UTF-8"?>
<net name="tOFF" type="iopt-flow">
  <signal id="in" x="240" y="290" mode="input" type="boolean" min="0" max="1"/>
  <signal id="delay" x="290" y="310" mode="input" type="range" min="0" max="32767" frac="0" value="0" dynamic="none"/>
  <signal id="out" x="605" y="290" mode="output" type="boolean" min="0" max="1" dynamic="type" frac="0"/>
  <operation id="o1" x="440" y="310" rot="0" shape="rect" size="44" locked="true">
    <name off_x="-40" off_y="-35" text="dn_delay"/>
    <input off_x="-45" off_y="-20" name="in" id="o1.in" type="boolean" min="0" max="1" frac="0"/>
    <input off_x="-45" off_y="0" name="delay" id="o1.delay" type="range" min="0" max="32767" frac="0"/>
    <input name="in_cntr" id="o1.in_cntr" type="range" min="0" max="32767" frac="0" off_x="-45" off_y="20"/>
    <output off_x="45" off_y="-20" name="out" id="o1.out" type="boolean" min="0" max="1" frac="0">
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="in"/>
          <operator type="equal"/>
          <operand type="literal" value="0"/>
          <operator type="and"/>
          <operand type="signal" idRef="in_cntr"/>
          <operator type="more-or-equal"/>
          <operand type="signal" idRef="delay"/>
        </operand>
        <text>0 WHEN (in = 0 AND in_cntr &gt;= delay)</text>
      </expression>
      <expression>
        <operand type="literal" value="1"/>
        <text>1 OTHERWISE</text>
      </expression>
    </output>
    <output name="cntr" id="o1.cntr" type="range" min="0" max="32767" frac="0" off_x="45" off_y="20">
      <expression>
        <operand type="literal" value="0"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="in"/>
          <operator type="equal"/>
          <operand type="literal" value="1"/>
        </operand>
        <text>0 WHEN (in = 1)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="in_cntr" delay="1"/>
        <operator type="add"/>
        <operand type="literal" value="1"/>
        <operator type="when"/>
        <operand type="sub-expression">
          <operand type="signal" idRef="in_cntr" delay="1"/>
          <operator type="less"/>
          <operand type="signal" idRef="delay"/>
        </operand>
        <text>in_cntr[-1] + 1 WHEN (in_cntr[-1] &lt; delay)</text>
      </expression>
      <expression>
        <operand type="signal" idRef="delay"/>
        <text>delay OTHERWISE</text>
      </expression>
    </output>
  </operation>
  <arc id="a7" type="read" source="in" target="o1.in"/>
  <arc id="a8" type="read" source="delay" target="o1.delay"/>
  <arc id="a9" type="read" source="o1.out" target="out"/>
  <arc id="a10" type="read" source="o1.cntr" target="o1.in_cntr" view="symbolic"/>
</net>
