fscareply version 21050500
Tool to parse and display a sequence of bytes as a GBT-SCA reply frame
or optionally as a request (command) frame (option -c).
It will indicate the CTRL byte, transaction ID, channel, error byte,
data size and data word, if any.
In addition it will indicate the type of error, if any,
and whether the frame has a CRC error.
Usage:
 fscareply [-h|V] [-c] [-r] [<byte0>] [<byte1>] ...
  -h         : Show this help text.
  -V         : Show version.
  -c         : Interpret the sequence as a GBT-SCA *request* frame.
  -r         : Reverse the byte order before interpretation.
 <byteX>     : Byte X of the reply frame to be parsed (provide it as hex number)

Examples:
> fscareply 00 0e 7d 00 00 03 00 fe e6 fb
CTRL=0E(r=0,s=7) TRID=125 Chan=CONF ERR=00 LEN=3 data=0xFE00

> fscareply 00 ec 28 14 00 06 00 00 f3 0b fd 9b
CTRL=EC(r=7,s=6) TRID=40 Chan=ADC ERR=00 LEN=6 data=0x00000BF3

Bytes provided in reversed order:
> fscareply -r 5c 09 06 00 13 36 ec 00
0 ec 36 13 0 6 9 5c : CTRL=EC(r=7,s=6) TRID=54 Chan=JTAG ERR=00 LEN=6 

Indication of a CRC error (could be in CRC itself or in the data bytes),
(here CRC has been changed from 095C to 195C):
> fscareply 00 ec 36 13 00 06 19 5c
CTRL=EC(r=7,s=6) TRID=54 Chan=JTAG ERR=00 LEN=6  ###CRC=095C
