Ee271 #HW2-2
Ee271 #HW2-2
Access the lab and use Synopsys tools for the HW problems and submit the screenshots
of your work. Your SJSU ID must be shown in the screenshots.
1) (10 points) Explain with example the difference between Mealy and Moore Machine.
2) (20 Points) Draw state diagram of “1010” pattern using Overlapping Moore
Sequence Detector. Also write Verilog code for the same.
3) (30 points) Design a Moore FSM which has a single input IN and a single output
OUT to detect the falling edge of the input IN. The output OUT is asserted (high) for
one clock cycle whenever the input changes from 1 to 0. The example waveforms
below would help you to understand how the output OUT behaves. Assume IN = 0
initially.
(i) Write the Verilog code for this FSM. The FSM should be reset asynchronously by
an active high reset signal. The states can be binary or one-hot encoded.
(ii) Write a testbench for your FSM Verilog module.
(iii) Run VCS for your FSM and obtain the waveforms.
6) (10 point) Given the following Verilog code, what value of "a" is displayed?
always @ (posedge clk) begin
a = 0;
a <= 1;
$display(a);
end