⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bidir1.v

📁 在采用 320x240 屏的设计实验箱上运行
💻 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 + -