text:
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <spirit:vendor>xilinx.com</spirit:vendor>
  <spirit:library>customized_ip</spirit:library>
  <spirit:name>bd_proc_sys_reset_1_0</spirit:name>
  <spirit:version>1.0</spirit:version>
  <spirit:busInterfaces>
    <spirit:busInterface>
      <spirit:name>clock</spirit:name>
      <spirit:displayName>Clock</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>CLK</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>slowest_sync_clk</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>ASSOCIATED_RESET</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.CLOCK.ASSOCIATED_RESET">mb_reset:bus_struct_reset:interconnect_aresetn:peripheral_aresetn:peripheral_reset</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>FREQ_HZ</spirit:name>
          <spirit:displayName>Slowest Sync clock frequency</spirit:displayName>
          <spirit:description>Slowest Synchronous clock frequency</spirit:description>
          <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="BUSIFPARAM_VALUE.CLOCK.FREQ_HZ">125000000</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>PHASE</spirit:name>
          <spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLOCK.PHASE">0</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>CLK_DOMAIN</spirit:name>
          <spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLOCK.CLK_DOMAIN">bd_mig_7series_0_0_ui_clk</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>ASSOCIATED_BUSIF</spirit:name>
          <spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.CLOCK.ASSOCIATED_BUSIF"/>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>ext_reset</spirit:name>
      <spirit:displayName>Ext_Reset</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>ext_reset_in</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>BOARD.ASSOCIATED_PARAM</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.EXT_RESET.BOARD.ASSOCIATED_PARAM">RESET_BOARD_INTERFACE</spirit:value>
          <spirit:vendorExtensions>
            <xilinx:parameterInfo>
              <xilinx:enablement>
                <xilinx:presence>required</xilinx:presence>
              </xilinx:enablement>
            </xilinx:parameterInfo>
          </spirit:vendorExtensions>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.EXT_RESET.POLARITY">ACTIVE_HIGH</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>aux_reset</spirit:name>
      <spirit:displayName>aux_reset</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>aux_reset_in</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:resolve="generated" spirit:id="BUSIFPARAM_VALUE.AUX_RESET.POLARITY">ACTIVE_LOW</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>dbg_reset</spirit:name>
      <spirit:displayName>DBG_Reset</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>mb_debug_sys_rst</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.DBG_RESET.POLARITY">ACTIVE_HIGH</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>mb_rst</spirit:name>
      <spirit:displayName>MB_rst</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:master/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>mb_reset</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.MB_RST.POLARITY">ACTIVE_HIGH</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>TYPE</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.MB_RST.TYPE">PROCESSOR</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>bus_struct_reset</spirit:name>
      <spirit:displayName>bus_struct_reset</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:master/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>bus_struct_reset</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.BUS_STRUCT_RESET.POLARITY">ACTIVE_HIGH</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>TYPE</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.BUS_STRUCT_RESET.TYPE">INTERCONNECT</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>interconnect_low_rst</spirit:name>
      <spirit:displayName>interconnect_low_rst</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:master/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>interconnect_aresetn</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.INTERCONNECT_LOW_RST.POLARITY">ACTIVE_LOW</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>TYPE</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.INTERCONNECT_LOW_RST.TYPE">INTERCONNECT</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>peripheral_high_rst</spirit:name>
      <spirit:displayName>peripheral_high_rst</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:master/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>peripheral_reset</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.PERIPHERAL_HIGH_RST.POLARITY">ACTIVE_HIGH</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>TYPE</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.PERIPHERAL_HIGH_RST.TYPE">PERIPHERAL</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>peripheral_low_rst</spirit:name>
      <spirit:displayName>peripheral_low_rst</spirit:displayName>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:master/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>peripheral_aresetn</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.PERIPHERAL_LOW_RST.POLARITY">ACTIVE_LOW</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>TYPE</spirit:name>
          <spirit:value spirit:id="BUSIFPARAM_VALUE.PERIPHERAL_LOW_RST.TYPE">PERIPHERAL</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
  </spirit:busInterfaces>
  <spirit:model>
    <spirit:views>
      <spirit:view>
        <spirit:name>xilinx_vhdlsynthesis</spirit:name>
        <spirit:displayName>VHDL Synthesis</spirit:displayName>
        <spirit:envIdentifier>vhdlSource:vivado.xilinx.com:synthesis</spirit:envIdentifier>
        <spirit:language>vhdl</spirit:language>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlsynthesis_xilinx_com_ip_lib_cdc_1_0__ref_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlsynthesis_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Fri Apr 14 22:32:27 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>bc1cf7f5</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_synthesisconstraints</spirit:name>
        <spirit:displayName>Synthesis Constraints</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:synthesis.constraints</spirit:envIdentifier>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_synthesisconstraints_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Fri Apr 14 22:32:27 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>bc1cf7f5</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_vhdlsynthesiswrapper</spirit:name>
        <spirit:displayName>VHDL Synthesis Wrapper</spirit:displayName>
        <spirit:envIdentifier>vhdlSource:vivado.xilinx.com:synthesis.wrapper</spirit:envIdentifier>
        <spirit:language>vhdl</spirit:language>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlsynthesiswrapper_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Fri Apr 14 22:32:27 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>bc1cf7f5</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_implementation</spirit:name>
        <spirit:displayName>Implementation</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:implementation</spirit:envIdentifier>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_implementation_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Fri Apr 14 22:32:27 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>bc1cf7f5</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_externalfiles</spirit:name>
        <spirit:displayName>External Files</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:external.files</spirit:envIdentifier>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_externalfiles_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Fri Apr 14 22:32:37 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>bc1cf7f5</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_vhdlbehavioralsimulation</spirit:name>
        <spirit:displayName>VHDL Simulation</spirit:displayName>
        <spirit:envIdentifier>vhdlSource:vivado.xilinx.com:simulation</spirit:envIdentifier>
        <spirit:language>vhdl</spirit:language>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlbehavioralsimulation_xilinx_com_ip_lib_cdc_1_0__ref_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlbehavioralsimulation_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Sun Apr 09 15:09:15 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>c695c492</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_vhdlsimulationwrapper</spirit:name>
        <spirit:displayName>VHDL Simulation Wrapper</spirit:displayName>
        <spirit:envIdentifier>vhdlSource:vivado.xilinx.com:simulation.wrapper</spirit:envIdentifier>
        <spirit:language>vhdl</spirit:language>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_vhdlsimulationwrapper_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>GENtimestamp</spirit:name>
            <spirit:value>Wed Apr 19 16:32:15 UTC 2017</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRC</spirit:name>
            <spirit:value>921e2800</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>boundaryCRCversion</spirit:name>
            <spirit:value>1</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRC</spirit:name>
            <spirit:value>c695c492</spirit:value>
          </spirit:parameter>
          <spirit:parameter>
            <spirit:name>customizationCRCversion</spirit:name>
            <spirit:value>6</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
    </spirit:views>
    <spirit:ports>
      <spirit:port>
        <spirit:name>slowest_sync_clk</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>ext_reset_in</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>aux_reset_in</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">1</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>mb_debug_sys_rst</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>dcm_locked</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0x1</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>mb_reset</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="bitString" spirit:bitStringLength="1">0x0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>bus_struct_reset</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long">0</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_NUM_BUS_RST')) - 1)">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>peripheral_reset</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long">0</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_NUM_PERP_RST')) - 1)">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>interconnect_aresetn</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long">0</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_NUM_INTERCONNECT_ARESETN')) - 1)">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">1</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>peripheral_aresetn</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long">0</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_NUM_PERP_ARESETN')) - 1)">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>std_logic_vector</spirit:typeName>
              <spirit:viewNameRef>xilinx_vhdlsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_vhdlbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue spirit:format="long">1</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
    </spirit:ports>
    <spirit:modelParameters>
      <spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="string">
        <spirit:name>C_FAMILY</spirit:name>
        <spirit:value spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_FAMILY">artix7</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_EXT_RST_WIDTH</spirit:name>
        <spirit:displayName>Ext Rst Width</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EXT_RST_WIDTH" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">4</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_AUX_RST_WIDTH</spirit:name>
        <spirit:displayName>Aux Rst Width</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AUX_RST_WIDTH" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">4</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="std_logic">
        <spirit:name>C_EXT_RESET_HIGH</spirit:name>
        <spirit:displayName>Ext Reset High</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EXT_RESET_HIGH">1</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="std_logic">
        <spirit:name>C_AUX_RESET_HIGH</spirit:name>
        <spirit:displayName>Aux Reset High</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AUX_RESET_HIGH" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">0</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_NUM_BUS_RST</spirit:name>
        <spirit:displayName>No. of Bus Reset (Active High)</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_NUM_BUS_RST" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">1</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_NUM_PERP_RST</spirit:name>
        <spirit:displayName>No. of Peripheral Reset (Active High)</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_NUM_PERP_RST" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">1</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_NUM_INTERCONNECT_ARESETN</spirit:name>
        <spirit:displayName>No. of Interconnect Reset (Active Low)</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_NUM_INTERCONNECT_ARESETN" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">1</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_NUM_PERP_ARESETN</spirit:name>
        <spirit:displayName>No. of Peripheral Reset (Active Low)</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_NUM_PERP_ARESETN" spirit:minimum="1" spirit:maximum="31" spirit:rangeType="long">1</spirit:value>
      </spirit:modelParameter>
    </spirit:modelParameters>
  </spirit:model>
  <spirit:choices>
    <spirit:choice>
      <spirit:name>choice_list_ac75ef1e</spirit:name>
      <spirit:enumeration>Custom</spirit:enumeration>
    </spirit:choice>
  </spirit:choices>
  <spirit:fileSets>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlsynthesis_xilinx_com_ip_lib_cdc_1_0__ref_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>../../ipshared/52cb/hdl/lib_cdc_v1_0_rfs.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:logicalName>lib_cdc_v1_0_2</spirit:logicalName>
      </spirit:file>
      <spirit:vendorExtensions>
        <xilinx:subCoreRef>
          <xilinx:componentRef xilinx:vendor="xilinx.com" xilinx:library="ip" xilinx:name="lib_cdc" xilinx:version="1.0" xilinx:isGenerated="true" xilinx:checksum="726cb4eb">
            <xilinx:mode xilinx:name="copy_mode"/>
          </xilinx:componentRef>
        </xilinx:subCoreRef>
      </spirit:vendorExtensions>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlsynthesis_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>../../ipshared/04b4/hdl/proc_sys_reset_v5_0_vh_rfs.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:logicalName>proc_sys_reset_v5_0_10</spirit:logicalName>
      </spirit:file>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0.xdc</spirit:name>
        <spirit:userFileType>xdc</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_synthesisconstraints_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_ooc.xdc</spirit:name>
        <spirit:userFileType>xdc</spirit:userFileType>
        <spirit:userFileType>USED_IN_implementation</spirit:userFileType>
        <spirit:userFileType>USED_IN_out_of_context</spirit:userFileType>
        <spirit:userFileType>USED_IN_synthesis</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlsynthesiswrapper_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>synth/bd_proc_sys_reset_1_0.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_implementation_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_board.xdc</spirit:name>
        <spirit:userFileType>xdc</spirit:userFileType>
        <spirit:userFileType>USED_IN_board</spirit:userFileType>
        <spirit:userFileType>USED_IN_implementation</spirit:userFileType>
        <spirit:userFileType>USED_IN_synthesis</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_externalfiles_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0.dcp</spirit:name>
        <spirit:userFileType>dcp</spirit:userFileType>
        <spirit:userFileType>USED_IN_implementation</spirit:userFileType>
        <spirit:userFileType>USED_IN_synthesis</spirit:userFileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_stub.v</spirit:name>
        <spirit:fileType>verilogSource</spirit:fileType>
        <spirit:userFileType>USED_IN_synth_blackbox_stub</spirit:userFileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_stub.vhdl</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:userFileType>USED_IN_synth_blackbox_stub</spirit:userFileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_sim_netlist.v</spirit:name>
        <spirit:fileType>verilogSource</spirit:fileType>
        <spirit:userFileType>USED_IN_simulation</spirit:userFileType>
        <spirit:userFileType>USED_IN_single_language</spirit:userFileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
      <spirit:file>
        <spirit:name>bd_proc_sys_reset_1_0_sim_netlist.vhdl</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:userFileType>USED_IN_simulation</spirit:userFileType>
        <spirit:userFileType>USED_IN_single_language</spirit:userFileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlbehavioralsimulation_xilinx_com_ip_lib_cdc_1_0__ref_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>../../ipshared/52cb/hdl/lib_cdc_v1_0_rfs.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:userFileType>USED_IN_ipstatic</spirit:userFileType>
        <spirit:logicalName>lib_cdc_v1_0_2</spirit:logicalName>
      </spirit:file>
      <spirit:vendorExtensions>
        <xilinx:subCoreRef>
          <xilinx:componentRef xilinx:vendor="xilinx.com" xilinx:library="ip" xilinx:name="lib_cdc" xilinx:version="1.0" xilinx:isGenerated="true" xilinx:checksum="726cb4eb">
            <xilinx:mode xilinx:name="copy_mode"/>
          </xilinx:componentRef>
        </xilinx:subCoreRef>
      </spirit:vendorExtensions>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlbehavioralsimulation_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>../../ipshared/04b4/hdl/proc_sys_reset_v5_0_vh_rfs.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:userFileType>USED_IN_ipstatic</spirit:userFileType>
        <spirit:logicalName>proc_sys_reset_v5_0_10</spirit:logicalName>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_vhdlsimulationwrapper_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>sim/bd_proc_sys_reset_1_0.vhd</spirit:name>
        <spirit:fileType>vhdlSource</spirit:fileType>
        <spirit:logicalName>xil_defaultlib</spirit:logicalName>
      </spirit:file>
    </spirit:fileSet>
  </spirit:fileSets>
  <spirit:description>Processor Reset System</spirit:description>
  <spirit:parameters>
    <spirit:parameter>
      <spirit:name>C_NUM_PERP_ARESETN</spirit:name>
      <spirit:displayName>No. of Peripheral Reset (Active Low)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_NUM_PERP_ARESETN" spirit:order="1800" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">1</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_NUM_INTERCONNECT_ARESETN</spirit:name>
      <spirit:displayName>No. of Interconnect Reset (Active Low)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_NUM_INTERCONNECT_ARESETN" spirit:order="1700" spirit:minimum="1" spirit:maximum="8" spirit:rangeType="long">1</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_NUM_PERP_RST</spirit:name>
      <spirit:displayName>No. of Peripheral Reset (Active High)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_NUM_PERP_RST" spirit:order="1600" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">1</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_NUM_BUS_RST</spirit:name>
      <spirit:displayName>No. of Bus Reset (Active High)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_NUM_BUS_RST" spirit:order="1500" spirit:minimum="1" spirit:maximum="8" spirit:rangeType="long">1</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_AUX_RESET_HIGH</spirit:name>
      <spirit:displayName>Aux Reset High</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_AUX_RESET_HIGH" spirit:order="1400" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">0</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_EXT_RESET_HIGH</spirit:name>
      <spirit:displayName>Ext Reset High</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_EXT_RESET_HIGH" spirit:order="1300" spirit:minimum="0" spirit:maximum="1" spirit:rangeType="long">1</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_AUX_RST_WIDTH</spirit:name>
      <spirit:displayName>Aux Rst Width</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_AUX_RST_WIDTH" spirit:order="1200" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">4</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_EXT_RST_WIDTH</spirit:name>
      <spirit:displayName>Ext Rst Width</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_EXT_RST_WIDTH" spirit:order="1100" spirit:minimum="1" spirit:maximum="16" spirit:rangeType="long">4</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>Component_Name</spirit:name>
      <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">bd_proc_sys_reset_1_0</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>USE_BOARD_FLOW</spirit:name>
      <spirit:displayName>Generate Board based IO Constraints</spirit:displayName>
      <spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.USE_BOARD_FLOW" spirit:order="2">false</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>RESET_BOARD_INTERFACE</spirit:name>
      <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.RESET_BOARD_INTERFACE" spirit:choiceRef="choice_list_ac75ef1e" spirit:order="3">Custom</spirit:value>
    </spirit:parameter>
  </spirit:parameters>
  <spirit:vendorExtensions>
    <xilinx:coreExtensions>
      <xilinx:displayName>Processor System Reset</xilinx:displayName>
      <xilinx:coreRevision>10</xilinx:coreRevision>
      <xilinx:configElementInfos>
        <xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.AUX_RESET.POLARITY" xilinx:valueSource="propagated"/>
        <xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.CLOCK.CLK_DOMAIN" xilinx:valueSource="default_prop"/>
        <xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.CLOCK.FREQ_HZ" xilinx:valueSource="user_prop"/>
        <xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.CLOCK.PHASE" xilinx:valueSource="default_prop"/>
        <xilinx:configElementInfo xilinx:referenceId="BUSIFPARAM_VALUE.EXT_RESET.POLARITY" xilinx:valueSource="constant_prop"/>
        <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.C_AUX_RESET_HIGH" xilinx:valueSource="propagated"/>
        <xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.C_EXT_RESET_HIGH" xilinx:valueSource="propagated"/>
      </xilinx:configElementInfos>
    </xilinx:coreExtensions>
    <xilinx:packagingInfo>
      <xilinx:xilinxVersion>2016.4</xilinx:xilinxVersion>
      <xilinx:checksum xilinx:scope="busInterfaces" xilinx:value="d8719302"/>
      <xilinx:checksum xilinx:scope="fileGroups" xilinx:value="8cd5b915"/>
      <xilinx:checksum xilinx:scope="ports" xilinx:value="5fd752fb"/>
      <xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="df586200"/>
      <xilinx:checksum xilinx:scope="parameters" xilinx:value="d5db842a"/>
    </xilinx:packagingInfo>
  </spirit:vendorExtensions>
