Designing a synchronous counter with d flip flops
A design simplification is to first design the up/down Johnson and ring counters independently.  Then just place a mux that selects Q* of either one depending on y. 







simulate this circuit &ndash; Schematic created using CircuitLab