Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Error Message With VHDL CODE

Status
Not open for further replies.

venkatpasumarthi

Newbie level 3
Joined
Apr 2, 2015
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
26

Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
library ieee;
use ieee.std_logic_1164.all;
use IEEE.std_logic_arith.all;
 
entity comp is
port(a : in std_logic_vector(7 downto 0);
      y : out std_logic_vector(7 downto 0));
end comp;
architecture dataflow of comp is
  signal temp: std_logic;
begin
 
y<=  not(a) + "00000001"; 
 
end dataflow;



and it is showing the error
** Error: D:/modelsim_projects/2scmpliment.vhd(13): No feasible entries for infix operator "+".
 
Last edited by a moderator:

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,483
Helped
14,048
Reputation
28,351
Reaction score
12,706
Trophy points
1,393
Location
Bochum, Germany
Activity points
276,136
std_logic_vector isn't a numeric data type. No arithmetic operations defined for it. You can use unsigned type instead Or use the non-IEEE library std_arithmetic_unsigned. Or apply type casts like

Code:
y<=  std_logic_vector(unsigned(not(a)) + unsigned("00000001"));
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top