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

Subversion Repositories spacewiresystemc

[/] [spacewiresystemc/] [trunk/] [altera_work/] [spw_fifo_ulight/] [ulight_fifo/] [synthesis/] [submodules/] [hps_sdram_p0_acv_ldc.v] - Blame information for rev 40

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 redbear
// (C) 2001-2017 Intel Corporation. All rights reserved.
2
// Your use of Intel Corporation's design tools, logic functions and other 
3
// software and tools, and its AMPP partner logic functions, and any output 
4 40 redbear
// files from any of the foregoing (including device programming or simulation 
5 32 redbear
// files), and any associated documentation or information are expressly subject 
6
// to the terms and conditions of the Intel Program License Subscription 
7 40 redbear
// Agreement, Intel FPGA IP License Agreement, or other applicable 
8 32 redbear
// license agreement, including, without limitation, that your use is for the 
9
// sole purpose of programming logic devices manufactured by Intel and sold by 
10
// Intel or its authorized distributors.  Please refer to the applicable 
11
// agreement for further details.
12
 
13
 
14
 
15
`timescale 1 ps / 1 ps
16
 
17
module hps_sdram_p0_acv_ldc
18
(
19
        pll_hr_clk,
20
        pll_dq_clk,
21
        pll_dqs_clk,
22
        dll_phy_delayctrl,
23
        afi_clk,
24
        avl_clk,
25
        adc_clk,
26
        adc_clk_cps,
27
        hr_clk
28
);
29
parameter DLL_DELAY_CTRL_WIDTH  = "";
30
parameter ADC_PHASE_SETTING = 0;
31
parameter ADC_INVERT_PHASE = "false";
32
parameter IS_HHP_HPS = "false";
33
 
34
input pll_hr_clk;
35
input pll_dq_clk;
36
input pll_dqs_clk;
37
input [DLL_DELAY_CTRL_WIDTH-1:0]  dll_phy_delayctrl;
38
output afi_clk;
39
output avl_clk;
40
output adc_clk;
41
output adc_clk_cps;
42
output hr_clk;
43
 
44
wire phy_clk_dqs;
45
wire phy_clk_dq;
46
wire phy_clk_hr;
47
wire phy_clk_dqs_2x;
48
wire phy_clk_addr_cmd;
49
wire phy_clk_addr_cmd_cps;
50
 
51
 
52
generate
53
if (IS_HHP_HPS == "true") begin
54
        assign phy_clk_hr = pll_hr_clk;
55
        assign phy_clk_dq = pll_dq_clk;
56
        assign phy_clk_dqs = pll_dqs_clk;
57
        assign phy_clk_dqs_2x = 1'b0;
58
end else begin
59
        cyclonev_phy_clkbuf phy_clkbuf (
60
                .inclk ({pll_hr_clk, pll_dq_clk, pll_dqs_clk, 1'b0}),
61
                .outclk ({phy_clk_hr, phy_clk_dq, phy_clk_dqs, phy_clk_dqs_2x})
62
        );
63
end
64
endgenerate
65
 
66
wire [3:0] leveled_dqs_clocks;
67
wire [3:0] leveled_hr_clocks;
68
wire hr_seq_clock;
69
 
70
cyclonev_leveling_delay_chain leveling_delay_chain_dqs (
71
        .clkin (phy_clk_dqs),
72
        .delayctrlin (dll_phy_delayctrl),
73
        .clkout(leveled_dqs_clocks)
74
);
75
defparam leveling_delay_chain_dqs.physical_clock_source = "DQS";
76
assign afi_clk = leveled_dqs_clocks[0];
77
 
78
cyclonev_leveling_delay_chain leveling_delay_chain_hr (
79
    .clkin (phy_clk_hr),
80
    .delayctrlin (),
81
    .clkout(leveled_hr_clocks)
82
);
83
defparam leveling_delay_chain_hr.physical_clock_source = "HR";
84
assign avl_clk = leveled_hr_clocks[0];
85
 
86
cyclonev_clk_phase_select clk_phase_select_addr_cmd (
87
        .clkin(leveled_dqs_clocks),
88
        .clkout(adc_clk_cps)
89
);
90
defparam clk_phase_select_addr_cmd.physical_clock_source = "ADD_CMD";
91
defparam clk_phase_select_addr_cmd.use_phasectrlin = "false";
92
defparam clk_phase_select_addr_cmd.phase_setting = ADC_PHASE_SETTING;
93
defparam clk_phase_select_addr_cmd.invert_phase = ADC_INVERT_PHASE;
94
 
95
cyclonev_clk_phase_select clk_phase_select_hr (
96
    .phasectrlin(),
97
    .phaseinvertctrl(),
98
    .dqsin(),
99
`ifndef SIMGEN
100
    .clkin (leveled_hr_clocks[0]),
101
`else
102
    .clkin (leveled_hr_clocks),
103
`endif
104
    .clkout (hr_seq_clock)
105
);
106
defparam clk_phase_select_hr.physical_clock_source = "HR";
107
defparam clk_phase_select_hr.use_phasectrlin = "false";
108
defparam clk_phase_select_hr.phase_setting = 0;
109
assign hr_clk = hr_seq_clock;
110
 
111
generate
112
if (ADC_INVERT_PHASE == "true")
113
begin
114
        assign adc_clk = ~leveled_dqs_clocks[ADC_PHASE_SETTING];
115
end else begin
116
        assign adc_clk = leveled_dqs_clocks[ADC_PHASE_SETTING];
117
end
118
endgenerate
119
 
120
endmodule

powered by: WebSVN 2.1.0

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