私は以下のように簡単なVerilogコードを実装しようとしています:Verilogで次の再宣言エラーが発生するのはなぜですか?
module test1(
input ACLK,
input RST,
output test_output1,
output test_output2
);
//wire ACLK;
//wire RST;
reg test_output1;
reg test_output2;
assign test_output1 = ACLK;
always @(posedge ACLK or negedge RST)
begin
if(!RST)
begin
//test_output1 <=0;
test_output2 <=0;
end
else
begin
//test_output1 <=0;
test_output2 <=1;
end
end
endmodule
私はザイリンクスのISEで、それを合成しようとすると、私は、次のエラーメッセージが表示されます。
=========================================================================
* HDL Compilation *
=========================================================================
Compiling verilog file "test1.v" in library work
ERROR:HDLCompilers:27 - "test1.v" line 30 Illegal redeclaration of 'test_output1'
ERROR:HDLCompilers:27 - "test1.v" line 31 Illegal redeclaration of 'test_output2`
私は解決することができませんこのエラー。どんな助けも高く評価されます。
test_output1は、レジスタとワイヤの両方として宣言されています。 – vim