//Behavioral description of 2-to-1-line multiplexer module mux2to1_bh(A, B, SEL, L); input A, B, SEL; output L; reg L; //define register variable always @(SEL or A or B) if (SEL == 1) L = b; //也可以写成 if (SEL) L=B; else L = A; endmodule 例 //Behavioral description of 4-to-1-line multiplexer module mux4to1_bh(A,SEL,E,L); input [3:0] A; input [1:0] SEL; output L; reg L; always @(A or SEL or E) begin if (E==1) L = 0; else case (SEL) 2’d0: L = A[0]; 2’d1: L = A[1]; 2’d2: L = A[2]; 2’d3: L = A[3]; endcase end endmodule
您可能关注的文档
最近下载
- DB15T3801-2024 内蒙古公共建筑节能设计标准.pdf VIP
- 《首饰 指环尺寸 定义、测量和命名》标准修订发展报告.docx VIP
- 新解读《GB_T 11888 - 2021首饰 指环尺寸 定义、测量和命名》最新解读.pptx VIP
- 仪器设备期间核查方法.pptx VIP
- GB46768-2025《有限空间作业安全技术规范》解读_-60页.pptx
- 仪器设备期间核查课件.ppt VIP
- (正式版)DB37∕T 2950-2017 《首饰手镯尺寸定义、测量和命名》.docx VIP
- 首饰 指环尺寸 定义、测量和命名标准立项修订与发展报告.docx VIP
- 仪器设备维护与保养培训.pptx VIP
- 《建筑设计防火规范》GB50016-2014.pptx VIP
原创力文档

文档评论(0)