Jump to content

Range must be bounded by constant expressions


ssingh

Recommended Posts

I am trying to implement the following in systemverilog.

always_comb

begin

for(int i=0;i<=124;i=i+6)

begin

offset = DFF_data[ ((2*i)+1) : (2*i) ]; // Error !

data_output[i+offset]= data_input;

end

end

I get the following error in the line marked above: Range must be bounded by constant expressions. The error ocuurs beacuse of the use of "i" in defining the range of array DFF_data. But writing this without "i" seems impractical. I am using QuestaSim 10.1d. Has anyone come across such a situation?

Edited by ssingh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...