Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Problem with integer a vector range

Reply
Thread Tools

Problem with integer a vector range

 
 
nicx82 nicx82 is offline
Junior Member
Join Date: Nov 2008
Posts: 9
 
      02-11-2010
My code:

Integer is an Integer Variable
OutputNumber is an Std_logic_Vector Input


Integer <= conv_integer(OutputNumber);
MyVector(37 downto (38-Integer)) <= Temp(37 downto (38-Integer));

Compiler Error:
Error (10454): VHDL syntax error: right bound of range must be a constant


PLEASE HELP ME.
 

Last edited by nicx82; 02-11-2010 at 04:56 PM..
Reply With Quote
 
 
 
 
sridar sridar is offline
Member
Join Date: Jun 2007
Posts: 52
 
      02-12-2010
I think, it is not possible to code like this way. Dynamic bus assignment while hardware is running doesn't seems to be a right way.

Since you are assigning the values base on user input,you are getting this error message and also if your integer value is zero, myvector value becomes (37 downto 3 which can't be done.

Re-think your logic keeping programing for hardware in mind.

If the integer value is constant or generic, this can be done.

Quote:
Originally Posted by nicx82
My code:

Integer is an Integer Variable
OutputNumber is an Std_logic_Vector Input


Integer <= conv_integer(OutputNumber);
MyVector(37 downto (38-Integer)) <= Temp(37 downto (38-Integer));

Compiler Error:
Error (10454): VHDL syntax error: right bound of range must be a constant


PLEASE HELP ME.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
const vector<A> vs vector<const A> vs const vector<const A> Javier C++ 2 09-04-2007 08:46 PM
Initializing vector<vector<int> > and other vector questions... pmatos C++ 6 04-26-2007 05:39 PM
Problems instantiating a Vector<Vector<Integer>> the.real.doctor.zoidberg@gmail.com Java 2 11-01-2006 01:38 AM
Free memory allocate by a STL vector, vector of vector, map of vector Allerdyce.John@gmail.com C++ 8 02-18-2006 12:48 AM
how the vector is created, how to pass vector to webservices method apachesoap:Vector Rushikesh Joshi Perl Misc 0 07-10-2004 01:04 PM



Advertisments