#!/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 0x0005  \t $(printf '%x' $($DIR/reg-read $DEV 0x0005))
Ver Compile Version                              \t 0x0004  \t $(printf '%x' $($DIR/reg-read $DEV 0x0004))
~~~~~~~~~~~~~~~~~~~~~ Board State Info ~~~~~~~~~~~~~~~~~~~~~
Phy in link State                                \t 0x2030  \t $(printf '%x' $($DIR/reg-read $DEV 0x2030))
DMA ready                                        \t 0x2031  \t $(printf '%x' $($DIR/reg-read $DEV 0x2031))
RAW0 user error                                  \t 0x2300  \t $($DIR/reg-read $DEV 0x2300)
RAW1 user error                                  \t 0x2301  \t $($DIR/reg-read $DEV 0x2301)
RAW2 user error                                  \t 0x2302  \t $($DIR/reg-read $DEV 0x2302)
RAW3 user error                                  \t 0x2303  \t $($DIR/reg-read $DEV 0x2303)
~~~~~~~~~~~~~~~~~~~~~ Configuration Status Info ~~~~~~~~~~~~~~~~~~~~~
event mask event0                                \t 0x1f10 \t $($DIR/reg-read $DEV 0x1f10)
event mask event1                                \t 0x1f11 \t $($DIR/reg-read $DEV 0x1f11)
event mask event2                                \t 0x1f12 \t $($DIR/reg-read $DEV 0x1f12)
event mask event3                                \t 0x1f13 \t $($DIR/reg-read $DEV 0x1f13)
event mask event4                                \t 0x1f14 \t $($DIR/reg-read $DEV 0x1f14)
event mask event5                                \t 0x1f15 \t $($DIR/reg-read $DEV 0x1f15)

