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 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:

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top