1
votes

I am trying to do the following: in a process, after declaring a variable of type natural...

VARIABLE Pointer: NATURAL := 0;

... I assign it to a value, Pnt, which is a signal of type std_logic_vector(3 downto 0):...

Pointer := to_integer(unsigned(Pnt));

... and later on (in the begin part of the process) I use this value, Pointer, to point to a portion (a byte) of a big std_logic_vector called Buffer:

Buffer(Pointer*8+7 downto Pointer*8) <= ...something...

Unfortunately, while compiling, I receive the following error:

Error (10327): VHDL error at OutputInterface.vhd(38): can't determine definition of operator ""*"" -- found 0 possible definitions

I have imported numeric_std, writing at the very top of my file the " use IEEE.numeric_std.all; "

Why is this error happening? Thank you in advance for your precious help and I hope I provided enough and organized information around the question!

1
It would help to post the whole of line 38 where the error is, and the declarations of everything on it. But it would be best to distil the problem into the smallest self-contained compilable example to let people reproduce what you're doing. Certainly Pointer * 8 given the above declarations, isn't the problem. - user_1818839
buffer is a reserved word in VHDL. Is your array really called "buffer"? If so, that won't help; you need to change its name. (A buffer port is a kind of output port that you can read. It is rarely used, because it introduces other complications.) - Matthew Taylor
@MatthewTaylor Good point : that could throw some VHDL parsers off track and lead to a confusingly wrong error message. - user_1818839

1 Answers

0
votes

The reason is that your indexer: Pointer variable is changing. This is not allowed in VHDL if the compiler cannot resolve section to combinatorial logic.

If the compiler can only realize a sequential implementation, then it will complain of an error.

Depending on your vendor. It is sometimes very difficult to get the compiler to understand that the logic you are describing can actually be combinatorial.

Additionally make sure to check that you have no inferred latched, if not this will surely not work