📄 bidir1.v
字号:
module bidir1(
hwr_,
hrd_,
hd,
swr_,
srd_,
sd,
dumy
);
input hwr_;
input hrd_;
inout [7:0] hd;
output swr_;
output srd_;
inout [7:0] sd;
input dumy;
wire hd_out_oe;
reg [7:0] hd_out;
wire sd_out_oe;
reg [7:0] sd_out;
always @(hwr_)
begin
if (!hwr_) sd_out = hd;
end
always @(hrd_)
begin
if (!hrd_) hd_out = sd;
end
assign swr_ = hwr_;
assign srd_ = hrd_;
assign sd_out_oe = !hwr_ & dumy;
//assign sd_out_oe = !hwr_;
assign hd_out_oe = !hrd_;
assign hd = hd_out_oe ? hd_out : 8'hzz;
assign sd = sd_out_oe ? sd_out : 8'hzz;
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -