📄 dsp_port.v
字号:
module dsp_port( input clk, input ce, input oe, input we, input re, input [15:0] din, input wr_ready, input rd_ready, input rdreq, output reg ardy, output reg int, output reg rclk, output reg wclk, output reg ren, output reg wen, output [15:0] dout, inout [15:0] ed);always @ (posedge clk) if(ce==0) begin rclk=~re; wclk=~we; ren=~oe; wen=oe; end//双向数据口,不能写在always句子中assign ed=((ce==0)&&(oe==0))?din:16'hZZZZ;assign dout=((ce==0)&&(oe==1))?ed:16'hZZZZ;always @ (posedge clk) if((ce==0)&&(oe==0)) ardy=rd_ready; else if((ce==0)&&(oe==1)) ardy=wr_ready; else ardy=1'bZ;always @ (posedge clk) if(rdreq==1) int=0; else int=1;endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -