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

Subversion Repositories freq_div

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 4 to Rev 5
    Reverse comparison

Rev 4 → Rev 5

/freq_div/trunk/rtl/odd.v
36,7 → 36,7
end
else
begin
counter <= counter-1;
counter <= counter - 1'b1;
end
end
end
43,7 → 43,7
 
reg [`SIZE-1:0] initial_begin; // this is used to offset the negative edge counter
wire [`SIZE:0] interm_3; // from the positive edge counter in order to
assign interm_3 = {1'b0,N} + 3; // guarante 50% duty cycle.
assign interm_3 = {1'b0,N} + 2'b11; // guarante 50% duty cycle.
 
// counter driven by negative edge of clock.
always @(negedge clk)
63,12 → 63,12
end
else
begin
counter2 <= counter2-1;
counter2 <= counter2 - 1'b1;
end
end
else if(enable)
begin
initial_begin <= initial_begin - 1;
initial_begin <= initial_begin - 1'b1;
end
end
 
100,6 → 100,10
rst_pulse <= 0;
end
end
end
 
always @(posedge clk)
begin
old_N <= N; // always save the old N value to guarante reset from
end // an even-to-odd transition.
 

powered by: WebSVN 2.1.0

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