Question: verilog WHEN YOU WRITE YOUR VERILOG, YOU SHOULD LIMIT YOURSELF TO: 1. primitive gates: and, or, not, xor, nor, nand (as many inputs as you
verilog
WHEN YOU WRITE YOUR VERILOG, YOU SHOULD LIMIT YOURSELF TO: 1. primitive gates: and, or, not, xor, nor, nand (as many inputs as you want) 2. assign statements using the &, |, ~, !, ^, ==, and != operators and parentheses 3. bus selection (e.g., x[1]) and concatenation (e.g., { x[1], y[2] }) 4. verilog constants (e.g., 2'b10, 6'h37) 5. wires USE OF ANY OTHER OPERATORS IN YOUR SUBMITTED CODE WILL RESULT IN A ZERO ON THE PROBLEM. // Netflix has been engaged by movie studios to advertise new movies. // Netflix will show visitors one of 4 ads based on the kind of movie // they last watched.
// The following characteristics of the last watched movie are // considered: // - Whether the movie was animated? (A = 1 means the movie was // animated; otherwise A = 0) // - Whether the starring actor was female (F = 1) or male (F = 0)? // - The type of movie: (T = 2'b00 (action movie), 2'b01 (romance), // 2'b10 (comedy), 2'b11 (thriller))
// The ad served is chosen by the following rules: // - "A Good Day to Die Hard" (M = 2'b00) will be shown to viewers of // action movies and thrillers, unless they are animated or had a // female starring actor. // - "Safe Haven" (M = 2'b01) will be selected for people who had // viewed romance movies or movies with a female starring actor that // are not comedies. // - When the previous two movie ads aren't shown, "Escape from Planet // Earth" (M = 2'b10) will be shown to people viewing animated movies, // comedies, or action movies. // - Otherwise, "Saving Lincoln" (M = 2'b11) will be shown.
module movies(M, A, F, T); output [1:0] M; input A, F; input [1:0] T;
endmodule // movies
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
