Error: Can't synthesize current design -- design does not contain any logic
用Quartus ii 8.0建立工程,建立bdf文件及verilog文件,其中verilog文件内容如下:
module Enc0
(
// {{ALTERA_ARGS_BEGIN}} DO NOT REMOVE THIS LINE!
Pulse, Set, Clock, Pos
// {{ALTERA_ARGS_END}} DO NOT REMOVE THIS LINE!
);
input [1:0] Pulse;
input Set;
input Clock;
inout reg [23:0] Pos;
reg [23:0] Position;
reg [1:0] EncAB;
always @(negedge Clock, negedge Set)
begin
if(Set == 0)
begin
Position = Pos;
EncAB = Pulse;
end
else
begin
if((Pulse == 2'b00 && EncAB == 2'b10) ||
(Pulse == 2'b01 && EncAB == 2'b00) ||
(Pulse == 2'b11 && EncAB == 2'b01) ||
(Pulse == 2'b10 && EncAB == 2'b11))
begin
Position <= Position + 24'b000000000000000000000001;
end
else if((Pulse == 2'b10 && EncAB == 2'b00) ||
(Pulse == 2'b00 && EncAB == 2'b01) ||
(Pulse == 2'b01 && EncAB == 2'b11) ||
(Pulse == 2'b11 && EncAB == 2'b10))
begin
Position <= Position - 24'b000000000000000000000001;
end
EncAB <= Pulse;
Pos <= Position;
end
end
endmodule
编译之后,出了上面那个错误,请问这是怎么回事,如何解决?如果知道的请说得详细一些,不胜感激。 |