What is wrong with my simple code?

Status
Not open for further replies.
Your COUNT register is uninitialized, so it defaults to 'x'.

If you are using Verilog 2001, try changing this:
reg [15:0] COUNT;
to this:
reg [15:0] COUNT = 0;

Or use an 'initial' statement to initialize COUNT to zero. That works in older Verilog.
 

Yes off Course .... there is no problem with code

EXCEPT Inilization of COUNT
 

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