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

Subversion Repositories openarty

[/] [openarty/] [trunk/] [rtl/] [xioddr.v] - Blame information for rev 3

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

Line No. Rev Author Line
1 3 dgisselq
////////////////////////////////////////////////////////////////////////////////
2
//
3
// Filename:    xioddr.v
4
//
5
// Project:     OpenArty, an entirely open SoC based upon the Arty platform
6
//
7
// Purpose:     For the DDR3 SDRAM, this handles the Xilinx specific portions
8
//              of the IO necessary to make this happen for one pin only.
9
//
10
// Creator:     Dan Gisselquist, Ph.D.
11
//              Gisselquist Technology, LLC
12
//
13
////////////////////////////////////////////////////////////////////////////////
14
//
15
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
16
//
17
// This program is free software (firmware): you can redistribute it and/or
18
// modify it under the terms of  the GNU General Public License as published
19
// by the Free Software Foundation, either version 3 of the License, or (at
20
// your option) any later version.
21
//
22
// This program is distributed in the hope that it will be useful, but WITHOUT
23
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
24
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25
// for more details.
26
//
27
// You should have received a copy of the GNU General Public License along
28
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
29
// target there if the PDF file isn't present.)  If not, see
30
// <http://www.gnu.org/licenses/> for a copy.
31
//
32
// License:     GPL, v3, as defined and found on www.gnu.org,
33
//              http://www.gnu.org/licenses/gpl.html
34
//
35
//
36
////////////////////////////////////////////////////////////////////////////////
37
//
38
//
39
module  xioddr(i_clk, i_oe, i_v, o_v, io_w);
40
        input   i_clk, i_oe;
41
        input   [1:0]    i_v;
42
        output  [1:0]    o_v;
43
        inout           io_w;
44
 
45
        wire    w_internal;
46
 
47
        ODDR #(
48
                .DDR_CLK_EDGE("OPPOSITE_EDGE"),
49
                .INIT(1'b0),
50
                .SRTYPE("SYNC")
51
        ) ODDRi(
52
                .Q(w_internal),
53
                .C(i_clk),
54
                .CE(1'b1),
55
                .D1(i_v[0]),
56
                .D2(i_v[1]),
57
                .R(1'b0),
58
                .S(1'b0));
59
 
60
        IDDR #(
61
                .DDR_CLK_EDGE("OPPOSITE_EDGE"),
62
                .INIT_Q1(1'b0),
63
                .INIT_Q2(1'b0),
64
                .SRTYPE("SYNC")
65
        ) IDDRi(
66
                .Q1(o_v[0]),
67
                .Q2(o_v[1]),
68
                .C(i_clk),
69
                .CE(1'b1),
70
                .D(io_w),
71
                .R(1'b0),
72
                .S(1'b0));
73
 
74
        assign  io_w = (i_oe) ? w_internal:1'bz;
75
 
76
endmodule

powered by: WebSVN 2.1.0

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