Question: You are asked to implement a four-bit prime (or one) number function in VHDL. The following entity has been declared. prime input isprime - 4


You are asked to implement a four-bit prime (or one) number function in VHDL. The following entity has been declared. prime input isprime - 4 bit binary number true if "input" is a prime number 1, 2, 3, 5, 7, 11, or 13 library ieee; use ieee.std_logic_1164.all; entity prime is port( input : in std_logic_vector (3 downto 0); isprime : out std_logic ); end prime; State the main functionality of this function. What are you expecting at the input and output? a) Write the architecture description using case statements. b) Optimise the logical statements in the previous part to implement it with logic gates. Discuss the use of case statements in comparison to using logic gates. Is one better than the other? Why or why not? Question 3 Not yet answered Marked out of 1.00 P Flag question Consider the four-bit prime (or one) number function you have synthesized in the previous section. You are now asked to develop a test bench for the function. Here, you need to answer the question, "What do you want to test to your code as input? What will you expect at the output?" Use a for loop and the report function to print the output in simulation. You are reminded that the concatenation symbol is the ampersand (&). *If you're not confident with for loops yet, feel free to omit it. You are asked to implement a four-bit prime (or one) number function in VHDL. The following entity has been declared. prime input isprime - 4 bit binary number true if "input" is a prime number 1, 2, 3, 5, 7, 11, or 13 library ieee; use ieee.std_logic_1164.all; entity prime is port( input : in std_logic_vector (3 downto 0); isprime : out std_logic ); end prime; State the main functionality of this function. What are you expecting at the input and output? a) Write the architecture description using case statements. b) Optimise the logical statements in the previous part to implement it with logic gates. Discuss the use of case statements in comparison to using logic gates. Is one better than the other? Why or why not? Question 3 Not yet answered Marked out of 1.00 P Flag question Consider the four-bit prime (or one) number function you have synthesized in the previous section. You are now asked to develop a test bench for the function. Here, you need to answer the question, "What do you want to test to your code as input? What will you expect at the output?" Use a for loop and the report function to print the output in simulation. You are reminded that the concatenation symbol is the ampersand (&). *If you're not confident with for loops yet, feel free to omit it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
