<?xml version="1.0" encoding="utf-8"?>
<circuit>
  <version>1</version>
  <attributes>
    <entry>
      <string>isGeneric</string>
      <boolean>true</boolean>
    </entry>
  </attributes>
  <visualElements>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>D_in</string>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.Bits=int(args.dataBits);</string>
        </entry>
      </elementAttributes>
      <pos x="240" y="140"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>A</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.Bits=int(args.addrBits);</string>
        </entry>
      </elementAttributes>
      <pos x="240" y="320"/>
    </visualElement>
    <visualElement>
      <elementName>Clock</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>C</string>
        </entry>
      </elementAttributes>
      <pos x="240" y="620"/>
    </visualElement>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>D_Out</string>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.Bits=int(args.dataBits);</string>
        </entry>
      </elementAttributes>
      <pos x="740" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>str</string>
        </entry>
      </elementAttributes>
      <pos x="240" y="260"/>
    </visualElement>
    <visualElement>
      <elementName>Multiplexer</elementName>
      <elementAttributes>
        <entry>
          <string>Selector Bits</string>
          <int>2</int>
        </entry>
        <entry>
          <string>generic</string>
          <string>this.Bits=int(args.dataBits);</string>
        </entry>
      </elementAttributes>
      <pos x="680" y="180"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>Input Splitting</string>
          <string>4</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>2,2</string>
        </entry>
        <entry>
          <string>generic</string>
          <string>if (args.addrBits&lt;4)   {
  panic(&quot;at least two address bits are necessary!&quot;);
}

if ((args.addrBits&amp;1)=1)   {
  panic(&quot;number of address bits must be even!&quot;);
}

this.&apos;Input Splitting&apos;=&quot;&quot;+args.addrBits;
this.&apos;Output Splitting&apos;=(args.addrBits-2)+&quot;,2&quot;;</string>
        </entry>
      </elementAttributes>
      <pos x="280" y="320"/>
    </visualElement>
    <visualElement>
      <elementName>Demultiplexer</elementName>
      <elementAttributes>
        <entry>
          <string>Selector Bits</string>
          <int>2</int>
        </entry>
      </elementAttributes>
      <pos x="360" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>memLeaf2.dig</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>export addrBits:=args.addrBits-2;
if (args.addrBits&gt;4) {
  setCircuit(&quot;memNode2.dig&quot;);
}</string>
        </entry>
      </elementAttributes>
      <pos x="540" y="140"/>
    </visualElement>
    <visualElement>
      <elementName>memLeaf2.dig</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>export addrBits:=args.addrBits-2;
if (args.addrBits&gt;4) {
  setCircuit(&quot;memNode2.dig&quot;);
}</string>
        </entry>
      </elementAttributes>
      <pos x="540" y="280"/>
    </visualElement>
    <visualElement>
      <elementName>memLeaf2.dig</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>export addrBits:=args.addrBits-2;
if (args.addrBits&gt;4) {
  setCircuit(&quot;memNode2.dig&quot;);
}</string>
        </entry>
      </elementAttributes>
      <pos x="540" y="420"/>
    </visualElement>
    <visualElement>
      <elementName>memLeaf2.dig</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>export addrBits:=args.addrBits-2;
if (args.addrBits&gt;4) {
  setCircuit(&quot;memNode2.dig&quot;);
}</string>
        </entry>
      </elementAttributes>
      <pos x="540" y="560"/>
    </visualElement>
    <visualElement>
      <elementName>GenericInitCode</elementName>
      <elementAttributes>
        <entry>
          <string>generic</string>
          <string>addrBits := 8;
