Question

In: Computer Science

A sequence detector is monitoring a serial input stream looking for either 0101 or 0110. The...

  1. A sequence detector is monitoring a serial input stream looking for either 0101 or 0110. The output is two consecutive cycles of 1’s, with the first of the two being asserted in the same cycle as the last input matching the sequence; in other words, it has to be a Mealy machine.

    1. Draw the state diagram for this sequence detector

    2. Assign states and create the state table, showing next states and output as a function of current state and input. You can call your state, input, and output variables

      anything you want.

    3. Write a Verilog module that implements the behavior

Solutions

Expert Solution

Here i am writing the code.

module detector(xd,y)
input xd;
output y;

module NOT_gate_level(x,xbar);
not (x,xbar);
module AND_4_gate_level(da,qabar,qb,qcbar,x);
AND(da,qabar,qb,qcbar,x);
endmodule
module AND_3_gate_level(c1,qabar,qc,x);
AND(c1,qabar,qc,x);
endmodule
module AND_4_gate_level(c2,qabar,qb,qcbar,xbar);
AND(c2,qabar,qb,qcbar,xbar);
endmodule
module OR_2_gate_level(db,c1,c2);
OR(db,c1,c2);
endmodule
module AND_3_gate_level(a1,qabar,qcbar,xbar);
AND(a1,qabar,qcbar,xbar);
endmodule
module AND_3_gate_level(a2,qabar,qbbar,xbar);
AND(a2,qabar,qbbar,xbar);
endmodule
module AND_4_gate_level(a3,qa,qbbar,qcbar,x);
AND(a3,qa,qbbar,qcbar,x);
endmodule
module OR_3_gate_level(dc,a1,a2,a3);
OR(dc,a1,a2,a3);
endmodule;
module dff_behavioral(da,clk,qa,qabar);
input da,clk;
output reg qa, qabar;
always@(posedge clk)
begin
qa<= da;
qabar = !da;
end
endmodule
module dff_behavioral(db,clk,qb,qbbar);
input db,clk;
output reg qb, qbbar;
always@(posedge clk)
begin
qb<= db;
qbbar = !db;
end
endmodule
module dff_behavioral(dc,clk,qc,qcbar);
input dc,clk;
output reg qc, qcbar;
always@(posedge clk)
begin
qc<= dc;
qcbar = !dc;
end
endmodule
module AND_4_gate_level(output x1,input qabar,qb,qc,x);
AND(x1,qabar,qb,qc,x);
endmodule
module AND_4_gate_level(output x2,input qa,qbbar,qc,x);
AND(x2,qa,qbbar,qc,x);
endmodule
module OR_2_gate_level(output xd,input x1,x2);
OR(xd,x1,x2);
endmodule
begin
y= xd;
end
endmodule

Here I have uploaded the solution.

If you have any doubt or problem, let me know in the comments.


Related Solutions

1. Design a sequence detector, a Mealy finite state machine to detect the serial bit sequence...
1. Design a sequence detector, a Mealy finite state machine to detect the serial bit sequence 1101, where the most significant bit (MSB) comes first and the least significant bit comes last. A) Draw the state diagram B) Draw the state table C) The circuit is to be implemented using JK flip-flops and combinational logic circuit. Derive the Boolean expression necessary for this implementation. D) Sketch the circuit diagram for your design. This should show all the flipflops, logic gates...
design a sequence detector that detects the sequence: 110. The device has one input x and...
design a sequence detector that detects the sequence: 110. The device has one input x and one output Y. When the input sequence is set to 1 followed by a 1 followed by a 0, then Y is set to 1 otherwise Y is set to 0. Use J-K flip-flops and minimum number of states is designing this detector and show the followings: a) Show the state diagram b)Show the state table for this detector
Design a Mealy state diagram for a sequence detector that has a single input and a...
Design a Mealy state diagram for a sequence detector that has a single input and a single output. The output is to be “1” unless the input has been “0” for four consecutive clock pulses or “1” for three consecutive pulses. Implement your design using D flip-flops and any logic gates. Assume non-overlapping input sequences are to be detected.
Design a detector for the input sequence X = 01011. The output Y must be 1...
Design a detector for the input sequence X = 01011. The output Y must be 1 when the sequence is detected, 0 in any other case. Draw the status diagram and generate a status table. Using the status table, design a logic circuit that generates the output function using T-type flip-flops. Please help me! Thanks!!!!
Design a sequence detector to detect either 01 or 10 sequences. Include a reset state. Show...
Design a sequence detector to detect either 01 or 10 sequences. Include a reset state. Show the state transition diagram, state table, K-maps, and complete circuit.
1. Using Moore machine approach design a sequence detector with one input and one output. When...
1. Using Moore machine approach design a sequence detector with one input and one output. When input sequence 010 occurs the output becomes 1 and remains 1 until the sequence 010 occurs again in which case the output returns to 0. The output remains 0 until, 010 occurs the third time, and so on. Your design should be able to handle overlapping sequences, i.e., input sequence 11001010100 should produce the output 00000110011. Implement your detector using D flip-flops and the...
Draw a TM that takes as input a sequence of 1s and doubles the input
Draw a TM that takes as input a sequence of 1s and doubles the input
python: ask the user to input a sequence of positive numbers. the end of the sequence...
python: ask the user to input a sequence of positive numbers. the end of the sequence is determined when the user enters a negative number. print out the maximum number from the sequence. output: keep entering positive numbers. to quit, input a negative number. enter a number: 67 enter a number: 5 enter a number: 8 enter a number: -3 largest number entered: 67 (note: i do not want to ask the user how many numbers they will input)
for this set of assignment, Moore state machine Design a sequence detector to detect "001", where...
for this set of assignment, Moore state machine Design a sequence detector to detect "001", where 0 arrives first, then 0, then 1. You need to show the test sequences you used to confirm that your state diagram is operating correctly. When the complete "001" sequence has been detected, the output goes high. Otherwise, the output stays at zero. Shows your state diagram, state table, encoded state table (use minimized bit encoding), logic equations, and logic circuit. (30 points) 3....
In practice, an LFSR sequence would not be used as keystream for a stream cipher, due...
In practice, an LFSR sequence would not be used as keystream for a stream cipher, due to the linear complexity. Answer the following questions about linear complexity. What is the linear complexity of a maximal length LFSR output sequence? Describe one method using LFSRs to produce a binary output sequence but with increased linear complexity. Draw a diagram to illustrate your construction.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT