Forum Discussion
Altera_Forum
Honored Contributor
10 years agofloat data format are simulated in Modelsim
Hi, Now, I need to simulate output data of FPGA in Modelsim which data format is signal precision . the width of single precision is 32 ,and the modelsim view those 32 bits to integer. and now...
Altera_Forum
Honored Contributor
10 years agoHi
'a' is binary format in your code ,so you can invoke system function to convert 'a' to be a float data format. But the format of input data is single precision format in my code, so its different to the example you posted. In other words, the output data form FPGA module is single precision(its generated by a float sqrt IP CORE ALTFP_SQRT) in my code, and those data would be viewed as a 32 bit width binary data if we use '$bitstoreal' in test bench ,in fact, but those data is single precision.