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

Subversion Repositories pwm

[/] [pwm/] [trunk/] [RTL/] [down_clocking_even.v] - Diff between revs 2 and 6

Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 1... Line 1...
/*Author: Zhuxu
/*Down clocking module
        m99a1@yahoo.cn
 
Down clocking module
 
Output clock frequency is the original frequency divided by an even number
Output clock frequency is the original frequency divided by an even number
*/
*/
module  down_clocking_even(
module  down_clocking_even(
input   i_clk,
input   i_clk,
input   i_rst,
input   i_rst,
Line 21... Line 19...
 
 
wire    go;
wire    go;
assign  go=((i_divisor!=0)&&i_rst);
assign  go=((i_divisor!=0)&&i_rst);
reg     [15:0]ct;
reg     [15:0]ct;
reg     clk;
reg     clk;
always@(posedge i_clk or i_rst)
always@(posedge i_clk or negedge i_rst)
        if(!i_rst)begin
        if(!i_rst)begin
                ct<=0;
                ct<=0;
                clk<=0;
                clk<=0;
        end
        end
        else if(go)begin
        else if(go)begin

powered by: WebSVN 2.1.0

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