<?xml version="1.0" encoding="utf-8"?>
<circuit>
  <version>1</version>
  <attributes/>
  <visualElements>
    <visualElement>
      <elementName>Out</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>D</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>32</int>
        </entry>
      </elementAttributes>
      <pos x="560" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>A</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>8</int>
        </entry>
      </elementAttributes>
      <pos x="180" y="160"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>Din</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>32</int>
        </entry>
      </elementAttributes>
      <pos x="180" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>Clock</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>C</string>
        </entry>
      </elementAttributes>
      <pos x="180" y="620"/>
    </visualElement>
    <visualElement>
      <elementName>In</elementName>
      <elementAttributes>
        <entry>
          <string>Label</string>
          <string>mask</string>
        </entry>
        <entry>
          <string>Bits</string>
          <int>4</int>
        </entry>
      </elementAttributes>
      <pos x="180" y="240"/>
    </visualElement>
    <visualElement>
      <elementName>Testcase</elementName>
      <elementAttributes>
        <entry>
          <string>Testdata</string>
          <testData>
            <dataString>C A Din         mask   D

# no write at all, mask is zero
C 0 0           0b1111 x
C 0 0xffffffff  0b0000 x
C 0 0           0b0000 0

# write bytes

C 0 0xffffffff  0b0001 x
C 0 0           0b0000 0xff

C 0 0xffffff00  0b0010 x
C 0 0           0b0000 0xffff

C 0 0xffff0000  0b0100 x
C 0 0           0b0000 0xffffff

C 0 0xff000000  0b1000 x
C 0 0           0b0000 0xffffffff

# write 16 bit words

C 1 0           0b1111 x
C 1 0xffff      0b0011 x
C 1 0           0b0000  0xffff

C 1 0xffff0000  0b1100 x
C 1 0           0b0000 0xffffffff

C 1 0xaaaa00    0b0110 x
C 1 0           0b0000 0xffaaaaff

# write 32 bit words

C 2 0           0b1111 x
C 2 0xffffffff  0b1111 x
C 2 0           0b0000  0xffffffff

