assign generic value to an output vhdl

Guest #3703117
Rate this post
useful
not useful
Hi everyone,

I'm a newbie in vhdl and I would like to know if is it possible to 
assign a generic value to an output in vhdl.

For instance:
1
entity xxx is
2

3
    generic(value : real);
4

5
    port (a : in real;
6
          b : in real;
7
          s : out real);
8

9
end xxx;
10

11
archi archi of xxx is
12
begin
13

14
      s <= value;
15

16
end archi;

If it is not can you help me to find an other way please ?
Guest #3703174
Rate this post
useful
not useful
guy wrote:
> Ahah, what is the way to do what I want? I tried as I have wrote it
> above but in simulation I have not the good value.

As Lothar already wrote: Your code is sufficient to do what you want. If 
there is still a problem, please show the context (i.e. the testbench) 
and tell us in detail how and by what means you came to the conclusion, 
that the result is not what you expect.

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now