Hi,
I have a question about the size of LUT in FC7.
Would it be possible to store large quantities of data such as 50000 elements as integers in first LUT
and another 50000 as float in a second LUT.
At the moment as far as i tested the component, it accepts approximately 6000 values.
Best Regards
George
Look Up Table - Size of elements
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Look Up Table - Size of elements
The amount of elements you can add to a LUT depends on the microcontroller you want to use. For 8 bit pic 50000 would be a huge amount and I don’t thing it can be done. For int alone that would be 100000 flash positions in flash.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: Look Up Table - Size of elements
Thanks for your comment. I checked the LUT component again using larger memory and 16bit mcu but the maximum elements i can paste in are 6221.
So i hope it will be another way( maybe define the LUT in supplementary code) to support more elements in the table.
George
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: Look Up Table - Size of elements
just an update after some time trying different things..
I created 6 LUT droping 6 different components in my project's panel.
I then paste on each table the 4000 values. So in total i have 25000 values in those 6 LUT !
I compile the project and the result of the used space was amazingly vesy small!
So now i am almost sure that the memory space is enough for holding the two LUT that i want to have (25000 elements on each table).
Do you think that there is any way of writing 25000 element in one LUT and not seperate the values in quantities of 6000 or less?
Thanks in advance!
George
I created 6 LUT droping 6 different components in my project's panel.
I then paste on each table the 4000 values. So in total i have 25000 values in those 6 LUT !
I compile the project and the result of the used space was amazingly vesy small!
So now i am almost sure that the memory space is enough for holding the two LUT that i want to have (25000 elements on each table).
Do you think that there is any way of writing 25000 element in one LUT and not seperate the values in quantities of 6000 or less?
Thanks in advance!
George
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Look Up Table - Size of elements
This doesn’t make sense. If you have 4000 elements of 1 byte (let alone a larger integer) you need 4000 memory locations to store those values. None of the memory allocations in your output has 6 times 4000 elements = 24000 elements allocated. My guess is the lookup tables are truncated or the optimizer got rid of them (do you access any elements in your code?)
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: Look Up Table - Size of elements
kersing wrote: ↑Fri Mar 19, 2021 9:36 pmThis doesn’t make sense. If you have 4000 elements of 1 byte (let alone a larger integer) you need 4000 memory locations to store those values. None of the memory allocations in your output has 6 times 4000 elements = 24000 elements allocated. My guess is the lookup tables are truncated or the optimizer got rid of them (do you access any elements in your code?)
I thing you are right. In the simulation i can access all the elements of any of 6 LUT. After i checked the C code produced from the compiled project i realized that there are only the elements of the first LUT! The other 5 are mising from the code..
-
- Posts: 128
- Joined: Wed Jul 04, 2012 11:21 pm
- Location: Greece
- Has thanked: 51 times
- Been thanked: 19 times
- Contact:
Re: Look Up Table - Size of elements
I focused on the solution to my problem and not so much on how to write huge tables in the microcontroller.
Therefore i am wondering if it is good idea to use an external EEPROM chip to do the job. With what characteristics should i choose the EEPROM chip in order to be able to holt the amount of data i want?
Therefore i am wondering if it is good idea to use an external EEPROM chip to do the job. With what characteristics should i choose the EEPROM chip in order to be able to holt the amount of data i want?