</spirit:component>


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>VO808X: testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container > Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

VO808X

Main Page

Related Pages

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

Public Types |
Public Member Functions |
List of all members

testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container > Class Template Reference

#include <gmock-matchers.h>

Inheritance diagram for testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >:

[legend]

Collaboration diagram for testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >:

[legend]

Public Types

typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> 	ContainerView

typedef ContainerView::type::size_type 	SizeType

Public Member Functions

 	Impl (const SizeMatcher &size_matcher)

virtual void 	DescribeTo (::std::ostream *os) const

virtual void 	DescribeNegationTo (::std::ostream *os) const

virtual bool 	MatchAndExplain (Container container, MatchResultListener *listener) const

 Public Member Functions inherited from testing::MatcherDescriberInterface

virtual 	~MatcherDescriberInterface ()

Detailed Description

template<typename SizeMatcher>

template<typename Container>

class testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >

Definition at line 2411 of file gmock-matchers.h.

Member Typedef Documentation

template<typename SizeMatcher >

template<typename Container >

          typedef internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::ContainerView

Definition at line 2414 of file gmock-matchers.h.

template<typename SizeMatcher >

template<typename Container >

          typedef ContainerView::type::size_type testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::SizeType

Definition at line 2415 of file gmock-matchers.h.

Constructor & Destructor Documentation