dataBits := 8;</string>
        </entry>
      </elementAttributes>
      <pos x="220" y="420"/>
    </visualElement>
  </visualElements>
  <wires>
    <wire>
      <p1 x="600" y="320"/>
      <p2 x="620" y="320"/>
    </wire>
    <wire>
      <p1 x="240" y="320"/>
      <p2 x="280" y="320"/>
    </wire>
    <wire>
      <p1 x="300" y="320"/>
      <p2 x="320" y="320"/>
    </wire>
    <wire>
      <p1 x="320" y="160"/>
      <p2 x="500" y="160"/>
    </wire>
    <wire>
      <p1 x="500" y="160"/>
      <p2 x="540" y="160"/>
    </wire>
    <wire>
      <p1 x="420" y="640"/>
      <p2 x="540" y="640"/>
    </wire>
    <wire>
      <p1 x="520" y="480"/>
      <p2 x="540" y="480"/>
    </wire>
    <wire>
      <p1 x="400" y="260"/>
      <p2 x="440" y="260"/>
    </wire>
    <wire>
      <p1 x="240" y="260"/>
      <p2 x="360" y="260"/>
    </wire>
    <wire>
      <p1 x="480" y="420"/>
      <p2 x="540" y="420"/>
    </wire>
    <wire>
      <p1 x="500" y="580"/>
      <p2 x="540" y="580"/>
    </wire>
    <wire>
      <p1 x="460" y="360"/>
      <p2 x="540" y="360"/>
    </wire>
    <wire>
      <p1 x="520" y="200"/>
      <p2 x="540" y="200"/>
    </wire>
    <wire>
      <p1 x="620" y="200"/>
      <p2 x="680" y="200"/>
    </wire>
    <wire>
      <p1 x="240" y="620"/>
      <p2 x="520" y="620"/>
    </wire>
    <wire>
      <p1 x="520" y="620"/>
      <p2 x="540" y="620"/>
    </wire>
    <wire>
      <p1 x="240" y="140"/>
      <p2 x="480" y="140"/>
    </wire>
    <wire>
      <p1 x="480" y="140"/>
      <p2 x="540" y="140"/>
    </wire>
    <wire>
      <p1 x="500" y="300"/>
      <p2 x="540" y="300"/>
    </wire>
    <wire>
      <p1 x="600" y="460"/>
      <p2 x="640" y="460"/>
    </wire>
    <wire>
      <p1 x="400" y="240"/>
      <p2 x="460" y="240"/>
    </wire>
    <wire>
      <p1 x="660" y="240"/>
      <p2 x="680" y="240"/>
    </wire>
    <wire>
      <p1 x="480" y="560"/>
      <p2 x="540" y="560"/>
    </wire>
    <wire>
      <p1 x="380" y="400"/>
      <p2 x="700" y="400"/>
    </wire>
    <wire>
      <p1 x="300" y="340"/>
      <p2 x="380" y="340"/>
    </wire>
    <wire>
      <p1 x="520" y="340"/>
      <p2 x="540" y="340"/>
    </wire>
    <wire>
      <p1 x="600" y="180"/>
      <p2 x="680" y="180"/>
    </wire>
    <wire>
      <p1 x="440" y="500"/>
      <p2 x="540" y="500"/>
    </wire>
    <wire>
      <p1 x="500" y="440"/>
      <p2 x="540" y="440"/>
    </wire>
    <wire>
      <p1 x="480" y="280"/>
      <p2 x="540" y="280"/>
    </wire>
    <wire>
      <p1 x="400" y="280"/>
      <p2 x="420" y="280"/>
    </wire>
    <wire>
      <p1 x="600" y="600"/>
      <p2 x="660" y="600"/>
    </wire>
    <wire>
      <p1 x="720" y="220"/>
      <p2 x="740" y="220"/>
    </wire>
    <wire>
      <p1 x="400" y="220"/>
      <p2 x="540" y="220"/>
    </wire>
    <wire>
      <p1 x="640" y="220"/>
      <p2 x="680" y="220"/>
    </wire>
    <wire>
      <p1 x="480" y="140"/>
      <p2 x="480" y="280"/>
    </wire>
    <wire>
      <p1 x="480" y="280"/>
      <p2 x="480" y="420"/>
    </wire>
    <wire>
      <p1 x="480" y="420"/>
      <p2 x="480" y="560"/>
    </wire>
    <wire>
      <p1 x="320" y="160"/>
      <p2 x="320" y="320"/>
    </wire>
    <wire>
      <p1 x="640" y="220"/>
      <p2 x="640" y="460"/>
    </wire>
    <wire>
      <p1 x="420" y="280"/>
      <p2 x="420" y="640"/>
    </wire>
    <wire>
      <p1 x="500" y="160"/>
      <p2 x="500" y="300"/>
    </wire>
    <wire>
      <p1 x="500" y="300"/>
      <p2 x="500" y="440"/>
    </wire>
    <wire>
      <p1 x="500" y="440"/>
      <p2 x="500" y="580"/>
    </wire>
    <wire>
      <p1 x="660" y="240"/>
      <p2 x="660" y="600"/>
    </wire>
    <wire>
      <p1 x="520" y="200"/>
      <p2 x="520" y="340"/>
    </wire>
    <wire>
      <p1 x="520" y="340"/>
      <p2 x="520" y="480"/>
    </wire>
    <wire>
      <p1 x="520" y="480"/>
      <p2 x="520" y="620"/>
    </wire>
    <wire>
      <p1 x="440" y="260"/>
      <p2 x="440" y="500"/>
    </wire>
    <wire>
      <p1 x="700" y="260"/>
      <p2 x="700" y="400"/>
    </wire>
    <wire>
      <p1 x="620" y="200"/>
      <p2 x="620" y="320"/>
    </wire>
    <wire>
      <p1 x="380" y="300"/>
      <p2 x="380" y="340"/>
    </wire>
    <wire>
      <p1 x="380" y="340"/>
      <p2 x="380" y="400"/>
    </wire>
    <wire>
      <p1 x="460" y="240"/>
      <p2 x="460" y="360"/>
    </wire>
  </wires>
  <measurementOrdering/>
</circuit>