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

📄 delay.v

📁 在Quartus下使用D触发器来加入延迟
💻 V
字号:
module de(in,out,clr_n,clk);
input clk;
input clr_n;
input [7:0] in;
output[7:0] out;
reg [7:0] out;
always @(posedge clk or negedge clr_n)
begin
  if(clr_n==0)
    out<=0;
  else out<=in;
end
endmodule
module delay(Din,Dout,clk,rst);
input [7:0] Din;
input clk,rst;
output [7:0] Dout;
//wire Dout;
wire [7:0]out1;
wire [7:0]out2;
wire [7:0]out3;
wire [7:0]out4;
wire [7:0]out5;
wire [7:0]out6;
wire [7:0]out7;
wire [7:0]out8;
de (.in(Din),.out(out1),.clr_n(rst),.clk(clk));
de (.in(out1),.out(out2),.clr_n(rst),.clk(clk));
de (.in(out2),.out(out3),.clr_n(rst),.clk(clk));
de (.in(out3),.out(out4),.clr_n(rst),.clk(clk));
de (.in(out4),.out(out5),.clr_n(rst),.clk(clk));
de (.in(out5),.out(out6),.clr_n(rst),.clk(clk));
de (.in(out6),.out(out7),.clr_n(rst),.clk(clk));
de (.in(out7),.out(out8),.clr_n(rst),.clk(clk));
de (.in(out8),.out(Dout),.clr_n(rst),.clk(clk));
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -