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

Subversion Repositories openarty

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

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 13 dgisselq
//              of the IO necessary to make this happen for one pin only.  (In
9
//      the end, this never worked for the DDR3 SDRAM ...)  In the case of the
10
//      QSPI flash, this module helps to reduce the logic delays on the "high
11
//      speed" flash data wires (it's not really used in any DDR mode in that
12
//      case ...).
13 3 dgisselq
//
14
// Creator:     Dan Gisselquist, Ph.D.
15
//              Gisselquist Technology, LLC
16
//
17
////////////////////////////////////////////////////////////////////////////////
18
//
19
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
20
//
21
// This program is free software (firmware): you can redistribute it and/or
22
// modify it under the terms of  the GNU General Public License as published
23
// by the Free Software Foundation, either version 3 of the License, or (at
24
// your option) any later version.
25
//
26
// This program is distributed in the hope that it will be useful, but WITHOUT
27
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
28
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
29
// for more details.
30
//
31
// You should have received a copy of the GNU General Public License along
32
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
33
// target there if the PDF file isn't present.)  If not, see
34
// <http://www.gnu.org/licenses/> for a copy.
35
//
36
// License:     GPL, v3, as defined and found on www.gnu.org,
37
//              http://www.gnu.org/licenses/gpl.html
38
//
39
//
40
////////////////////////////////////////////////////////////////////////////////
41
//
42
//
43 13 dgisselq
module  xioddr(i_clk, i_oe, i_v, o_v, io_pin);
44 3 dgisselq
        input   i_clk, i_oe;
45
        input   [1:0]    i_v;
46
        output  [1:0]    o_v;
47 13 dgisselq
        inout           io_pin;
48 3 dgisselq
 
49
        wire    w_internal;
50 13 dgisselq
        reg     last;
51
        always @(posedge i_clk)
52
                last <= i_v[1];
53 3 dgisselq
 
54
        ODDR #(
55 13 dgisselq
                .DDR_CLK_EDGE("SAME_EDGE"),
56 3 dgisselq
                .INIT(1'b0),
57
                .SRTYPE("SYNC")
58
        ) ODDRi(
59
                .Q(w_internal),
60
                .C(i_clk),
61
                .CE(1'b1),
62 13 dgisselq
                .D1(last),      // Negative clock edge
63
                .D2(i_v[0]),     // Positive clock edge
64 3 dgisselq
                .R(1'b0),
65
                .S(1'b0));
66
 
67
        IDDR #(
68 13 dgisselq
                .DDR_CLK_EDGE("SAME_EDGE_PIPELINED"),
69 3 dgisselq
                .INIT_Q1(1'b0),
70
                .INIT_Q2(1'b0),
71
                .SRTYPE("SYNC")
72
        ) IDDRi(
73
                .Q1(o_v[0]),
74
                .Q2(o_v[1]),
75
                .C(i_clk),
76
                .CE(1'b1),
77 13 dgisselq
                .D(io_pin),
78 3 dgisselq
                .R(1'b0),
79
                .S(1'b0));
80
 
81 13 dgisselq
        assign  io_pin = (i_oe) ? w_internal:1'bz;
82 3 dgisselq
 
83
endmodule

powered by: WebSVN 2.1.0

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