Statistics
| Branch: | Tag: | Revision:

root / usrp2 / top / u2plus / capture_ddrlvds.v @ e7eb44d5

History | View | Annotate | Download (1 KB)

1

    
2

    
3
module capture_ddrlvds
4
  #(parameter WIDTH=7)
5
   (input clk,
6
    input ssclk_p,
7
    input ssclk_n,
8
    input [WIDTH-1:0] in_p,
9
    input [WIDTH-1:0] in_n,
10
    output reg [(2*WIDTH)-1:0] out);
11

    
12
   wire [WIDTH-1:0] 	   ddr_dat;
13
   wire 		   ssclk_regional;
14
   wire 		   ssclk_io;
15
   wire 		   ssclk;
16
   wire [(2*WIDTH)-1:0]    out_pre1;
17
   reg [(2*WIDTH)-1:0] 	   out_pre2;
18
   
19
   IBUFGDS #(.IOSTANDARD("LVDS_33"),.DIFF_TERM("TRUE")) clkbuf (.O(ssclk), .I(ssclk_p), .IB(ssclk_n));
20
   
21
   genvar 	       i;
22
   generate
23
      for(i = 0; i < WIDTH; i = i + 1)
24
	begin : gen_lvds_pins
25
	   IBUFDS #(.IOSTANDARD("LVDS_33"),.DIFF_TERM("TRUE")) ibufds 
26
	      (.O(ddr_dat[i]), .I(in_p[i]), .IB(in_n[i]) );
27
	   IDDR2 #(.DDR_ALIGNMENT("C1")) iddr2
28
	     (.Q0(out_pre1[2*i]), .Q1(out_pre1[(2*i)+1]), .C0(ssclk), .C1(~ssclk),
29
	      .CE(1'b1), .D(ddr_dat[i]), .R(1'b0), .S(1'b0));
30
	end
31
   endgenerate
32

    
33
   always @(negedge clk)
34
     out_pre2 <= out_pre1;
35

    
36
   always @(posedge clk)
37
     out      <= out_pre2;
38
   
39
endmodule // capture_ddrlvds