1 Star 0 Fork 0

打野/Verilog练习代码

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
practice_24.6.18.v 702 Bytes
一键复制 编辑 原始数据 按行查看 历史
打野 提交于 2024-06-22 21:47 +08:00 . 2024-6-18
//2024-6-18 姜青羊
//?;实现多路选择器
`timescale 1ns/10ps
module muxtwo (
A,
B,
sel,
Y
);
input A,B,sel;
output Y;
assign Y=sel?(A^B):(A&B);
endmodule
//-----testbench-----
module tb_muxtwo ();
reg[2:0] sab;
wire y;
muxtwo muxtwo (
.A(sab[1]),
.B(sab[0]),
.sel(sab[2]),
.Y(y)
);
initial begin
sab<=3'b000;
#100 $stop;
end
always #10 sab=sab+1;
endmodule
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fight_wild/verilog-code.git
git@gitee.com:fight_wild/verilog-code.git
fight_wild
verilog-code
Verilog练习代码
master

搜索帮助