Line-A destination IP       -- future 2p/s       \t 0x11100 \t $($DIR/reg-read $DEV 0x11100)
Line-A destination IP       -- energy 2p/s       \t 0x11101 \t $($DIR/reg-read $DEV 0x11101)
Line-A UDP destination port -- future 2p/s       \t 0x11102 \t $($DIR/reg-read $DEV 0x11102)
Line-A UDP destination port -- energy 2p/s       \t 0x11103 \t $($DIR/reg-read $DEV 0x11103)
Line-B destination IP       -- future 2p/s       \t 0x11104 \t $($DIR/reg-read $DEV 0x11104)
Line-B destination IP       -- energy 2p/s       \t 0x11105 \t $($DIR/reg-read $DEV 0x11105)
Line-B UDP destination port -- future 2p/s       \t 0x11106 \t $($DIR/reg-read $DEV 0x11106)
Line-B UDP destination port -- energy 2p/s       \t 0x11107 \t $($DIR/reg-read $DEV 0x11107)
Line-A destination IP       -- future 4p/s       \t 0x21100 \t $($DIR/reg-read $DEV 0x21100)
Line-A destination IP       -- energy 4p/s       \t 0x21101 \t $($DIR/reg-read $DEV 0x21101)
Line-A UDP destination port -- future 4p/s       \t 0x21102 \t $($DIR/reg-read $DEV 0x21102)
Line-A UDP destination port -- energy 4p/s       \t 0x21103 \t $($DIR/reg-read $DEV 0x21103)
Line-B destination IP       -- future 4p/s       \t 0x21104 \t $($DIR/reg-read $DEV 0x21104)
Line-B destination IP       -- energy 4p/s       \t 0x21105 \t $($DIR/reg-read $DEV 0x21105)
Line-B UDP destination port -- future 4p/s       \t 0x21106 \t $($DIR/reg-read $DEV 0x21106)
Line-B UDP destination port -- energy 4p/s       \t 0x21107 \t $($DIR/reg-read $DEV 0x21107)
packet_no out-of-order timeout 2p/s              \t 0x11112 \t $($DIR/reg-read $DEV 0x11112)
packet_no out-of-order timeout 4p/s              \t 0x21112 \t $($DIR/reg-read $DEV 0x21112)
Update packet_no future 2p/s                     \t 0x11110 \t $($DIR/reg-read $DEV 0x11110)
Update packet_no energy 2p/s                     \t 0x11111 \t $($DIR/reg-read $DEV 0x11111)
Update packet_no future 4p/s                     \t 0x21110 \t $($DIR/reg-read $DEV 0x21110)
Update packet_no energy 4p/s                     \t 0x21111 \t $($DIR/reg-read $DEV 0x21111)
Proc_start future                                \t 0x11120 \t $($DIR/reg-read $DEV 0x11120)
Proc_start energy                                \t 0x21120 \t $($DIR/reg-read $DEV 0x21120)
~~~~~~~~~~~~~~~~~~~~~ Filter Info ~~~~~~~~~~~~~~~~~~~~~
Filter0 msg cnt                                  \t 0x12000 \t $($DIR/reg-read $DEV 0x12000)
Filter0 udp cnt                                  \t 0x12001 \t $($DIR/reg-read $DEV 0x12001)
Filter0 udp future2 cnt                          \t 0x12002 \t $($DIR/reg-read $DEV 0x12002)
Filter0 udp energy2 cnt                          \t 0x12003 \t $($DIR/reg-read $DEV 0x12003)
Filter0 udp future4 cnt                          \t 0x12004 \t $($DIR/reg-read $DEV 0x12004)
Filter0 udp energy4 cnt                          \t 0x12005 \t $($DIR/reg-read $DEV 0x12005)
Filter1 msg cnt                                  \t 0x12006 \t $($DIR/reg-read $DEV 0x12006)
Filter1 udp cnt                                  \t 0x12007 \t $($DIR/reg-read $DEV 0x12007)
Filter1 udp future2 cnt                          \t 0x12008 \t $($DIR/reg-read $DEV 0x12008)
Filter1 udp energy2 cnt                          \t 0x12009 \t $($DIR/reg-read $DEV 0x12009)
Filter1 udp future4 cnt                          \t 0x1200a \t $($DIR/reg-read $DEV 0x1200a)
Filter1 udp energy4 cnt                          \t 0x1200b \t $($DIR/reg-read $DEV 0x1200b)
Filter2 msg cnt                                  \t 0x22000 \t $($DIR/reg-read $DEV 0x22000)
Filter2 udp cnt                                  \t 0x22001 \t $($DIR/reg-read $DEV 0x22001)
Filter2 udp future2 cnt                          \t 0x22002 \t $($DIR/reg-read $DEV 0x22002)
Filter2 udp energy2 cnt                          \t 0x22003 \t $($DIR/reg-read $DEV 0x22003)
Filter2 udp future4 cnt                          \t 0x22004 \t $($DIR/reg-read $DEV 0x22004)
Filter2 udp energy4 cnt                          \t 0x22005 \t $($DIR/reg-read $DEV 0x22005)
Filter3 msg cnt                                  \t 0x22006 \t $($DIR/reg-read $DEV 0x22006)
Filter3 udp cnt                                  \t 0x22007 \t $($DIR/reg-read $DEV 0x22007)
Filter3 udp future2 cnt                          \t 0x22008 \t $($DIR/reg-read $DEV 0x22008)
Filter3 udp energy2 cnt                          \t 0x22009 \t $($DIR/reg-read $DEV 0x22009)
Filter3 udp future4 cnt                          \t 0x2200a \t $($DIR/reg-read $DEV 0x2200a)
Filter3 udp energy4 cnt                          \t 0x2200b \t $($DIR/reg-read $DEV 0x2200b)
~~~~~~~~~~~~~~~~~~~~~ 2ps future Info ~~~~~~~~~~~~~~~~~~~~~
Mux0 received mac0 udp cnt                       \t 0x12010 \t $($DIR/reg-read $DEV 0x12010)
Mux0 received mac1 udp cnt                       \t 0x12011 \t $($DIR/reg-read $DEV 0x12011)
Mux0 received mac2 udp cnt                       \t 0x12022 \t $($DIR/reg-read $DEV 0x12022)
Mux0 received mac3 udp cnt                       \t 0x12023 \t $($DIR/reg-read $DEV 0x12023)
Mux0 transmit mirp sop cnt                       \t 0x12012 \t $($DIR/reg-read $DEV 0x12012)
Mux0 transmit mirp eop cnt                       \t 0x12050 \t $($DIR/reg-read $DEV 0x12050)
Mux0 mac0 latest packet_no                       \t 0x12013 \t $($DIR/reg-read $DEV 0x12013)
Mux0 mac1 latest packet_no                       \t 0x12014 \t $($DIR/reg-read $DEV 0x12014)
Mux0 mac2 latest packet_no                       \t 0x12024 \t $($DIR/reg-read $DEV 0x12024)
Mux0 mac3 latest packet_no                       \t 0x12025 \t $($DIR/reg-read $DEV 0x12025)
Mux0 optimized packet_no                         \t 0x12015 \t $($DIR/reg-read $DEV 0x12015)
Mux0 choose mac0 cnt                             \t 0x1201c \t $($DIR/reg-read $DEV 0x1201c)
Mux0 choose mac1 cnt                             \t 0x1201d \t $($DIR/reg-read $DEV 0x1201d)
Mux0 choose mac2 cnt                             \t 0x12026 \t $($DIR/reg-read $DEV 0x12026)
Mux0 choose mac3 cnt                             \t 0x12027 \t $($DIR/reg-read $DEV 0x12027)
parser inst_vld f2ps cnt                         \t 0x12020 \t $($DIR/reg-read $DEV 0x12020)
instrument debug (inst_end & select)             \t 0x1220  \t $($DIR/reg-read $DEV 0x1220)
split field sop cnt                              \t 0x1221  \t $($DIR/reg-read $DEV 0x1221)   
split field eop cnt                              \t 0x1222  \t $($DIR/reg-read $DEV 0x1222)
instrument end cnt                               \t 0x1223  \t $($DIR/reg-read $DEV 0x1223)   
zigzag vld cnt                                   \t 0x1224  \t $($DIR/reg-read $DEV 0x1224)
select store time low                            \t 0x1260  \t $($DIR/reg-read $DEV 0x1260)
select store time high                           \t 0x1264  \t $($DIR/reg-read $DEV 0x1264)
~~~~~~~~~~~~~~~~~~~~~ 2ps energy Info ~~~~~~~~~~~~~~~~~~~~~
Mux1 received mac0 udp cnt                       \t 0x12016 \t $($DIR/reg-read $DEV 0x12016)
Mux1 received mac1 udp cnt                       \t 0x12017 \t $($DIR/reg-read $DEV 0x12017)
Mux1 received mac2 udp cnt                       \t 0x12028 \t $($DIR/reg-read $DEV 0x12028)
Mux1 received mac3 udp cnt                       \t 0x12029 \t $($DIR/reg-read $DEV 0x12029)
Mux1 transmit mirp sop cnt                       \t 0x12018 \t $($DIR/reg-read $DEV 0x12018)
Mux1 transmit mirp eop cnt                       \t 0x12051 \t $($DIR/reg-read $DEV 0x12051)
Mux1 mac0 latest packet_no                       \t 0x12019 \t $($DIR/reg-read $DEV 0x12019)
Mux1 mac1 latest packet_no                       \t 0x1201a \t $($DIR/reg-read $DEV 0x1201a)
Mux1 mac2 latest packet_no                       \t 0x1202a \t $($DIR/reg-read $DEV 0x1202a)
Mux1 mac3 latest packet_no                       \t 0x1202b \t $($DIR/reg-read $DEV 0x1202b)
Mux1 optimized packet_no                         \t 0x1201b \t $($DIR/reg-read $DEV 0x1201b)
Mux1 choose mac0 cnt                             \t 0x1201e \t $($DIR/reg-read $DEV 0x1201e)
Mux1 choose mac1 cnt                             \t 0x1201f \t $($DIR/reg-read $DEV 0x1201f)
Mux1 choose mac2 cnt                             \t 0x1202c \t $($DIR/reg-read $DEV 0x1202c)
Mux1 choose mac3 cnt                             \t 0x1202d \t $($DIR/reg-read $DEV 0x1202d)
parser inst_vld e2ps cnt                         \t 0x12021 \t $($DIR/reg-read $DEV 0x12021)
instrument debug (inst_end & select)             \t 0x1230  \t $($DIR/reg-read $DEV 0x1230)
split field sop cnt                              \t 0x1231  \t $($DIR/reg-read $DEV 0x1231)
split field eop cnt                              \t 0x1232  \t $($DIR/reg-read $DEV 0x1232)
instrument end cnt                               \t 0x1233  \t $($DIR/reg-read $DEV 0x1233)
zigzag vld cnt                                   \t 0x1234  \t $($DIR/reg-read $DEV 0x1234)
select store time low                            \t 0x1262  \t $($DIR/reg-read $DEV 0x1262)
select store time high                           \t 0x1266  \t $($DIR/reg-read $DEV 0x1266)
~~~~~~~~~~~~~~~~~~~~~ 4ps future Info ~~~~~~~~~~~~~~~~~~~~~
Mux2 received mac0 udp cnt                       \t 0x22010 \t $($DIR/reg-read $DEV 0x22010)
Mux2 received mac1 udp cnt                       \t 0x22011 \t $($DIR/reg-read $DEV 0x22011)
Mux2 received mac2 udp cnt                       \t 0x22022 \t $($DIR/reg-read $DEV 0x22022)
Mux2 received mac3 udp cnt                       \t 0x22023 \t $($DIR/reg-read $DEV 0x22023)
Mux2 transmit mirp sop cnt                       \t 0x22012 \t $($DIR/reg-read $DEV 0x22012)
Mux2 transmit mirp eop cnt                       \t 0x12052 \t $($DIR/reg-read $DEV 0x12052)
Mux2 mac0 latest packet_no                       \t 0x22013 \t $($DIR/reg-read $DEV 0x22013)
Mux2 mac1 latest packet_no                       \t 0x22014 \t $($DIR/reg-read $DEV 0x22014)
Mux2 mac2 latest packet_no                       \t 0x22024 \t $($DIR/reg-read $DEV 0x22024)
Mux2 mac3 latest packet_no                       \t 0x22025 \t $($DIR/reg-read $DEV 0x22025)
Mux2 optimized packet_no                         \t 0x22015 \t $($DIR/reg-read $DEV 0x22015)
Mux2 choose mac0 cnt                             \t 0x2201c \t $($DIR/reg-read $DEV 0x2201c)
Mux2 choose mac1 cnt                             \t 0x2201d \t $($DIR/reg-read $DEV 0x2201d)
Mux2 choose mac2 cnt                             \t 0x22026 \t $($DIR/reg-read $DEV 0x22026)
Mux2 choose mac3 cnt                             \t 0x22027 \t $($DIR/reg-read $DEV 0x22027)
parser inst_vld f4ps cnt                         \t 0x22020 \t $($DIR/reg-read $DEV 0x22020)
instrument debug (inst_end & select)             \t 0x1240  \t $($DIR/reg-read $DEV 0x1240)
split field sop cnt                              \t 0x1241  \t $($DIR/reg-read $DEV 0x1241)
split field eop cnt                              \t 0x1242  \t $($DIR/reg-read $DEV 0x1242)
instrument end cnt                               \t 0x1243  \t $($DIR/reg-read $DEV 0x1243)
zigzag vld cnt                                   \t 0x1244  \t $($DIR/reg-read $DEV 0x1244)
select store time low                            \t 0x1261  \t $($DIR/reg-read $DEV 0x1261)
select store time high                           \t 0x1265  \t $($DIR/reg-read $DEV 0x1265)
~~~~~~~~~~~~~~~~~~~~~ 4ps energy Info ~~~~~~~~~~~~~~~~~~~~~
Mux3 received mac0 udp cnt                       \t 0x22016 \t $($DIR/reg-read $DEV 0x22016)
Mux3 received mac1 udp cnt                       \t 0x22017 \t $($DIR/reg-read $DEV 0x22017)
Mux3 received mac2 udp cnt                       \t 0x22028 \t $($DIR/reg-read $DEV 0x22028)
Mux3 received mac3 udp cnt                       \t 0x22029 \t $($DIR/reg-read $DEV 0x22029)
Mux3 transmit mirp sop cnt                       \t 0x22018 \t $($DIR/reg-read $DEV 0x22018)
Mux3 transmit mirp eop cnt                       \t 0x12053 \t $($DIR/reg-read $DEV 0x12053)
Mux3 mac0 latest packet_no                       \t 0x22019 \t $($DIR/reg-read $DEV 0x22019)
Mux3 mac1 latest packet_no                       \t 0x2201a \t $($DIR/reg-read $DEV 0x2201a)
Mux3 mac2 latest packet_no                       \t 0x2202a \t $($DIR/reg-read $DEV 0x2202a)
Mux3 mac3 latest packet_no                       \t 0x2202b \t $($DIR/reg-read $DEV 0x2202b)
Mux3 optimized packet_no                         \t 0x2201b \t $($DIR/reg-read $DEV 0x2201b)
Mux3 choose mac0 cnt                             \t 0x2201e \t $($DIR/reg-read $DEV 0x2201e)
Mux3 choose mac1 cnt                             \t 0x2201f \t $($DIR/reg-read $DEV 0x2201f)
Mux3 choose mac2 cnt                             \t 0x2202c \t $($DIR/reg-read $DEV 0x2202c)
Mux3 choose mac3 cnt                             \t 0x2202d \t $($DIR/reg-read $DEV 0x2202d)
parser inst_vld e4ps cnt                         \t 0x22021 \t $($DIR/reg-read $DEV 0x22021)
instrument debug (inst_end & select)             \t 0x1250  \t $($DIR/reg-read $DEV 0x1250)
split field sop cnt                              \t 0x1251  \t $($DIR/reg-read $DEV 0x1251)
split field eop cnt                              \t 0x1252  \t $($DIR/reg-read $DEV 0x1252)
instrument end cnt                               \t 0x1253  \t $($DIR/reg-read $DEV 0x1253)
zigzag vld cnt                                   \t 0x1254  \t $($DIR/reg-read $DEV 0x1254)
select store time low                            \t 0x1263  \t $($DIR/reg-read $DEV 0x1263)
select store time high                           \t 0x1267  \t $($DIR/reg-read $DEV 0x1267)
~~~~~~~~~~~~~~~~~~~~~ event cnt ~~~~~~~~~~~~~~~~~~~~~
dma_up_ready_mix                                 \t 0x1200  \t $($DIR/reg-read $DEV 0x1200)
i_mac_ready_mix                                  \t 0x1208  \t $($DIR/reg-read $DEV 0x1208)
price_error_sum_flag                             \t 0x1209  \t $($DIR/reg-read $DEV 0x1209)
event_dma_cnt                                    \t 0x1207  \t $($DIR/reg-read $DEV 0x1207)
hbm_error      cnt                               \t 0x1211  \t $($DIR/reg-read $DEV 0x1211)
changeno_error cnt                               \t 0x1212  \t $($DIR/reg-read $DEV 0x1212)
fifo_pfull     cnt                               \t 0x1213  \t $($DIR/reg-read $DEV 0x1213)
raw_error_flag cnt                               \t 0x1214  \t $($DIR/reg-read $DEV 0x1214)
dma_up_vld_cnt_1-4                               \t 0x1215  \t $($DIR/reg-read $DEV 0x1215)
dma_up_vld_cnt_5                                 \t 0x1216  \t $($DIR/reg-read $DEV 0x1216)
switch_4pack_cnt_1-4                             \t 0x1217  \t $($DIR/reg-read $DEV 0x1217)

