How to generate a gray counter test pattern?

Status
Not open for further replies.

no_mad

Full Member level 5
Joined
Dec 10, 2004
Messages
271
Helped
30
Reputation
60
Reaction score
11
Trophy points
1,298
Location
Naboo
Activity points
2,489
Hi,

Any ideas on how to generate a gray counter test pattern.

NOT generate stimulus for gray counter.

One way is

Code:
initial begin

inputA = 3'b000;
#20;
inputA = 3'b001;
#20;
inputA = 3'b011;
#20;
inputA = 3'b010;
#20;
.
.
.
.
.
inputA = 3'b100;

end

Is there any other way to do this? Any ideas.

Thanks in advance.
 

Re: Generate a stimulus

hi, u can simply implement a gray code counter in ur testbench. for some examples, look at this link.

**broken link removed**
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…