Forum Discussion
Altera_Forum
Honored Contributor
15 years agotext to mif conversion
Hello, I am looking for something that would convert a text file (with fractional entries), with values to be stored in a LUT, into a mif file with hexadecimal entries. For example, let a fra...
Altera_Forum
Honored Contributor
15 years agoHi Zainab,
data is the vector(array) in Matlab that contains your data to be written into named mif file. It is meant to be signed integer (no fractions) in the code (since data radix is made decimal). if your data is not scaled then the following statement creates signed integers scaled to 10 bits signed: data = randn(1,2048); %unscaled floating data = round((2^9-1) * data/max(abs(data))); in this case your array length is 2048 to replace "k"