VHDL code problem, need help ASAP !

Status
Not open for further replies.

alpha91

Full Member level 3
Joined
Sep 23, 2011
Messages
168
Helped
1
Reputation
2
Reaction score
2
Trophy points
1,298
Activity points
2,625
Hi, i am doing the TEA in VHDL. but the coding for shift has some problem. can anyone tell me what to do?
it comes out with an error says that :
cant determine definition of operator '&' -- found 0 possible definition.
but actually in shift register code i did use the symbol '&' without any problem.

this is my code:


i just left this small part only. please... and thank you.


 
Last edited:

Hi,
Can you try it after by adding these VHDL libraries :
Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

Apart from the fact that std_logic_arith and std_logic_unsigned are not standard VHDL libraries, and hence should not be used in any new code, they will not help you here as the OPs code is all bit_vectors.

OP, you need to post the whole code - the code snippet is not enough. The picture hides the definition of s50 and s51.
 
Hi,
Can you try it after by adding these VHDL libraries :
Code:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

hi, i sure not the problem with library, because last time i use this command with the same library without any problem.


the s50 and s51 is signal and i declared it in front already. my code is very very long. do you mind if i pm you my code ?
 

You need to show the full code, so we can see how s50 and s51 are declared.
Post the full code in the forum, inside code or syntax tags.
 

You need to show the full code, so we can see how s50 and s51 are declared.
Post the full code in the forum, inside code or syntax tags.

hi, i just uploaded my code...
 

Editing existing posts is frowned upon btw.

- - - Updated - - -

the problem is that s50 and s51 are bits, not bit_vectors.
 

Editing existing posts is frowned upon btw.

- - - Updated - - -

the problem is that s50 and s51 are bits, not bit_vectors.

so what should i do? i cannot make the output as signal ? i need to shift the input.
 

There are many errors in the code.First decide data types of x and y,bit or bit_vector.
x <= s(34);
y <= s(39);
they give errors because s is not declared and indexing is out of range.may be they are
x<=s34;
y<=s39;
s1 <= s0 xor RI xor C1; change it to as like
s1 <= s0 xor RI xor ("000000" & C1);every where C1 is present.
 

so what should i do? i cannot make the output as signal ? i need to shift the input.

Use bit_vectors instead of just bit?

- - - Updated - - -

s1 <= s0 xor RI xor C1; change it to as like
s1 <= s0 xor RI xor ("000000" & C1);every where C1 is present.

This doesnt make any sense. You cannot xor single bits with a bit_vector.
 

@TrickyDicky I forgot to mention That is after changing every signal to bit_vector except C1.
 

@TrickyDicky I forgot to mention That is after changing every signal to bit_vector except C1.
So we are back to start: Show your code!
 

@TrickyDicky I forgot to mention That is after changing every signal to bit_vector except C1.

So we are back to start: Show your code!

hi, the output x and y have been edited.

actually this is a code for TEA system. but i need to write it in data flow approach. and the & command doesnt work. it should be work because when i did shift register it did works without any error.
 

Im getting deja vu: You cannot do a shit register with single bits, as s50 and s51 are declared. You need to use a bit-vector, ie. an array of bits.
 

Im getting deja vu: You cannot do a shit register with single bits, as s50 and s51 are declared. You need to use a bit-vector, ie. an array of bits.

oh... then how should i set the output ?
 

I dont know, how about actually assigning the output rather than just internal signals.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…