upload_nocahnge & model_sel                      \t 0x0100  \t $($DIR/reg-read $DEV 0x0100)
fpga version                                     \t 0x0101  \t $(printf '%x' $($DIR/reg-read $DEV 0x0101))
soft write version                               \t 0x0102  \t $(printf '%x' $($DIR/reg-read $DEV 0x0102))
version judge                                    \t 0x0103  \t $($DIR/reg-read $DEV 0x0103)
lowest software version                          \t 0x0104  \t $(printf '%x' $($DIR/reg-read $DEV 0x0104))

raw0_checksum_err_cnt                            \t 0x1310  \t $($DIR/reg-read $DEV 0x1310)
hbm0_tcp_checksum_cnt                            \t 0x1311  \t $($DIR/reg-read $DEV 0x1311)
raw1_checksum_err_cnt                            \t 0x1312  \t $($DIR/reg-read $DEV 0x1312)
hbm1_tcp_checksum_cnt                            \t 0x1313  \t $($DIR/reg-read $DEV 0x1313)
raw2_checksum_err_cnt                            \t 0x1314  \t $($DIR/reg-read $DEV 0x1314)
hbm2_tcp_checksum_cnt                            \t 0x1315  \t $($DIR/reg-read $DEV 0x1315)
raw3_checksum_err_cnt                            \t 0x1316  \t $($DIR/reg-read $DEV 0x1316)
hbm3_tcp_checksum_cnt                            \t 0x1317  \t $($DIR/reg-read $DEV 0x1317)

