Incrementing value test

S

Salman

I have a vhdl value that I must test whether it increments by one. The
input signal is a 32-bits count value (std logic vector). My module
would receive this value as an input to check whether it increments and
that would affect the state machine.

How would I code something like this as efficiently as possible?


Salman
 
B

Bert Cuzeau

Salman said:
I have a vhdl value that I must test whether it increments by one. The
input signal is a 32-bits count value (std logic vector). My module
would receive this value as an input to check whether it increments and
that would affect the state machine.

How would I code something like this as efficiently as possible?


Salman

Unclear spec.
If it' a counter with Enable (that can only be incremented by one
or remain stable. Load ??), then a simple xor gate on LSB does it !

Otherwise, an incrementor and equality comparator ?
 
E

Engineering Guy

Salman said:
I have a vhdl value that I must test whether it increments by one. The
input signal is a 32-bits count value (std logic vector). My module
would receive this value as an input to check whether it increments and
that would affect the state machine.

How would I code something like this as efficiently as possible?


Salman
Should it check if the previous value is (current-1)?
Is it unsigned or signed?
Need more spec...

EG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,899
Members
47,440
Latest member
YoungBorel

Latest Threads

Top