Electronics > Beginners
Basic counter in verilog
(1/1)
Dmeads:
Hi all!

In my simulation picture below, there is a,b,c,d,e ect after the 9 in my counter.

Why is this and can anybody help me fix this please?

I am doing some research and i think it might be related to roll over?

Thanks!

You can view my code and testbench on EDA playground:
https://www.edaplayground.com/x/5Wjr

picture of simulation below
Buriedcode:
That would be because it is showing hexadecimal representation of numbers rather than decimal.  You have a 4-bit counter, so in decimal it counts 0 to 15 then rolls over to 0 again.  10 in Hex is 'A', 15 is 'F'. Hex is very common and quite handy because a single hex digit represents all possible states of 4 bits (a nibble).
Dmeads:
Ah, thank you!

So if I implemented some PWM using this counter, it would work okay on the FPGA?

It seems to work okay in the simulation
Dmeads:
Never mind I answered my own question lol it totally works!
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod