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.

VHDL Error: cannot determine exact overloaded matching definition for "="

Status
Not open for further replies.

Rimon Selim

Newbie level 2
Newbie level 2
Joined
Nov 23, 2014
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
36
ERROR:HDLCompiler:1731 - "C:/Xilinx/Processor/alu32.vhd" Line 87: found '0' definitions of operator "=", cannot determine exact overloaded matching definition for "="
===================================================
I am getting this error on all of the lines with "="
I am using a case and here are the lines where the error comes up:


Code VHDL - [expand]
1
2
3
4
5
when (alu_op="1011") =>
            when (alu_op="0001" or alu_op="0010" or alu_op="0101" or 
                            alu_op="0110" or alu_op="0111" or alu_op="1000") =>
 
            when (alu_op = "0011") =>





Full Code:




Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;
use work.c31L_pack.all;
 
 
entity alu32 is
        port( RI : in std_logic;
                a_alu32 : buffer std_logic_vector(BW-1 downto 0);
                b_alu32 : buffer std_logic_vector(BW-1 downto 0);
                alu_op : in alu_function_type;--operation code
                g : out std_logic;              --greater
                e : out std_logic;              --equal
                l : out std_logic;              --less
                o_alu32 : buffer std_logic_vector(BW-1 downto 0); --output
                c_alu32 : inout std_logic;      --carry
                ov_alu32 : out std_logic);      --overflow flag
end alu32; 
 
architecture Behavioral of alu32 is
 
    COMPONENT alu_1bit
        Port (A : in  STD_LOGIC;
            B : in  STD_LOGIC;
                cin: in STD_LOGIC;
            opsel : in  STD_LOGIC_VECTOR (3 DOWNTO 0);
            output : out  STD_LOGIC;
            cout : out  STD_LOGIC);
    END COMPONENT;
    
    COMPONENT comparator
        PORT (in_0 : IN STD_LOGIC ;
                in_1 : IN STD_LOGIC ;
                greater_in : IN STD_LOGIC;
                equal_in : IN STD_LOGIC;
                less_in : IN STD_LOGIC;
                greater : OUT STD_LOGIC ;
                equal : OUT STD_LOGIC ;
                less : OUT STD_LOGIC);
    END COMPONENT;
    
    signal carry :std_logic_vector(BW downto 0);
    signal gs, es, ls : std_logic_vector (BW-1 downto 0);
    
    
begin
    
    process(RI, a_alu32, b_alu32, alu_op)
        variable o_alu32var: std_logic_vector(BW-1 downto 0);
    begin
        case alu_op is
                        
            ---None---
            when (alu_op = "0000") =>
                o_alu32 <= "00000000000000000000000000000000";
                
            ---move/I---
            when (alu_op="1011") =>
                if (RI='0') then
                    o_alu32 <= a_alu32;
                else
                    o_alu32 <= b_alu32;
                end if;
            
            ---SLL---
            when (alu_op="1001") =>
                o_alu32 <= to_stdlogicvector(to_bitvector(a_alu32) SLL (to_integer(b_alu32)));
                            
 
            ---arthmetic and logic---
            
            
            when (alu_op="0001" or alu_op="0010" or alu_op="0101" or 
                            alu_op="0110" or alu_op="0111" or alu_op="1000") =>
                            
                carry(0) <= '0';
                z1: FOR i IN 0 to BW-1 loop
                    a1: alu_1bit port map(a_alu32(i), b_alu32(i), carry(i), alu_op, o_alu32var(i), carry(i+1));
                END loop z1;
                c_alu32<=carry(BW);
                
                
                ov_alu32 <= (a_alu32(31) and b_alu32(31) and not o_alu32(31)) or (not a_alu32(31) and not b_alu32(31) and o_alu32(31)) when (alu_op = "0001" or alu_op = "0010")
                else '0';
 
            ---COMP---
            when (alu_op = "0011") =>
            
                gs(0) <= '0';
               ls(0) <= '0';
            es(0) <= '1';
                g1: for i in 0 to BW-1 loop
                comparator32: comparator port map(a_alu32(i), b_alu32(i), gs(i), es(i), ls(i), gs(i+1), es(i+1), ls(i+1));
            END loop g1;
                g <= gs(BW);
                e <= es(BW);
                l <= ls(BW);
                
        END CASE;
    END PROCESS;
            
    
end Behavioral;

 
Last edited by a moderator:

Re: VHDL Error: cannot determine exact overloaded matching definition for "="

You didnt include the code for the c31L_pack package.

But I suspect you didnt create an = function for your custom type.
 

Re: VHDL Error: cannot determine exact overloaded matching definition for "="

You don't need to specify alu_op = "xxxx" in your when statement. Only the "xxxx" is needed.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top