HLS:@E Simulation failed: SIGSEGV.
前言
在HLS工具中使用C仿真时报如下错误,经定位问题后发现有数组开辟方式的问题。
错误描述
@E Simulation failed: SIGSEGV.
ERROR: [SIM 211-100] CSim failed with errors.
错误原因
官方解释
This signal was generated when a program tries to read or write outside the memory that is allocated for it, or to write memory that can only be read.
Possible cause of this problem may be: 1) the depth setting of pointer type argument is much larger than it needed;2)insufficient depth of array argument; 3)null pointer etc.
2021.01.22更新
根据自己这几天的调试经验,出现这种问题一般是在HLS仿真中出现数组越界访问的情况。所以出现这种问题时需检查数组开辟的空间大小是否合适、寻址过程是否越界、指针是否为空