common_cells
common_cells copied to clipboard
feature/idea: using a multiplexer to iterate between new and old values in clk_int_div
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.