- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all;
It is possible if I want to convert from sfixed to floating point? For example: convert 000001000 to 0.483.. I try to write like below, but its working for convert integer.. ------------------------------------------------------- library ieee; library ieee_proposed; use ieee_proposed.fixed_pkg.all; use IEEE.STD_LOGIC_SIGNED.ALL; use IEEE.numeric_std.all; entity try is port (A: in sfixed(4 downto -4); clk: in bit; out_A: out integer range -127 to 127); end try; architecture try of try is begin process (clk) begin if (clk'event and clk='1') then out_A <= to_integer(signed(A)); end if; end process; end try; ----------------------------------------------------------- There are no problems when I compile in quartus. But, a fatal error occur when I simulate in ModelSim. Need helps..ThanksLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page