Professional Documents
Culture Documents
EXPERIMENT 13
AIM : To design and simulate the given sequential circuit shown in diagram using Verilog HDL.
EDA TOOL USED : Xilinx ISE 8.1i
METHODOLOGY : The circuit is implemented using two JK flip-flops having the same clock
and an input x which will be used to decide the next state of the circuit. The J and K inputs of the
two flip-flops are designed from the state table using the excitation table and K-map reduction. This
technique is used in complex machines where the different processes can be considered as the
different states of the machine.
State Diagram :
VERILOG CODE :
module jk(clk,j,k,q);
57
input clk,j,k;
output reg q;
end
always@(posedge clk)
begin
q<=((j&(~q))+((~k)&q));
end
endmodule
module seqct(clk,x,q);
input clk,x;
output [1:0]q;
jk j1(clk,1,1,q[1]);
jk j2(clk,~x,(q[1]^x),q[0]);
endmodule
OUTPUT WAVEFORM :
RESULT : The given sequential circuit problem is successfully implemented and its operation is
verified by simulation.
58