有没有问题?
1 module cnt10(clk,rst,ena,q,count);
2 input clk,rst,ena;
3 output[3:0] q;
4 output count;
5 reg [3:0] q;
6 always @ (posedge clk or posedge rst)
7 begin
8 if(rst)q=4'd0;
9 else if(ena)
10 begin
11 if(q<9)q=q+1;//???
12 else q=0;
13 end
14 end
15assign count=q[3]&q[0];
16endmodule