活动介绍
file-type

Cortex-M0 联合调试:VCS Tarmac与Verdi HWSW_Debug实战

PDF文件

下载需积分: 35 | 823KB | 更新于2024-08-05 | 121 浏览量 | 19 下载量 举报 1 收藏
download 立即下载
"Cortex-M0的Tarmac与Verdi HWSW_Debug联合调试方法" 在嵌入式系统开发中,尤其是针对微控制器如Cortex-M0的调试,理解和掌握有效的调试工具至关重要。本文详细介绍了如何在Linux环境中利用VCS仿真工具的Tarmac功能和Cadence的Verdi HWSW_Debug工具进行C代码与FSDB波形的联合调试。这种方法有助于开发者迅速定位到特定时刻CPU执行的具体指令,从而高效地发现并解决问题。 首先,调试流程分为四个步骤: 1. **编译C代码**:使用armcc或gcc编译C代码,生成包含调试信息(-g)的elf文件,用于转换成fsdb,以及生成hex文件供VCS仿真使用。编译时通常设置-O0选项以保留更多调试信息,但也可选择其他优化等级。 2. **VCS仿真**:利用step1生成的hex文件进行带有CPU Tarmac信息的VCS仿真。在TestBench中,需要例化与CPU匹配的Tarmac记录模块,如Cortex-M0的cm0_tarmac.v,来记录CPU活动。 3. **转换Tarmac日志**:将VCS仿真的Tarmac日志转换为FSDB格式,以便于Verdi读取和分析。 4. **Verdi HWSW_Debug联合调试**:启动Verdi,选择HWSW_Debug功能,结合FSDB波形与C代码进行联合调试,能直观地看到波形中的事件与C代码的对应关系。 在进行上述步骤时,确保正确配置了VCS和Verdi的环境变量,以便顺利运行仿真和调试。此外,对于复杂的C代码和涉及AXI等高速总线的系统,这种联合调试方法尤其有用,因为它能够清晰地展示软件和硬件交互的细节。 在实际操作中,了解汇编语言、C编译器生成的.lst文件以及CPU总线工作原理是很有帮助的,这可以直接通过观察仿真波形的PC值和地址总线来定位问题。但对于大型项目或不熟悉这些的开发者,Verdi HWSW_Debug工具提供了更直观、便捷的解决方案。 Cortex-M0的Tarmac与Verdi HWSW_Debug的联合调试是嵌入式系统开发中一种强大的调试技术,它使得在软件和硬件层面的协同调试成为可能,大大提高了问题定位和调试的效率。无论是在Cortex-M0还是其他Cortex系列CPU上,这一方法都能通用,是嵌入式工程师必备的技能之一。

相关推荐

filetype

Solver failed when solving following set of constraints rand svt_axi_transaction::burst_size_enum burst_size = svt_axi_transaction::burst_size_enum::BURST_SIZE_256BIT; // rand_mode = OFF constraint slave_burst_size // (from this) (constraint_mode = ON) (/project/PANGU_FM/work/xiaojh/PANGU_FM/trunk/dv/vrf/hnic/env/cust_svt_axi_slave_transaction.sv:33) { (burst_size == svt_axi_transaction::burst_size_enum::BURST_SIZE_64BIT); } ======================================================= Note-[CNST-SATE] Standalone test extracted A standalone test-case for this failure has automatically been extracted from randomize serial 68 partition 9. To reproduce the error using the extracted testcase, please use the following command: cd /project/PANGU_FM/work/xiaojh/PANGU_FM/trunk/dv/vrf/hnic/sim/snps_m0/simv.cst/testcases; vcs -sverilog extracted_r_68_p_9_inconsistent_constraints.sv -R To reproduce the error using the original design and verbose logging, re-run simulation using: simv +ntb_solver_debug=trace +ntb_solver_debug_filter=68 To reproduce the error using the original design and debug the error with Verdi/DVE: 1. re-compile the original design with -debug_access+all, if not already done so % vcs -debug_access+all <other options> 2. re-run the simulation interactively with -gui/-verdi % simv -gui/-verdi <other options> 3. enter the following commands to begin interactive constraint inconsistency debug within Verdi/DVE I. set the breakpoint: verdi/dve> stop -solver -serial 68 II. run the simulation till it stops: verdi/dve> run III. step in the constraint solver: verdi/dve> step -solver

wrhwindboy
  • 粉丝: 0
上传资源 快速赚钱