module P_NCO( clk, rstn, clr, clr_acc, pha, s1, s2, s3, s1_o, s2_o, s3_o, fcw, cos, sin ); input clk; input rstn; input clr; input clr_acc; input [15:0] pha; input [15:0] s1; input [15:0] s2; input [15:0] s3; output [15:0] s1_o; output [15:0] s2_o; output [15:0] s3_o; output [15:0] cos; output [15:0] sin; input [47:0] fcw; reg [15:0] pha_r; always@(posedge clk or negedge rstn) if(!rstn) pha_r <= 16'd0; else pha_r <= pha; wire [18:0] pha0; PIPE3_ACC_48BIT inst_pipe(.clk(clk),.rstn(rstn),.in(fcw),.clr(clr_acc),.ptw(pha),.s_o_1(s1_o),.s_o_2(s2_o),.s_o_3(s3_o),.s_i_1(s1),.s_i_2(s2),.s_i_3(s3),.out(pha0)); PH2AMP inst_ph2amp_0( .clk(clk) , .rstn(rstn) , .pha_map(pha0) , .sin_o(sin) , .cos_o(cos) ); endmodule