You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generating arbitrary values from a small range of input values is easy with look up tables (LUTs). The reverse operation, condensing a large set of values into a small range, is typically either computation intensive (linear search through all values) or memory intensive (requires a LUT with 1000s of entries).
@@ -50,7 +59,7 @@ This section is written especially for everyone who is **not familiar** with the
50
59
51
60
### Step 3: Run the demo
52
61
-**Select your MCU & Programming tool:**<br>
53
-
Press `F5`to run the demo code in the simulator. Pause the simulation and mouse over the variables to see the results
62
+
Press `F5`to run the demo code in the simulator. Pause the simulation and mouse over the variables to see the results
54
63
55
64
### Step 4: Generate a custom LUT
56
65
-**Edit the included Excel file:**
@@ -60,9 +69,9 @@ This section is written especially for everyone who is **not familiar** with the
60
69
61
70
## Under the Hood
62
71
63
-
Typically LUTs are direct mapped, for each input value a specific output value is stored. A quantisation assigns multiple values one output value, which would require a lot of memory that is filled with redundant information. This implementation instead stores the threshold values at which the output value changes.
72
+
Typically LUTs are direct mapped, for each input value a specific output value is stored. A quantisation assigns one output value to multiple input values, which would require a lot of memory filled with redundant information. This implementation instead stores the threshold values at which the output value changes.
64
73
65
-
Depending on the size of the input value (2/4 byte) and the range of output values, the resulting LUT can be quite large still. Finding the correct value would require a search across all values and multiple 2/4 byte comparisons, which are rather slow on a AVR8 MCU. Because this level of accuracy is rarely required, this algorithm only compares the 8 most significant bits, ignoring the leading zeros. If the input value is larger than 8bit, it is shifted right until it can be compared. To represent numbers >8bit correctly, a header row is added to the LUT, which contains the LUT offset for each amount of shifts required.
74
+
Depending on the size of the input value (2/4 byte) and the range of output values, the resulting LUT can still be quite large. Finding the correct value would require a search across all values and multiple 2/4 byte comparisons, which are rather slow on a AVR8 MCU. Because this level of accuracy is rarely required, the algorithm only compares the 8 most significant bits, ignoring the leading zeros. If the input value is larger than 8bit, it is shifted right until it can be compared. To represent numbers >8bit correctly, a header row is added to the LUT, which contains the LUT offset for each amount of shifts required.
0 commit comments