<!-- ROD TOB processor address table -->
<!-- Defines ROD_tob_processor register block container -->
<node fwinfo="endpoint;width=10">

  <!-- <node id="TobProc" address="0x0" description="TOB processor Registers"> -->
    
	<node id="event_fifo_control" 		permission="rw"   address="0x0" description="event fifo control bits" fwinfo="endpoint;width=0">
		<node id="Busy_enable" 				mask="0x1" 			description="Enable action on busy threshold exceeded" />
		<node id="Xoff_enable"				mask="0x2" 			description="Enable action on xoff threshold exceeded" />
		</node>
		
	<node id="Event_fifo_reset" 		permission="w"   address="0x1" description="TOB fifo reset bits(pulse reg)" fwinfo="endpoint;width=0">
		<node id="Event_fifo_reset" 		mask="0x1" 			description="Reset and purge the event fifo" />
		<node id="Event_watermark_reset"	mask="0x2" 			description="Reset the event fifo watermark" />
		<node id="Debug_fifo_reset" 		mask="0x10" 		description="Reset and purge the debug fifo" />
		<node id="Debug_watermark_reset"	mask="0x20" 		description="Reset the debug fifo watermark" />
<!--	<node id="Stage_fifo_reset"         mask="0x40" 		description="Reset the stage fifo" />
		<node id="Stage_watermark_reset"    mask="0x80" 		description="Reset the stage fifo watermark" /> -->
		<node id="fm_watermark_reset"       mask="0x100" 		description="Reset the full mode fifo watermark" />
		<node id="fm_status_reset"          mask="0x200" 		description="Reset the full mode status reg" />
		</node>	
		
	<node id="Event_fifo_fill_level"  	permission="r"  address="0x2" description="Event fifo fill level" fwinfo="endpoint;width=0">
		<node id="Event_fifo_level" 		mask="0x0000FFFF" 	description="TOB fifo current level" />
		<node id="Event_fifo_watermark" 	mask="0xFFFF0000" 	description="TOB fifo watermark" />
	</node>	
	
	<node id="Debug_fifo_fill_level"  	permission="r"  address="0x3" description="Debug fifo fill level" fwinfo="endpoint;width=0">
		<node id="Debug_fifo_level" 		mask="0x0000FFFF" 	description="Debug fifo current level" />
		<node id="Debug_fifo_watermark" 	mask="0xFFFF0000" 	description="Debug fifo watermark" />
	</node>	
	
	<node id="Tob_proc_status"  		permission="r"  address="0x4" description="Tob Processor Status" fwinfo="endpoint;width=0">
		<node id="Current_chan" 		    mask="0x000000FF" 	description="Channel being processed" />
		<node id="Current_state"	        mask="0x0000FF00" 	description="Processor microcode state" />
		<node id="Header_mark" 		        mask="0x00010000" 	description="Header mark coming from input mux" />
		<node id="Header_fifo_valid"	    mask="0x00020000" 	description="An Event Header is in the Header FIFO" />
		<node id="Header_crc_error"	        mask="0x00040000" 	description="Header crc error mark from input mux" />
		<node id="TTC_crc_error"	        mask="0x00080000" 	description="TTC crc error mark out of fifo" />
	</node>	
		
		
	<node id="Full_mode_control"  		permission="rw"  address="0x5" description="controls for associated full mode output" fwinfo="endpoint;width=0">
		<node id="Soft_reset" 				mask="0x1" 			description="soft reset the interface - must be set back to zero" />
		<node id="Enable_playout" 			mask="0x2" 			description="turn on playout memory" />
		<node id="Set_busy" 			    mask="0x4" 			description="set busy output" />	
		<node id="LEMO" 	  		    	mask="0x8" 			description="set LEMO output" />	
		<node id="flx_bp_enable" 	  		mask="0x10" 		description="enable felix backpressure" />	
		<node id="flx_bp_select" 	  		mask="0xf00" 		description="select felix backpressure signal for this output" />
		<node id="error_reset" 	  		    mask="0x1000" 		description="clear_error_stat - must be set to 1 then 0" />
	</node>	
	
	<node id="Full_mode_status"  		permission="r"  address="0x6" description="status of associated full mode output" fwinfo="endpoint;width=0">	
		<node id="QPLL_lock" 	   			mask="0x1" 			description="QPLL is locked" />
		<node id="MGT_reset_done" 		    mask="0x2" 			description="Reset is done" />	
		<node id="Fifo_full" 				mask="0x4" 			description="sticky bit that needs a reset" />
		<node id="duplicate_word_error" 	mask="0x8" 			description="duplicate first word detected" />
		<node id="Fifo_fill_level" 			mask="0xFF0000" 	description="FM tx fifo fill level" />
		<node id="packet_meter" 	        mask="0xFF000000" 	description="rolling packet counter" />
	</node>	
	
	<node id="Full_mode_L1ID"  			permission="r"  address="0x7" description="last L1ID sent from the Full Mode interface" fwinfo="endpoint;width=0"/>	
		
	
	
	<node id="TOB_Staging_fifo_level"  	permission="r"  address="0x8" description="Staging fifo fill level in 64-bit words - size = 4Kx64 bits" fwinfo="endpoint;width=0">
		<node id="Stage_fifo_level" 		mask="0x0000FFFF" 	description="Staging fifo current level in 64-bit words" />
		<node id="Stage_fifo_watermark" 	mask="0xFFFF0000" 	description="Staging fifo watermark in 64-bit words" />
	</node>	
	
	<node id="Full_mode_fifo_level"  	permission="r"  address="0x9" description="Small FIFO in FM interface 1Kx32 bits" fwinfo="endpoint;width=0">
		<node id="FM_fifo_level" 			mask="0x0000FFFF" 	description="Full Mode Tx fifo current level in 32-bit words" />
		<node id="FM_fifo_watermark" 		mask="0xFFFF0000" 	description="Full Mode Tx fifo watermark in 32-bit words" />
	</node>	
	
	
	<!--   <TOB Staging FIFO Status and Control>  -->
	<node id="Tob_staging_fifo_thresholds" permission="rw"   address="0xA" description="TOB output staging fifo busy thresholds" fwinfo="endpoint;width=0">
		<node id="Busy_threshold" 			mask="0x0000FFFF" 	description="FIFO fill level at which Busy is activated" />
		<node id="Xoff_threshold"			mask="0xFFFF0000" 	description="FIFO fill level at which XOFF is activated" />
		</node>
		
	<node id="Tob_staging_fifo_control" permission="rw"   address="0xB" description="TOB fifo control bits" fwinfo="endpoint;width=0">
		<node id="Busy_enable" 				mask="0x1" 			description="Enable action on busy threshold exceeded" />
		<node id="Xoff_enable"				mask="0x2" 			description="Enable action on xoff threshold exceeded" />
		<node id="Force_busy"				mask="0x10" 		description="Force activation of Busy to Felix" />
		</node>	
		
	<node id="Tob_staging_fifo_resets" permission="rw"   address="0xC" description="TOB staging fifo reset bits(pulse reg)" fwinfo="endpoint;width=0">
		<node id="stage_fifo_reset" 		mask="0x1" 			description="Reset and purge the tob staging fifo" />
		<node id="stage_watermark_reset"    mask="0x2" 		    description="Reset the stage fifo watermark" />
		<node id="stage_busy_thresh_reset"	mask="0x4" 			description="Reset the tob busy threshold exceeded count" />
		<node id="stage_xoff_thresh_reset"	mask="0x8" 			description="Reset the tob xoff threshold exceeded count" />
		<node id="Flx_bp_time_reset" 	  	mask="0x10"         description="Reset felix backpressure time counter" />
		
		</node>	
		
	<node id="Tob_staging_fifo_status" permission="r"   address="0xD" description="TOB Staging fifo status bits" fwinfo="endpoint;width=0">
		<node id="stage_fifo_full" 			mask="0x1" 			description="TOB Staging fifo is currently overrun" />
		<node id="stage_fifo_busy"			mask="0x2" 			description="TOB Staging fifo level is currently above the busy threshold" />
		<node id="stage_fifo_xoff"			mask="0x4" 			description="TOB Staging fifo level is currently above the xoff threshold" />
	</node>	
				
	
	<node id="Tob_staging_fifo_busy_Count"  	permission="r"  address="0xE" description="TOB Staging FIFO Busy Threshold Exceeded Counter" fwinfo="endpoint;width=0"/>
    <node id="Tob_staging_fifo_xoff_Count"  	permission="r"  address="0xF" description="TOB Staging FIFO Busy Threshold Exceeded Counter" fwinfo="endpoint;width=0"/>

	<node id="Tob_timeout_values" permission="rw"   address="0x10" description="The number of 200MHz clock cycles the processor will wait for TOBs to arrive" fwinfo="endpoint;width=0">
		<node id="timeout_1"        		mask="0x0000FFFF" 	description="Timeout waiting for first channel" />
		<node id="timeout_n"	    		mask="0xFFFF0000" 	description="Timeout waiting for subsequent channels" />
	</node>	
	
	<!--   <address "0x11" is also used by the register above>  -->
	
	<node id="Tob_error_count" permission="r"   address="0x12" 	description="TOB error counter values - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">
		<node id="crc9_count"       		mask="0x000000FF" 	description="CRC9 header errors" />
		<node id="crc20_count"	    		mask="0x0000FF00" 	description="CRC20 payload errors" />
		<node id="l1id_err_count"			mask="0x00FF0000" 	description="incoming packet does not match l1id" />
		<node id="BCN_err_count"			mask="0xFF000000" 	description="BCN mismatch errors" />
	</node>	
	
	<node id="Tob_error_reset" permission="w"   address="0x13" 	description="Reset Error Bits" fwinfo="endpoint;width=0">
		<node id="clr_crc9_count"         	mask="0x00000001" 	description="Clear the CRC9 counter" />
		<node id="clr_crc20_count"	      	mask="0x00000002" 	description="Clear the CRC20 counter" />
		<node id="clr_L1ID_err_count"	  	mask="0x00000004" 	description="Clear the L1ID mismatch counter" />
		<node id="clr_BCN_err_count"	  	mask="0x00000008" 	description="Clear the BCN mismatch counter" />
		<node id="clr_w_dog_count"	      	mask="0x00000010" 	description="Clear the Watchdog incident counter" />
		<node id="clr_timeout_errors"	    mask="0x00000020" 	description="Clear the Timeout Error map register" />
		<node id="clr_event_timer"	    	mask="0x00000040" 	description="Clear the event timer including max and avg" />
		<node id="clr_debug_pkt_count"	    mask="0x00000080" 	description="Clear the debug packet counter" />
		<node id="clr_pkt_wait_timer"	    mask="0x00000100" 	description="Clear the packet wait time registers" />
		<node id="clr_timeout_regs"	        mask="0x00000200" 	description="Clear the TobProc timeout registers" />
	</node>	
	
	
	<node id="Watchdog_control" permission="rw"   address="0x14" description="Watchdog timer control" fwinfo="endpoint;width=0">
		<node id="disable"        			mask="0x00000001" 	description="Disable watchdog timer" />
		<node id="enable_wd_fifo_reset"     mask="0x00000002" 	description="Clear input pipe and fifos on WD reset" />
		<node id="enable_l1id_resync"       mask="0x00000010" 	description="Allow tob processor to attempt l1id resync" />
		<node id="tob_timeout_1_disable"    mask="0x00000100" 	description="Disable the tob processor timeout for the first channel" />
		<node id="tob_timeout_n_disable"    mask="0x00000200" 	description="Disable the tob processor timeout for all other channels" />
	</node>	
	
	<node id="Watchdog_threshold_value" permission="rw"   address="0x15" description="Watchdog overflow threshold" fwinfo="endpoint;width=0">
		<node id="threshold"     			mask="0x0000FFFF" 	description="Number of 100MHz processor clocks allocated to one complete event before timeout" />
	</node>	
	
	<node id="Watchdog_Overflow_Count"  permission="r"  address="0x16" description="Number of Watchdog Resets" fwinfo="endpoint;width=0"/>
	
	<node id="crc9_error_map"  permission="r"  address="0x17" description="channel map of crc9 errors - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">	
		<node id="ch00"     				mask="0x00000001" description="channel 00" />
		<node id="ch01"     				mask="0x00000002" description="channel 01" />
		<node id="ch02"     				mask="0x00000004" description="channel 02" />
		<node id="ch03"     				mask="0x00000008" description="channel 03" />
		<node id="ch04"     				mask="0x00000010" description="channel 04" />
		<node id="ch05"     				mask="0x00000020" description="channel 05" />
		<node id="ch06"     				mask="0x00000040" description="channel 06" />
		<node id="ch07"     				mask="0x00000080" description="channel 07" />
		<node id="ch08"     				mask="0x00000100" description="channel 08" />
		<node id="ch09"     				mask="0x00000200" description="channel 09" />
		<node id="ch10"     				mask="0x00000400" description="channel 10" />
		<node id="ch11"     				mask="0x00000800" description="channel 11" />
		<node id="ch12"     				mask="0x00001000" description="channel 12" />
		<node id="ch13"     				mask="0x00002000" description="channel 13" />
		<node id="ch14"     				mask="0x00004000" description="channel 14" />
		<node id="ch15"     				mask="0x00008000" description="channel 15" />
		<node id="ch16"     				mask="0x00010000" description="channel 16" />
		<node id="ch17"     				mask="0x00020000" description="channel 17" />
		<node id="ch18"     				mask="0x00040000" description="channel 18" />
		<node id="ch19"     				mask="0x00080000" description="channel 19" />
		<node id="ch20"     				mask="0x00100000" description="channel 20" />
		<node id="ch21"     				mask="0x00200000" description="channel 21" />
		<node id="ch22"     				mask="0x00400000" description="channel 22" />
		<node id="ch23"     				mask="0x00800000" description="channel 23" />
	</node>	
	
	
	<node id="crc20_error_map"  permission="r"  address="0x18" description="channel map of crc20 errors - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">
		<node id="ch00"     mask="0x00000001" description="channel 00" />
		<node id="ch01"     mask="0x00000002" description="channel 01" />
		<node id="ch02"     mask="0x00000004" description="channel 02" />
		<node id="ch03"     mask="0x00000008" description="channel 03" />
		<node id="ch04"     mask="0x00000010" description="channel 04" />
		<node id="ch05"     mask="0x00000020" description="channel 05" />
		<node id="ch06"     mask="0x00000040" description="channel 06" />
		<node id="ch07"     mask="0x00000080" description="channel 07" />
		<node id="ch08"     mask="0x00000100" description="channel 08" />
		<node id="ch09"     mask="0x00000200" description="channel 09" />
		<node id="ch10"     mask="0x00000400" description="channel 10" />
		<node id="ch11"     mask="0x00000800" description="channel 11" />
		<node id="ch12"     mask="0x00001000" description="channel 12" />
		<node id="ch13"     mask="0x00002000" description="channel 13" />
		<node id="ch14"     mask="0x00004000" description="channel 14" />
		<node id="ch15"     mask="0x00008000" description="channel 15" />
		<node id="ch16"     mask="0x00010000" description="channel 16" />
		<node id="ch17"     mask="0x00020000" description="channel 17" />
		<node id="ch18"     mask="0x00040000" description="channel 18" />
		<node id="ch19"     mask="0x00080000" description="channel 19" />
		<node id="ch20"     mask="0x00100000" description="channel 20" />
		<node id="ch21"     mask="0x00200000" description="channel 21" />
		<node id="ch22"     mask="0x00400000" description="channel 22" />
		<node id="ch23"     mask="0x00800000" description="channel 23" />
	</node>		
	
	<node id="BCN_mismatch_map"  permission="r"  address="0x19" description="channel map of bcn_mismatches - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">
		<node id="ch00"     mask="0x00000001" description="channel 00" />
		<node id="ch01"     mask="0x00000002" description="channel 01" />
		<node id="ch02"     mask="0x00000004" description="channel 02" />
		<node id="ch03"     mask="0x00000008" description="channel 03" />
		<node id="ch04"     mask="0x00000010" description="channel 04" />
		<node id="ch05"     mask="0x00000020" description="channel 05" />
		<node id="ch06"     mask="0x00000040" description="channel 06" />
		<node id="ch07"     mask="0x00000080" description="channel 07" />
		<node id="ch08"     mask="0x00000100" description="channel 08" />
		<node id="ch09"     mask="0x00000200" description="channel 09" />
		<node id="ch10"     mask="0x00000400" description="channel 10" />
		<node id="ch11"     mask="0x00000800" description="channel 11" />
		<node id="ch12"     mask="0x00001000" description="channel 12" />
		<node id="ch13"     mask="0x00002000" description="channel 13" />
		<node id="ch14"     mask="0x00004000" description="channel 14" />
		<node id="ch15"     mask="0x00008000" description="channel 15" />
		<node id="ch16"     mask="0x00010000" description="channel 16" />
		<node id="ch17"     mask="0x00020000" description="channel 17" />
		<node id="ch18"     mask="0x00040000" description="channel 18" />
		<node id="ch19"     mask="0x00080000" description="channel 19" />
		<node id="ch20"     mask="0x00100000" description="channel 20" />
		<node id="ch21"     mask="0x00200000" description="channel 21" />
		<node id="ch22"     mask="0x00400000" description="channel 22" />
		<node id="ch23"     mask="0x00800000" description="channel 23" />
	</node>	
	
	<node id="L1ID_mismatch_map"  permission="r"  address="0x1A" description="channel map of L1ID_mismatches - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">
		<node id="ch00"     mask="0x00000001" description="channel 00" />
		<node id="ch01"     mask="0x00000002" description="channel 01" />
		<node id="ch02"     mask="0x00000004" description="channel 02" />
		<node id="ch03"     mask="0x00000008" description="channel 03" />
		<node id="ch04"     mask="0x00000010" description="channel 04" />
		<node id="ch05"     mask="0x00000020" description="channel 05" />
		<node id="ch06"     mask="0x00000040" description="channel 06" />
		<node id="ch07"     mask="0x00000080" description="channel 07" />
		<node id="ch08"     mask="0x00000100" description="channel 08" />
		<node id="ch09"     mask="0x00000200" description="channel 09" />
		<node id="ch10"     mask="0x00000400" description="channel 10" />
		<node id="ch11"     mask="0x00000800" description="channel 11" />
		<node id="ch12"     mask="0x00001000" description="channel 12" />
		<node id="ch13"     mask="0x00002000" description="channel 13" />
		<node id="ch14"     mask="0x00004000" description="channel 14" />
		<node id="ch15"     mask="0x00008000" description="channel 15" />
		<node id="ch16"     mask="0x00010000" description="channel 16" />
		<node id="ch17"     mask="0x00020000" description="channel 17" />
		<node id="ch18"     mask="0x00040000" description="channel 18" />
		<node id="ch19"     mask="0x00080000" description="channel 19" />
		<node id="ch20"     mask="0x00100000" description="channel 20" />
		<node id="ch21"     mask="0x00200000" description="channel 21" />
		<node id="ch22"     mask="0x00400000" description="channel 22" />
		<node id="ch23"     mask="0x00800000" description="channel 23" />
	</node>		
	
	
	<node id="Timeout_Error_map"  permission="r"  address="0x1B" description="channel map of timeout errors - cleared by tob_error_reset bits or system reset" fwinfo="endpoint;width=0">
		<node id="ch00"     mask="0x00000001" description="channel 00" />
		<node id="ch01"     mask="0x00000002" description="channel 01" />
		<node id="ch02"     mask="0x00000004" description="channel 02" />
		<node id="ch03"     mask="0x00000008" description="channel 03" />
		<node id="ch04"     mask="0x00000010" description="channel 04" />
		<node id="ch05"     mask="0x00000020" description="channel 05" />
		<node id="ch06"     mask="0x00000040" description="channel 06" />
		<node id="ch07"     mask="0x00000080" description="channel 07" />
		<node id="ch08"     mask="0x00000100" description="channel 08" />
		<node id="ch09"     mask="0x00000200" description="channel 09" />
		<node id="ch10"     mask="0x00000400" description="channel 10" />
		<node id="ch11"     mask="0x00000800" description="channel 11" />
		<node id="ch12"     mask="0x00001000" description="channel 12" />
		<node id="ch13"     mask="0x00002000" description="channel 13" />
		<node id="ch14"     mask="0x00004000" description="channel 14" />
		<node id="ch15"     mask="0x00008000" description="channel 15" />
		<node id="ch16"     mask="0x00010000" description="channel 16" />
		<node id="ch17"     mask="0x00020000" description="channel 17" />
		<node id="ch18"     mask="0x00040000" description="channel 18" />
		<node id="ch19"     mask="0x00080000" description="channel 19" />
		<node id="ch20"     mask="0x00100000" description="channel 20" />
		<node id="ch21"     mask="0x00200000" description="channel 21" />
		<node id="ch22"     mask="0x00400000" description="channel 22" />
		<node id="ch23"     mask="0x00800000" description="channel 23" />
	</node>		
	
	
	<node id="Average_Event_Time"  permission="r"  address="0x1C" description="Average number of processor clocks used to process events - target less than d400" fwinfo="endpoint;width=0"/>
	
	<node id="Event_Time" permission="r"   address="0x1D" description="number of 200MHz processor clocks used to process events - target less than d400" fwinfo="endpoint;width=0">
		<node id="Last_Event_Time"     		mask="0x0000FFFF" 	description="Time to process that last event" />
		<node id="Largest_Event_time"     	mask="0xFFFF0000" 	description="Largest time to process an event" />
	</node>	
	
	<node id="Debug_Packet_Count"  permission="r"  address="0x1E" description="Number of Debug Packets generated" fwinfo="endpoint;width=0"/>

	<node id="Felix_backpressure_time"        	permission="r"  address="0x1F" description="Felix Back Pressure Active Time Counter" fwinfo="endpoint;width=0"/>
	
	<node id="packet_wait_time_last"        	permission="r"  address="0x20" description="last event waiting time following L1A" fwinfo="endpoint;width=0"/>
	<node id="packet_wait_time_max"        	    permission="r"  address="0x21" description="maximum event waiting time following L1A" fwinfo="endpoint;width=0"/>
	<node id="packet_max_wait_time_L1id"        permission="r"  address="0x22" description="L1id for event with max waiting time" fwinfo="endpoint;width=0"/>
	
	<node id="max_timeout"                      permission="r"  address="0x23" description="max tob_proc timeout counter value" fwinfo="endpoint;width=0">
		<node id="max_timeout_count"     		mask="0x0000FFFF" 	description="maximum occurring timeout counter value @100MHz" />
		<node id="recorded_channel"     	    mask="0x00FF0000" 	description="channel where that value occurred" />
	</node>

	
	<node id="pkt_capture_regs" address="0x30" description="processor output header and trailer capture" module="file://L1CaloHubRodPktCaptureRegisters.xml"/>
	
	<node id="input_capture_regs" address="0x40" description="input channel header and trailer capture" module="file://L1CaloHubRodInputCaptureRegisters.xml"/>
	
	<node id="l1id_capture_regs" address="0x80" description="input channel header and trailer capture" module="file://L1CaloHubRodL1idCaptureRegisters.xml"/>
	
    <node id="proc_trace"       address="0x200" description="Tob Processor Trace Module" module="file://L1CaloHubRodTrace.xml"/>
	
</node>
