3.1)
3.2) System Verilog code:-
module sequence_detector(in,clk,reset,y);
input in,clk,reset;
output y;
reg y;
reg [1:0] r,n;
parameter s0=2'b00,s1=2'b01,s2=2'b10;
always @(posedge clk or posedge reset)
if (reset)
r<= s0;
else
r<= n;
always @(r or in)
if (r ==s0 && in==0) n =s0;
else if (r ==s0 && in==1) n = s1;
else if (r ==s1 && in==0) n = s0;
else if (r ==s1 && in==1) n =s2;
else if (r ==s2 && in==0) n =s0;
else if (r ==s2 && in==1) n =s2;
always @(r or in)
if (r ==s2 && in==1) y=1;
else y=0;
endmodule
(Note: code is written in software , so it is errorfree).
We want to design a circuit that takes as input a serial bit stream and outputs...
Design a synchronous state machine which detects the serial bit sequence of 0 1 10 on the 1-bit input signal A (tested one bit at a time) and produces a "Moore-type positive-logic output of Y equal to 1 (and lasting just one clock period) only when that particular bit sequence is observed. At all other times, the output Y should be 0. The final 0 of the desired input sequence 0 110 can persist and become the first 0 of...
Design a sequential circuit that outputs 2’s complement of a bit sequence. The bit sequence will be given to the circuit in reverse order. For instance, if the given bit sequence is 0010101000, the circuit should output 1101011000.
Design a combinational circuit design that given a four-bit number as the input outputs an 8-bit number that represents the nth Fibonacci number in the sequence. For instance, if the input is 0001, the output should be the second number in the Fibonacci sequence. The Fibonacci series looks like the following: 0, 1, 1, 2, 3, 5, 8, 13, and so on. The first two numbers in the sequence are always 0 and 1. However, after that, you must add...
Q1) If R0 and R1 are both 16-bit serial shift registers, each with a single serial input (S_IN) and a single serial output (S_OUT), clock and reset. Design using R0 and R1 additional logic, a circuit that would store the output S_OUT of either R0 or R1 into a D-FF based on input CH. If CH is 0, S OUT of R0 will be stored in the D-FF (at the edge of the clock) and if CH is 1, S_OUT...
Write a behavioral Verilog module for a 4-bit Johnson counter that has 8 states. The counter loads the "0000" state if reset is low. The counter should start and end with this state. Write a testbench to verify the correctness of the 4-bit Johnson counter. The testbenclh should have a clock with a period of 20ns and a reset signal. The testbench should store the 4-bit binary outputs of the counter in a file, which will be used to provide...
Design a sequential circuit that takes in a sequence x1, x2, . . . xn of unsigned 8 bit integers as inputs, and outputs an unsigned 8 bit integer that counts how many groups of three adjacent inputs xi , xi+1, xi+2 are consecutive, increasing values (such as 1, 2, 3 or 137, 138, 139). Note that a sequence like 1, 2, 3, 4 has two such groups (1, 2, 3 and 2, 3, 4). The three values 254, 255,...
Design a 4-bit serial bit sequence detector. The input to your state detector is called DIN and the output is called FOUND. Your detector will assert FOUND anytime there is a 4-bit sequence of "0101". For all other input sequuences the output is not asserted. (a) (b) Provide the state diagram for this FSM. Encode your states using binary encoding. How many D-Flip-Flops does it take to implement the state memory for this FSM? (c) Provide the state transition table...
As we discussed in the lecture, you need to design the sequence recognizers in slide 24 and slide 25 by using: a. D-FF b. JK-FF c. T-FF d. combination of D & JK & T Flip-flop these are the slides he talking about. Sequence recognizer (Moore) • A sequence recognizer is a special kind of sequential circuit that looks for a special bit pattern in some input • The recognizer circuit has only one input, X - One bit of...
please answer question 4 (all parts of question4 please) will rate! 3. (30 pts) Design a 2-bit Gray code generator that ropetitively delivers the sequence 00301911-10-00when the input signal UP- 1,or in reverse order 009 10기け01 →00→ when UP-0. Your design should include an asynchronous low. active reset operation: the FSM goes to 00 state when a reset signal is applied In addition to the state output z[1). 2[0]. there is a carry/borrow output bit e which is I when...
Please label the circuit as well, the inputs and outputs Design a sequence detector that examines a string of inputs applied to the input X and generates an output Z-1 whenever the input sequence is 011. A typical input sequence is as follows: X 0 01 1 01 1 1 0 1 0 1 0 0 1 1 Z 0 0 01 0 01 0 0 0 0 0 0 0 0 1 Time: 0 1 2 3 4 5...