1

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!

3
  • 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. Commented Aug 4, 2016 at 19:36
  • 1
    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.) Commented Aug 5, 2016 at 7:36
  • @MatthewTaylor Good point : that could throw some VHDL parsers off track and lead to a confusingly wrong error message. Commented Aug 5, 2016 at 11:25

1 Answer 1

0

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you CJC, that was the issue! I had to specify a whole lots of "with xx select..." explicitly contemplating all possible cases, then using just numbers around the "downto" and everything works now :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.