马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
我使用的linux版本是centos 7,DVE版本是2016.6,scl版本为11.9,gcc版本为4.8.5。首先生成了三个文件clk_half.v、counter.v、counter_testbench.v具体代码如下:
module clk_half(
clk_in
,rst
,clk_out
);
input clk_in;
input rst;
output reg clk_out;
always @(posedge clk_in or posedge rst) begin
if (rst) begin
// reset
clk_out <= 0;
end
else begin
clk_out <= !clk_out;
end
end
endmodule
module counter ( out, clk, reset ) ;
input clk, reset;
output [3:0] out;
reg [3:0] out;
always @(posedge clk or posedge reset) begin
if (reset) begin
// reset
out <= 4'b0;
end
else begin
out <= out + 1'b1;
end
end
wire clk_out;
clk_half uu1(
.clk_in(clk)
,.rst(reset)
,.clk_out(clk_out)
);
endmodule
module counter_testbench () ;
wire [3:0] out;
reg clk;
reg reset;
counter u0 (
.out (out[3:0]),
.reset (reset),
.clk (clk)
);
initial begin
clk = 1'b0;
forever #10 clk = ~clk;
end
initial begin
reset = 1'b0;
#4 reset = 1'b1;
#4 reset = 1'b0;
end
initial begin
$dumpfile("counter.vcd");
$dumpvars(0,u0);
end
initial #1000 $finish;
endmodule
在linux下载入运行环境之后使用命令vcs clk_half.v counter.v counter_testbench.v
生成文件夹:csrc、simv.daidir以及可执行文件simv
终端返回:
*----------------------------------------------*
[lubaoyi@tteda pre_sim]$ vcs clk_half.v counter.v counter_testbench.v
Chronologic VCS (TM)
Version L-2016.06 -- Mon May 11 13:44:54 2020
Copyright (c) 1991-2016 by Synopsys Inc.
ALL RIGHTS RESERVED
This program is proprietary and confidential information of Synopsys Inc.
and may be used and disclosed only as authorized in a license agreement
controlling such use and disclosure.
Parsing design file 'clk_half.v'
Parsing design file 'counter.v'
Parsing design file 'counter_testbench.v'
Top Level Modules:
counter_testbench
No TimeScale specified
Starting vcs inline pass...
2 unique modules to generate
2 modules and 0 UDP read.
recompiling module counter
recompiling module counter_testbench
All of 2 modules done
rm -f _csrc*.so pre_vcsobj_*.so share_vcsobj_*.so
if [ -x ../simv ]; then chmod -x ../simv; fi
g++ -o ../simv -Wl,-rpath-link=./ -Wl,-rpath='$ORIGIN'/simv.daidir/ -Wl,-rpath=./simv.daidir/ -Wl,-rpath='$ORIGIN'/simv.daidir//scsim.db.dir -m32 -m32 -rdynamic amcQwB.o objs/amcQw_d.o _12055_archive_1.so SIM_l.o rmapats_mop.o rmapats.o rmar.o rmar_llvm_0_1.o rmar_llvm_0_0.o /eda/s/vcs-mx/L-2016.06/linux/lib/libzerosoft_rt_stubs.so /eda/s/vcs-mx/L-2016.06/linux/lib/libvirsim.so /eda/s/vcs-mx/L-2016.06/linux/lib/liberrorinf.so /eda/s/vcs-mx/L-2016.06/linux/lib/libsnpsmalloc.so /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so /eda/s/vcs-mx/L-2016.06/linux/lib/libsimprofile.so /eda/s/vcs-mx/L-2016.06/linux/lib/libuclinative.so -Wl,-whole-archive /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsucli.so -Wl,-no-whole-archive /eda/s/vcs-mx/L-2016.06/linux/lib/vcs_save_restore_new.o /eda/s/vcs-mx/L-2016.06/linux/lib/ctype-stubs_32.a -ldl -lc -lm -lpthread -ldl
../simv up to date
CPU time: .143 seconds to compile + .276 seconds to elab + .105 seconds to link
*------------------------------------------*
然后运行./simv
生成ucli.key文件,该文件为空
终端返回信息如下:
*------------------------------------------*
Command line: ./simv
--- Stack trace follows:
Dumping VCS Annotated Stack:
#0 0xf7705430 in __kernel_vsyscall ()
#1 0xf29bf1cb in waitpid () from /lib/libc.so.6
#2 0xf293face in do_system () from /lib/libc.so.6
#3 0xf293fed5 in system () from /lib/libc.so.6
#4 0xf2c08e2b in system () from /lib/libpthread.so.0
#5 0xf71ad3ac in SNPSle_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313e639d2928478c79b3f673f99203bcf8be64600612100082236bffb2007f1e0ef9 () from /eda/s/vcs-mx/L-2016.06/linux/lib/liberrorinf.so
#6 0xf71ae83c in SNPSle_10ee25eff68cd8461c9146fa1d0b35e87067f3c8015b313efba706aab251478fa49e66610e453774633a6c152e7ef778f2202cda681f3d4e () from /eda/s/vcs-mx/L-2016.06/linux/lib/liberrorinf.so
#7 0xf71a6fe1 in SNPSle_d35ca1ff70d465c2b9b1a72eee90a506fdd009d3de3db1de () from /eda/s/vcs-mx/L-2016.06/linux/lib/liberrorinf.so
#8 0xf4f8cb70 in SNPSle_64133461705005bb725549e2e6fa1b3f () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#9 0xf4e08365 in SNPSle_82244d58c54c18c70d63edc9becab634 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#11 0xf717190d in mem_free () from /eda/s/vcs-mx/L-2016.06/linux/lib/libsnpsmalloc.so
#12 0xf715c406 in snpsFreeFunc () from /eda/s/vcs-mx/L-2016.06/linux/lib/libsnpsmalloc.so
#13 0xf4c1f171 in SNPSle_77e776236473f4bc83d28b2811172395 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#14 0xf4c19d4d in SNPSle_4e2b4bf1677349c165275718f4085a72 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#15 0xf4ac9cec in SNPSle_e08561af70b15158c1effee38014f2e6 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#16 0xf4ac9e43 in SNPSle_6a600e65c1e59889d2167a3056e08869 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#17 0xf4ac9ea3 in SNPSle_79019f86c02f3a7a4fc861b56b22e07a449f142e33a64a009cd88060dca82713b97bc310751f5b0c () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#18 0xf2c00b3c in start_thread () from /lib/libpthread.so.0
#19 0xf29ff44e in clone () from /lib/libc.so.6
#0 0xf7705430 in __kernel_vsyscall ()
#1 0xf29bf676 in nanosleep () from /lib/libc.so.6
#2 0xf29bf44d in sleep () from /lib/libc.so.6
#3 0xf4a4cc27 in SNPSle_95ae9cc2e78cc668673c60b8d88c4908 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#4 0xf4a4cdea in SNPSle_92de4d0d4cf0d6931bc37e8d42a01d93 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#5 0xf4a4b4e6 in SNPSle_b76ef993ee82b3d58a5cadddbec8b67c () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#6 0xf4a4b7ee in SNPSle_f28f24b8c84ac8f6e02e0b03bcd33aa8 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#7 0xf4a172b0 in SNPSle_b02289328df49303de0a4a986839ba718c1b162de585ec41 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#8 0xf4a17ee5 in SNPSle_b02289328df493035a8cfe7a2a96e3f1 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#9 0xf4a19ea1 in SNPSle_7309f02bf869c35a32837a6e487da0db () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#10 0xf4a1ab41 in SNPSle_b02289328df493035a8cfe7a2a96e3f14356a2494eb82428 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#11 0xf4a1c12d in SNPSle_b02289328df493035a8cfe7a2a96e3f105a2510afcb822b0f2351f16fde66779 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#12 0xf4a1ca7a in SNPSle_ba11b1edbd04051f5bb81b1861cdf84a () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#13 0xf4a089af in SNPSle_2e65c0794628fc5af60953149776c29b () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#14 0xf49feed6 in SNPSle_541f757be362289a7c9e5618c0ff28327846f8d3cc02839f () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#15 0xf49fe001 in SNPSle_541f757be362289a7c9e5618c0ff283244765933a2ab0071 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#16 0xf49f7644 in SNPSle_c0de1345d5ab80930e06dd2b68f214c3 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#17 0xf49f8883 in SNPSle_25cd5712eacded5feaee03dc3430943e () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#18 0xf4fa585b in SNPSle_490598bfebcc8e8183ad3550288b1f82 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#19 0xf4fb1178 in SNPSle_490598bfebcc8e81 () from /eda/s/vcs-mx/L-2016.06/linux/lib/libvcsnew.so
#20 0x0804ce53 in main ()
No context available
*-------------------------------------------------*
并未生成波形文件,请问是那个环节出错了呢
|