Question

Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code...

Problem 4 - 5 Pts] Verilog [Part 4.1 - 5 Pts] What does the Verilog code below do? Provide as much detail as possible and provide informative descriptions/labels for the 4 input/outputs.

module mystery (W, X, Y, Z);

input W, X, Y; output Z;

reg [7:0] P;

always @ (posedge W or posedge X)

begin

if (X) P = 8'b00000000;

else P = {P[6:0], Y);

end

assign Z = P[7];

endmodule

Homework Answers

Answer #1

Here W and X acts as conditions to perform operation or not and Y as input to get assigned depending on X, W and Z is the output.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
How do I design a divide by 4 clock in verilog using 2 D Flip Flop...
How do I design a divide by 4 clock in verilog using 2 D Flip Flop blocks? I have created this divide by 2 clock D Flip Flop block so far: module divide_by_2(D, Clk,reset, Q, Qnext); //Divide by 2 clock with reset using D flip flop    input Clk, D, reset;    output Q,Qnext;    reg Q;       assign Qnext = ~Q;       always @(posedge Clk or posedge reset) //always at the positive edge of the clock or...
Using the programing language of Verilog I attempted to make a counter to count from 0...
Using the programing language of Verilog I attempted to make a counter to count from 0 to 9 then loop back to 0 using the internal clock of the FPGA cyclone IV from altera. the code is posted at the bottom counts from 0 to 1 then loop back to 0 instead of counting up to 9. Can someone help me spot the error so it can count up to 9 module Encryption(SW, CLOCK_50, OUT, HEX0); input[1:0]SW; input CLOCK_50; output...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue...
QUESTION 1 What does the following code segment output? int red, blue; red = 7; blue = red + 2 * 5 red++; blue = blue + red; cout << blue; 4 points    QUESTION 2 Is the following statement true or false? The Boolean expression in the following if statement will be true for all values of x in the range from 10 to 20 (including the endpoints) and false for all other values: int x; if (x >=...
Problem Set 2: Pearson’s correlation (7 pts) Research Scenario: Is there a positive relationship between grit...
Problem Set 2: Pearson’s correlation (7 pts) Research Scenario: Is there a positive relationship between grit and GPA in high school seniors? A researcher examined this issue by having students beginning their senior year of high school complete a grit inventory using a Likert-based scale (range 1 – 7), where higher numbers indicate more “grit”. GPA was self-reported (scale 0 – 4.0). Enter the data shown here into SPSS to assess whether there is a positive relationship between grit and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT