Figure 9: Overview of VHDL code (flow chart).