jgrigo
Newbie level 2
- Joined
- Jan 6, 2012
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,316
For an integer defined with range 0 to 1000, and if the integer is an incrementing counter.
What happens if the signal that resets an integer counter never goes active and the integer counter does not have a clamp? How does the synthesizer handle an integer counter that is attempting to go beyond the defined limits. Does the synthesized design clamp it at max range defined? ...does it clamp at max value associated with the allocated bits (1023 for 10 bits since defined range 0-1000)? ....does it roll over? ...is it synthesizer based (Xilinx ISE)? BTW, I know this is not a good design practice....
Code is like this in a clocked process.
I know simulation just stops (crashes) and I always use std_logic_vectors since they roll-over and are predicatable. I never had time in my career to make builds and characterize what happens in this condition using an integer counter.
Any insight is appreciated!
What happens if the signal that resets an integer counter never goes active and the integer counter does not have a clamp? How does the synthesizer handle an integer counter that is attempting to go beyond the defined limits. Does the synthesized design clamp it at max range defined? ...does it clamp at max value associated with the allocated bits (1023 for 10 bits since defined range 0-1000)? ....does it roll over? ...is it synthesizer based (Xilinx ISE)? BTW, I know this is not a good design practice....
Code is like this in a clocked process.
Code:
If(FrameSync = '1')then
Integer0_1000 <= 0;
else
Integer0_1000 <= Integer0_1000 + 1;
end if;
I know simulation just stops (crashes) and I always use std_logic_vectors since they roll-over and are predicatable. I never had time in my career to make builds and characterize what happens in this condition using an integer counter.
Any insight is appreciated!