摘要: //计数器 //led每500ms状态翻转一次 //系统时钟为50m,对应周期为20ns, //500ms=500_000_000ns(ms μs ns) /20 = 25_000_000次 module counter(clk50m, rst_n, led_out); input clk50m; 阅读全文
posted @ 2021-09-05 19:58 瓜大wjs 阅读(2282) 评论(0) 推荐(0) 编辑
摘要: module code3_8(a,b,c,out); //输入端口 input a; input b; input c; //输出端口 output reg [7:0]out; //【】定义out信号为8位的位宽,高位在前,低位在后 //所有在always@中要赋值的信号都必须定义为reg型 alw 阅读全文
posted @ 2021-09-05 17:48 瓜大wjs 阅读(533) 评论(0) 推荐(0) 编辑