Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

Re: Lookup table working logic.

$
0
0

     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.

 

Table_pic.jpg     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:

LUT-test-sch_pic.jpg

 

 

    

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:

IndexLimitProtect-out_pic.jpg

 

     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:

IndexNoProtect-out_pic.jpg

     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.


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>