Ich versuche, einen einfachen Verilog-Code wie unten zu implementieren:Warum tritt in Verilog der folgende Fehler bei der erneuten Deklaration auf?
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
ich die folgende Fehlermeldung erhalten, wenn ich versuche, es in Xilinx ISE zu synthetisieren:
=========================================================================
* 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`
Ich bin nicht in der Lage zu lösen dieser Fehler. Jede Hilfe würde sehr geschätzt werden.
test_output1 wurde sowohl als Register als auch als Draht deklariert. – vim