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.

How can i work complex floating operation in vhdl ?

Status
Not open for further replies.

papetorh

Newbie level 5
Joined
Aug 8, 2013
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
114
I need some library packages for my vhdl in ise webpack to make my code run, i ve been having errors due to complex floating operations and the libraries included are not enough, also i need to make it sintetizable for my board!.
 

What libraries are you using that are "not enough"? What are your errors?
 

Libraries :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.std_logic_arith.all;
use IEEE.math_real.all;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;


-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
use IEEE.NUMERIC_STD.ALL;



Errors:
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 142: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 155: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 168: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 181: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 237: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 250: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 263: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 276: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 340: Indexed name prefix type string expects 1 dimensions
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 341: Indexed name prefix type string expects 1 dimensions
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 342: Indexed name prefix type string expects 1 dimensions
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 343: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 344: found '0' definitions of operator "-", cannot determine exact overloaded matching definition for "-"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 345: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 346: found '0' definitions of operator "-", cannot determine exact overloaded matching definition for "-"
ERROR:HDLCompiler:1638 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 349: found '0' definitions of operator "/", cannot determine exact overloaded matching definition for "/"
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 365: Indexed name prefix type string expects 1 dimensions
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 366: Indexed name prefix type string expects 1 dimensions
ERROR:HDLCompiler:540 - "C:\Users\LuisAlberto\Desktop\CONTROLADOR\CONTROLADOR.vhd" Line 367: Indexed name prefix type string expects 1 dimensions
 

don't use std_logic_arith

I'm assuming you are trying to divide two reals with your "/". You need a library that supports that. math_real does not.

What do the lines that are actually causing the error look like? what data types are you using?
 

Thanks, what librarie supports de division of the 2 reals.

I am using fractions, real numbers, and decimals, also vectors and matrix.



elsif (anglein>angle(fia,coa+1) and anglein<angle(fia,coa+2) and etiquetas(fia,coa+1)="lfunction") then
Line 142: pendiente:=((-1)/((angle(fia,coa+2)-angle(fia,coa+1))));
corte:=(pendiente*(anglein-angle(fia,coa+2)));
fia:=fia+1;




elsif(anglein>angle(fia,coa) and anglein<angle(fia,coa+1) and etiquetas(fia,coa+1)="gamma") then
Line 181 pendiente:=(1/(angle(fia,coa)-angle(fia,coa+1)));
corte:=(pendiente*(anglein-angle(fia,coa)));
fia:=fia+1;


if (etiquetas(f,0)=speed) then
x0:=speed(f,0);
Line 341 med:=speed(f,1);
Line 342 x3:=speed(f,2);
Line 343 pend1:=(1/(med-x0));
Line 344 x1:=(((mayor-1)/pend1)+med);
Line 345 pend2:=(-1/(x3-med));
Line 346 x2:=(((mayor-1)/pend2)+med);
 

The problem is you're trying to synthesise stuff using the math_real package. Basically, you cant. Math_real is for simulation only.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top