appu1985
Member level 2
Code:
module out2(clk,j,lrate,w,y,xi,psw,g,w1);
input lrate;
input [7:0]j;
input [7:0]y ;
input [7:0] xi;
input [7:0] w ;
input [7:0]psw;
input clk;
wire [15:0]d;
wire [23:0]out;
wire [23:0]temp;
wire [23:0]temp1;
wire [15:0]y2;
output [23:0]g;
output [23:0]w1;
assign d = lrate * y;
assign out = d * xi;
assign temp = out + w;
assign y2 = w[j] * y[j] ;
assign temp1 = psw + y2;
assign g = temp1 + psw;
assign w1 = temp - temp1;
endmodule