ddr_input.v

来自「本人正在学习vhdl语言」· Verilog 代码 · 共 40 行

V
40 行
字号
//
// Module: 	DDR_Input
//
// Description: Verilog instantiation template
//		Double Data Rate Input
//		
//
// Device: 	VIRTEX-II Family 
//--------------------------------------------------------------------------

module ddr_input (data_in, q1, q2, clk, rst);

input data_in, clk, rst;

output q1, q2;
reg q1, q2;


//Describe input DDR registers (behaviorally) to be inferred

always @ (posedge clk or posedge rst) //rising-edge DDR reg and asynchronous reset

  begin
	if (rst) 
	   q1 = 1'b0;
	else 
	   q1 = data_in;
  end 

always @ (negedge clk or posedge rst) //falling-edge DDR reg and asynchronous reset

begin
	if (rst) 
	   q2 = 1'b0;
	else 
	   q2 = data_in;
  end 

endmodule

⌨️ 快捷键说明

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