mrdimm-area-ledger.md 4.6 KB

MRDIMM Native Area Ledger (实测面积账本)

Device: Anlogic EF2L45BG256B (Capacity: 4480 LUTs, 2240 Slices, 4480 Registers, 12 BRAM9K, 15 DSP)
Toolchain: Anlogic TD 2026.1 SP2 (Build 6.2.2.200067), Linux container prod2u-dev on edk2-uefi-lab
Native Receipts Recovered:

  • Baseline d4e2595: /data/prod2u/runs/fetch-factor-td-d4e2595/native/td-receipt.json
  • DSP Pipeline 037b459: /data/prod2u/runs/dsp-done-td-037b459/native/td-receipt.json

1. 原生综合数据对比与超限分析

Metric Device Limit Baseline d4e2595 Candidate 037b459 Delta vs Baseline
LUT 4480 5449 (+969) 5209 (+729) -240 LUT
Registers 4480 3929 (87.7%) 4405 (98.3%) +476 Regs
BRAM (9K) 12 8 (66.7%) 8 (66.7%) 0
DSP 15 1 (6.7%) 9 (60.0%) +8 DSP
Packed Slices 2240 3016 (+776) 354* (+PHY fail) -
Fit / Bitgen PASS FAIL FAIL (PHY-9011) -

*注:037b459 虽在门级网表报告 354 slices,但实际在布局阶段因 Design's lut number = 4501 plus slices exceeds limit 2240 发生 PHY-9011 致命阻塞。


2. 真实网表分层面积归因(基于 d4e2595 Gate Area 报告)

pie title MRDIMM Core LUT Distribution (Total 5058 LUTs)
    "Motor Subsystem (u_motor)" : 3024
    "Telemetry & Snapshot (u_snapshot)" : 832
    "Host Command & Framer" : 646
    "CT7428 Sensor Acquisition" : 497
    "PWM & Watchdog (u_output)" : 195

详细模块门级消耗清单

Instance Module LUT (Logic) Ripple (Carry) Total LUT Seq (DFF) BRAM DSP
top prod2u_mrdimm_rs232_only_top 5069 380 5449 3944 8 1
core prod2u_mrdimm_top 5058 380 5438 3929 8 1
├── u_motor motor_engine 2775 249 3024 2579 4 1
│ ├── u_axes motor_axis_core 1130 114 1244 1448 0 0
│ │ └── u_state_bank motor_axis_state_bank 411 0 411 966 0 0
│ ├── u_limit_history motor_limit_history 230 0 230 0 0 0
│ ├── u_events motor_event_ring 183 31 214 75 2 0
│ ├── u_queue motor_queue_storage 109 10 119 270 1 1
│ ├── u_stage ef2_bram_dp 0 0 0 0 1 0
│ └── 内部胶水/调度/深度 internal FSM & muxes 1123 94 1217 ~-174 0 0
├── u_snapshot mrdimm_snapshot_mux 828 4 832 381 1 0
│ └── u_snapshot_memory ef2_bram_dp (输入端 MUX) 622 0 622 0 1 0
├── u_command mrdimm_host_command 318 22 340 221 0 0
├── u_ct_snapshot ct7428_snapshot 303 30 333 130 2 0
├── u_ct_i2c i2c_word_reader 194 12 206 88 0 0
├── u_output mrdimm_output_core 186 9 195 248 0 0
│ └── u_pwm pwm_bitmap_engine 63 9 72 41 0 0
├── u_frame_rx frame_rx 134 19 153 98 0 0
├── u_frame_tx frame_tx 114 5 119 33 0 0
├── u_host_rx uart_rx_byte 45 0 45 32 0 0
├── u_host_tx uart_tx_byte 25 0 25 21 0 0
├── u_host_crc crc16_serial 43 0 43 30 0 0
└── 其他时钟/复位/MUX prod2u_por, ticks 50 19 69 43 0 0

3. 核心成本机制与优化方向

  1. 电机执行子系统占整机 55.5%:
    • 322-bit 状态字每拍寄存:3 轴达 966 DFF,扇入 MUX 达 411 LUT。
    • motor_axis_core 算术加法器/比较器冗余:多套 32/34-bit 进位链占 114 ripple + 数百 LUT。
    • 调度/队列/深度管理占用 1217 LUT。
  2. 快照生成占整机 15.3%:
    • 622 LUT 被综合器归入 u_snapshot_memory 接入端,系因为单拍内从数百个源信号向 16-bit BRAM 端口组合 MUX 所致。
  3. 等价面积重构路径(Route A)空间:
    • 拆分快路径(STEP/DIR/限位截断/下一期限)与冷路径(统计步数/位置累加/历史),预计节约 250-350 LUT。
    • 共享多周期算术(16-bit ALU + carry),预计节约 150-250 LUT。
    • 复用请求 Payload RAM 消除 u_stage 专用 BRAM 及双写胶水,预计节约 60-120 LUT。
    • 顺序化快照组装,消除宽 MUX,预计节约 200-300 LUT。
    • 合计理论潜力:660 - 1020 LUT,足以跨越 969 LUT 缺口实现硬件 Fit。