在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 530|回复: 9

[原创] system c的Core Dump问题

[复制链接]
发表于 2024-7-14 15:56:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
老铁们,最近在研究system c+uvm+vcs的联合仿真问题。

system c 版本:2.3.1
uvm 版本: 1.2a
vcs版本:2018

问题描述如下:

0 s(0): stim_axi_master0.stim_axi_master0.stim_axi_master0.stim_axi_master0: reading STL from
/output/des02/sim_rtl/uc0/stl_des02/axi_master0.p1.stl
Warning: No STL stream found for master stim_axi_master1
UVM_INFO @ 0: reporter [RNTST] Running test des02Test...
INFO: Clock clk0 period = 10000 ps
simv: ../../../../src/sysc/kernel/sc_cor_qt.cpp:109: virtual void sc_core::sc_cor_qt::stack_protect(bool): Assertion `ret == 0' failed.
An unexpected termination has occurred in ./simv due to a signal: Aborted
During SystemC/HDL delta-sync loop (RSysC) During execution of one SystemC delta cycle
sc_time_stamp=28350 sysc_new_sync=2 sysc_on_top=0 RSysC_cnt=3609 sysc_tli=1
Command line: ./simv +define+Plat64 +vcs+lic+wait +noportcoerce +define+ASSERT_ON +define+SONICS_STLTB +define+NOTBV +warn=noSC-TCMM-V5 +define+SONICS_SVA_DISABLE +define+SVA_disable +define+FCOV_disable +access+rw +timeformat=-12,0,ps +stlDirectory=  +define+UVM_REPORT_DISABLE_FILE_LINE +UVM_VERBOSITY=UVM_MEDIUM +UVM_TESTNAME=des02Test +UVM_NO_RELNOTES +v2k

--- Stack trace follows:

Dumping VCS Annotated Stack:
#0  0x00002aaab558660c in waitpid () from /lib64/libc.so.6
#1  0x00002aaab5503f62 in do_system () from /lib64/libc.so.6
#2  0x00002aaaabb141fc in SNPSle_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/liberrorinf.so
#3  0x00002aaaabb15d3e in SNPSle_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/liberrorinf.so
#4  0x00002aaaabb0e6e3 in SNPSle_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/liberrorinf.so
#5  0x00002aaaafc25abf in SNPSle_64133461705005bb725549e2e6fa1b3f () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/libvcsnew.so
#6  0x00002aaaafa6bc89 in SNPSle_82244d58c54c18c70d63edc9becab634 () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/libvcsnew.so
#8  0x00002aaab54f7387 in raise () from /lib64/libc.so.6
#9  0x00002aaab54f8a78 in abort () from /lib64/libc.so.6
#10 0x00002aaab54f01a6 in __assert_fail_base () from /lib64/libc.so.6
#11 0x00002aaab54f0252 in __assert_fail () from /lib64/libc.so.6
#12 0x00002aaaadc1a6cd in sc_core::sc_cor_qt::stack_protect(bool) () from /opt/tool/systemc/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#13 0x00002aaaadc3479b in sc_core::sc_thread_process::~sc_thread_process() () from /opt/tool/systemc/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#14 0x00002aaaadc34809 in sc_core::sc_thread_process::~sc_thread_process() () from /opt/tool/systemc/systemc-2.3.1/lib-linux64/libsystemc-2.3.1.so
#15 0x00000000011ce9b4 in sc_core::sc_simcontext::crunch_1dc() ()
#16 0x0000000001055d01 in RSysC1 ()
#17 0x0000000001056657 in RSysC ()
#18 0x00002aaaafbbe586 in SNPSle_63c7abb936d47b0707a381e1e7ec5406 () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/libvcsnew.so
#19 0x00002aaaafc39977 in SNPSle_490598bfebcc8e81efcf3d1815066cc9 () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/libvcsnew.so
#20 0x00002aaaafc4ffa4 in SNPSle_490598bfebcc8e81 () from /opt/tool/synopsys/vcs/vcs_o_2018_09_sp2/linux64/lib/libvcsnew.so
#21 0x0000000000d2a18f in ?? ()
#22 0x0000000000000000 in ?? ()
Command line: ./simv -vcs_internal_stack_annotator /tmp/vcs_20240714075344_56069/.stack_annotator_pmap_output_file_lY9xC8 /tmp/vcs_20240714075344_56069/.stack_annotator_gdb_output_file_7aPZK6

--- Stack Annotator Error Recovered ---

--- Stack trace follows:
/bin/cat: /tmp/vcs_20240714075344_56069/.stack_annotator_gdb_output_file_7aPZK6: No such file or directory
Child process exited with status 1: /bin/cat /tmp/vcs_20240714075344_56069/.stack_annotator_gdb_output_file_7aPZK6

Process VmPeak: 331140 kb, VmSize: 331136 kb
System Free Memory: 12840220 kb, System Free Swap: 10239996 kb

Completed context dump phase data location*
Note: Execution of ./simv exited with code 1
CPU time: 28.926 seconds to compile + .586 seconds to elab + 2.333 seconds to link + 4.411 seconds in simulation
make[2]: *** [VCSrun] Error 1
make[2]: Leaving directory `
make[1]: *** [simrun] Error 2
make[1]: Leaving directory `

 楼主| 发表于 2024-7-14 15:58:48 | 显示全部楼层
分析:
这个问题的原因看起来是栈保护发生了溢出造成的,有两种方法解决这个问题,
第一种是减小激励文件数量。
第二种是想办法扩大内存等等
 楼主| 发表于 2024-7-14 16:06:17 | 显示全部楼层
尝试采用了第一种简单的方法,减少激励内容:
原始激励:文件axi_master0.p0.stl
# -------------------------------------------------------------------------------------------------------------------------------------------
# axi_master0(axi_master0.p0.stl)(ts0.axi_master0.p0.f0) -> axi_slave0 WriteTransactions: 20 Bandwidth: 32.00 MB/s Start: 0.34us End: 10.34us
# -------------------------------------------------------------------------------------------------------------------------------------------
# axi_master0(axi_master0.p0.stl) Total                                WriteTransactions: 20 Bandwidth: 32.00 MB/s Start: 0.34us End: 10.34us
# -------------------------------------------------------------------------------------------------------------------------------------------
# STL Format:
# [cycle:] [tid [;[tgid]] [/cid]] [(burst_length,[,burst_seq[,burst_type[,atomic_length]]])] \
#          [ace:<acelite_cmd>/<acelite_domain>] cmd[/reqinfo] [as/]address [(be)] [data [(mask)] [datainfo[/dimask]]] \
#          [qos:<qos_value>] [size:<transfer_size>] [buf|!buf] [mod|!mod] [rda|!rda] [wra|!wra] [priv|!priv] [sec|!sec] [iacc|dacc]
# -------------------------------------------------------------------------------------------------------------------------------------------
      50:        (  4,INCR)bwr             0x7885a0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     100:        (  4,INCR)bwr             0x8e3f70 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     150:        (  4,INCR)bwr             0xe94fe0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     200:        (  4,INCR)bwr             0x7c2ed0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     250:        (  4,INCR)bwr             0xe62a20 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     300:        (  4,INCR)bwr             0xdb0a70 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     350:        (  4,INCR)bwr             0x8bdbe0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     400:        (  4,INCR)bwr             0x10a590 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     450:        (  4,INCR)bwr             0xe650c0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     500:        (  4,INCR)bwr             0xc2a150 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     550:        (  4,INCR)bwr             0xee5820 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     600:        (  4,INCR)bwr             0xde8bb0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     650:        (  4,INCR)bwr             0xa825b0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     700:        (  4,INCR)bwr             0x45a4d0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     750:        (  4,INCR)bwr             0x4a9750 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     800:        (  4,INCR)bwr             0x16db10 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     850:        (  4,INCR)bwr             0x8aa1a0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     900:        (  4,INCR)bwr             0x7ad820 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
     950:        (  4,INCR)bwr             0x435a0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_slave0
    1000:        (  4,INCR)bwr             0x605ea0 ndata                  size:4                              dacc  #ts0.axi_master0.p0.f0 -> axi_
修改的激励如下:
只保留“ 50:        (  4,INCR)bwr             0x7885a0 ndata                  size:4                              dacc  ”这一行,其他的都删掉,
重新运行仿真:
结果如下:【问题解决了】

make[3]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/csrc'
Chronologic VCS simulator copyright 1991-2018
Contains Synopsys proprietary information.
Compiler version O-2018.09-SP2_Full64; Runtime version O-2018.09-SP2_Full64;  Jul 14 16:04 2024
----------------------------------------------------------------
UVM-1.1d.Synopsys
(C) 2007-2013 Mentor Graphics Corporation
(C) 2007-2013 Cadence Design Systems, Inc.
(C) 2006-2013 Synopsys, Inc.
(C) 2011-2013 Cypress Semiconductor Corp.
----------------------------------------------------------------

Info: (I804) /IEEE_Std_1666/deprecated: deprecated constructor: sc_time(double,bool)
0 s(0): stim_axi_master0.stim_axi_master0.stim_axi_master0.stim_axi_master0: reading STL from /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/stl_des02/axi_master0.p0.stl
0 s(0): stim_axi_master0.stim_axi_master0.stim_axi_master0.stim_axi_master0: reading STL from /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/stl_des02/axi_master0.p1.stl
Warning: No STL stream found for master stim_axi_master1
UVM_INFO @ 0: reporter [RNTST] Running test des02Test...
INFO: Clock clk0 period = 10000 ps
INFO: 110340000 ps timeout was reached, ending simulation

--- UVM Report Summary ---

Quit count :     0 of    10
** Report counts by severity
UVM_INFO :    1
UVM_WARNING :    0
UVM_ERROR :    0
UVM_FATAL :    0
** Report counts by id
[RNTST]     1
$finish called from file "./stim.v", line 900.
$finish at simulation time 110340000 ps
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ta1_ta/ta1_fip/ta1_fip.v", 2434: stim.des02.sgn0.ta1.ta1_fip0.ta1_fip_func_ctrl.ta1_fip_func_ctrl_threadfunctrl_0.s388, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ta0_ta/ta0_fip/ta0_fip.v", 2434: stim.des02.sgn0.ta0.ta0_fip0.ta0_fip_func_ctrl.ta0_fip_func_ctrl_threadfunctrl_0.s388, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ia1_ia/ia1_fip/ia1_fip.v", 2342: stim.des02.sgn0.ia1.ia1_fip0.ia1_fip_func_ctrl.ia1_fip_func_ctrl_threadfunctrl_0.s360, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ia0_ia/ia0_fip/ia0_fip.v", 2342: stim.des02.sgn0.ia0.ia0_fip0.ia0_fip_func_ctrl.ia0_fip_func_ctrl_threadfunctrl_0.s360, 35 attempts, 0 match
           V C S   S i m u l a t i o n   R e p o r t
Time: 110340000 ps
CPU Time:      1.520 seconds;       Data structure size:   1.8Mb
Sun Jul 14 16:04:39 2024
CPU time: 36.593 seconds to compile + .579 seconds to elab + 2.327 seconds to link + 1.569 seconds in simulation
make[2]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0'
make[1]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0'
EXIT_STATUS=0 run_rtl_simulation /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/run_rtl_simulation.log
 楼主| 发表于 2024-7-14 18:45:17 | 显示全部楼层
make[3]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/csrc'
Chronologic VCS simulator copyright 1991-2018
Contains Synopsys proprietary information.
Compiler version O-2018.09-SP2_Full64; Runtime version O-2018.09-SP2_Full64;  Jul 14 16:04 2024
----------------------------------------------------------------
UVM-1.1d.Synopsys
(C) 2007-2013 Mentor Graphics Corporation
(C) 2007-2013 Cadence Design Systems, Inc.
(C) 2006-2013 Synopsys, Inc.
(C) 2011-2013 Cypress Semiconductor Corp.
----------------------------------------------------------------

Info: (I804) /IEEE_Std_1666/deprecated: deprecated constructor: sc_time(double,bool)
0 s(0): stim_axi_master0.stim_axi_master0.stim_axi_master0.stim_axi_master0: reading STL from /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/stl_des02/axi_master0.p0.stl
0 s(0): stim_axi_master0.stim_axi_master0.stim_axi_master0.stim_axi_master0: reading STL from /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/stl_des02/axi_master0.p1.stl
Warning: No STL stream found for master stim_axi_master1
UVM_INFO @ 0: reporter [RNTST] Running test des02Test...
INFO: Clock clk0 period = 10000 ps
INFO: 110340000 ps timeout was reached, ending simulation

--- UVM Report Summary ---

Quit count :     0 of    10
** Report counts by severity
UVM_INFO :    1
UVM_WARNING :    0
UVM_ERROR :    0
UVM_FATAL :    0
** Report counts by id
[RNTST]     1
$finish called from file "./stim.v", line 900.
$finish at simulation time 110340000 ps
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ta1_ta/ta1_fip/ta1_fip.v", 2434: stim.des02.sgn0.ta1.ta1_fip0.ta1_fip_func_ctrl.ta1_fip_func_ctrl_threadfunctrl_0.s388, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ta0_ta/ta0_fip/ta0_fip.v", 2434: stim.des02.sgn0.ta0.ta0_fip0.ta0_fip_func_ctrl.ta0_fip_func_ctrl_threadfunctrl_0.s388, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ia1_ia/ia1_fip/ia1_fip.v", 2342: stim.des02.sgn0.ia1.ia1_fip0.ia1_fip_func_ctrl.ia1_fip_func_ctrl_threadfunctrl_0.s360, 21 attempts, 0 match
"/home/cqiu/sonics_prj/ex01/mysoc/output/des02/rtl/sgn0_sgn/ia0_ia/ia0_fip/ia0_fip.v", 2342: stim.des02.sgn0.ia0.ia0_fip0.ia0_fip_func_ctrl.ia0_fip_func_ctrl_threadfunctrl_0.s360, 35 attempts, 0 match
           V C S   S i m u l a t i o n   R e p o r t
Time: 110340000 ps
CPU Time:      1.520 seconds;       Data structure size:   1.8Mb
Sun Jul 14 16:04:39 2024
CPU time: 36.593 seconds to compile + .579 seconds to elab + 2.327 seconds to link + 1.569 seconds in simulation
make[2]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0'
make[1]: Leaving directory `/home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0'
EXIT_STATUS=0 run_rtl_simulation /home/cqiu/sonics_prj/ex01/mysoc/output/des02/sim_rtl/uc0/run_rtl_simulation.log
发表于 2024-9-18 14:08:21 | 显示全部楼层
求教,第二种想办法扩大内存的方法有尝试吗,要怎么做呀
发表于 2024-9-20 14:42:15 | 显示全部楼层
有用第三方库吗,uvm和sc之间怎么通信的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-11-21 21:27 , Processed in 0.022250 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表