template<typename SizeMatcher >

template<typename Container >

          testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::Impl
          (
          const SizeMatcher &
          size_matcher	)

inlineexplicit

Definition at line 2416 of file gmock-matchers.h.

Member Function Documentation

template<typename SizeMatcher >

template<typename Container >

          virtual void testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::DescribeNegationTo
          (
          ::std::ostream *
          os	)
           const

inlinevirtual

Reimplemented from testing::MatcherDescriberInterface.

Definition at line 2423 of file gmock-matchers.h.

template<typename SizeMatcher >

template<typename Container >

          virtual void testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::DescribeTo
          (
          ::std::ostream *
          os	)
           const

inlinevirtual

Implements testing::MatcherDescriberInterface.

Definition at line 2419 of file gmock-matchers.h.

template<typename SizeMatcher >

template<typename Container >

          virtual bool testing::internal::SizeIsMatcher< SizeMatcher >::Impl< Container >::MatchAndExplain
          (
          Container
          container,

          MatchResultListener *
          listener

          )
          	 const

inlinevirtual

Implements testing::MatcherInterface< Container >.

Definition at line 2428 of file gmock-matchers.h.

The documentation for this class was generated from the following file:

/home/bhargavi/Documents/SDR/Copy_Exam_808X/vendor/googletest/googlemock/include/gmock/gmock-matchers.h

