Professional Documents
Culture Documents
Objective: To design and simulate Ring Counter and Johnson Counter using Verilog.
Tools & Apparatus Used: Xilinx ISE
Theory: These are sequential circuits that are used for counting the pulses.
Ring Counter: A ring counter is also known as SISO (serial in serial out) shift register counter,
where the output of the flip flop is connected to the input of the flip flop which acts as a ring
counter. The designing of the ring counter can be done by using four D-Flip Flops with a
common clock signal.
always @(posedge(Clock),Reset)
begin
if(Reset == 1'b1) begin //when Reset is high
Count_temp = 4'b0001; end //The Count value is reset to "0001".
else if(Clock == 1'b1) begin //When the Clock is high
//Left shift the Count value.
Count_temp = {Count_temp[2:0],Count_temp[3]}; end
end
assign Count_out = Count_temp;
endmodule
endmodule
RTL Schematics:
RTL Schematic: Ring Counter
Output Waveforms:
Ring Counter:
Johnson Counter:
Result: We have successfully designed and simulated ring counter and Johnson counter
through Verilog in Xilinx software. We have verified the results using the test bench.