From 007a7170e119354a2e5764b095d92d69ad6db080 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 21 Dec 2015 18:37:53 +0800 Subject: [PATCH] analyzer: report DDS channel number --- artiq/coredevice/analyzer.py | 5 +++-- artiq/runtime/analyzer.c | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/artiq/coredevice/analyzer.py b/artiq/coredevice/analyzer.py index b3b187d69..bcc445871 100644 --- a/artiq/coredevice/analyzer.py +++ b/artiq/coredevice/analyzer.py @@ -58,8 +58,9 @@ def decode_message(data): def decode_dump(data): - parts = struct.unpack(">IQI", data[:16]) - sent_bytes, total_byte_count, overflow_occured = parts + parts = struct.unpack(">IQbbbb", data[:16]) + (sent_bytes, total_byte_count, + overflow_occured, log_channel, dds_channel, _) = parts if sent_bytes + 16 != len(data): raise ValueError("analyzer dump has incorrect length") diff --git a/artiq/runtime/analyzer.c b/artiq/runtime/analyzer.c index b2a517888..9a3440edb 100644 --- a/artiq/runtime/analyzer.c +++ b/artiq/runtime/analyzer.c @@ -10,7 +10,10 @@ struct analyzer_header { unsigned int sent_bytes; unsigned long long int total_byte_count; - unsigned int overflow_occured; + unsigned char overflow_occured; + unsigned char log_channel; + unsigned char dds_channel; + unsigned char padding; } __attribute__((packed)); @@ -68,6 +71,9 @@ void analyzer_start(void) analyzer_header.sent_bytes = analyzer_header.total_byte_count; analyzer_header.overflow_occured = rtio_analyzer_message_encoder_overflow_read(); + analyzer_header.log_channel = 0; + analyzer_header.dds_channel = CONFIG_RTIO_DDS_CHANNEL; + analyzer_header.padding = 0; offset_consumed = 0; offset_sent = 0;