|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
请大神帮我看看啊
- module led(
- clk,rstn,led);
- input clk,rstn;
- output led;
- reg[11:0]count;
- parameter T200MS = 12'd4095;
- always@(posedge clk or negedge rstn)
- if(!rstn)
- count <= 12'd0;
- else if(count==T200MS)
- count <= 12'd0;
- else
- count <= count + 1'b1;
-
- assign led = ((count>12'd2048)&&(count<=T200MS))?1'b1:1'b0;
- endmodule
复制代码 |
|