A clock frequency odd divider with nearly 50% duty.
ex1. the odd divider number is 3.
1. Using the posedge of clock, a 2-bit counter is cyclically added up from 0 to 2, and the new clock_1 will be reversed when cnt is 0 and 1. The counter can be replace with a 3-bit shift register.
2. Using the negedge of clock, repeat step 1.
3. Using logic AND operator, and the new clock_1 to the new clock_2.
4. The resule of step 3 is just the 3-divider clock with 50% duty.
ex2.A clock frequency 1.5-divider with no duty limited.
1~2. Repeat the step 1~2.
3. Shift the new clock_2, and the new clock_3 is got.
4. Then using the OR operator, OR the the new clock_1 to the new clock_3.
5. The resule of step 4 is just the 1.5-divider clock with no duty limited.
Note, The adder in step 1~2 can be replaced with a shift register, which just like using one-hot code.