floating point - Convert real to IEEE double-precision std_logic_vector(63 downto 0) -


this shouldn't difficult.

i want read raw 64-bit ieee 754 double-precision floating-point data file, , use in std_logic_vector(63 downto 0). i'm using modelsim altera 10.1b.

i tried read raw binary data 64-bit vector:

type double_file file of std_logic_vector(63 downto 0); file infile1: double_file open read_mode "input1.bin";  variable input1 : std_logic_vector(63 downto 0) := (others => '0');  read(infile1, input1); 

but doesn't work. apparently modelsim tries interpret each byte of input data std_logic ('u', 'z', '-', etc.). enter image description here


i can however, read data real variables:

type real_file file of real; file infile1: real_file open read_mode "input1.bin";  variable input1 : real;  read(infile1, input1); 

but @ point, cannot figure out how convert real variable std_logic_vector(63 downto 0). pretty of google results "you can't this; real isn't synthesizable". understand - simulation.

you can find david bishop's user guides packages at: http://www.eda.org/fphdl/

in addition, can find david's , presentation titled, fixed , floating point packages, at: http://www.synthworks.com/papers/index.htm


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -