Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error while coding a 2 bit comparator code

Status
Not open for further replies.

Sujith_Raj

Newbie level 1
Joined
May 4, 2020
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
14
Hi all;

I write a VHDL code below. There are no error when I compile it, but then fatal error occur when I try to simulate.



Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
    process(A,B)
    begin
        if (A(0)=B(0))and (A(1)=B(1))then
        Equals <= '1';
        else
        Equals <= '0';
        end if;
    end process;
end behavioral;

 
Last edited by a moderator:

You dont say what tool or error. There is nothing wrong with the code.
 

is there a testbench? does the tool count the lack of a testbench as a fatal error?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top