Hi, I'm trying to make lookup table in Quartus 2. v.8.1.
I think I can use a dual port RAM to make the LUT, but the original data sheet (lookup table) is large (16x48 per each table) and it is made in Matlab (2-dimension data array like Excel data sheet). How can I import the data from Matlab to build the LUT ? Please help me to solve this problem.連結已複製
5 回應
MatLab should be flexible enough to format the data according to Quartus needs. Otherwise a tcl script will do. Some kind of programming is obviously required.
I don't really understand the 16x48 point. MatLab should be expected to represent LUT data by a one-dimensional array, the 16x48 seems to be just a print format? If you're actually dealing with two-dimensional data, you have to think about a suitable mapping to FPGA embedded memory first. The same embedded FPGA memory can be used as RAM or ROM respectively, there's no real difference, execpt for the usage of available port signals. They are all mapped to altsyncram megafunction anyway.You can either generate a mif(or hex) file using Matlab programming. Alternatively a non-official shortcut is this:
open a new mif file in quartus(you will get cells like spread sheet), set width and size,set data type to signed ...etc. go to matlab and display your data as column of integers, copy to clipboard then go to quartus mif and paste. In this way quartus does the work for you. I also commonly use this trick to convert data as well(hex to signed to binary...) and copy back to my workHi,
I needed some help in creating my own look up table in matlab for windows. What are the ways through which i can match the input grayscale values to the output monitor grayscale values, ie. basically how can i know what are the monitor output values.