VHDL QUESTION 
Author Message
 VHDL QUESTION

Quote:

> Greetings,
> I am experiencing a very frustrating problem which probably has a simple
> solution.
> I have two signals coming in:
>   exp1         : in integer range 0 to 255;
>   exp2         : in integer range 0 to 255;
> I must capture the difference between the two values in a variable
> exp_diff and send that variable as a parameter to a function. The
> problem is that my synthesis tool (Warp4) will not let me make this
> simple assignment:
>                              exp_diff := exp1 - exp2;
> The compiler complains that the right side of the equation must be a
> constant or a variable.
> I have tried to define exp_diff as a signal instead of a variable. The
> assignment will then work, but the function will not accept a signal as
> a parameter because the synthesis tool requires a constant or variable.
> Can anyone please suggest any way out of this? Any help will be greatly
> appreciated. This is for a class project, and I am running behind.
> Thanks,
> Levy


--
Try this:
use exp_diff as signal, define a new variable (e.g. vexp_diff),
assign then vexp_diff := exp_diff
and send vexp_diff to function

hope it helps
Jens
----------------------------------------------------------------

Quote:

>> WWW  : http://www.*-*-*.com/ ~holz

----------------------------------------------------------------


Sat, 01 Apr 2000 03:00:00 GMT  
 VHDL QUESTION

Greetings,
I am experiencing a very frustrating problem which probably has a simple
solution.
I have two signals coming in:
  exp1         : in integer range 0 to 255;
  exp2         : in integer range 0 to 255;
I must capture the difference between the two values in a variable
exp_diff and send that variable as a parameter to a function. The
problem is that my synthesis tool (Warp4) will not let me make this
simple assignment:
                             exp_diff := exp1 - exp2;
The compiler complains that the right side of the equation must be a
constant or a variable.
I have tried to define exp_diff as a signal instead of a variable. The
assignment will then work, but the function will not accept a signal as
a parameter because the synthesis tool requires a constant or variable.
Can anyone please suggest any way out of this? Any help will be greatly
appreciated. This is for a class project, and I am running behind.
Thanks,
Levy



Sat, 01 Apr 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. a synopsys vhdl question

2. VHDL, question on the correct way of using Variable

3. A simple VHDL question

4. Newbie ModelSim VHDL question

5. Basic VHDL Question

6. VHDL Question

7. String manipulation in VHDL question

8. A VHDL question (with ModelSim Xilinx Edition)

9. a synopsys vhdl question

10. Basic Student VHDL Questions

11. Parameterised VHDL question

12. Altera Max+Plus II VHDL Question

 

 
Powered by phpBB® Forum Software