assign generic value to an output vhdl

Guest #3703117
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 #3703163
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.
Guest #3703174
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

A question of your own? This thread is over 12 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.