event_data0                                      \t 0x1318  \t $($DIR/reg-read $DEV 0x1318)
event_data1                                      \t 0x1319  \t $($DIR/reg-read $DEV 0x1319)

s_switch0   eop sop                              \t 0x1320  \t $(printf '%x' $($DIR/reg-read $DEV 0x1320))
s_switch1   eop sop                              \t 0x1321  \t $(printf '%x' $($DIR/reg-read $DEV 0x1321))
s_switch2   eop sop                              \t 0x1322  \t $(printf '%x' $($DIR/reg-read $DEV 0x1322))
m_switch    eop sop                              \t 0x1323  \t $(printf '%x' $($DIR/reg-read $DEV 0x1323))
m_axi_delay eop sop                              \t 0x1324  \t $(printf '%x' $($DIR/reg-read $DEV 0x1324))
s_switch0   maxcnt samecnt                       \t 0x1325  \t $(printf '%x' $($DIR/reg-read $DEV 0x1325))
s_switch1   maxcnt samecnt                       \t 0x1326  \t $(printf '%x' $($DIR/reg-read $DEV 0x1326))
s_switch2   maxcnt samecnt                       \t 0x1327  \t $(printf '%x' $($DIR/reg-read $DEV 0x1327))
m_switch    maxcnt samecnt                       \t 0x1328  \t $(printf '%x' $($DIR/reg-read $DEV 0x1328))
m_axi_delay maxcnt samecnt                       \t 0x1329  \t $(printf '%x' $($DIR/reg-read $DEV 0x1329))
s_switch0   curbyte idlebyte                     \t 0x1330  \t $(printf '%x' $($DIR/reg-read $DEV 0x1330))
s_switch1   curbyte idlebyte                     \t 0x1331  \t $(printf '%x' $($DIR/reg-read $DEV 0x1331))
s_switch2   curbyte idlebyte                     \t 0x1332  \t $(printf '%x' $($DIR/reg-read $DEV 0x1332))
m_switch    curbyte idlebyte                     \t 0x1333  \t $(printf '%x' $($DIR/reg-read $DEV 0x1333))
m_axi_delay curbyte idlebyte                     \t 0x1334  \t $(printf '%x' $($DIR/reg-read $DEV 0x1334))
s_switch0   error_sop error_eop                  \t 0x1335  \t $(printf '%x' $($DIR/reg-read $DEV 0x1335))
s_switch1   error_sop error_eop                  \t 0x1336  \t $(printf '%x' $($DIR/reg-read $DEV 0x1336))
s_switch2   error_sop error_eop                  \t 0x1337  \t $(printf '%x' $($DIR/reg-read $DEV 0x1337))
m_switch    error_sop error_eop                  \t 0x1338  \t $(printf '%x' $($DIR/reg-read $DEV 0x1338))
m_axi_delay error_sop error_eop                  \t 0x1339  \t $(printf '%x' $($DIR/reg-read $DEV 0x1339))

