<?xml version="1.0" encoding="utf-8"?>
<circuit>
  <version>1</version>
  <attributes/>
  <visualElements>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>clk</string>
        </entry>
      </elementAttributes>
      <pos x="180" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>en</string>
        </entry>
      </elementAttributes>
      <pos x="280" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>clr</string>
        </entry>
      </elementAttributes>
      <pos x="180" y="300"/>
    </visualElement>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>out</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
      </elementAttributes>
      <pos x="460" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>ov</string>
        </entry>
      </elementAttributes>
      <pos x="380" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>CounterPreset</elementName>
      <elementAttributes>
        <entry>
          <string>maxValue</string>
          <int>9</int>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
      </elementAttributes>
      <pos x="300" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>dir</string>
        </entry>
      </elementAttributes>
      <pos x="280" y="240"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>in</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
      </elementAttributes>
      <pos x="180" y="260"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>ld</string>
        </entry>
      </elementAttributes>
      <pos x="280" y="280"/>
    </visualElement>
    <visualElement>
      <elementName>Testcase</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>dir</string>
        </entry>
        <entry>
          <string>Testdata</string>
          <testData>
            <dataString>clk clr ld in dir en out ov

# normal operation up
repeat(30) C 0 0 0  0  1  ((n+1)%10)  (((n+1)%10)=9)

# normal operation down
repeat(32) C 0 0 0  1  1  ((39-n)%10)  ((39-n)%10=0)

</dataString>
          </testData>
        </entry>
      </elementAttributes>
      <pos x="280" y="380"/>
    </visualElement>
  </visualElements>
  <wires>
    <wire>
      <p1 x="280" y="240"/>
      <p2 x="300" y="240"/>
    </wire>
    <wire>
      <p1 x="180" y="260"/>
      <p2 x="300" y="260"/>
    </wire>
    <wire>
      <p1 x="360" y="200"/>
      <p2 x="460" y="200"/>
    </wire>
    <wire>
      <p1 x="280" y="200"/>
      <p2 x="300" y="200"/>
    </wire>
    <wire>
      <p1 x="280" y="280"/>
      <p2 x="300" y="280"/>
    </wire>
    <wire>
      <p1 x="180" y="220"/>
      <p2 x="300" y="220"/>
    </wire>
    <wire>
      <p1 x="360" y="220"/>
      <p2 x="380" y="220"/>
    </wire>
    <wire>
      <p1 x="180" y="300"/>
      <p2 x="300" y="300"/>
    </wire>
  </wires>
</circuit>