Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > error message while using floating point package

Reply
Thread Tools

error message while using floating point package

 
 
kdas kdas is offline
Junior Member
Join Date: Apr 2008
Posts: 1
 
      04-18-2008
Hi,

I need to perform a division operation that can be synthesized in xilinx and the "/" operator works with unsigned, integer and float types but not with std_logic types. I have synthesized that successfully in a test code. However, I am getting error messages in the modelsim even though the signals were loaded correctly. The values that is shown initially seems to be garbage values for one of the signals that is s2 in the following code.

library ieee, ieee_proposed;
---library ieee_proposed;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
--use ieee.std_logic_arith.all;
use ieee_proposed.float_pkg.all;
--use work.fphdl_base_pkg.all;
entity divider is
port(DI : in std_logic_vector(7 downto 0);
DO1: out std_logic_vector(7 downto 0);
DO : inout std_logic_vector(7 downto 0));
end divider;
architecture archi of divider is
signal s1,s2: float(7 downto 0);----unsigned(7 downto 0);
--signal s3: float;-----unsigned(3 downto 0);
begin
s1 <= to_float(DI,s1);
s2 <= s1 / "0000101";
DO <= std_logic_vector(to_unsigned(s2,);
---s3 <= s2;
DO1 <= std_logic_vector(to_unsigned(s2,);

end archi;
---v1 <= conv_std_logic_vector(u1, 4);


I am also attaching themessages in modelsim and the error messages can be seen at the end

# Reading C:/Modeltech_xe_starter/tcl/vsim/pref.tcl
# do {divider.fdo}
# ** Warning: (vlib-34) Library already exists at "work".
# ** Warning: (vlib-34) Library already exists at "ieee_proposed".
# Model Technology ModelSim XE III vcom 6.2g Compiler 2007.02 Feb 22 2007
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Loading package numeric_std
# -- Loading package textio
# -- Compiling package fixed_pkg
# -- Loading package math_real
# -- Loading package std_logic_textio
# -- Compiling package body fixed_pkg
# -- Loading package fixed_pkg
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/fixed_pkg_c.vhd(129: Range 0 downto 1 is null.
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/fixed_pkg_c.vhd(1299): Range 0 downto 1 is null.
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/fixed_pkg_c.vhd(1300): Range 0 downto 1 is null.
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/fixed_pkg_c.vhd(630: Range 2 to 1 is null.
# ** Warning: (vlib-34) Library already exists at "ieee_proposed".
# Model Technology ModelSim XE III vcom 6.2g Compiler 2007.02 Feb 22 2007
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Loading package numeric_std
# -- Loading package textio
# -- Loading package fixed_pkg
# -- Compiling package float_pkg
# -- Loading package math_real
# -- Loading package std_logic_textio
# -- Compiling package body float_pkg
# -- Loading package float_pkg
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/float_pkg_c.vhd(913): Range 0 downto 1 is null.
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/float_pkg_c.vhd(914): Range 0 downto 1 is null.
# ** Warning: [3] ../../../Xilinx9.2/vhdl/src/ieee_proposed/float_pkg_c.vhd(5592): Range 2 to 1 is null.
# Model Technology ModelSim XE III vcom 6.2g Compiler 2007.02 Feb 22 2007
# -- Loading package standard
# -- Loading package std_logic_1164
# -- Loading package numeric_std
# -- Loading package textio
# -- Loading package fixed_pkg
# -- Loading package float_pkg
# -- Compiling entity divider
# -- Compiling architecture archi of divider
# vsim -lib work -t 1ps divider
# Loading C:\Modeltech_xe_starter\win32xoem/../std.standard
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_1164(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.numeric_std(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../std.textio(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.math_real(body)
# Loading C:\Modeltech_xe_starter\win32xoem/../ieee.std_logic_textio(body)
# Loading ieee_proposed.fixed_pkg(body)
# Loading ieee_proposed.float_pkg(body)
# Loading work.divider(archi)
# .main_pane.mdi.interior.cs.vm.paneset.cli_0.wf.cli p.cs.pw.wf
# .main_pane.workspace.interior.cs.nb.canvas.noteboo k.cs.page2.cs
# .main_pane.signals.interior.cs
# ** Error: FLOAT_GENERIC_PKG.CLASS: Floating point number detected with a bad range
# Time: 0 ps Iteration: 0 Instance: /divider
# ** Error: FLOAT_GENERIC_PKG.CLASS: Floating point number detected with a bad range
# Time: 0 ps Iteration: 0 Instance: /divider
# ** Error: FLOAT_GENERIC_PKG: Unbounded number passed, was a literal used?
# Time: 0 ps Iteration: 0 Instance: /divider
# ** Error: FLOAT_GENERIC_PKG.CLASS: Floating point number detected with a bad range
# Time: 0 ps Iteration: 1 Instance: /divider
# ** Error: FLOAT_GENERIC_PKG.CLASS: Floating point number detected with a bad range
# Time: 0 ps Iteration: 1 Instance: /divider

Please help! Where is the error in the code?

Thanks in advance.
K.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Questions on implementing a floating point bignum package mike3 C++ 2 12-16-2007 09:34 PM
floating point problem... floating indeed :( teeshift Ruby 2 12-01-2006 01:16 AM
Problem with using Floating Point Package ravi81082@gmail.com VHDL 0 10-30-2006 02:24 PM
converting floating point to fixed point H aka N VHDL 15 03-02-2006 02:26 PM



Advertisments