Logarithmic number systems (LNS) are used to represent real numbers in many applications using a constant base raised to a fixed-point exponent making its distribution exponential. This greatly simplifies hardware multiply, divide and square root. LNS with base-2 is most common, but in this paper we show that for low-precision LNS the choice of base has a significant impact. We make four main contributions. First, LNS is not closed under addition and subtraction, so the result is approximate. We show that choosing a suitable base can manipulate the distribution to reduce the average error. Second, we show that low-precision LNS addition and subtraction can be implemented efficiently in logic rather than commonly used ROM lookup tables, the complexity of which can be reduced by an appropriate choice of base. A similar effect is shown where the result of arithmetic has greater precision than the input. Third, where input data from external sources is not expected to be in LNS, we can reduce the conversion error by selecting a LNS base to match the expected distribution of the input. Thus, there is no one base which gives the global optimum, and base selection is a trade-off between different factors. Fourth, we show that circuits realized in LNS require lower area and power consumption for short word lengths.
翻译:对数系统( LNS) 用于代表许多应用中的真实数字, 使用固定基数, 向固定点显示其分布指数, 以固定基数显示其分布指数。 这大大简化了硬件的倍增、 分隔和平方根。 使用基-2 的 LNS 最为常见, 但在本文件中我们显示, 对于低精度 LNS 来说, 基数的选择具有重大影响。 我们做出四个主要贡献。 首先, LNS 在增减中不关闭, 结果是近似的。 我们显示, 选择合适的基数可以操纵分布来减少平均错误。 第二, 我们显示, 低精度 LNS 增减可以在逻辑上高效地实施, 而不是常用的 ROM 查看表, 其复杂性可以通过适当的基数选择来降低。 在计算结果比输入更精确的情况下, 类似效果显示。 第三, 外部源的输入数据不会在 LNS 中关闭, 我们可以通过选择一个 LNS 基数来减少转换错误, 来匹配平均输入的分布 。 因此, 我们没有一个基数可以给全球最佳度最短的 LNS 和基数选择一个基数区域之间, 需要不同的交易。