C/RTL 联合仿真报错:顶层函数未在测试平台中调用
仿真 Sim / XSim 已闭环 Vitis HLS
一句话结论:为仿真设置 CFLAG 后解决该联合仿真报错。
运行 C/RTL Co-sim 时报错,提示顶层函数 matrixmul 未在 test bench 中调用,联合仿真失败。
ERROR: [COSIM 212-330] Aborting co-simulation: top function 'matrixmul' is not invoked in the test bench.
testbench 代码中含有 #ifdef,需要为仿真设置 CFLAG 才能调用顶层函数。
为仿真设置 CFLAG 后解决该联合仿真报错。
本文据 AMD 客户社区(原 Xilinx 论坛)真实报错帖整理为中文要点,非原文转载;技术细节以原帖与 AMD 官方文档为准。
原帖:https://adaptivesupport.amd.com/s/question/0D54U00007WJhLMSA1/i-am-new-to-vitis-hls-and-was-…