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.

Help for VHDL code error is No feasible entries

Status
Not open for further replies.

Adnan86

Full Member level 2
Joined
Apr 4, 2013
Messages
121
Helped
26
Reputation
52
Reaction score
26
Trophy points
1,308
Activity points
2,153
hi
i wrote this code :

Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--use IEEE.STD_LOGIC_arith.ALL;
use IEEE.NUMERIC_STD.ALL; 

constant rom_width : integer := 32 ;
constant rom_length: integer := 7 ; -- 1550 integer
subtype rom_word is STD_LOGIC_VECTOR(rom_width-1 downto 0) ;
type rom_table is array (0 to rom_length-1) of rom_word ;

constant mem_width : integer := 32 ;
constant mem_length: integer := 7 ; -- 1550 integer
subtype mem_word is STD_LOGIC_VECTOR(mem_width-1 downto 0) ;
type mem_table is array (0 to mem_length-1) of mem_word ;


entity test01 is
    Port ( data_in : in  rom_table := rom ;--STD_LOGIC_VECTOR(31 downto 0);
			  clk     : in  STD_LOGIC;
			  x_diff_1: out STD_LOGIC_VECTOR(31 downto 0) );
end test01;

architecture behave of test01 is


	signal N		   : STD_LOGIC_VECTOR(11 downto 0) := "000000000111" ;
	signal ii	   : STD_LOGIC_VECTOR(11 downto 0) := "000000000001" ;
	
	[B]signal x_dif1 : mem_table ; --STD_LOGIC_VECTOR(31 downto 0) := "00000000000000000000000000000000" ;[/B]

begin

	process (clk)
		begin
			IF (clk'event AND clk = '1' ) THEN
	x_dif1(conv_integer(ii)) <= data_in( conv_integer(ii+ "000000000001" )) - data_in(conv_integer(ii)) ;
				
			end if ;
	end process ;
end bahav ;

but ihave this error :
No feasible entries for infixoperator "+" for this line :
Code:
x_dif1(conv_integer(ii)) <= data_in( conv_integer(ii+ "000000000001" )) - data_in(conv_integer(ii)) ;
please help , what can i shoud do ???
thanks for attention
 
Last edited:

So many misunderstandings on this one line:
1. There is no conv_integer function in the numeric_std library
2. There are no arithmetic functions for std_logic_vector
3. Why give yourself RSI - make ii an integer type?

Code:
signal ii : integer range 0 to 2047;

...

x_dif1(ii) <= std_logic_vector( unsigned(data_in(ii +1)) - unsigned(data_in(ii));

Even better, stop using std_logic_vector.

I assume this is not the full code, or there would be errors with the constants and types created outside of a package/entity/architecture.
 
yes it's not full code , 2nd and 3rd part about rom and mem it's package, because it's too long so i chose just some line. i want this for fpga , so if if i use std_logic i think it's better than integer !!!

- - - Updated - - -

i used your code really helped , thank you , i forget some tips of vhdl . for now my problem solved , but i have so many work for my code.
:D
thanks again .
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top