Using R2021A or R2021B simulink I have a lookup table (n-D Direct Lookup Table) that works in simulink, but generates bad VHDL code about 1/2 the time I use it. The bad VHDL seems to be checking if the index into the table is out of range, but instead of checking it against max range, it checks it against zero which totally breaks it.
What I need is a workaround. Is there some other other way to get lookup table functionality in simulink that won't have this bug?
In my case I can't go beyond R2021B at least not easily because this is on an airgapped computer that can't be easily changed.
Thanks in advance!