module pidt1(error,uk,clk,rst);
input [16:0]error;
input clk,rst;
output reg[16:0]uk;
reg [16:0]uk1;
wire [16:0]uk_wire;
always@(posedge clk or negedge rst)
if(!rst)
begin
uk1<=0;
end
else
begin
uk<=uk_wire;
uk1<=uk;
end
assign uk_wire=uk1+error;
endmodule |