<!-- Top level of Readout structure  -->
<!-- version: 1.5.0     sha: B17D984 -->

<node id="efex_Readout" fwinfo="endpoint">
  
  <!-- Test Control Register inside readout block -->
  <node id="test_control_reg"   address="0x0" permission="rw" fwinfo="endpoint;width=0" description="Control Register for Testing" >
    <node id="read_raw_all"      mask="0x00000001"  description="Read all the RAW data channels" />
  </node>
  
  <!-- Pulse Register inside readout block -->
  <node id="rdout_pulse_reg"    address="0x1" permission="rw" fwinfo="endpoint;width=0" description="Pulse register inside the readout block" >
    <node id="l1a_id_rst_pulse"       mask="0x00000002" description="L1A ID reset Pulse by software command" />
    <node id="raw_fifo_rst_pulse"     mask="0x00000004" description="RAW Readout FIFO reset Pulse by software command" />
    <node id="tob_fifo_rst_pulse"     mask="0x00000008" description="TOB Readout FIFO reset Pulse by software command" />
    <node id="rst_spy_mem_wr_addr_pulse"  mask="0x00000020" description="SPY mem write address counter reset Pulse by software command" />
    <node id="busy_counter_rst_pulse"     mask="0x00000040" description="BUSY counter reset for RAW and TOB data" />
    <node id="rst_ECR_dbg_cntr"     mask="0x00000080" description="Reset ECR Debug Counter" />
    <node id="rst_L1A_dbg_cntr"     mask="0x00000100" description="Reset L1A Debug Counter" />
    <node id="busy_counter_latch"   mask="0x00000200" description="Latch BUSY Counters" />
  </node>
 
  <node id="top_level_counters" address="0x10" description="Top Level Counters"  fwinfo="endpoint;width=3">
   <node id="busy_raw_counter"	address="0x0" permission="r" description="Number of RAW Readout BUSY assertions"/>
   <node id="busy_tob_counter"	address="0x1" permission="r" description="Number of TOB Readout BUSY assertions"/>
   <node id="busy_raw_duration_counter"	address="0x2" permission="r" description="Number of 40M clocks RAW Readout BUSY is asserted"/>
   <node id="busy_tob_duration_counter"	address="0x3" permission="r" description="Number of 40M clocks TOB Readout BUSY is asserted"/>
   <node id="ecr_debug_counter"		address="0x4" permission="r" description="Number of ECR assertions"/>
   <node id="l1a_debug_counter"		address="0x5" permission="r" description="Number of L1A assertions"/>
   <node id="real_time_40m_counter" address="0x6" permission="r" description="Number of 40M clocks"/>
   <node id="tob_double_word_counter" address="0x7" permission="r" description="Number of identical TOB double words"/>
  </node>

  <node id="tob" module="file://efex_tob_readout.xml" address="0x2000"/> 
  
  <node id="raw" module="file://efex_raw_readout.xml" address="0x4000"/> 
  
</node>
