kpraneethin007
Newbie level 6
- Joined
- Jan 2, 2011
- Messages
- 11
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,350
Hi I have designed a 8-bit counter using verilog.
I simulated it using modelsim. counter is performing it's function correctly till the total event at the output reaches 127 (i.e after counting 127 clock cycles)
but after 127 I am getting a value of -128, then -127,126,-125 and so on for each additional clock cycle.
why it is going to -128, why not 129 ?
when I convert decimal to binary value I am getting values correctly in an incremental order, eg: 1111111(127) then for the next clock cycle I am getting 10000000 and so on. Why the same is not happening in case of decimal values?
I have attached the waveform below
Thanks for the reply
I simulated it using modelsim. counter is performing it's function correctly till the total event at the output reaches 127 (i.e after counting 127 clock cycles)
but after 127 I am getting a value of -128, then -127,126,-125 and so on for each additional clock cycle.
why it is going to -128, why not 129 ?
when I convert decimal to binary value I am getting values correctly in an incremental order, eg: 1111111(127) then for the next clock cycle I am getting 10000000 and so on. Why the same is not happening in case of decimal values?
I have attached the waveform below
Thanks for the reply