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

Subversion Repositories spacewiresystemc

[/] [spacewiresystemc/] [trunk/] [rtl/] [DEBUG_VERILOG/] [clock_reduce.v] - Blame information for rev 30

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

Line No. Rev Author Line
1 23 redbear
//+FHDR------------------------------------------------------------------------
2
//Copyright (c) 2013 Latin Group American Integhrated Circuit, Inc. All rights reserved
3
//GLADIC Open Source RTL
4
//-----------------------------------------------------------------------------
5
//FILE NAME      :
6
//DEPARTMENT     : IC Design / Verification
7
//AUTHOR         : Felipe Fernandes da Costa
8
//AUTHOR’S EMAIL :
9
//-----------------------------------------------------------------------------
10
//RELEASE HISTORY
11
//VERSION DATE AUTHOR DESCRIPTION
12
//1.0 YYYY-MM-DD name
13
//-----------------------------------------------------------------------------
14
//KEYWORDS : General file searching keywords, leave blank if none.
15
//-----------------------------------------------------------------------------
16
//PURPOSE  : ECSS_E_ST_50_12C_31_july_2008
17
//-----------------------------------------------------------------------------
18
//PARAMETERS
19
//PARAM NAME            RANGE   : DESCRIPTION : DEFAULT : UNITS
20
//e.g.DATA_WIDTH        [32,16] : width of the DATA : 32:
21
//-----------------------------------------------------------------------------
22
//REUSE ISSUES
23
//Reset Strategy        :
24
//Clock Domains         :
25
//Critical Timing       :
26
//Test Features         :
27
//Asynchronous I/F      :
28
//Scan Methodology      :
29
//Instantiations        :
30
//Synthesizable (y/n)   :
31
//Other                 :
32
//-FHDR------------------------------------------------------------------------
33
 
34
module clock_reduce(
35
                        input clk,
36
                        input reset_n,
37
 
38
                        output reg clk_reduced
39
                   );
40
 
41
 
42
reg [10:0] counter;
43
 
44
always@(posedge clk)
45
begin
46
 
47
        if(!reset_n)
48
        begin
49
                counter <= 11'd0;
50
                clk_reduced <= 1'b0;
51
        end
52
        else
53
        begin
54
                if(counter >=11'd0 && counter <=11'd24 )
55
                begin
56
                        clk_reduced <= 1'b1;
57
                        counter <= counter + 11'd1;
58
                end
59
                else if(counter >=11'd25 && counter <=11'd49 )
60
                begin
61
                        clk_reduced <= 1'b0;
62
                        counter <= counter + 11'd1;
63
                end
64
                else
65
                begin
66
                        clk_reduced <= 1'b1;
67
                        counter <= 11'd0;
68
                end
69
 
70
        end
71
 
72
end
73
 
74
endmodule

powered by: WebSVN 2.1.0

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