求问:MODELSIM编译错误。
时间:10-02
整理:3721RD
点击:
小弟正在自学MODELSIM,有个问题想请问一下:
编译的测试模块的时候总是提示以下错误:near" 't ":Illegal base specifier in numeric constant.
near" 't ":syntax error,unexpected "BASE",expecting"class"
请问是什么原因,一下是测试模块的代码:
'timescale 1ns/1ns
'include "./compare.v"
module t;
reg a,b;
wire equal;
initial
begin
a=0;
b=0;
#100 a=0;b=1;
#100 a=1;b=1;
#100 a=1;b=0;
#100 a=0;b=0;
#100 $stop;
end
compare m(.equal(equal),.a(a),.b(b));
endmodule
编译的测试模块的时候总是提示以下错误:near" 't ":Illegal base specifier in numeric constant.
near" 't ":syntax error,unexpected "BASE",expecting"class"
请问是什么原因,一下是测试模块的代码:
'timescale 1ns/1ns
'include "./compare.v"
module t;
reg a,b;
wire equal;
initial
begin
a=0;
b=0;
#100 a=0;b=1;
#100 a=1;b=1;
#100 a=1;b=0;
#100 a=0;b=0;
#100 $stop;
end
compare m(.equal(equal),.a(a),.b(b));
endmodule
module t ();
`timescale之前的那个标点好像你用的是单引号,而不是点符号。`include也似乎是同样的问题。你确定一下。
楼上正解
呵呵,对于初学者,一定要找些例程看看,刚开始我也是会感觉好难写,其实把基础做好,复杂的都是由基础组成的。
对啊,·timescale 和’timescale不一样
