Problem 2 (20 Points): Part 1: Create a VHDL type new_array…

Problem 2 (20 Points): Part 1: Create a VHDL type new_array for a one-dimensional unconstrained array where each element is 32 bit (std_logic_vector).  Part 2: Create a signal temp_array that is an instance of new_array with 100 total elements.  Part 3: If I wanted to output a clock with a 100 ns period, what ratio (scaling factor) would I use if I were using the on-board 50MHz clock? What would be the value of the counter that toggles the derived clock?

Problem 5 (20 Points) Create the controller to implement the…

Problem 5 (20 Points) Create the controller to implement the pseudocode below using the provided datapath. The pseudocode finds the largest prime number less than or equal to n. The output should be 1 when n is equal to 0 or 1. Do not write VHDL and instead create the FSM in graphical form (i.e., state machine with corresponding operations in each state). Make sure to specify all operations and state transitions. Answer this on one of your scratch papers, label the question and submit it after the exam. // inputs: go, n// outputs: output, done// reset valuesdone = 0;while(1){    // wait for go to start the circuit    while(go == 0);    done = 0;    //Load your input into a register    tempLargestPrime = 1;    regN = n;    regI = 2;    //Find largest prime number