OpenCores
URL https://opencores.org/ocsvn/openarty/openarty/trunk

Subversion Repositories openarty

[/] [openarty/] [trunk/] [rtl/] [xioddrserdesb.v] - Blame information for rev 48

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    xioddrserdesb.v
4
//
5
// Project:     A wishbone controlled DDR3 SDRAM memory controller.
6
//
7
// Purpose:     
8
//
9
// Creator:     Dan Gisselquist, Ph.D.
10
//              Gisselquist Technology, LLC
11
//
12
////////////////////////////////////////////////////////////////////////////////
13
//
14
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
15
//
16
// This program is free software (firmware): you can redistribute it and/or
17
// modify it under the terms of  the GNU General Public License as published
18
// by the Free Software Foundation, either version 3 of the License, or (at
19
// your option) any later version.
20
//
21
// This program is distributed in the hope that it will be useful, but WITHOUT
22
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License along
27
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
28
// target there if the PDF file isn't present.)  If not, see
29
// <http://www.gnu.org/licenses/> for a copy.
30
//
31
// License:     GPL, v3, as defined and found on www.gnu.org,
32
//              http://www.gnu.org/licenses/gpl.html
33
//
34
//
35
////////////////////////////////////////////////////////////////////////////////
36
//
37
//
38
module  xioddrserdesb(i_clk_fast, i_clk_fast_inv, i_clk_slow, i_reset,
39
                i_oe, i_data, o_data, io_pin_p, io_pin_n);
40
        input           i_clk_fast, i_clk_fast_inv, i_clk_slow, i_reset;
41
        input           i_oe;
42
        input   [7:0]    i_data;
43
        output  [7:0]    o_data;
44
        inout           io_pin_p, io_pin_n;
45
 
46
        wire            feedback;
47
        wire            oe_for_fabric__unconnected;
48
        wire    [1:0]    local_shiftout__unconnected;
49
        wire            local_tbyte_out__unconnected;
50
        wire            send_to_iob;
51
        wire            oe_for_iob;
52
        wire    [1:0]    iserdes_shiftout__unconnected;
53
 
54
        OSERDESE2       #(
55
                        .DATA_RATE_OQ("DDR"),
56
                        .DATA_RATE_TQ("BUF"),
57
                        .DATA_WIDTH(8), // 8 data wires sent per clkdiv
58
                        .INIT_OQ(1'b1),
59
                        .SERDES_MODE("MASTER"),
60
                        // 
61
                        .TRISTATE_WIDTH(1),
62
                        .INIT_TQ(1'b1),
63
                        .TBYTE_CTL("FALSE"),
64
                        .TBYTE_SRC("FALSE")
65
                ) oserdes_i(
66
                        .CLK(i_clk_fast),
67
                        .CLKDIV(i_clk_slow),
68
                        .OCE(1'b1),
69
                        .OFB(feedback),
70
                        .OQ(send_to_iob),
71
                        .RST(i_reset),
72
                        //
73
                        .TCE(1'b1),
74
                        .TQ(oe_for_iob),
75
                        .TFB(oe_for_fabric__unconnected),
76
                        .T1(~i_oe), .T2(~i_oe), .T3(~i_oe), .T4(~i_oe),
77
                        //
78
                        .SHIFTOUT1(local_shiftout__unconnected[0]),
79
                        .SHIFTOUT2(local_shiftout__unconnected[1]),
80
                        .SHIFTIN1(1'b0),
81
                        .SHIFTIN2(1'b0),
82
                        .TBYTEIN(1'b0),
83
                        .TBYTEOUT(local_tbyte_out__unconnected),
84
                        //
85
                        // And now for the actual data we wish to send
86
                        //
87
                        .D1(i_data[0]), .D2(i_data[1]),
88
                        .D3(i_data[2]), .D4(i_data[3]),
89
                        .D5(i_data[4]), .D6(i_data[5]),
90
                        .D7(i_data[6]), .D8(i_data[7])
91
                );
92
 
93
        IOBUFDS iobuf_i(
94
                        .T(oe_for_iob),
95
                        .I(send_to_iob),
96
                        .IO(io_pin_p), .IOB(io_pin_n),
97
                        .O(input_from_iobuf));
98
 
99
        ISERDESE2       #(
100
                        .DATA_RATE("DDR"),
101
                        .DATA_WIDTH(8), // 8 data wires sent per clkdiv
102
                        .INTERFACE_TYPE("OVERSAMPLE"),
103
                        .IOBDELAY("NONE"),
104
                        .NUM_CE(1),
105
                        .OFB_USED("FALSE"),
106
                        .SERDES_MODE("MASTER")
107
                ) iserdes_i(
108
                        .BITSLIP(1'b0),
109
                        .CE1(1'b1),
110
                        .CE2(1'b1),
111
                        .CLK(i_clk_fast),
112
                        .CLKB(i_clk_fast_inv),
113
                        .CLKDIV(i_clk_slow),
114
                        .CLKDIVP(1'b0), // Only used in MEMORY_DDR3 mode?
115
                        .D(input_from_iobuf),
116
                        .DDLY(1'b0),
117
                        .DYNCLKDIVSEL(1'b0),
118
                        .DYNCLKSEL(1'b0),
119
                        .O(iserdes_unconnected_output),
120
                        .OCLK(i_clk_fast),
121
                        .OCLKB(i_clk_fast_inv),
122
                        .OFB(feedback),
123
                        .Q1(o_data[0]), .Q2(o_data[1]),
124
                        .Q3(o_data[2]), .Q4(o_data[3]),
125
                        .Q5(o_data[4]), .Q6(o_data[5]),
126
                        .Q7(o_data[6]), .Q8(o_data[7]),
127
                        .RST(i_reset),
128
                        .SHIFTIN1(1'b0), .SHIFTIN2(1'b0),
129
                        .SHIFTOUT1(iserdes_shiftout__unconnected[0]),
130
                        .SHIFTOUT2(iserdes_shiftout__unconnected[1])
131
                );
132
 
133
endmodule
134
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.