testing

internal

SizeIsMatcher

Impl

Generated by

     1.8.11

redpajama_set_name: RedPajamaGithub


text:
const RESOURCES_DIR = "/html/semantics/links/downloading-resources/resources/";

function testOriginHeader(expectedOrigin) {
  var id = self.token();
  let testUrl = RESOURCES_DIR + "inspect-header.py?header=origin&cmd=put&id=" + id;

  promise_test(function(test) {
    const anchor = document.getElementById("a");
    anchor.setAttribute("ping", testUrl);
    anchor.click();
    return pollResult(id) .then(result => {
      assert_equals(result, expectedOrigin, "Correct origin header result");
    });
  }, "Test origin header " + RESOURCES_DIR);
}

// Sending a ping is an asynchronous and non-blocking request to a web server.
// We may have to create a poll loop to get result from server
function pollResult(id) {
  let checkUrl = RESOURCES_DIR + "inspect-header.py?header=origin&cmd=get&id=" + id;

  return new Promise(resolve => {
    function checkResult() {
      fetch(checkUrl).then(
        function(response) {
          assert_equals(response.status, 200, "Inspect header response's status is 200");
          let result = response.headers.get("x-request-origin");

          if (result != undefined) {
            resolve(result);
          } else {
            step_timeout(checkResult.bind(this), 100);
          }
        });
    }

    checkResult();
  });

}


