<!-- Address table for Algorithm -->
<!-- version: 1.1.1     sha: 15F9CE5 -->

<node fwinfo="endpoint;width=14">
  <node id="algo_registers" address="0x0" description="Registers for e FEX algorithm" fwinfo="endpoint;width=6">
    <!-- Control registers -->
    <node id="eg_control"                        address="0x00">
      <node id="enable_fake_tob"   description="Enable fake TOB output" mask="0x1"/>
      <node id="enable_output_spy" description="Enable writing output data on output spy memory" mask="0x2"/>
      <node id="enable_bcidonput_spy"    description="Enable writing BC number instead of first output TOB" mask="0x4"/>

    </node>
    <node id="tau_control"                       address="0x01">
      <node id="enable_fake_tob"   description="Enable fake TOB output" mask="0x1"/>
      <node id="enable_output_spy" description="Enable writing output data on output spy memory" mask="0x2"/>
      <node id="enable_bcidonput_spy"    description="Enable writing BC number instead of first output TOB" mask="0x4"/>
    </node>
    <node id="global_control"                    address="0x02">
      <node id="enable_fake_input" description="Enable fake algo input" mask="0x1"/>
      <node id="enable_input_spy"  description="Enable writing input data on input spy memory" mask="0x2"/>
    </node>
    <node id="global_position"                   address="0x03">
      <node id="on_eta_edge" description="High if the e FEX FPGA is on eta edge" mask="0x1"/>
      <node id="on_left_eta_edge" description="High if the e FEX FPGA is on eta edge" mask="0x2"/>
      <node id="eta_orientation_left_col" description="Eta orientation on the left (low eta) column. High for left to right, low for right to left" mask="0x4"/>
      <node id="eta_orientaton_centre_cols" description="Eta orientation on the 4 central eta columns. High for left to right, low for right to left" mask="0x8"/>
      <node id="eta_orientation_right_col" description="Eta orientation on the right (high eta) column. High for left to right, low for right to left" mask="0x10"/>
      <node id="hadronic_position" description="Module position for hadronic fibre connection. 0 Central (all fibres coming from Tile), 1 Negative-eta near (Mixed LAr and Tile fibres), 2 Positive-eta near (LAr+Tiles), 3 Negative-eta far (LAr+Tiles), 4 Positive-eta far (Lar+Tiles)" mask="0xe0"/>            
    </node>
    <node id="noise_thresholds" description="10-bit noise threshold in LAr or Tile format. Bits from 11 to 31 are ignored. If the value is less than the threshold, zeroes will be propagated instead." address="0x08">
      <node id="layer_0" description="10-bit noise threshold in LAr multi-linear format." address="0x0"/>
      <node id="layer_1" description="10-bit noise threshold in LAr multi-linear format."  address="0x1"/>
      <node id="layer_2" description="10-bit noise threshold in LAr multi-linear format."  address="0x2"/>
      <node id="layer_3"  description="10-bit noise threshold in LAr multi-linear format." address="0x3"/>
      <node id="hadronic"  description="Hadronic noise thresholds, the one/ones used depends on the hadronic_position field in the global_position register." address="0x4">
	<node id="lar" mask="0x000003FF" description="10-bit noise threshold in LAr multi-linear format."/>
	<node id="tile" mask="0x03FF0000" description="10-bit noise threshold in Tile linear format."/>
      </node>
    </node>
    
    <node id="debug_control_registers" address="0x10">
      <node id="debug_0" address="0x0"/>
      <node id="debug_1" address="0x1"/>
      <node id="debug_2" address="0x2"/>
      <node id="debug_3" address="0x3"/>
      <node id="debug_4" address="0x4"/>
      <node id="debug_5" address="0x5"/>
      <node id="debug_6" address="0x6"/>
    </node>

    <!-- Status registers -->
    <node id="efex_real_position" address="0x20"/>
    <node id="debug_tob_counter" address="0x21"/>
    <node id="debug_sync_count" address="0x22"/>
    <node id="debug" address="0x23"/>
  </node>

  <node id="algo_parameter_ram"  address="0x100" size="0x28"   mode="block" description="RAM for e FEX algorithm parameters"    fwinfo="endpoint;width=6"/>
  <node id="algo_input_ram"      address="0x1000" description="spy RAM for e FEX algorithm input"     fwinfo="endpoint;width=12">
    <node id="input_ram_00" address="0x00000" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_01" address="0x00040" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_02" address="0x00080" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_03" address="0x000c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_04" address="0x00100" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_05" address="0x00140" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_06" address="0x00180" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_07" address="0x001c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_08" address="0x00200" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_09" address="0x00240" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_10" address="0x00280" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_11" address="0x002c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_12" address="0x00300" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_13" address="0x00340" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_14" address="0x00380" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_15" address="0x003c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_16" address="0x00400" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_17" address="0x00440" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_18" address="0x00480" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_19" address="0x004c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_20" address="0x00500" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_21" address="0x00540" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_22" address="0x00580" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_23" address="0x005c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_24" address="0x00600" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_25" address="0x00640" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_26" address="0x00680" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_27" address="0x006c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_28" address="0x00700" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_29" address="0x00740" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_30" address="0x00780" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_31" address="0x007c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_32" address="0x00800" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_33" address="0x00840" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_34" address="0x00880" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_35" address="0x008c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_36" address="0x00900" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_37" address="0x00940" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_38" address="0x00980" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_39" address="0x009c0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_40" address="0x00a00" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_41" address="0x00a40" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_42" address="0x00a80" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_43" address="0x00ac0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_44" address="0x00b00" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_45" address="0x00b40" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_46" address="0x00b80" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_47" address="0x00bc0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_48" address="0x00c00" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_49" address="0x00c40" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_50" address="0x00c80" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_51" address="0x00cc0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_52" address="0x00d00" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_53" address="0x00d40" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_54" address="0x00d80" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_55" address="0x00dc0" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_56" address="0x00e00" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_57" address="0x00e40" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_58" address="0x00e80" mode="block" size="0x40" description="Trigger Tower" />
    <node id="input_ram_59" address="0x00ec0" mode="block" size="0x40" description="Trigger Tower" />
  </node>
  <node id="algo_output_eg_ram"  address="0x2000" size="0x400"  mode="block" description="spy RAM for e FEX algorithm eg output" fwinfo="endpoint;width=10"/>
 <node id="algo_output_tau_ram" address="0x2400" size="0x400" mode="block" description="spy RAM for e FEX algorithm tau output" fwinfo="endpoint;width=10"/>

  <node id="algo_rate_monitor"  address="0x3000"  description="Algo output rate counters"  fwinfo="endpoint;width=8">

    <node id="counter_control"                    address="0x00">
      <node id="start" description="Start the counter, reset and stop must be 0" mask="0x1"/>
      <node id="stop" description="Stop the counter, reset must be 0" mask="0x2"/>
      <node id="reset" description="Reset the counters" mask="0x4"/>
    </node>

    <node id="energy_threshold" address="0x01">
      <node id="energy_eg" description="Only TOB with an energy exceeding this threshold will be counted. 16 bit, LSB=25MeV" mask="0x0000ffff"/>
      <node id="energy_tau" description="Only TOB with an energy exceeding this threshold will be counted. 16 bit, LSB=25MeV" mask="0xffff0000"/>      
    </node>
    <node id="eg_counters" address="0x80">
      <node id="counter00" address="0x00" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter01" address="0x01" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter02" address="0x02" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter03" address="0x03" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter04" address="0x04" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter05" address="0x05" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter10" address="0x06" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter11" address="0x07" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter12" address="0x08" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter13" address="0x09" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter14" address="0x0a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter15" address="0x0b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter20" address="0x0c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter21" address="0x0d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter22" address="0x0e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter23" address="0x0f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter24" address="0x10" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter25" address="0x11" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter30" address="0x12" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter31" address="0x13" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter32" address="0x14" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter33" address="0x15" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter34" address="0x16" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter35" address="0x17" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>    
      <node id="counter40" address="0x18" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter41" address="0x19" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter42" address="0x1a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter43" address="0x1b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter44" address="0x1c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter45" address="0x1d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter50" address="0x1e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter51" address="0x1f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter52" address="0x20" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter53" address="0x21" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter54" address="0x22" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter55" address="0x23" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter60" address="0x24" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter61" address="0x25" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter62" address="0x26" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter63" address="0x27" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter64" address="0x28" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter65" address="0x29" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter70" address="0x2a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter71" address="0x2b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter72" address="0x2c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter73" address="0x2d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter74" address="0x2e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter75" address="0x2f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
    </node>
    <node id="tau_counters" address="0xb0">
      <node id="counter00" address="0x00" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter01" address="0x01" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter02" address="0x02" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter03" address="0x03" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter04" address="0x04" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter05" address="0x05" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter10" address="0x06" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter11" address="0x07" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter12" address="0x08" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter13" address="0x09" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter14" address="0x0a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter15" address="0x0b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter20" address="0x0c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter21" address="0x0d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter22" address="0x0e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter23" address="0x0f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter24" address="0x10" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter25" address="0x11" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter30" address="0x12" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter31" address="0x13" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter32" address="0x14" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter33" address="0x15" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter34" address="0x16" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter35" address="0x17" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>    
      <node id="counter40" address="0x18" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter41" address="0x19" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter42" address="0x1a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter43" address="0x1b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter44" address="0x1c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter45" address="0x1d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter50" address="0x1e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter51" address="0x1f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter52" address="0x20" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter53" address="0x21" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter54" address="0x22" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter55" address="0x23" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter60" address="0x24" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter61" address="0x25" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter62" address="0x26" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter63" address="0x27" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter64" address="0x28" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter65" address="0x29" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter70" address="0x2a" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter71" address="0x2b" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter72" address="0x2c" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter73" address="0x2d" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter74" address="0x2e" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
      <node id="counter75" address="0x2f" description="The first number is phi (from 0 to 7) the second is eta (from 0 to 5)"/>
    </node>
    
    <node id="counter_ref" address="0xe0" permission="r" description="Counts BCs, should be used as normalisation for the other counters."/>

    <node id="counter_status" address="0xe1" permission="r">
      <node id="cnt_state"       description="00 : idle (needs a reset), 01 : ready (needs a start), 11 : run (needs a stop)" mask="0x3"/>
      <node id="enable"  description="Counting" mask="0x4"/>
      <node id="reset"   description="Reset"    mask="0x8"/>      
    </node>

  </node>
</node>
