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
Read Details