module board(ball, net, bclk, serve, couclk, serclk);
input ball;
input net;
input bclk;
input serve;
output couclk;
reg couclk;
output serclk;
reg serclk;
always @(posedge bclk or posedge net)
if (net == 1'b1)
begin
serclk <= 1'b0;
couclk <= 1'b0;
end
else
begin
if (serve == 1'b1)
serclk <= 1'b1;
else
if (ball == 1'b1)
serclk <= 1'b1;
else
begin
serclk <= 1'b0;
couclk <= 1'b1;
end
end
endmodule
//搞定了,转换器转换的
|