Jan 29, 2013 #1 B 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: Nov 11, 2014
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 .
Jan 29, 2013 #2 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 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';
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';
Jan 29, 2013 #3 barry Advanced Member level 7 Joined Mar 31, 2005 Messages 6,341 Helped 1,194 Reputation 2,400 Reaction score 1,390 Trophy points 1,393 Location California, USA Activity points 34,536 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;
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;
Jan 30, 2013 #4 B 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 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 thank you. Can you tell me exactly what are the merits of VHDL over verilog (not text book answers) application wise
Jan 30, 2013 #5 barry Advanced Member level 7 Joined Mar 31, 2005 Messages 6,341 Helped 1,194 Reputation 2,400 Reaction score 1,390 Trophy points 1,393 Location California, USA Activity points 34,536 The major merit in using VHDL is that I don't know verilog.
Jan 30, 2013 #6 T TrickyDicky Advanced Member level 7 Joined Jun 7, 2010 Messages 7,110 Helped 2,081 Reputation 4,181 Reaction score 2,048 Trophy points 1,393 Activity points 39,769 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.
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.