Reading decimal numbers (with floating points) from a text file (Verilog)

Status
Not open for further replies.

chikaofili

Junior Member level 3
Joined
Jun 29, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,510
Hello,
What is the best way to read a textfile that contains decimal number (eg. 2.987) into verilog?

At the moment, I convert the values to hex using matlab (using num2hex). But when I use readmemh, it assumes that the 32bit variable is a 'regular' number and not a floating number?

Any suggestion will be greatly appreciated.

Thanks!
 

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