Lookup table working logic.
Hello guyz, I am playing with the lookup table, looking at its description etc. it is written, that "This algorithm checks if the index at the input is greater than the maximum index and, if so, indexes the last value in the table." Could you please clarify, does it mean that if my last cell has index 10 and value 1 and if the input is greater, then one the output of the table will constantly produce 1? I misunderstand something probably...
Thank you!
Hello Skfir,
Actually the documented behavior applies only to the IndexLimitProtection LUT. When indexed within its table limits it outputs the appropriate indexed value. It outputs the first table entry when its input is one or below. It outputs the entry in the highest available position for that position's index or higher. Thus its output is well-defined for any index, whether within its table or outside.
For example, an IndexLimitProtection LUT with the table shown, outputs 0 for zero or negative inputs. An input of 1 to 16 (integer format) outputs the indexed value from 1.0 to 15.0 (in 5.23 format). Indexes exceeding 16 also output 15.0. We can demonstrate this behavior with a circuit like the one shown here:
The sawtooth oscillator causes a slow sweep from integer -32 to integer +32. Because the LUT only has entries for indexes 1 to 16, the rest of the sweep saturates at the table edges. The Real-Time Display shows this result:
The other LUT in this circuit is a Standard LUT, without Index Limit Protection. With the same table and input sweep, its output is a mess:
Thus, choose a Standard LUT when you're certain its input remains within range. Use the IndexLimitProtection LUT when you can't guarantee within-range operation.
Great! Now I understand finally! Thank you Bob!
Hi Skfir,
Thank you for your kind reply. As it turns out, there's a goof above I need to fix. A zero input into a LUT references the first table entry, a one advances to the next entry (labeled "2"). An input n references the (n+1)th entry if it exists. The table's input logic going into the table appears as shown. I'd fix my answer above except it appears that posts cannot be edited once they have been replied to. Also it's hard to type anything with a cat sleeping on my lap.
I had to insert a DC Source at the LUT input to figure out the LUT logic. This is the old, "Is it 0 to whatever, or 1 to whatever+1?" difficulty that has followed me in all my attempts to do anything that even smells like digital (hardware or software). That's why SigmaStudio rocks -- it makes (almost) everything look like analog.
Best regards,
Bob
Yeah Thank you Bob. Regards to the kitty.
Please log in to reply.









