How to use custom components described in VHDL #798
-
Hello, I tried Digitial for the first time now and I cannot figure out how can I use custom components written in VHDL. Let's say that I have a vhdl component like this: library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity and_or_top is
Port ( INA1, INA2 : in STD_LOGIC; -- AND gate input
OA : out STD_LOGIC); -- AND gate output
end and_or_top;
architecture Behavioral of and_or_top is
begin
OA <= INA1 and INA2; -- 2 input AND gate
end Behavioral; saved as and_gate.vhdl How can I now import it as a component and then simulate it (I have installed VHDL simulator ghdl) Thanks for help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
In the latest release it is not possible to use code stored in a file. You have to insert the external component and copy the vhdl code into it. |
Beta Was this translation helpful? Give feedback.
In the latest release it is not possible to use code stored in a file. You have to insert the external component and copy the vhdl code into it.
Then select GHDL and press the "Check" button. The input/output fields should be filled in automatically.
However, the latest pre-release also allows the use of a file containing the vhdl code.