NOTSTT error: expecting a statement in verilog
NOTSTT error: expecting a statement in verilog
我有这个简单的测试代码(test.v)来生成编译错误。
`timescale 1ns/10ps
`define START 'h10000000;
`define WIDTH 800
`define HEIGHT 600
module test;
integer ifm_addr;
integer ifm_idx;
initial begin
ifm_idx = 0;
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
end
initial begin
#1000;
$finish;
end
endmodule
当我 运行 ncvlog test.v
时,我得到了这个错误,我不知道是什么问题。
ncvlog: 12.20-s008: (c) Copyright 1995-2013 Cadence Design Systems, Inc.
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
|
ncvlog: *E,NOTSTT (test.v,11|19): expecting a statement [9(IEEE)].
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
|
ncvlog: *E,MISEXX (test.v,11|28): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
请帮忙!
编辑:错误是因为 define START 'h10000000
末尾的 ;
。它使 +
出现在 initial
块中的语句之后。
您还没有定义ifm_idx
。
module test;
integer ifm_addr;
integer ifm_idx;
initial begin
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
end
我有这个简单的测试代码(test.v)来生成编译错误。
`timescale 1ns/10ps
`define START 'h10000000;
`define WIDTH 800
`define HEIGHT 600
module test;
integer ifm_addr;
integer ifm_idx;
initial begin
ifm_idx = 0;
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
end
initial begin
#1000;
$finish;
end
endmodule
当我 运行 ncvlog test.v
时,我得到了这个错误,我不知道是什么问题。
ncvlog: 12.20-s008: (c) Copyright 1995-2013 Cadence Design Systems, Inc.
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
|
ncvlog: *E,NOTSTT (test.v,11|19): expecting a statement [9(IEEE)].
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
|
ncvlog: *E,MISEXX (test.v,11|28): expecting an '=' or '<=' sign in an assignment [9.2(IEEE)].
请帮忙!
编辑:错误是因为 define START 'h10000000
末尾的 ;
。它使 +
出现在 initial
块中的语句之后。
您还没有定义ifm_idx
。
module test;
integer ifm_addr;
integer ifm_idx;
initial begin
ifm_addr = `START + ifm_idx*4*`HEIGHT*`WIDTH;
end