Question: ( 2 0 points ) Problem 5 . 2 8 on the textbook. You are not required to submit simulation plots. But you should clearly

(20 points) Problem 5.28 on the textbook. You are not required to submit simulation plots.
But you should clearly show the counting sequence starting with 001 at time 0 in your answer. With blocking assignments this code produces the desired logic function, which is \( f=\)\( a_{1} a_{0}+\cdots+a_{n-1} a_{n-2}\). What logic function is produced if we change the code to use non-blocking assignments?
5.28 The Verilog code in Figure P5.9 represents a 3-bit linear-feedback shift register (LFSR). This type of circuit generates a counting sequence of pseudo-random numbers that repeats after \(2^{n}-1\) clock cycles, where \( n \) is the number of flip-flops in the LFSR. Synthesize a circuit to implement the LFSR in a chip. Draw a diagram of the circuit. Simulate the circuit's behavior by loading the pattern 001 into the LFSR and then enabling the register to count. What is the counting sequence?
```
module lfsr (R, L, Clock, Q);
input [0:2] R;
input L, Clock;
output reg [0:2] Q;
always @(posedge Clock)
if (L)
Q=R;
else
Q={Q[2], Q[0]^ Q[2], Q[1]};
endmodule
```
Figure P5.9 Code for a linear-feedback shift register.
( 2 0 points ) Problem 5 . 2 8 on the textbook.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!