text:
import { IMessage } from "./message";

export interface IMessageQueue {
  getLastReadAt(): number;

  addMessage(message: IMessage): void;

  readMessage(): IMessage | undefined;

  getMessages(): IMessage[];
}

export class MessageQueue implements IMessageQueue {
  private lastReadAt: number = new Date().getTime();
  private readonly messages: IMessage[] = [];

  public getLastReadAt(): number {
    return this.lastReadAt;
  }

  public addMessage(message: IMessage): void {
    this.messages.push(message);
  }

  public readMessage(): IMessage | undefined {
    if (this.messages.length > 0) {
      this.lastReadAt = new Date().getTime();
      return this.messages.shift();
    }

    return undefined;
  }

  public getMessages(): IMessage[] {
    return this.messages;
  }
}


text:
package org.ndexbio.common.util;

import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Util {
	public static String readFile(String path)
			  throws IOException
			{
			  byte[] encoded = Files.readAllBytes(Paths.get(path));
			  return new String(encoded, Charset.forName("UTF-8"));
			}
}


text:
import pytest

@pytest.mark.parametrize(
    'middleware_request',
    ({'FAKEUSERAGENT_PROVIDERS': ['scrapy_fake_useragent.providers.FixedUserAgentProvider'],
      'USER_AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0)'},),
    indirect=True
)
def test_fixed_ua_set(middleware_request):
    assert middleware_request.headers == {
        b'User-Agent': [b'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0)']
    }


text:
set +x
set -e