# sync read
C 1 0           0b0000 0xffaaaaff
0 0 0           0b0000 0xffaaaaff
0 2 0           0b0000 0xffaaaaff
C 0 0           0b0000 0xffffffff
C 2 0           0b0000 0xffffffff
</dataString>
          </testData>
        </entry>
      </elementAttributes>
      <pos x="120" y="380"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>splitterSpreading</string>
          <int>6</int>
        </entry>
        <entry>
          <string>Input Splitting</string>
          <string>8*4</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>32</string>
        </entry>
      </elementAttributes>
      <pos x="500" y="220"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>splitterSpreading</string>
          <int>6</int>
        </entry>
        <entry>
          <string>Input Splitting</string>
          <string>32</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>8*4</string>
        </entry>
      </elementAttributes>
      <pos x="300" y="200"/>
    </visualElement>
    <visualElement>
      <elementName>Splitter</elementName>
      <elementAttributes>
        <entry>
          <string>splitterSpreading</string>
          <int>6</int>
        </entry>
        <entry>
          <string>Input Splitting</string>
          <string>4</string>
        </entry>
        <entry>
          <string>Output Splitting</string>
          <string>1*4</string>
        </entry>
      </elementAttributes>
      <pos x="240" y="240"/>
    </visualElement>
    <visualElement>
      <elementName>BlockRAMDualPort</elementName>
      <elementAttributes>
        <entry>
          <string>AddrBits</string>
          <int>8</int>
        </entry>
        <entry>
          <string>Bits</string>
          <int>8</int>
        </entry>
      </elementAttributes>
      <pos x="400" y="180"/>
    </visualElement>
    <visualElement>
      <elementName>BlockRAMDualPort</elementName>
      <elementAttributes>
        <entry>
          <string>AddrBits</string>
          <int>8</int>
        </entry>
        <entry>
          <string>Bits</string>
          <int>8</int>
        </entry>
      </elementAttributes>
      <pos x="400" y="300"/>
    </visualElement>
    <visualElement>
      <elementName>BlockRAMDualPort</elementName>
      <elementAttributes>
        <entry>
          <string>AddrBits</string>
          <int>8</int>
        </entry>
        <entry>
          <string>Bits</string>
          <int>8</int>
        </entry>
      </elementAttributes>
      <pos x="400" y="420"/>
    </visualElement>
    <visualElement>
      <elementName>BlockRAMDualPort</elementName>
      <elementAttributes>
        <entry>
          <string>AddrBits</string>
          <int>8</int>
        </entry>
        <entry>
          <string>Bits</string>
          <int>8</int>
        </entry>
      </elementAttributes>
      <pos x="400" y="540"/>
    </visualElement>
  </visualElements>
  <wires>
    <wire>
      <p1 x="180" y="160"/>
      <p2 x="380" y="160"/>
    </wire>
    <wire>
      <p1 x="320" y="320"/>
      <p2 x="400" y="320"/>
    </wire>
    <wire>
      <p1 x="260" y="480"/>
      <p2 x="400" y="480"/>
    </wire>
    <wire>
      <p1 x="360" y="260"/>
      <p2 x="400" y="260"/>
    </wire>
    <wire>
      <p1 x="460" y="580"/>
      <p2 x="500" y="580"/>
    </wire>
    <wire>
      <p1 x="380" y="420"/>
      <p2 x="400" y="420"/>
    </wire>
    <wire>
      <p1 x="180" y="200"/>
      <p2 x="300" y="200"/>
    </wire>
    <wire>
      <p1 x="320" y="200"/>
      <p2 x="400" y="200"/>
    </wire>
    <wire>
      <p1 x="260" y="360"/>
      <p2 x="400" y="360"/>
    </wire>
    <wire>
      <p1 x="180" y="620"/>
      <p2 x="360" y="620"/>
    </wire>
    <wire>
      <p1 x="360" y="620"/>
      <p2 x="400" y="620"/>
    </wire>
    <wire>
      <p1 x="460" y="460"/>
      <p2 x="500" y="460"/>
    </wire>
    <wire>
      <p1 x="380" y="300"/>
      <p2 x="400" y="300"/>
    </wire>
    <wire>
      <p1 x="320" y="560"/>
      <p2 x="400" y="560"/>
    </wire>
    <wire>
      <p1 x="180" y="240"/>
      <p2 x="240" y="240"/>
    </wire>
    <wire>
      <p1 x="260" y="240"/>
      <p2 x="400" y="240"/>
    </wire>
    <wire>
      <p1 x="380" y="180"/>
      <p2 x="400" y="180"/>
    </wire>
    <wire>
      <p1 x="460" y="340"/>
      <p2 x="500" y="340"/>
    </wire>
    <wire>
      <p1 x="360" y="500"/>
      <p2 x="400" y="500"/>
    </wire>
    <wire>
      <p1 x="320" y="440"/>
      <p2 x="400" y="440"/>
    </wire>
    <wire>
      <p1 x="260" y="600"/>
      <p2 x="400" y="600"/>
    </wire>
    <wire>
      <p1 x="520" y="220"/>
      <p2 x="560" y="220"/>
    </wire>
    <wire>
      <p1 x="460" y="220"/>
      <p2 x="500" y="220"/>
    </wire>
    <wire>
      <p1 x="380" y="540"/>
      <p2 x="400" y="540"/>
    </wire>
    <wire>
      <p1 x="360" y="380"/>
      <p2 x="400" y="380"/>
    </wire>
    <wire>
      <p1 x="360" y="260"/>
      <p2 x="360" y="380"/>
    </wire>
    <wire>
      <p1 x="360" y="500"/>
      <p2 x="360" y="620"/>
    </wire>
    <wire>
      <p1 x="360" y="380"/>
      <p2 x="360" y="500"/>
    </wire>
    <wire>
      <p1 x="380" y="160"/>
      <p2 x="380" y="180"/>
    </wire>
    <wire>
      <p1 x="380" y="420"/>
      <p2 x="380" y="540"/>
    </wire>
    <wire>
      <p1 x="380" y="300"/>
      <p2 x="380" y="420"/>
    </wire>
    <wire>
      <p1 x="380" y="180"/>
      <p2 x="380" y="300"/>
    </wire>
  </wires>
</circuit>