raw0cnt eop sop                                  \t 0x1334  \t $(printf '%x' $($DIR/reg-read $DEV 0x1344))
raw0 bytes min max                               \t 0x1335  \t $(printf '%x' $($DIR/reg-read $DEV 0x1345))
hbmcnt eop bytecur                               \t 0x1336  \t $(printf '%x' $($DIR/reg-read $DEV 0x1346))
hbm bytes min max                                \t 0x1337  \t $(printf '%x' $($DIR/reg-read $DEV 0x1347))
s00cnt eop bytecur                               \t 0x1338  \t $(printf '%x' $($DIR/reg-read $DEV 0x1348))
s00 bytes min max                                \t 0x1339  \t $(printf '%x' $($DIR/reg-read $DEV 0x1349))

~~~~~~~~~~~~~~~~~~~~~ Upload Info ~~~~~~~~~~~~~~~~~~~~~
Instrument miss cnt  -- future 2p/s              \t 0x2010  \t $($DIR/reg-read $DEV 0x2010)
Instrument miss cnt  -- energy 2p/s              \t 0x2011  \t $($DIR/reg-read $DEV 0x2011)
Instrument miss cnt  -- future 4p/s              \t 0x2012  \t $($DIR/reg-read $DEV 0x2012)
Instrument miss cnt  -- energy 4p/s              \t 0x2013  \t $($DIR/reg-read $DEV 0x2013)
Instrument pkt cnt   -- future 2p/s              \t 0x2014  \t $($DIR/reg-read $DEV 0x2014)
Instrument pkt cnt   -- energy 2p/s              \t 0x2015  \t $($DIR/reg-read $DEV 0x2015)
Instrument pkt cnt   -- future 4p/s              \t 0x2016  \t $($DIR/reg-read $DEV 0x2016)
Instrument pkt cnt   -- energy 4p/s              \t 0x2017  \t $($DIR/reg-read $DEV 0x2017)
MAC upload miss cnt  -- future 2p/s              \t 0x2018  \t $($DIR/reg-read $DEV 0x2018)
MAC upload miss cnt  -- energy 2p/s              \t 0x2019  \t $($DIR/reg-read $DEV 0x2019)
MAC upload miss cnt  -- future 4p/s              \t 0x201a  \t $($DIR/reg-read $DEV 0x201a)
MAC upload miss cnt  -- energy 4p/s              \t 0x201b  \t $($DIR/reg-read $DEV 0x201b)
~~~~~~~~~~~~~~~~~~~~~ HBM Info ~~~~~~~~~~~~~~~~~~~~~
HBM state                                        \t 0x2032  \t $(printf '%x' $($DIR/reg-read $DEV 0x2032))
HBM fifo ready                                   \t 0x2033  \t $(printf '%x' $($DIR/reg-read $DEV 0x2033))
HBM FIFO0 storage data cnt                       \t 0x2000  \t $($DIR/reg-read $DEV 0x2000)
HBM FIFO1 storage data cnt                       \t 0x2001  \t $($DIR/reg-read $DEV 0x2001)
HBM FIFO2 storage data cnt                       \t 0x2002  \t $($DIR/reg-read $DEV 0x2002)
HBM FIFO3 storage data cnt                       \t 0x2003  \t $($DIR/reg-read $DEV 0x2003)
HBM FIFO4 storage data cnt                       \t 0x2004  \t $($DIR/reg-read $DEV 0x2004)
HBM FIFO5 storage data cnt                       \t 0x2005  \t $($DIR/reg-read $DEV 0x2005)
HBM FIFO6 storage data cnt                       \t 0x2006  \t $($DIR/reg-read $DEV 0x2006)
HBM FIFO7 storage data cnt                       \t 0x2007  \t $($DIR/reg-read $DEV 0x2007)
HBM FIFO0 in  cnt                                \t 0x2100  \t $($DIR/reg-read $DEV 0x2100)
HBM FIFO0 out cnt                                \t 0x2108  \t $($DIR/reg-read $DEV 0x2108)
HBM FIFO1 in  cnt                                \t 0x2101  \t $($DIR/reg-read $DEV 0x2101)
HBM FIFO1 out cnt                                \t 0x2109  \t $($DIR/reg-read $DEV 0x2109)
HBM FIFO2 in  cnt                                \t 0x2102  \t $($DIR/reg-read $DEV 0x2102)
HBM FIFO2 out cnt                                \t 0x210a  \t $($DIR/reg-read $DEV 0x210a)
HBM FIFO3 in  cnt                                \t 0x2103  \t $($DIR/reg-read $DEV 0x2103)
HBM FIFO3 out cnt                                \t 0x210b  \t $($DIR/reg-read $DEV 0x210b)
HBM FIFO4 in  cnt                                \t 0x2104  \t $($DIR/reg-read $DEV 0x2104)
HBM FIFO4 out cnt                                \t 0x210c  \t $($DIR/reg-read $DEV 0x210c)
HBM FIFO5 in  cnt                                \t 0x2105  \t $($DIR/reg-read $DEV 0x2105)
HBM FIFO5 out cnt                                \t 0x210d  \t $($DIR/reg-read $DEV 0x210d)
HBM FIFO6 in  cnt                                \t 0x2106  \t $($DIR/reg-read $DEV 0x2106)
HBM FIFO6 out cnt                                \t 0x210e  \t $($DIR/reg-read $DEV 0x210e)
HBM FIFO7 in  cnt                                \t 0x2107  \t $($DIR/reg-read $DEV 0x2107)
HBM FIFO7 out cnt                                \t 0x210f  \t $($DIR/reg-read $DEV 0x210f)
~~~~~~~~~~~~~~~~~~~~~ NET Info ~~~~~~~~~~~~~~~~~~~~~
NET0 out cnt                                     \t 0x3120  \t $($DIR/reg-read $DEV 0x3120)
NET1 out cnt                                     \t 0x3121  \t $($DIR/reg-read $DEV 0x3121)
~~~~~~~~~~~~~~~~~~~~~ DMA Info ~~~~~~~~~~~~~~~~~~~~~
DMA0  sop cnt                                    \t 0x2200  \t $($DIR/reg-read $DEV 0x2200)
DMA0  eop cnt                                    \t 0x2210  \t $($DIR/reg-read $DEV 0x2210)
DMA1  sop cnt                                    \t 0x2201  \t $($DIR/reg-read $DEV 0x2201)
DMA1  eop cnt                                    \t 0x2211  \t $($DIR/reg-read $DEV 0x2211)
DMA2  sop cnt                                    \t 0x2202  \t $($DIR/reg-read $DEV 0x2202)
DMA2  eop cnt                                    \t 0x2212  \t $($DIR/reg-read $DEV 0x2212)
DMA3  sop cnt                                    \t 0x2203  \t $($DIR/reg-read $DEV 0x2203)
DMA3  eop cnt                                    \t 0x2213  \t $($DIR/reg-read $DEV 0x2213)
DMA4  sop cnt                                    \t 0x2204  \t $($DIR/reg-read $DEV 0x2204)
DMA4  eop cnt                                    \t 0x2214  \t $($DIR/reg-read $DEV 0x2214)
DMA5  sop cnt                                    \t 0x2205  \t $($DIR/reg-read $DEV 0x2205)
DMA5  eop cnt                                    \t 0x2215  \t $($DIR/reg-read $DEV 0x2215)
DMA6  sop cnt                                    \t 0x2206  \t $($DIR/reg-read $DEV 0x2206)
DMA6  eop cnt                                    \t 0x2216  \t $($DIR/reg-read $DEV 0x2216)
DMA7  sop cnt                                    \t 0x2207  \t $($DIR/reg-read $DEV 0x2207)
DMA7  eop cnt                                    \t 0x2217  \t $($DIR/reg-read $DEV 0x2217)
DMA8  sop cnt                                    \t 0x2208  \t $($DIR/reg-read $DEV 0x2208)
DMA8  eop cnt                                    \t 0x2218  \t $($DIR/reg-read $DEV 0x2218)
DMA9  sop cnt                                    \t 0x2209  \t $($DIR/reg-read $DEV 0x2209)
DMA9  eop cnt                                    \t 0x2219  \t $($DIR/reg-read $DEV 0x2219)
DMA10 sop cnt                                    \t 0x220a  \t $($DIR/reg-read $DEV 0x220a)
DMA10 eop cnt                                    \t 0x221a  \t $($DIR/reg-read $DEV 0x221a)
DMA11 sop cnt                                    \t 0x220b  \t $($DIR/reg-read $DEV 0x220b)
DMA11 eop cnt                                    \t 0x221b  \t $($DIR/reg-read $DEV 0x221b)
DMA12 sop cnt                                    \t 0x220c  \t $($DIR/reg-read $DEV 0x220c)
DMA12 eop cnt                                    \t 0x221c  \t $($DIR/reg-read $DEV 0x221c)
DMA13 sop cnt                                    \t 0x220d  \t $($DIR/reg-read $DEV 0x220d)
DMA13 eop cnt                                    \t 0x221d  \t $($DIR/reg-read $DEV 0x221d)
DMA14 sop cnt                                    \t 0x220e  \t $($DIR/reg-read $DEV 0x220e)
DMA14 eop cnt                                    \t 0x221e  \t $($DIR/reg-read $DEV 0x221e)
DMA15 sop cnt                                    \t 0x220f  \t $($DIR/reg-read $DEV 0x220f)
DMA15 eop cnt                                    \t 0x221f  \t $($DIR/reg-read $DEV 0x221f)" | ${SHOW}