if [[ $# -lt 1 ]]; then
    printf "missing configuration\n"
    exit 1
fi

source $1

response=$(curl -XHEAD -i --write-out %{http_code} --silent --output /dev/null "${ES_HOST}:${ES_PORT}/${ES_INDEX}")

if [[ "$response" -eq 404 ]]; then
    printf "create index ${ES_INDEX}\n"
    curl -s -XPUT "${ES_HOST}:${ES_PORT}/${ES_INDEX}" --data-binary "@etc/settings.json"
fi

response=$(curl -XHEAD -i --write-out %{http_code} --silent --output /dev/null "${ES_HOST}:${ES_PORT}/${ES_INDEX}/${ES_DOC_TYPE_EMAILADDR}")
if [[ "$response" -eq 200 ]]; then
    printf "WARNING:  You must clear the index <${ES_INDEX}> before ingesting data."
    exit 1
fi

printf "create doc_type\n"
curl -s -XPUT "${ES_HOST}:${ES_PORT}/${ES_INDEX}/${ES_DOC_TYPE_EMAILADDR}/_mapping" --data-binary "@etc/email_address_mapping.json"

printf "ingest documents\n"

spark-submit --master local[*] --driver-memory 8g --jars lib/elasticsearch-hadoop-2.2.0-m1.jar --conf spark.storage.memoryFraction=.8 spark/elastic_bulk_ingest.py "pst-extract/spark-emailaddr/part-*" "${ES_INDEX}/${ES_DOC_TYPE_EMAILADDR}"  --es_nodes ${ES_NODES}


text:
package ru.nivanov;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
 * Calculate triangle square.
 * @author nivanov.
 */

public class TriangleTest {
    /**
     * Calculate square.
     */
    @Test
    public void whenABCCorrectThenReturnArea() {
        final double one = 2.0;
        final double two = 1.0;
        final double three = -1.0;
        final double four = -3.0;
        final double five = -1.0;
        final double six = 1.0;
        final double seven = 6.0;
        Triangle abcOne = new Triangle(new Point(one, two), new Point(three, four), new Point(five, six));
        double ploShad = abcOne.area();
        assertThat(ploShad, is(seven));
    }

    /**
     * Test if triangle cannot exist.
     */
    @Test
    public void whenABCinLineThenReturnError() {
        final double one = 1.0;
        final double two = 1.0;
        final double three = 5.0;
        final double four = 5.0;
        final double five = 10.0;
        final double six = 10.0;
        final double seven = 0.0;
        Triangle abcTwo = new Triangle(new Point(one, two), new Point(three, four), new Point(five, six));
        double ploShad = abcTwo.area();
        assertThat(ploShad, is(seven));
    }
}


text:
"use strict";

var _ = require('underscore');
var Backbone = require('backbone');
var helpers = require('./helpers');

/**
 * Creates a hierarchical model, allowing properties to be cast via an object passed to this.schema.
 *
 */
module.exports = Backbone.Model.extend({

    // The structure of any nested models/collections,
    // defined as an object of key: value pairs.
    // The key refers to the model attribute and
    // value is the class that will be cast to.
    // For example:
    // schema: {
    //      items: Backbone.Collection,
    // }
    schema: {},

    // References to the nested child instances. Equivalent to model.attributes
    children: null,

    constructor: function (attributes, options) {
        options || (options = {});
        options.parse = true;
        this.children = {};
        Backbone.Model.call(this, attributes, options);
    },

    // Iterate through the models schema, casting each property to the appropriate class.
    parse: function (response) {
        // Return the parsed response with the mapped schema
        var keys = _.keys(this.schema);
        var mappedResponse = _.reduce(keys, _.bind(this.mapSchema, this), response);
        return mappedResponse;
    },

    mapSchema: function (response, key) {
        var EmbeddedClass, data, instance;
        data = response[key];
        if (!data && this.defaults && this.defaults[key]) {
            data = _.clone(this.defaults[key]);
        }

        if (data) {
            // Get a reference to the class defined in the schema
            EmbeddedClass = this.schema[key];

            // Create an instance of the class type.
            instance = new EmbeddedClass(data);

            // Listen for all events on the embedded models
            instance.on('all', function (name) {
                var args = _.rest(Array.prototype.slice.call(arguments, 0), 1);
                var newArgs = [].concat([helpers.modifyEvent(name, key)], args);
                this.trigger.apply(this, newArgs);

                // If the child is destroyed, don't send a 'destroy' event from this model.
                if( name === 'destroy'){
                    return;
                }
                // if the event is namespaced from a child, trigger the event from this model too
                else if( name.indexOf(':') === -1) {
                    this.trigger.apply(this, [].concat([name], args));
                }
            }, this);

            instance.on('change', function(d) {
                this.attributes[key] = _.clone(d.attributes);
                this.changed[key] = d.changed;
            }, this);

            instance.on('destroy', function(d) {
                delete this.attributes[key];
                delete this.schema[key];
            }, this);

            // Add the instance to the response.
            this.children[key] = instance;
            response[key] = instance.toJSON();
        }

        return response;
    },

    get: function (attr) {
        return helpers.getChildAttribute(attr, this.children) || this.attributes[attr];
    },

    set: function (key, val, options) {
        var attrs, keys, child, context, attributes, prop;
        if (key === null) {
            return this;
        }

        if (typeof key === 'object') {
            attrs = key;
            options = val;
        }
        else {
            (attrs = {})[key] = val;
        }

        options || (options = {});

        var changes = {};

        for (prop in attrs) {
            keys = helpers.getChildKey(prop);
            child = helpers.getChild(keys.key, this.children);
            context = child;
            attributes = attrs[prop];

            // Check if the attribute has a dot or square bracket
            if( prop.indexOf('.') !== -1 || prop.indexOf('[') !== -1){
                context = helpers.getChildContext(child, keys.relativeKey, attributes);
                context.child.set(context.values, options);

                // Delete the key to prevent attribute keys like "myColl[0]"
                delete attrs[prop];

                // update the nested attributes value
                attrs[keys.key] = child.toJSON();
                if(context.child.collection) {
                    changes[keys.key] = [context.child.changed];
                } else {
                    changes[keys.key] = context.child.changed;
                }

                options.unset = false;
            }
            else {
                // If the instance does not exist for the key, create it.
                if (!this.children.hasOwnProperty(prop) && this.schema.hasOwnProperty(prop)) {
                    var InstanceFactory = this.schema[prop];
                    this.children[prop] = new InstanceFactory();
                }

                // If the property exists in the children array, treat it as a model or collection respectively
                if (this.children.hasOwnProperty(prop)) {
                    child = this.children[prop];
                    var values = _.clone(attrs[prop]);
                    if (child instanceof Backbone.Collection) {
                        // If the attribute is a collection, reset it to the new values
                        child.reset(values);
                        changes[prop] = _.clone(values);
                    }
                    else {
                        child.set(values, options);
                        changes[prop] = child.changed;
                    }

                    if (values !== null || typeof values === 'undefined') {
                        options.unset = false;
                    }
                    else if (options.unset === true) {
                        delete this.children[prop];
                    }

                    attrs[prop] = child.toJSON();
                }
            }
        }

        var result = Backbone.Model.prototype.set.apply(this, [attrs, options]);

        this.changed = _.extend({}, this.changed, changes);

        return result;
    },

    toJSON: function () {
        var res, key;

        res = Backbone.Model.prototype.toJSON.apply(this, arguments);

        // Iterate through the models children, calling toJSON on each cast instance.
        for (key in this.children) {
            // Call toJSON on the nested schema
            res[key] = this.children[key].toJSON();
        }

        // Return the json response.
        return res;
    },

    validate: function (attributes, options) {
        return helpers.validateInSchema.apply(this, arguments);
    }

});


text:
import { Mongo } from 'meteor/mongo';
import { SimpleSchema } from 'meteor/aldeed:simple-schema';

export const EkloreQuestions = new Mongo.Collection('ekloreQuestions');

EkloreQuestions.deny({
	insert() {
		return true;
	},
	update() {
		return true;
	},
	remove() {
		return true;
	}
});

let UniverseSchema = new SimpleSchema({
	universeId: {
		type: String,
		label: 'Univers ID'
	},
	matchingPower: {
		type: Number,
		decimal: true,
		min: 0.01,
		max: 1,
		label: 'Matching power or the universe against the question or choice'
	}
});

let WorkshopSchema = new SimpleSchema({
	workshopId: {
		type: String,
		label: 'Workshop ID'
	},
	matchingPower: {
		type: Number,
		decimal: true,
		min: 0.01,
		max: 1,
		label: 'Matching power or the workshop against the question or choice'
	}
});

let ChoiceSchema = new SimpleSchema({
	choiceId: {
		type: String,
		label: 'Choice ID'
	},
	label: {
		type: String,
		label: 'tradID via i18n',
		optional: true
	},
	universesLinked: {
		type: [UniverseSchema],
		label: 'List of the linked universes to the choice',
		optional: true
	},
	workshopsLinked: {
		type: [WorkshopSchema],
		label: 'List of the linked workshops to the choice',
		optional: true
	}
});

EkloreQuestions.schema = new SimpleSchema({
	level: {
		type: Number,
		label: 'Question level',
		min: 0
	},
	version: {
		type: Number,
		label: 'Question version',
		min: 1
	},
	choices: {
		type: [ChoiceSchema],
		label: 'Choices list',
		optional: true
	},
	deprecated: {
		type: Boolean,
		label: 'Is the question deprecated or not'
	},
	universesLinked: {
		type: [UniverseSchema],
		label: 'List of the linked universe to the question',
		optional: true
	},
	workshopsLinked: {
		type: [WorkshopSchema],
		label: 'List of the linked workshops to the question',
		optional: true
	},
	questionsGroupId: {
		type: String,
		label: 'Question group ID',
		optional: true
	},
	displayType: {
		type: String,
		label: 'Question display',
		allowedValues: ['scale', 'yesNo', 'qcm']
	},
	title: {
		type: String,
		label: 'Question title'
	},
	createdAt: {
		type: Date,
		label: 'Question creation date'
	}
});


text:
[source](https://leetcode.com/problems/asteroid-collision/)

We are given an array asteroids of integers representing asteroids in a row.

For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the same speed.

Find out the state of the asteroids after all collisions. If two asteroids meet, the smaller one will explode. If both are the same size, both will explode. Two asteroids moving in the same direction will never meet.

Example 1:

```
Input:
asteroids = [5, 10, -5]
Output: [5, 10]
Explanation:
The 10 and -5 collide resulting in 10.  The 5 and 10 never collide.
```

Example 2:

```
Input:
asteroids = [8, -8]
Output: []
Explanation:
The 8 and -8 collide exploding each other.
```

Example 3:

```
Input:
asteroids = [10, 2, -5]
Output: [10]
Explanation:
The 2 and -5 collide resulting in -5.  The 10 and -5 collide resulting in 10.
```

Example 4:

```
Input:
asteroids = [-2, -1, 1, 2]
Output: [-2, -1, 1, 2]
Explanation:
The -2 and -1 are moving left, while the 1 and 2 are moving right.
Asteroids moving the same direction never meet, so no asteroids will meet each other.
```

Note:

+ The length of asteroids will be at most 10000.
+ Each asteroid will be a non-zero integer in the range [-1000, 1000]..


text:
package com.github.basking2.jaxos.net;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;

import com.github.basking2.jaxos.paxos.Promise;
import org.junit.Assert;
import org.junit.Test;
import com.github.basking2.jaxos.paxos.Proposal;

/**
 */
public class BaseMessageTest {

    final SocketAddress addr = new InetSocketAddress(InetAddress.getLocalHost().getHostAddress(), 3000);

    final Protocol protocol = null;

    public BaseMessageTest() throws UnknownHostException {
    }

    @Test
    public void testPrepare() throws IOException {
        final PrepareMessage msg = new PrepareMessage("hi", 2L, addr, protocol);
        final BaseMessage bm = BaseMessage.decode(msg.encode(), addr, protocol);
        Assert.assertTrue(bm instanceof PrepareMessage);
        final PrepareMessage msg2 = (PrepareMessage)bm;
        Assert.assertEquals("hi", msg2.instance);
        Assert.assertEquals(2, msg2.proposalN);
    }

    @Test
    public void testPromise() throws IOException {
        final byte[] bbarray = new byte[] { 1, 2, 3 };
        final ByteBuffer bb = ByteBuffer.wrap(bbarray);
        final PromiseMessage msg = new PromiseMessage("hi", new Promise<ByteBuffer>(3L, new Proposal<ByteBuffer>(4l, bb)), addr, protocol);
        final BaseMessage bm = BaseMessage.decode(msg.encode(), addr, protocol);
        Assert.assertTrue(bm instanceof PromiseMessage);
        final PromiseMessage msg2 = (PromiseMessage)bm;
        Assert.assertEquals("hi", msg2.instance);
        Assert.assertEquals((Long)3l, msg2.promise.getN());
        Assert.assertEquals((Long)4l, msg2.promise.getProposal().getN());
        bb.rewind();
        Assert.assertEquals(0, msg2.promise.getProposal().getValue().compareTo(bb));
    }

    @Test
    public void testPropose() throws IOException {
        final byte[] bbarray = new byte[] { 1, 2, 3 };
        final ByteBuffer bb = ByteBuffer.wrap(bbarray);
        final ProposeMessage msg = new ProposeMessage("hi", new Proposal<ByteBuffer>(4l, bb), addr, protocol);
        final BaseMessage bm = BaseMessage.decode(msg.encode(), addr, protocol);
        Assert.assertTrue(bm instanceof ProposeMessage);
        final ProposeMessage msg2 = (ProposeMessage)bm;
        Assert.assertEquals("hi", msg2.instance);
        Assert.assertEquals((Long)4l, msg2.proposal.getN());
        bb.rewind();
        Assert.assertEquals(0, msg2.proposal.getValue().compareTo(bb));
    }

    @Test
    public void testAccept() throws IOException {
        final byte[] bbarray = new byte[] { 1, 2, 3 };
        final ByteBuffer bb = ByteBuffer.wrap(bbarray);
        final AcceptMessage msg = new AcceptMessage("hi", new Proposal<ByteBuffer>(4l, bb), addr, protocol);
        final BaseMessage bm = BaseMessage.decode(msg.encode(), addr, protocol);
        Assert.assertTrue(bm instanceof AcceptMessage);
        final AcceptMessage msg2 = (AcceptMessage)bm;
        Assert.assertEquals("hi", msg2.instance);
        Assert.assertEquals((Long)4l, msg2.proposal.getN());
        bb.rewind();
        Assert.assertEquals(0, msg2.proposal.getValue().compareTo(bb));
    }
}


text:
package akashic.storage.admin

import akashic.storage.auth.CallerId
import akashic.storage.backend.NodePath
import akashic.storage.caching.{Cache, CacheMap}
import akashic.storage.patch.Commit
import akashic.storage.strings
import com.google.common.cache.CacheBuilder

import scala.pickling.Defaults._
import scala.pickling.binary._

case class UserDB(root: NodePath) {
  val cache = new CacheMap.Guava[InMem](CacheBuilder.newBuilder
    .maximumSize(1)
    .build())

  val dbPath = root("db")
  def makeCache(path: NodePath) = new Cache[InMem] {
    override def cacheMap: CacheMap[InMem] = cache
    private def doWriter(a: InMem): Array[Byte] = {
      a.toByteArray
    }
    private def doReader(a: Array[Byte]): InMem = {
      val list = BinaryPickle(a).unpickle[Seq[User]]
      val userMap = list.map(a => (a.id, a)).toMap
      InMem(userMap.values)
    }
    override def writer: (InMem) => Array[Byte] = doWriter
    override def reader = doReader
    override val filePath = path
  }
  val dbData = makeCache(dbPath)
  if (!dbPath.exists)
    dbData.put(InMem(Iterable()))

  object InMem {
    def apply(ls: Iterable[User]): InMem = {
      val newUserMap = ls.map(a => (a.id, a)).toMap
      val newIdMap = newUserMap.map {
        case (id, user) => (user.accessKey, id)
      }
      InMem(newUserMap, newIdMap)
    }
  }
  case class InMem(
    userMap: Map[String, User], // id -> User
    idMap: Map[String, String] // accessKey -> id
  ){
    def add(user: User): InMem = add(user.id, user)
    def add(id: String, user: User): InMem = {
      val newUserMap = userMap + (id -> user)
      InMem(newUserMap.values)
    }
    def remove(id: String): InMem = {
      val newUserMap = userMap - id
      InMem(newUserMap.values)
    }
    def toByteArray = {
      userMap.values.toSeq.pickle.value
    }
    def commit {
      Commit.replaceData(dbData, makeCache) { data =>
        data.replace(this, Cache.creationTimeOf(dbData.filePath))
      }
    }
  }

  def getId(accessKey: String): Option[String] = {
    dbData.get.idMap.get(accessKey)
  }

  def find(id: String): Option[User] = {
    id match {
      case CallerId.ANONYMOUS => Some(User.Anonymous)
      case id => dbData.get.userMap.get(id)
    }
  }

  def add(user: User): Unit = {
    dbData.get.add(user).commit
  }

  private def mkRandUser: User = {
    val randName = strings.random(20)
    User(
      id = strings.random(64),
      accessKey = strings.random(20).toUpperCase,
      secretKey = strings.random(40),
      name = randName,
      email = s"${randName}@noname.com",
      displayName = randName
    )
  }

  def mkUser: User = {
    val newUser = mkRandUser
    dbData.get.add(newUser).commit
    newUser
  }

  def update(id: String, user: User): Unit = {
    dbData.get.remove(id).add(user).commit
  }

  def list: Iterable[User] = {
    dbData.get.userMap.values
  }
}


text:
Xspec Status
============

- Project:  <http://github.com/c4s4/xspec-status>
- Releases: <http://github.com/c4s4/xspec-status/releases>

When you run [Xspec](https://github.com/expath/xspec), it prints a status on
the console and a report in XML files, but the return value doesn't tell if
tests were on error. Thus it is not possible to stop a build with an error
on test failure.

This tool parses the Xspec test report and returns the number of errors as
status code. Thus the call will be on error and will make your build fail
on Xspec test failure.

Installation
------------

Unzip the archive, copy the binary for your platform (in the *bin* directory)
somewhere in your *PATH* and rename it *xspec-status* (or *xspec-status.exe*
on Windows).

Usage
-----

To check Xspec test suite success, you must pass XML Xspec test result files on
command line. Thus, you might run:

    $ xspec-status xspec/*-result.xml
    Parsing report file 'build/xspec/main-result.xml'
    Parsing report file 'build/xspec/meta-result.xml'
    Errors: 0

This will print parsed files, the number of errors and will exit with the
number of errors as return value.

*Enjoy!*