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

Subversion Repositories rtf68ksys

[/] [rtf68ksys/] [trunk/] [rtl/] [verilog/] [PSRAMCtrl_PudTimer.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 robfinch
// ============================================================================
2
//  2008  Robert Finch
3
//
4
//  PSRAM power up delay timer
5
//  PSRAM requires a 150 us delay on power up before operation
6
//
7
//
8
//  This source code is available for evaluation and validation purposes
9
//  only. This copyright statement and disclaimer must remain present in
10
//  the file.
11
//
12
//
13
//      NO WARRANTY.
14
//  THIS Work, IS PROVIDEDED "AS IS" WITH NO WARRANTIES OF ANY KIND, WHETHER
15
//  EXPRESS OR IMPLIED. The user must assume the entire risk of using the
16
//  Work.
17
//
18
//  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
19
//  INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES WHATSOEVER RELATING TO
20
//  THE USE OF THIS WORK, OR YOUR RELATIONSHIP WITH THE AUTHOR.
21
//
22
//  IN ADDITION, IN NO EVENT DOES THE AUTHOR AUTHORIZE YOU TO USE THE WORK
23
//  IN APPLICATIONS OR SYSTEMS WHERE THE WORK'S FAILURE TO PERFORM CAN
24
//  REASONABLY BE EXPECTED TO RESULT IN A SIGNIFICANT PHYSICAL INJURY, OR IN
25
//  LOSS OF LIFE. ANY SUCH USE BY YOU IS ENTIRELY AT YOUR OWN RISK, AND YOU
26
//  AGREE TO HOLD THE AUTHOR AND CONTRIBUTORS HARMLESS FROM ANY CLAIMS OR
27
//  LOSSES RELATING TO SUCH UNAUTHORIZED USE.
28
//
29
//
30
//      Webpack 9.2i xc3s1200e-4fg320   
31
//      21 LUTs / 12 slices / 220.848MHz
32
//      20 FFs
33
//
34
// ============================================================================
35
 
36
module PSRAMCtrl_PudTimer(rst, clk, pud);
37
parameter pClkFreq = 60000000;                          // 60 MHz
38
parameter tPWR = pClkFreq / 6667 + 1;           // 150 micro seconds
39
input rst;
40
input clk;
41
output pud;
42
 
43
reg [19:0] pudcnt;
44
assign pud = ~pudcnt[19];
45
 
46
always @(posedge clk)
47
        if (rst)
48
                pudcnt <= tPWR;
49
        else begin
50
                if (pudcnt[19]==1'b0)
51
                        pudcnt <= pudcnt - 20'd1;
52
        end
53
 
54
endmodule

powered by: WebSVN 2.1.0

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