摘要: 功能说明 状态图 状态 信号 S0 Hwy=G, Cntry=R S1 Hwy=Y, Cntry=R S2 Hwy=R, Cntry=R S3 Hwy=R, Cntry=G S4 Hwy=R, Cntry=Y Verilog代码 `define TRUE 1'b1 `define FALSE 1'b 阅读全文
posted @ 2023-01-23 20:09 vicky2021 阅读(811) 评论(0) 推荐(0) 编辑
摘要: // 四选一多路选择器 module mux4_to_1(out, i0,i1,i2,i3,s1,s0) // 声明端口 output out; input i1,i2,i3,i4; input s1,s2; // 声明输出端口为寄存器变量 reg out; // 若输入信号改变,则重新计算输出信号 阅读全文
posted @ 2023-01-23 18:18 vicky2021 阅读(900) 评论(0) 推荐(0) 编辑
摘要: 门级建模 wire out1, in1, in2; // 与门(and)和或门(or) and a1(out1, in1, in2); // 与门 nand na1(out1, in1, in2); // 与非门 or or1(out1, in1, in2); // 或门 nor nor1(out1 阅读全文
posted @ 2023-01-23 13:04 vicky2021 阅读(124) 评论(0) 推荐(0) 编辑