module out2(j,w,y,xi,psw,g,w1);
input [7:0]j;
input [15:0] y;
input [7:0] xi;
input [23:0] w ;
input [23:0]psw;
wire [15:0]d;
wire [23:0]out;
wire [23:0]temp;
wire [23:0]temp1;
wire [15:0]y2;
reg [7:0]k;
output [23:0]g;
output [23:0]w1;
integer i;
initial
begin
temp1 = 0;
end
assign k = j;
for ( i =1;i<=k;i=i+1)
begin temp1 = temp1 + (w[i]*y[i]);
end
assign g = psw + temp1;//Evaluated the Partial Sum uptill now
assign w1 = (xi * y[j]) + (y[j]*w[j]) - (y[j]*g);
endmodule