= TTVXS Data Format = Hardware [[TTVXS]] TTVXS payload data is encapsulated in [[MStream_2_2|M-Stream 2.2]] protocol using Data Subtype 0. ||<-32 rowclass="bits">M-Stream Header|| ||<:>word #||<:>byte offset||<:>bits||<:>description|| ||<:|4> 0 ||<:|4> 0 || 31:24 || [[DeviceId|Device ID]] || || 23:18 || Flags || || 17:16 || Subtype || || 15:0 || Fragment length, 4*(N-2)|| ||<:|2> 1 ||<:|2> 4 || 31:16 || Fragment ID bits [15:0] || ||15:0||Fragment offset code|| ||<-32 rowclass="bits">M-Stream Subtype 0, first fragment|| ||<:> 2 ||<:> 8 || 31:0 || Device Serial || ||<:|2> 3 ||<:|2> 12 || 31:24 || reserved || || 23:0 || Event number || ||<:-4>'''M-Stream Payload''' ''in [[MpdDeviceRawDataFormat#MStream_Block|MPD rawdata]]''|| ||<:> 4 ||<:> 16 || 31:0 || Event timestamp, TAI seconds || ||<:|2> 5 ||<:|2> 20 || 31:2 || Event timestamp, TAI nanoseconds || || 1:0 || Event timestamp, TAI flags || ||<:> 6 ||<:> 24 || 31:0 ||<|3> Event Data || ||<:-3> ... || ||<:> N-1 ||<:> 4*(N-1) || 31:0 || ||<-32 rowclass="bits">M-Stream Subtype 0, next fragments|| ||<:> 2 ||<:> 8 || 31:0 ||<|3> Event Data || ||<:-3> ... || ||<:> N-1 ||<:> 4*(N-1) || 31:0 || ---- == Event Data format == ||<:>'''word #'''||<:>'''byte offset'''||<:>'''bits'''||<:>'''description'''|| ||<:> 0 ||<:> 0 || 31:0 ||<|3> Data Block #1 (S,,1,, bytes) || ||<:-3> ... || ||<:> S,,1,,/4-1 ||<:> S,,1,,-4 || 31:0 || ||<:> S,,1,,/4 ||<:> S,,1,, || 31:0 ||<|3> Data Block #2 (S,,2,, bytes) || ||<:-3> ... || ||<:> (S,,1,,+S,,2,,)/4-1 ||<:> S,,1,,+S,,2,,-4 || 31:0 || ||<:-4> ... || ||<:-4> Till the last data block || ||<:-4> ... || ---- == Data Block format == ||<:>'''word #'''||<:>'''byte offset'''||<:>'''bits'''||<:>'''description'''|| ||<:|3> 0 ||<:|3> 0 || 31:28 || Data Type || || 27:16 || Data Block specific bits || || 15:0 || Data Payload length (4*(N-1) bytes) || ||<:> 1 ||<:> 4 || 31:0 ||<|3> Data Payload || ||<:-3> ... || ||<:> N-1 ||<:> 4*(N-1) || 31:0 || Supported data blocks: . [[#TRIG_BLK|Trigger Data Block]] . [[#STAT_BLK|Statistic Data Block]] Statistic data blocks is optional. ---- <> === Trigger Data Block === . __Data Type is 0xA__ Trigger Data Block specific bits: . [27:17] - reserved . [16] - event FIFO overflow Trigger data block payload starts with Trigger word, followed by a set of auxiliary counters (optional, could be disabled). ||<:-3>'''Trigger data block payload'''|| ||<:>'''word #'''||<:>'''byte offset'''||<:>'''description''' || ||<:> 0 ||<:> 0 || Trigger word || ||<:> 1 ||<:> 4 ||<:|3> Auxiliary counters (optional) || ||<:-2> ... || ||<:> N-1 ||<:> 4*(N-1) || . N - number of 32-bit words in payload ||<:-32 rowclass="bits"> Trigger word || ||31||30||29||28||27||26||25||24||23||22||21||20||19||18||17||16||15||14||13||12||11||10||9||8||7||6||5||4||3||2||1||0|| ||<:-16> reserved ||<:-8> Trigger type ||<:-8> Trigger source || '''Trigger source''': . [0] - pulser . [1] - random pulser . [2] - external ttl . [3] - digital (SFP) - not yet implemented . [7:4] - reserved '''Trigger type''': . [7:0] - ''reserved''. '''Auxiliary counters''' list and format - ''TBD''. ---- <> === Statistic Data Block === . __Data Type is 0xF__ Statistic Data Block specific bits: . [27:18] - reserved . [17] - RegIO Error . [16] - RegIO Timeout === Statistic Data Payload === Consist of variable set of module registers. ||<:-32 rowclass="bits"> Format of statistics data word || ||31||30||29||28||27||26||25||24||23||22||21||20||19||18||17||16||15||14||13||12||11||10||9||8||7||6||5||4||3||2||1||0|| ||<:-16> RegIO Address ||<:-16> RegIO Read Data || Default set of registers included in statistics data: . reg 0x004B - Board Temperature . reg 0x004C - FPGA F/W Version . reg 0x004D - FPGA F/W Revision . reg 0x4001 - Onboard PLL Status . reg 0x4002 - Onboard PLL Unlock Counter . reg 0x4003 - PLL Temperature . reg 0x4004 - Temperature #1 from MCU . reg 0x4005 - Temperature #2 from MCU . reg 0x4006 - Temperature #3 from MCU . reg 0x4007 - Temperature #4 from MCU . reg 0x4008 - BMC F/W Revision . reg 0x4009 - BMC F/W Version . reg 0x400A - BMC Overal System Status . reg 0x400B - BMC Power Status . reg 0x400C - BMC PLL Status See also [[TTVXS_Registers|TTVXS Registers]] ---- ---- [[CategoryRawData|RawData]]