1. As discussed in the text, an n-bit Johnson counter is a mod-2n counter. Write the VHDL code for a mod-7 counter constructed from a 4-bit Johnson counter.
2. Write the VHDL code for the following state machine using the state assignment A = 111, B = 001, C = 101, D = 011, E = 000, F = 110, and G = 010: