链路时延M1-M3收尾:Phase12-14基线与生产路径Δ实测、D10/E-02/D17修复、D20定位与硬化、文档整理

This commit is contained in:
2026-09-22 06:12:16 +08:00
parent ac48c6d716
commit e5733b3454
42 changed files with 18294 additions and 1168 deletions
+18 -2
View File
@@ -20,6 +20,8 @@
#include "net_socket.h"
#include "net_types.h"
#include "ui_net_sink_backend.h"
#include "test_config.h" /* TEST_LATENCY_PROBE(链路时延探针编译开关) */
#include "net_latency_test.h" /* M3 探针:prod_cycle_mcu(LCDMEM 处理净成本) */
/* RemoDispBus 标签与命令(与 ui_net_sink.h 的 UI_REMO_* 常量对齐) */
#define TAG_CLIENT UI_REMO_TAG_CLIENT
@@ -122,7 +124,10 @@ static void remo_send(uint8_t cmd, const uint8_t *data, uint16_t len) {
* 入口参数:无
* 返回值:无
* 限定条件:g_client >= 0
* 函数说明:payload 为 [宽u16][高u16][缓冲字节数u32],共 6 字节(大端)
* 函数说明:payload 为 [宽u16][高u16][缓冲字节数u32],共 8 字节(大端)
* ⚠ 2026-09-22 M3 台架实测修复(D17):本函数原以 len=6 发送,只发出
* 8 字节数据段的前 6 字节 → u32 帧字节数被截成高半字,客户端读到的
* "帧字节数"恒为 0(真机与模拟器一致复现)。现按字段定义发满 8B。
*/
static void remo_send_init(void) {
uint8_t init[8];
@@ -130,7 +135,7 @@ static void remo_send_init(void) {
put_u16(init, UI_W);
put_u16(init + 2, UI_H);
put_u32(init + 4, UI_MEMSIZE);
remo_send(CMD_INIT, init, 6);
remo_send(CMD_INIT, init, 8);
}
/*
@@ -218,6 +223,14 @@ static void remo_handle(const uint8_t *f, int n) {
((uint32_t)data[3]);
/* 目前仅支持偏移 0(整帧)请求;非 0 偏移暂不支持,静默忽略 */
if (off == 0) {
#if defined(TEST_LATENCY_PROBE)
/* M3 探针 prod_cycle_mcu:从"请求已解析完"到"应答交入芯片"
* 的 MCU 净成本(1bpp 取帧 + 组帧 CRC + net_send 队列/芯片)。
* 不含 uiTask 10ms 轮询拾取拍(由 peer 侧 cycle 与 L11 覆盖)。 */
lat_tmark_t tm;
lat_mark(&tm);
#endif
/* 整帧请求:经平台后端取 1bpp 位图(MCU: ui_port_get_framebuffer /
* 模拟器: sim_port_get_screen_mono)写入应答缓冲尾部,失败则静默丢弃 */
if (ui_net_sink_get_lcdmem(g_lcdmem_data + 4, UI_MEMSIZE) == 0) {
@@ -225,6 +238,9 @@ static void remo_handle(const uint8_t *f, int n) {
memcpy(g_lcdmem_data, data, 4);
remo_send(CMD_LCDMEM, g_lcdmem_data, (uint16_t)(4 + UI_MEMSIZE));
}
#if defined(TEST_LATENCY_PROBE)
lat_probe_add_seg("prod_cycle_mcu", lat_mark_us(&tm));
#endif
}
}
break;