Real to decimal number conversion in VHDL

Status
Not open for further replies.

raghava216

Junior Member level 3
Joined
Mar 10, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,646
I have some real numbers like 9.123472e+002.
I need to print these to a file after converting them to normal decimal number representation from scientific representation like in this example I want to write 912.3472 to the file instead of writing 9.123472e+002.

Any idea how to do this in VHDL? Any library functions to do this job?
 

Are you talking about testbench design or synthesizable VHDL? Print to a file sounds like testbench output.
 

Where comes from your 9.123472e+002 number?

that's data for or from the test-bench?
 

@rca
These numbers are generated by the testbench.

@FvM
passing that real number as an argument to IEEE TEXTIO package write() prints the number in scientific notation, which is not what I want to see.
would u mind to post the exact VHDL code?
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…