Forum: FPGA, VHDL & Verilog Make Variables out of an array

von izeagG (Guest)

Rate this post
0 useful
not useful
entity auf1 is
port (
  i : in std_logic_vector(0 to 2);
  d : out std_logic
end entity auf1;

architecture one of auf1 is
  variable a : std_logic := 'U';
  variable b : std_logic := 'U';
  variable c : std_logic := 'U';
a <= i(0);
b <= i(1);
c <= i(2);
d <= (not a and b and c);
end architecture;
I wanted in these Code make some variables out of an array 
How do I correct make the assignment?
The Input is the array i, the output the logic value d.

von Duke Scarring (Guest)

Rate this post
0 useful
not useful
If you are a beginner with vhdl use signal instead of variable.



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.