我在系統的Verilog寄存器一個簡單的CPU工作如下之前:找到「模塊」模塊內關鍵字「endmodule」
module register(
input clk, e,
input [7:0]in,
output reg [7:0]out
);
[email protected](posedge clk or posedge e)
begin
if(e == 1)
out <= in;
else
out <= out;
end
endmodule
當我編譯的一切,我得到以下錯誤:
Error-[USVSNM] Unsupported System Verilog construct
register.v, 1
lm2
Found 'module' keyword inside a module before the 'endmodule'. Nested
modules are not supported.
Error-[SE] Syntax error
Following verilog source has syntax error :
"register.v", 2: token is 'input'
input clk, e,
^
我在這件事上摸不着頭腦。我只看到模塊聲明過一次,而且我的語法沒有看到任何問題。任何幫助表示讚賞!
你說SystemVerilog,但你沒有使用SV構造。 '寄存器'是用Verilog-2001編寫的。 – Greg