module data_cal( input [15:0] d,//输入数据 input [1:0] sel,//输入位选信号 input clk, input rst, output reg [4:0]out,//数据相加结果 output reg validout ); reg [15:0] d1; always @(posedge clk or negedge rst) begin if (!rst) out <= 'b0; else case(sel) 'd0: begin out <= 'b0; d1 <= d; //sel为0时输入的值有效 end 'd1: be...