Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
nikmeilleur
Posts: 5
Registered: ‎01-17-2012
0

no loop for ranged type in simulation ?

Hi,

is there a way i get a loop instead of 'out of index'

 

signal test : integer range 0 to 3:=0;

test <= test + 1 ; --0 1 2 3 0 1 2.....

 

thx

Expert Contributor
bassman59
Posts: 4,679
Registered: ‎02-25-2008
0

Re: no loop for ranged type in simulation ?


nikmeilleur wrote:

Hi,

is there a way i get a loop instead of 'out of index'

 

signal test : integer range 0 to 3:=0;

test <= test + 1 ; --0 1 2 3 0 1 2.....

 

thx


test <= (test + 1) mod 4;

 

You're welcome.


----------------------------------------------------------------
Yes, I do this for a living.