r/rfelectronics • u/PsychologicalTwo1461 • 7d ago
Help with VHDL 2-bit comparator assignment (Mission 2-002 / comparator2) in ModelSim
Hi everyone, I'm working on a VHDL 2-bit equality comparator assignment (comparator2) and running into trouble getting myvectorh.out generated properly in ModelSim.
The starter files include AAC2M1P1.vhd, AAC2M1P1_tb.vhdp, and vectorh.out, and I need to produce myvectorh.out by running the testbench in ModelSim.
Here is the entity and my comparator2 architecture in AAC2M1P1.vhd:
VHDL
library ieee;
use ieee.std_logic_1164.all;
entity comparator2 is port (
A, B: in std_logic_vector(1 downto 0);
Equals: out std_logic);
end comparator2;
architecture behavioral of comparator2 is
begin
Equals <= '1' when (A = B) else '0';
end behavioral;I have AAC2M1P1.vhd, AAC2M1P1_tb.vhdp, and vectorh.out in my project directory, and I kept AAC2M1P1_tb.vhdp unmodified. When I compile and run run -all in ModelSim, I'm running into [describe your exact error message or whether myvectorh.out is missing/empty].
Could someone point out what I might be missing in the architecture or ModelSim setup?