Buffer data files¶
The EMP datapath buffers can be used to capture data from the payload or RX link firmware, and to play user-defined data into the payload or TX link firmware. This page describes the format of the files that the EMP software uses to store this buffer data.
Note
In order to accommodate the new lword
fields, the format of buffer data files has been
updated in version 0.7.0. You can convert data files from the old format to new format using
convert-old-buffer-data-file.exe
, e.g:
convert-old-buffer-data-file.exe /path/to/old_format_data_file.txt /path/to/new_format_data_file.txt
Format¶
The data is organised in a simple space-separated table format in plaintext files. Each column the table represents a different input/output channel, and each row represents the data for subsequent clock cycles, starting from ‘frame 0’ which is at the start of the buffer. The first line of the data file must start with ``ID: `` and should then specify an ID string for the captured/injected data (e.g. the name of the board/pattern). The second line specifies the encoding order of the metadata flags, and must be:
Metadata: (strobe,) start of orbit, start of packet, end of packet, valid
The column headings – the indices of the stored I/O channels – are then specified. For example:
056 057 058 059
Finally the data frames themselves follow, with each line prefixed by Frame NNNN ``. For channels
on which the value of strobe is always high, the ``ldata
values are encoded as:
PSLV DDDDDDDDDDDDDDDD
where
P
is the value of thestart_of_packet
field (either0
or1
);S
is the value of thestart
field (either0
or1
);L
is the value of thelast
field (either0
or1
);V
is the value of thevalid
field (either0
or1
); andDDDDDDDDDDDDDDDD
is the value of thedata
field, in hex.
If the value of strobe
is low for at least one clock cycle on a channel, then the value of
strobe
is added just before the other metadata fields. For example, the last word in a CSP
packet (where start_of_packet
and start
would be low but strobe, ``last
and valid
high) with data
set to 0x0123456789abcdef is stored as:
0011 0123456789abcdef
Example¶
The first 20 lines of a file containing incrementing counter data for four channels (indices 0, 1,
70 and 71), with packet and orbit starting on clock cycle 0 and ID myData
, is shown below:
ID: myData
Metadata: (strobe,) start of orbit, start of packet, end of packet, valid
Link 000 001 070 071
Frame 0000 1101 0000000000000000 1101 0000000000000000 1101 0000000000000000 1101 0000000000000000
Frame 0001 0001 0000000000000001 0001 0000000000000001 0001 0000000000000001 0001 0000000000000001
Frame 0002 0001 0000000000000002 0001 0000000000000002 0001 0000000000000002 0001 0000000000000002
Frame 0003 0001 0000000000000003 0001 0000000000000003 0001 0000000000000003 0001 0000000000000003
Frame 0004 0001 0000000000000004 0001 0000000000000004 0001 0000000000000004 0001 0000000000000004
Frame 0005 0001 0000000000000005 0001 0000000000000005 0001 0000000000000005 0001 0000000000000005
Frame 0006 0001 0000000000000006 0001 0000000000000006 0001 0000000000000006 0001 0000000000000006
Frame 0007 0001 0000000000000007 0001 0000000000000007 0001 0000000000000007 0001 0000000000000007
Frame 0008 0001 0000000000000008 0001 0000000000000008 0001 0000000000000008 0001 0000000000000008
Frame 0009 0001 0000000000000009 0001 0000000000000009 0001 0000000000000009 0001 0000000000000009
Frame 0010 0001 000000000000000a 0001 000000000000000a 0001 000000000000000a 0001 000000000000000a
Frame 0011 0001 000000000000000b 0001 000000000000000b 0001 000000000000000b 0001 000000000000000b
Frame 0012 0001 000000000000000c 0001 000000000000000c 0001 000000000000000c 0001 000000000000000c
Frame 0013 0001 000000000000000d 0001 000000000000000d 0001 000000000000000d 0001 000000000000000d
Frame 0014 0001 000000000000000e 0001 000000000000000e 0001 000000000000000e 0001 000000000000000e
Frame 0015 0001 000000000000000f 0001 000000000000000f 0001 000000000000000f 0001 000000000000000f