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.

No matching overload in VHDL

Status
Not open for further replies.

bsbs

Junior Member level 2
Joined
Apr 22, 2011
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,424
Im getting :32:14:32:24|No matching overload for "<" error for the following code

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Process (clk, RST)  
BEGIN
     IF RST = '0' THEN
        
        acc <= (Others => '0') ;
     ELSIF (Clk = '1' and Clk'event)  THEN
        If acc = max THEN  
           
           acc <= (others => '0') ;
        ELSE
          acc <= acc + '1' ;
          output <= acc < input;
        END IF ;
     END IF ; 
END PROCESS ;



Im using std_logic_signed .
 
Last edited by a moderator:

Re: No matching overload error

acc < input
returns a boolean, not a std_logic. Unless output is declared as a boolean, you have to write it like this:

Code:
if acc < input then
  output <= '1';
else
  output <= '0';
end if;

or if you have a VHDL 2008 compliant compiler (very unlikely) you can write:

output <= '1' when (acc < input) else '0';
 

That line: "output<=acc<input" doesn't look right. What is the type of output, input? Are you trying to set output to 1 if acc is less than input? If so, try using an if statement.

Code:
        If acc< input then
           output<='1';
        else
          output<='0';
        end if;
 

Re: No matching overload error

thank you. Can you tell me exactly what are the merits of VHDL over verilog (not text book answers) application wise
 

Re: No matching overload error

They are both different. Some love VHDL, some love verilog. But they both do the same things. You need to chose which one you prefer.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top