Hello all! I'vecreated the following simple logic arrangement in VHDL
----------------------------------------------------------------------------------
--Combinational Logic Code
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--Begin decleration of combinational logic
--This is the tree of logic components used to feed the input of one of the flip flops
entity logic is
Port( FRM_IN, FRM_Q1: in std_logic;
TO_T2: out std_logic);
end logic;
architecture logic_a of logic is
signal IN_L, Q1_L, A, B: std_logic; --Signals to hold inverted versions of INPUT and Q1 and the and combination of INPUT and Q1 as well as their inverted counterparts
component inv port(o: out std_logic; i: in std_logic);
end component;
component and2 port(o: out std_logic; i1,i0: in std_logic);
end component;
component or2 port(o: out std_logic; i1,i0: in std_logic);
end component;
begin
U1: inv port map(IN_L, FRM_IN);
U2: inv port map(Q1_L, FRM_Q1);
U3: and2 port map(A, FRM_IN,FRM_Q1);
U4: and2 port map(B, IN_L,Q1_L);
U5: or2 port map(TO_T2, A,B);
end logic_a;
I made the following script to test the logic arrangment
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
LIBRARY UNISIM;
USE UNISIM.Vcomponents.ALL;
ENTITY logictest IS
END logictest;
ARCHITECTURE behavioral OF logictest IS
COMPONENT logic is
PORT(
FRM_IN : IN std_logic;
FRM_Q1 : IN std_logic;
TO_T2 : OUT std_logic
);
END COMPONENT;
SIGNAL IN1 : STD_LOGIC:='0';
SIGNAL IN2 : STD_LOGIC:='0';
SIGNAL T2 : STD_LOGIC;
BEGIN
UUT: logic PORT MAP(
FRM_IN => IN1,
FRM_Q1 => IN2,
TO_T2 => T2
);
-- *** Test Bench - User Defined Section ***
tb : PROCESS
BEGIN
wait for 50 ns;
IN1 <= '1';
wait for 50 ns;
IN2 <= '1';
wait for 50 ns;
IN2 <= '0';
wait for 50 ns;
IN1 <= '0';
WAIT;
END PROCESS;
-- *** End Test Bench - User Defined Section ***
END;
Unfortunately, I am getting an undefined output using Xilinx webtools ISim. Can anyone spot my error? I am very new to this. The course that I am taking just started covering VHDL about a week ago.