Problem with integer a vector range

Joined
Nov 5, 2008
Messages
9
Reaction score
0
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:
Joined
Jun 5, 2007
Messages
51
Reaction score
0
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 38) 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.

nicx82 said:
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.
 

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

No members online now.

Forum statistics

Threads
473,961
Messages
2,570,131
Members
46,689
Latest member
liammiller

Latest Threads

Top