Write Verilog code for a Moore detector that detects sequences10111 and 10101 on its j input and creates a pulse ofexactly one clock duration on its output. The output becomes 1 ifeither of the sequences, or an overlap of the two is detected.A) Show the state diagram of this machine.B) Write complete Verilog for the design.C) Write a testbench and test your state machineusing ModelSim.