common_cells icon indicating copy to clipboard operation
common_cells copied to clipboard

feature/idea: using a multiplexer to iterate between new and old values in clk_int_div

Open oops408 opened this issue 2 years ago • 0 comments

For example: We can set up an always block generating a new clk_o based on whether the counter is gated or a new value is requested. Then we can do something like:

clk_o <= (clk_gated_cnt != 3'b0) ? clk_div : ((div_i == clk_div) ? clk_div : new_clk_div);

We no longer need the old div_i register and therefore can eliminate the logic to check between old and new registers.

oops408 avatar Mar 18 '23 08:03 oops408