I've tried this code as an additional vhdl file to he original one i posted:
library ieee;
use ieee.std_logic_1164.all;
entity mygate_TB is
end entity mygate_TB;
architecture RTL of mygate_TB is
signal x,y,z : std_logic;
begin
UUT : entity work.mygate;
port map (
x => x,
y => y,
z => z
)
x <= '0', '1' after 100 ns, '0' after 200 ns;
y <= '1', '0' after 300 ns;
end architecture RTL;
I've corrected the "mygate_TB" problem and get this error when compiling:
vcom -work work -2002 -explicit C:/altera/11.1/modelsim_ase/test.vhd
Model Technology ModelSim ALTERA vcom 10.0c Compiler 2011.09 Sep 21 2011
-- Loading package STANDARD
-- Loading package TEXTIO
-- Loading package std_logic_1164
-- Compiling entity mygate_TB
-- Compiling architecture RTL of mygate_TB
-- Loading entity mygate
** Error: C:/altera/11.1/modelsim_ase/test.vhd(11): (vcom-1035) Formal port "x" has OPEN or no actual associated with it.
** Error: C:/altera/11.1/modelsim_ase/test.vhd(11): (vcom-1035) Formal port "y" has OPEN or no actual associated with it.
** Error: C:/altera/11.1/modelsim_ase/test.vhd(12): near "port": syntax error
** Error: C:/altera/11.1/modelsim_ase/test.vhd(21): VHDL Compiler exiting
Hmmm... what's going on? I don't understand what the "UUT" part means. I'm just looking for a simple simlulation which will test the gate.