#!/bin/bash
#./xilinx-reg-read-reader $DEV

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

if [ -z "$1" ]
then
    echo "No device specified. use xilinx0 as deault."
    DEV="xilinx0"
else
    DEV="$1"
fi

if [ -z "$2" ]
then
    echo "No show specified. use sh $DIR/table -15 -red,-green,-blue as deault."
    SHOW="sh $DIR/table -15 -red,-green,-blue"
else
    SHOW="$2"
fi

echo -e "---------------- Version Info ------------------
Ver Compile Date                                       \t 0x110002 \t $(printf "%x" $($DIR/reg-read $DEV 0x110002))
Ver Compile Version                                    \t 0x110001 \t $(printf '%x' $($DIR/reg-read $DEV 0x110001))
---------------- Fiber State Info ------------------
Phy_in_link_status                                     \t 0x110003 \t $(printf '%x' $($DIR/reg-read $DEV 0x110003))
16 DMA Ready | 4 RAW Ready                             \t 0x110004 \t $(printf '%x' $($DIR/reg-read $DEV 0x110004))
---------------- Level1 Config ------------------
Level1 original data enable                            \t 0x328    \t $(printf '%x' $($DIR/reg-read $DEV 0x328))
Level1 original data dma15 enable                      \t 0x329    \t $(printf '%x' $($DIR/reg-read $DEV 0x329))
Level1 decode enable                                   \t 0x32a    \t $(printf '%x' $($DIR/reg-read $DEV 0x32a))
---------------- Level2 Config ------------------
Level2 decode enable                                   \t 0x110384 \t $(printf '%x' $($DIR/reg-read $DEV 0x110384))
Level2 original data enable                            \t 0x110385 \t $(printf '%x' $($DIR/reg-read $DEV 0x110385))
Level2 tcp src port(A)                                 \t 0x110320 \t $(printf '%x' $($DIR/reg-read $DEV 0x110320))
Level2 tcp src port(B)                                 \t 0x110321 \t $(printf '%x' $($DIR/reg-read $DEV 0x110321))
Level2 algorithm type(A)                               \t 0x110324 \t $(printf '%x' $($DIR/reg-read $DEV 0x110324))
Level2 algorithm type(B)                               \t 0x110325 \t $(printf '%x' $($DIR/reg-read $DEV 0x110325))
Level2 hash factors_0                                  \t 0x110340 \t $(printf '%x' $($DIR/reg-read $DEV 0x110340))
Level2 hash factors_63                                 \t 0x11037F \t $(printf '%x' $($DIR/reg-read $DEV 0x11037F))
Level2 subscribe All enable                            \t 0x1107FD \t $(printf '%x' $($DIR/reg-read $DEV 0x1107FD))
Level2 subscribe CP  enable                            \t 0x1107FE \t $(printf '%x' $($DIR/reg-read $DEV 0x1107FE))
Level2 subscribe SP/SPC enable                         \t 0x1107FF \t $(printf '%x' $($DIR/reg-read $DEV 0x1107FF))
Level2 subscribe name1                                 \t 0x110800 \t $(printf '%x' $($DIR/reg-read $DEV 0x110800))
Level2 subscribe date1                                 \t 0x110801 \t $(printf '%x' $($DIR/reg-read $DEV 0x110801))
Level2 subscribe name2                                 \t 0x110802 \t $(printf '%x' $($DIR/reg-read $DEV 0x110802))
Level2 subscribe date2                                 \t 0x110803 \t $(printf '%x' $($DIR/reg-read $DEV 0x110803))
---------------- Level1 Info ------------------
Level1 original/udp/host full flag                     \t 0x32b    \t $(printf '%x' $($DIR/reg-read $DEV 0x32b))
Level1 debug_info_extract                              \t 0x32C    \t $(printf '%x' $($DIR/reg-read $DEV 0x32C))
Level1 cnt_sof_frag                                    \t 0x335    \t $(printf '%x' $($DIR/reg-read $DEV 0x335))
Level1 cnt_eof_frag                                    \t 0x336    \t $(printf '%x' $($DIR/reg-read $DEV 0x336))
Level1 cnt_sof_fast                                    \t 0x337    \t $(printf '%x' $($DIR/reg-read $DEV 0x337))
Level1 cnt_eof_fast                                    \t 0x338    \t $(printf '%x' $($DIR/reg-read $DEV 0x338))
Level1 cnt_sof_net_rx                                  \t 0x339    \t $(printf '%x' $($DIR/reg-read $DEV 0x339))
Level1 cnt_eof_net_rx                                  \t 0x33A    \t $(printf '%x' $($DIR/reg-read $DEV 0x33A))
Level1 cnt_sof_net_tx                                  \t 0x33B    \t $(printf '%x' $($DIR/reg-read $DEV 0x33B))
Level1 cnt_eof_net_tx                                  \t 0x33C    \t $(printf '%x' $($DIR/reg-read $DEV 0x33C))
Level1 cnt_sof_dma                                     \t 0x33D    \t $(printf '%x' $($DIR/reg-read $DEV 0x33D))
Level1 cnt_eof_dma                                     \t 0x33E    \t $(printf '%x' $($DIR/reg-read $DEV 0x33E))
Level1 check_reset_over                                \t 0x33F    \t $(printf '%x' $($DIR/reg-read $DEV 0x33F))
---------------- Level2 Info ------------------
Level2 cnt_rx0_sof                                     \t 0x1102B0 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B0))
Level2 cnt_rx1_sof                                     \t 0x1102B1 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B1))
Level2 cnt_rx0_err                                     \t 0x1102B2 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B2))
Level2 cnt_rx1_err                                     \t 0x1102B3 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B3))
Level2 cnt_rx0_crc_fail                                \t 0x1102B4 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B4))
Level2 cnt_rx1_crc_fail                                \t 0x1102B5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B5))
Level2 get_tcp[0]_src_ip                               \t 0x110208 \t $(printf '%x' $($DIR/reg-read $DEV 0x110208))
Level2 get_tcp[0]_dst_ip                               \t 0x110210 \t $(printf '%x' $($DIR/reg-read $DEV 0x110210))
Level2 get_tcp[0]_src_port                             \t 0x110218 \t $(printf '%x' $($DIR/reg-read $DEV 0x110218))
Level2 get_tcp[0]_dst_port                             \t 0x110220 \t $(printf '%x' $($DIR/reg-read $DEV 0x110220))
Level2 get_tcp[1]_src_ip                               \t 0x110209 \t $(printf '%x' $($DIR/reg-read $DEV 0x110209))
Level2 get_tcp[1]_dst_ip                               \t 0x110211 \t $(printf '%x' $($DIR/reg-read $DEV 0x110211))
Level2 get_tcp[1]_src_port                             \t 0x110219 \t $(printf '%x' $($DIR/reg-read $DEV 0x110219))
Level2 get_tcp[1]_dst_port                             \t 0x110221 \t $(printf '%x' $($DIR/reg-read $DEV 0x110221))
Level2 get_tcp[2]_src_ip                               \t 0x11020A \t $(printf '%x' $($DIR/reg-read $DEV 0x11020A))
Level2 get_tcp[2]_dst_ip                               \t 0x110212 \t $(printf '%x' $($DIR/reg-read $DEV 0x110212))
Level2 get_tcp[2]_src_port                             \t 0x11021A \t $(printf '%x' $($DIR/reg-read $DEV 0x11021A))
Level2 get_tcp[2]_dst_port                             \t 0x110222 \t $(printf '%x' $($DIR/reg-read $DEV 0x110222))
Level2 get_tcp[3]_src_ip                               \t 0x11020B \t $(printf '%x' $($DIR/reg-read $DEV 0x11020B))
Level2 get_tcp[3]_dst_ip                               \t 0x110213 \t $(printf '%x' $($DIR/reg-read $DEV 0x110213))
Level2 get_tcp[3]_src_port                             \t 0x11021B \t $(printf '%x' $($DIR/reg-read $DEV 0x11021B))
Level2 get_tcp[3]_dst_port                             \t 0x110223 \t $(printf '%x' $($DIR/reg-read $DEV 0x110223))
Level2 tcp[0]_fifo_debug_stat                          \t 0x110230 \t $(printf '%x' $($DIR/reg-read $DEV 0x110230))
Level2 tcp[0]_session_lost_flag                        \t 0x110234 \t $(printf '%x' $($DIR/reg-read $DEV 0x110234))
Level2 cnt_tcp[0]_session_lost                         \t 0x110238 \t $(printf '%x' $($DIR/reg-read $DEV 0x110238))
Level2 cnt_tcp[0]_drop_fcs_error                       \t 0x11023C \t $(printf '%x' $($DIR/reg-read $DEV 0x11023C))
Level2 cnt_tcp[0]_drop_overflow                        \t 0x110240 \t $(printf '%x' $($DIR/reg-read $DEV 0x110240))
Level2 cnt_tcp[0]_missed_pkt                           \t 0x110244 \t $(printf '%x' $($DIR/reg-read $DEV 0x110244))
Level2 cnt_tcp[0]_fcs_in                               \t 0x110248 \t $(printf '%x' $($DIR/reg-read $DEV 0x110248))
Level2 cnt_tcp[0]_fcs_out                              \t 0x11024C \t $(printf '%x' $($DIR/reg-read $DEV 0x11024C))
Level2 cnt_tcp[0]_outmtu                               \t 0x110250 \t $(printf '%x' $($DIR/reg-read $DEV 0x110250))
Level2 cnt_tcp[0]_offload_pkt_sop                      \t 0x110254 \t $(printf '%x' $($DIR/reg-read $DEV 0x110254))
Level2 cnt_tcp[0]_offload_pkt_eop                      \t 0x110258 \t $(printf '%x' $($DIR/reg-read $DEV 0x110258))
Level2 cnt_tcp[0]_offload_pkt_error                    \t 0x11025C \t $(printf '%x' $($DIR/reg-read $DEV 0x11025C))
Level2 cnt_tcp[0]_reformat_pkt_sop                     \t 0x110260 \t $(printf '%x' $($DIR/reg-read $DEV 0x110260))
Level2 cnt_tcp[0]_reformat_pkt_eop                     \t 0x110264 \t $(printf '%x' $($DIR/reg-read $DEV 0x110264))
Level2 cnt_tcp[0]_reformat_pkt_error                   \t 0x110268 \t $(printf '%x' $($DIR/reg-read $DEV 0x110268))
Level2 cnt_tcp[0]_reordered_pkt_sop                    \t 0x11026C \t $(printf '%x' $($DIR/reg-read $DEV 0x11026C))
Level2 cnt_tcp[0]_reordered_pkt_eop                    \t 0x110270 \t $(printf '%x' $($DIR/reg-read $DEV 0x110270))
Level2 cnt_tcp[0]_reordered_pkt_error                  \t 0x110274 \t $(printf '%x' $($DIR/reg-read $DEV 0x110274))
Level2 tcp[1]_fifo_debug_stat                          \t 0x110231 \t $(printf '%x' $($DIR/reg-read $DEV 0x110231))
Level2 tcp[1]_session_lost_flag                        \t 0x110235 \t $(printf '%x' $($DIR/reg-read $DEV 0x110235))
Level2 cnt_tcp[1]_session_lost                         \t 0x110239 \t $(printf '%x' $($DIR/reg-read $DEV 0x110239))
Level2 cnt_tcp[1]_drop_fcs_error                       \t 0x11023D \t $(printf '%x' $($DIR/reg-read $DEV 0x11023D))
Level2 cnt_tcp[1]_drop_overflow                        \t 0x110241 \t $(printf '%x' $($DIR/reg-read $DEV 0x110241))
Level2 cnt_tcp[1]_missed_pkt                           \t 0x110245 \t $(printf '%x' $($DIR/reg-read $DEV 0x110245))
Level2 cnt_tcp[1]_fcs_in                               \t 0x110249 \t $(printf '%x' $($DIR/reg-read $DEV 0x110249))
Level2 cnt_tcp[1]_fcs_out                              \t 0x11024D \t $(printf '%x' $($DIR/reg-read $DEV 0x11024D))
Level2 cnt_tcp[1]_outmtu                               \t 0x110251 \t $(printf '%x' $($DIR/reg-read $DEV 0x110251))
Level2 cnt_tcp[1]_offload_pkt_sop                      \t 0x110255 \t $(printf '%x' $($DIR/reg-read $DEV 0x110255))
Level2 cnt_tcp[1]_offload_pkt_eop                      \t 0x110259 \t $(printf '%x' $($DIR/reg-read $DEV 0x110259))
Level2 cnt_tcp[1]_offload_pkt_error                    \t 0x11025D \t $(printf '%x' $($DIR/reg-read $DEV 0x11025D))
Level2 cnt_tcp[1]_reformat_pkt_sop                     \t 0x110261 \t $(printf '%x' $($DIR/reg-read $DEV 0x110261))
Level2 cnt_tcp[1]_reformat_pkt_eop                     \t 0x110265 \t $(printf '%x' $($DIR/reg-read $DEV 0x110265))
Level2 cnt_tcp[1]_reformat_pkt_error                   \t 0x110269 \t $(printf '%x' $($DIR/reg-read $DEV 0x110269))
Level2 cnt_tcp[1]_reordered_pkt_sop                    \t 0x11026D \t $(printf '%x' $($DIR/reg-read $DEV 0x11026D))
Level2 cnt_tcp[1]_reordered_pkt_eop                    \t 0x110271 \t $(printf '%x' $($DIR/reg-read $DEV 0x110271))
Level2 cnt_tcp[1]_reordered_pkt_error                  \t 0x110275 \t $(printf '%x' $($DIR/reg-read $DEV 0x110275))
Level2 tcp[2]_fifo_debug_stat                          \t 0x110232 \t $(printf '%x' $($DIR/reg-read $DEV 0x110232))
Level2 tcp[2]_session_lost_flag                        \t 0x110236 \t $(printf '%x' $($DIR/reg-read $DEV 0x110236))
Level2 cnt_tcp[2]_session_lost                         \t 0x11023A \t $(printf '%x' $($DIR/reg-read $DEV 0x11023A))
Level2 cnt_tcp[2]_drop_fcs_error                       \t 0x11023E \t $(printf '%x' $($DIR/reg-read $DEV 0x11023E))
Level2 cnt_tcp[2]_drop_overflow                        \t 0x110242 \t $(printf '%x' $($DIR/reg-read $DEV 0x110242))
Level2 cnt_tcp[2]_missed_pkt                           \t 0x110246 \t $(printf '%x' $($DIR/reg-read $DEV 0x110246))
Level2 cnt_tcp[2]_fcs_in                               \t 0x11024A \t $(printf '%x' $($DIR/reg-read $DEV 0x11024A))
Level2 cnt_tcp[2]_fcs_out                              \t 0x11024E \t $(printf '%x' $($DIR/reg-read $DEV 0x11024E))
Level2 cnt_tcp[2]_outmtu                               \t 0x110252 \t $(printf '%x' $($DIR/reg-read $DEV 0x110252))
Level2 cnt_tcp[2]_offload_pkt_sop                      \t 0x110256 \t $(printf '%x' $($DIR/reg-read $DEV 0x110256))
Level2 cnt_tcp[2]_offload_pkt_eop                      \t 0x11025A \t $(printf '%x' $($DIR/reg-read $DEV 0x11025A))
Level2 cnt_tcp[2]_offload_pkt_error                    \t 0x11025E \t $(printf '%x' $($DIR/reg-read $DEV 0x11025E))
Level2 cnt_tcp[2]_reformat_pkt_sop                     \t 0x110262 \t $(printf '%x' $($DIR/reg-read $DEV 0x110262))
Level2 cnt_tcp[2]_reformat_pkt_eop                     \t 0x110266 \t $(printf '%x' $($DIR/reg-read $DEV 0x110266))
Level2 cnt_tcp[2]_reformat_pkt_error                   \t 0x11026A \t $(printf '%x' $($DIR/reg-read $DEV 0x11026A))
Level2 cnt_tcp[2]_reordered_pkt_sop                    \t 0x11026E \t $(printf '%x' $($DIR/reg-read $DEV 0x11026E))
Level2 cnt_tcp[2]_reordered_pkt_eop                    \t 0x110272 \t $(printf '%x' $($DIR/reg-read $DEV 0x110272))
Level2 cnt_tcp[2]_reordered_pkt_error                  \t 0x110276 \t $(printf '%x' $($DIR/reg-read $DEV 0x110276))
Level2 tcp[3]_fifo_debug_stat                          \t 0x110233 \t $(printf '%x' $($DIR/reg-read $DEV 0x110233))
Level2 tcp[3]_session_lost_flag                        \t 0x110237 \t $(printf '%x' $($DIR/reg-read $DEV 0x110237))
Level2 cnt_tcp[3]_session_lost                         \t 0x11023B \t $(printf '%x' $($DIR/reg-read $DEV 0x11023B))
Level2 cnt_tcp[3]_drop_fcs_error                       \t 0x11023F \t $(printf '%x' $($DIR/reg-read $DEV 0x11023F))
Level2 cnt_tcp[3]_drop_overflow                        \t 0x110243 \t $(printf '%x' $($DIR/reg-read $DEV 0x110243))
Level2 cnt_tcp[3]_missed_pkt                           \t 0x110247 \t $(printf '%x' $($DIR/reg-read $DEV 0x110247))
Level2 cnt_tcp[3]_fcs_in                               \t 0x11024B \t $(printf '%x' $($DIR/reg-read $DEV 0x11024B))
Level2 cnt_tcp[3]_fcs_out                              \t 0x11024F \t $(printf '%x' $($DIR/reg-read $DEV 0x11024F))
Level2 cnt_tcp[3]_outmtu                               \t 0x110253 \t $(printf '%x' $($DIR/reg-read $DEV 0x110253))
Level2 cnt_tcp[3]_offload_pkt_sop                      \t 0x110257 \t $(printf '%x' $($DIR/reg-read $DEV 0x110257))
Level2 cnt_tcp[3]_offload_pkt_eop                      \t 0x11025B \t $(printf '%x' $($DIR/reg-read $DEV 0x11025B))
Level2 cnt_tcp[3]_offload_pkt_error                    \t 0x11025F \t $(printf '%x' $($DIR/reg-read $DEV 0x11025F))
Level2 cnt_tcp[3]_reformat_pkt_sop                     \t 0x110263 \t $(printf '%x' $($DIR/reg-read $DEV 0x110263))
Level2 cnt_tcp[3]_reformat_pkt_eop                     \t 0x110267 \t $(printf '%x' $($DIR/reg-read $DEV 0x110267))
Level2 cnt_tcp[3]_reformat_pkt_error                   \t 0x11026B \t $(printf '%x' $($DIR/reg-read $DEV 0x11026B))
Level2 cnt_tcp[3]_reordered_pkt_sop                    \t 0x11026F \t $(printf '%x' $($DIR/reg-read $DEV 0x11026F))
Level2 cnt_tcp[3]_reordered_pkt_eop                    \t 0x110273 \t $(printf '%x' $($DIR/reg-read $DEV 0x110273))
Level2 cnt_tcp[3]_reordered_pkt_error                  \t 0x110277 \t $(printf '%x' $($DIR/reg-read $DEV 0x110277))
Level2 cnt_handle_tcp_fifo_pfull[0]                    \t 0x110278 \t $(printf '%x' $($DIR/reg-read $DEV 0x110278))
Level2 cnt_handle_tcp_fifo_pfull[1]                    \t 0x110279 \t $(printf '%x' $($DIR/reg-read $DEV 0x110279))
Level2 cnt_handle_tcp_fifo_pfull[2]                    \t 0x11027A \t $(printf '%x' $($DIR/reg-read $DEV 0x11027A))
Level2 cnt_handle_tcp_fifo_pfull[3]                    \t 0x11027B \t $(printf '%x' $($DIR/reg-read $DEV 0x11027B))
Level2 cnt_4grp1_tcp[0]_in_error                       \t 0x110294 \t $(printf '%x' $($DIR/reg-read $DEV 0x110294))
Level2 cnt_4grp1_tcp[0]_in_sop                         \t 0x110280 \t $(printf '%x' $($DIR/reg-read $DEV 0x110280))
Level2 cnt_4grp1_tcp[0]_in_eop                         \t 0x110284 \t $(printf '%x' $($DIR/reg-read $DEV 0x110284))
Level2 cnt_4grp1_tcp[0]_fifo_in_sop                    \t 0x110288 \t $(printf '%x' $($DIR/reg-read $DEV 0x110288))
Level2 cnt_4grp1_tcp[0]_fifo_in_eop                    \t 0x11028C \t $(printf '%x' $($DIR/reg-read $DEV 0x11028C))
Level2 cnt_4grp1_tcp[0]_fifo_pfull                     \t 0x110290 \t $(printf '%x' $($DIR/reg-read $DEV 0x110290))
Level2 cnt_4grp1_tcp[1]_in_error                       \t 0x110295 \t $(printf '%x' $($DIR/reg-read $DEV 0x110295))
Level2 cnt_4grp1_tcp[1]_in_sop                         \t 0x110281 \t $(printf '%x' $($DIR/reg-read $DEV 0x110281))
Level2 cnt_4grp1_tcp[1]_in_eop                         \t 0x110285 \t $(printf '%x' $($DIR/reg-read $DEV 0x110285))
Level2 cnt_4grp1_tcp[1]_fifo_in_sop                    \t 0x110289 \t $(printf '%x' $($DIR/reg-read $DEV 0x110289))
Level2 cnt_4grp1_tcp[1]_fifo_in_eop                    \t 0x11028D \t $(printf '%x' $($DIR/reg-read $DEV 0x11028D))
Level2 cnt_4grp1_tcp[1]_fifo_pfull                     \t 0x110291 \t $(printf '%x' $($DIR/reg-read $DEV 0x110291))
Level2 cnt_4grp1_tcp[2]_in_error                       \t 0x110296 \t $(printf '%x' $($DIR/reg-read $DEV 0x110296))
Level2 cnt_4grp1_tcp[2]_in_sop                         \t 0x110282 \t $(printf '%x' $($DIR/reg-read $DEV 0x110282))
Level2 cnt_4grp1_tcp[2]_in_eop                         \t 0x110286 \t $(printf '%x' $($DIR/reg-read $DEV 0x110286))
Level2 cnt_4grp1_tcp[2]_fifo_in_sop                    \t 0x11028A \t $(printf '%x' $($DIR/reg-read $DEV 0x11028A))
Level2 cnt_4grp1_tcp[2]_fifo_in_eop                    \t 0x11028E \t $(printf '%x' $($DIR/reg-read $DEV 0x11028E))
Level2 cnt_4grp1_tcp[2]_fifo_pfull                     \t 0x110292 \t $(printf '%x' $($DIR/reg-read $DEV 0x110292))
Level2 cnt_4grp1_tcp[3]_in_error                       \t 0x110297 \t $(printf '%x' $($DIR/reg-read $DEV 0x110297))
Level2 cnt_4grp1_tcp[3]_in_sop                         \t 0x110283 \t $(printf '%x' $($DIR/reg-read $DEV 0x110283))
Level2 cnt_4grp1_tcp[3]_in_eop                         \t 0x110287 \t $(printf '%x' $($DIR/reg-read $DEV 0x110287))
Level2 cnt_4grp1_tcp[3]_fifo_in_sop                    \t 0x11028B \t $(printf '%x' $($DIR/reg-read $DEV 0x11028B))
Level2 cnt_4grp1_tcp[3]_fifo_in_eop                    \t 0x11028F \t $(printf '%x' $($DIR/reg-read $DEV 0x11028F))
Level2 cnt_4grp1_tcp[3]_fifo_pfull                     \t 0x110293 \t $(printf '%x' $($DIR/reg-read $DEV 0x110293))
Level2 cnt_4grp1_tcp_out_sop                           \t 0x110298 \t $(printf '%x' $($DIR/reg-read $DEV 0x110298))
Level2 cnt_4grp1_tcp_out_eop                           \t 0x110299 \t $(printf '%x' $($DIR/reg-read $DEV 0x110299))
Level2 cnt_4grp1_tcp_out_error                         \t 0x11029A \t $(printf '%x' $($DIR/reg-read $DEV 0x11029A))
Level2 cnt_a_arbi_vld                                  \t 0x1102A4 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A4))
Level2 cnt_b_arbi_vld                                  \t 0x1102A5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A5))
Level2 cnt_a_best_vld                                  \t 0x1102A6 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A6))
Level2 cnt_b_best_vld                                  \t 0x1102A7 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A7))
Level2 cnt_parser_sop                                  \t 0x1102A8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A8))
Level2 cnt_parser_eop                                  \t 0x1102A9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102A9))
Level2 multi_path_sel_ready                            \t 0x1102AA \t $(printf '%x' $($DIR/reg-read $DEV 0x1102AA))
Level2 cnt_multi_path_sel_in                           \t 0x1102AB \t $(printf '%x' $($DIR/reg-read $DEV 0x1102AB))
Level2 cnt_multi_path_sel_out                          \t 0x1102AC \t $(printf '%x' $($DIR/reg-read $DEV 0x1102AC))
Level2 cnt_hash_not_hit                                \t 0x1102AD \t $(printf '%x' $($DIR/reg-read $DEV 0x1102AD))
Level2 cnt_pcie_sof                                    \t 0x1102B8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B8))
Level2 cnt_pcie_eof                                    \t 0x1102B9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1102B9))
Level2 cnt_net_sof                                     \t 0x1102BA \t $(printf '%x' $($DIR/reg-read $DEV 0x1102BA))
Level2 cnt_net_eof                                     \t 0x1102BB \t $(printf '%x' $($DIR/reg-read $DEV 0x1102BB))
---------------- Top Info ------------------
Top cnt_raw[0]_4grp1_in_sop                            \t 0x348    \t $(printf '%x' $($DIR/reg-read $DEV 0x348))
Top cnt_raw[0]_4grp1_in_eop                            \t 0x34c    \t $(printf '%x' $($DIR/reg-read $DEV 0x34c))
Top cnt_raw[0]_4grp1_fifo_in_sop                       \t 0x350    \t $(printf '%x' $($DIR/reg-read $DEV 0x350))
Top cnt_raw[0]_4grp1_fifo_in_eop                       \t 0x354    \t $(printf '%x' $($DIR/reg-read $DEV 0x354))
Top cnt_raw[1]_4grp1_in_sop                            \t 0x349    \t $(printf '%x' $($DIR/reg-read $DEV 0x349))
Top cnt_raw[1]_4grp1_in_eop                            \t 0x34d    \t $(printf '%x' $($DIR/reg-read $DEV 0x34d))
Top cnt_raw[1]_4grp1_fifo_in_sop                       \t 0x351    \t $(printf '%x' $($DIR/reg-read $DEV 0x351))
Top cnt_raw[1]_4grp1_fifo_in_eop                       \t 0x355    \t $(printf '%x' $($DIR/reg-read $DEV 0x355))
Top cnt_raw[2]_4grp1_in_sop                            \t 0x34a    \t $(printf '%x' $($DIR/reg-read $DEV 0x34a))
Top cnt_raw[2]_4grp1_in_eop                            \t 0x34e    \t $(printf '%x' $($DIR/reg-read $DEV 0x34e))
Top cnt_raw[2]_4grp1_fifo_in_sop                       \t 0x352    \t $(printf '%x' $($DIR/reg-read $DEV 0x352))
Top cnt_raw[2]_4grp1_fifo_in_eop                       \t 0x356    \t $(printf '%x' $($DIR/reg-read $DEV 0x356))
Top cnt_raw[3]_4grp1_in_sop                            \t 0x34b    \t $(printf '%x' $($DIR/reg-read $DEV 0x34b))
Top cnt_raw[3]_4grp1_in_eop                            \t 0x34f    \t $(printf '%x' $($DIR/reg-read $DEV 0x34f))
Top cnt_raw[3]_4grp1_fifo_in_sop                       \t 0x353    \t $(printf '%x' $($DIR/reg-read $DEV 0x353))
Top cnt_raw[3]_4grp1_fifo_in_eop                       \t 0x357    \t $(printf '%x' $($DIR/reg-read $DEV 0x357))
Top cnt_raw_4grp1_out_sop                              \t 0x358    \t $(printf '%x' $($DIR/reg-read $DEV 0x358))
Top cnt_raw_4grp1_out_eop                              \t 0x359    \t $(printf '%x' $($DIR/reg-read $DEV 0x359))
Top L1_raw_data_256fifo_in_sop                         \t 0x1104B5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104B5))
Top L1_raw_data_256fifo_in_eop                         \t 0x1104B6 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104B6))
Top L1_raw_data_256fifo_out_sop                        \t 0x1104B9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104B9))
Top L1_raw_data_256fifo_out_eop                        \t 0x1104BA \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BA))
Top L1_decode_data_256fifo_in_sop                      \t 0x1104B7 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104B7))
Top L1_decode_data_256fifo_in_eop                      \t 0x1104B8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104B8))
Top L1_decode_data_256fifo_out_sop                     \t 0x1104BB \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BB))
Top L1_decode_data_256fifo_out_eop                     \t 0x1104BC \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BC))
Top L2_raw_data_256fifo_in_sop                         \t 0x1104C5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C5))
Top L2_raw_data_256fifo_in_eop                         \t 0x1104C6 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C6))
Top L2_Raw_data_256fifo_out_sop                        \t 0x1104C9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C9))
Top L2_Raw_data_256fifo_out_eop                        \t 0x1104CA \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CA))
Top L2_decode_data_256fifo_in_sop                      \t 0x1104C7 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C7))
Top L2_decode_data_256fifo_in_eop                      \t 0x1104C8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C8))
Top L2_decode_data_256fifo_out_sop                     \t 0x1104CB \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CB))
Top L2_decode_data_256fifo_out_eop                     \t 0x1104CC \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CC))
Top arbitration mux L1 Raw Data Output SOP             \t 0x1104BD \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BD))
Top arbitration mux L1 Raw Data Output EOP             \t 0x1104BE \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BE))
Top arbitration mux L1 Decode Data Output SOP          \t 0x1104BF \t $(printf '%x' $($DIR/reg-read $DEV 0x1104BF))
Top arbitration mux L1 Decode Data Output EOP          \t 0x1104C0 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104C0))
Top arbitration mux L2 Raw Data Output SOP             \t 0x1104CD \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CD))
Top arbitration mux L2 Raw Data Output EOP             \t 0x1104CE \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CE))
Top arbitration mux L2 Decode Data Output SOP          \t 0x1104CF \t $(printf '%x' $($DIR/reg-read $DEV 0x1104CF))
Top arbitration mux L2 Decode Data Output EOP          \t 0x1104D0 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D0))
Top state_next|state_current                           \t 0x1103E9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1103E9))
Top dma_store FIFO Full|Empty (/16bit)                 \t 0x1103EA \t $(printf '%x' $($DIR/reg-read $DEV 0x1103EA))
Top L1 FIFO Full|pF|Empty|pE (/2bit )                  \t 0x1103EB \t $(printf '%x' $($DIR/reg-read $DEV 0x1103EB))
Top L2 FIFO Full|pF|Empty|pE (/2bit)                   \t 0x1103EC \t $(printf '%x' $($DIR/reg-read $DEV 0x1103EC))
Top L1 Store FIFO1|0 (/16bit) pfull cnt                \t 0x1103ED \t $(printf '%x' $($DIR/reg-read $DEV 0x1103ED))
Top L2 Store FIFO1|0 (/16bit) pfull cnt                \t 0x1103EE \t $(printf '%x' $($DIR/reg-read $DEV 0x1103EE))
DMA0  Output SOP                                       \t 0x1104D1 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D1))
DMA0  Output EOP                                       \t 0x1104D2 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D2))
DMA1  Output SOP                                       \t 0x1104D3 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D3))
DMA1  Output EOP                                       \t 0x1104D4 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D4))
DMA2  Output SOP                                       \t 0x1104D5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D5))
DMA2  Output EOP                                       \t 0x1104D6 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D6))
DMA3  Output SOP                                       \t 0x1104D7 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D7))
DMA3  Output EOP                                       \t 0x1104D8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D8))
DMA4  Output SOP                                       \t 0x1104D9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104D9))
DMA4  Output EOP                                       \t 0x1104DA \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DA))
DMA5  Output SOP                                       \t 0x1104DB \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DB))
DMA5  Output EOP                                       \t 0x1104DC \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DC))
DMA6  Output SOP                                       \t 0x1104DD \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DD))
DMA6  Output EOP                                       \t 0x1104DE \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DE))
DMA7  Output SOP                                       \t 0x1104DF \t $(printf '%x' $($DIR/reg-read $DEV 0x1104DF))
DMA7  Output EOP                                       \t 0x1104E0 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E0))
DMA8  Output SOP                                       \t 0x1104E1 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E1))
DMA8  Output EOP                                       \t 0x1104E2 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E2))
DMA9  Output SOP                                       \t 0x1104E3 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E3))
DMA9  Output EOP                                       \t 0x1104E4 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E4))
DMA10 Output SOP                                       \t 0x1104E5 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E5))
DMA10 Output EOP                                       \t 0x1104E6 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E6))
DMA11 Output SOP                                       \t 0x1104E7 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E7))
DMA11 Output EOP                                       \t 0x1104E8 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E8))
DMA12 Output SOP                                       \t 0x1104E9 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104E9))
DMA12 Output EOP                                       \t 0x1104EA \t $(printf '%x' $($DIR/reg-read $DEV 0x1104EA))
DMA13 Output SOP                                       \t 0x1104EB \t $(printf '%x' $($DIR/reg-read $DEV 0x1104EB))
DMA13 Output EOP                                       \t 0x1104EC \t $(printf '%x' $($DIR/reg-read $DEV 0x1104EC))
DMA14 Output SOP                                       \t 0x1104ED \t $(printf '%x' $($DIR/reg-read $DEV 0x1104ED))
DMA14 Output EOP                                       \t 0x1104EE \t $(printf '%x' $($DIR/reg-read $DEV 0x1104EE))
DMA15 Output SOP                                       \t 0x1104EF \t $(printf '%x' $($DIR/reg-read $DEV 0x1104EF))
DMA15 Output EOP                                       \t 0x1104F0 \t $(printf '%x' $($DIR/reg-read $DEV 0x1104F0))" | ${SHOW}