Question

Design a 3 bits binary counter that count up from 000 to 111 and recycles according to the following specification: E is the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Truth Table

Present

state

S E

Next

state

d 1 1 000
d 1 0 000
000 - 111 0 0 000-111
000 0 1 001
001 0 1 010
010 0 1 011
011 0 1 100
100 0 1 101
101 0 1 110
110 0 1 111
111 0 1 000

The design is implemented using the Verilog HDL Language

//------------- Code Starts Here --------------//

`timescale 1ns / 1ps

module counter(S,E,clk,count
);
input S,E,clk;
output reg [2:0] count;

always @(posedge clk) begin
if(S==1)
   count<=0;
else begin
           if(!E)
               count<=count;
           else
               count<=count+1;
   end
end
endmodule

//----------------------- END ----------------------//

N.B: Please copy the code save it (in a .v file) and simulate using the VERILOG simulator to have the best results.

Add a comment
Know the answer?
Add Answer to:
Design a 3 bits binary counter that count up from 000 to 111 and recycles according to the following specification: E i...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT