Here i will be explaining how to write a very simple VHDL code to simulate an And gate with two inputs. In the following post I have mentioned about device families, pin assignments, compilation and programming the actual hardware. I will not repeat those information please go through this post if you have not.
Only difference here is that instead of adding Block diagram / Schematic to the project you should select File >New > VHDL file. Then you will get a window to type the code.
Following is the VHDL code,
entity VHDLturo is
port (A, B:in BIT;
Z : out BIT);
end VHDLturo;
architecture logicfunc of VHDLturo is
begin
Z <= A and B;
end architecture logicfunc;
(more…)