WO2017166026A1 - Multiplier-accumulator, multiplier-accumulator array and digital filter - Google Patents

Multiplier-accumulator, multiplier-accumulator array and digital filter Download PDF

Info

Publication number
WO2017166026A1
WO2017166026A1 PCT/CN2016/077530 CN2016077530W WO2017166026A1 WO 2017166026 A1 WO2017166026 A1 WO 2017166026A1 CN 2016077530 W CN2016077530 W CN 2016077530W WO 2017166026 A1 WO2017166026 A1 WO 2017166026A1
Authority
WO
WIPO (PCT)
Prior art keywords
multiplier
accumulator
converted
digital filter
array
Prior art date
Application number
PCT/CN2016/077530
Other languages
French (fr)
Chinese (zh)
Inventor
张科峰
Original Assignee
武汉芯泰科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉芯泰科技有限公司 filed Critical 武汉芯泰科技有限公司
Priority to PCT/CN2016/077530 priority Critical patent/WO2017166026A1/en
Publication of WO2017166026A1 publication Critical patent/WO2017166026A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/57Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations

Definitions

  • the present invention relates to the field of digital filtering technologies, and in particular, to a multiplier, a multiplier array, and a digital filter.
  • digital filtering technology is an important technology.
  • the digital filtering process is mainly realized by the multiplication operation of the filter coefficient and the sampled data, and the accumulation operation. Therefore, the multiplier is a very core module of the digital filter, which often determines the speed and resource consumption of the digital filter (such as area, power consumption, etc.).
  • the multiplier is operated based on the principle of precise calculation, and the filter coefficient is usually a very accurate number which changes with the change of the sampled data.
  • the effect of the filter coefficients on the final filtering accuracy of the digital filter is a relative relationship and is not an absolute relationship.
  • the use of accurate filter coefficient calculations will make the calculation of multiplication and addition, especially the multiplication calculation, very large, which leads to the defects of digital filter, such as slow speed, large power consumption and large area. Therefore, it is necessary to design a multiplier that can ensure the effective accuracy of the digital filter and simplify the multiplication calculation.
  • the present invention provides a multiplier, a multiplier array and a multiplier that can greatly simplify multiplication calculation, reduce the area of the multiplier and power consumption, and Digital filter.
  • a multiplier including: a multiplier converter for converting a multiplier to obtain a converted multiplier, the converted multiplier being represented by a binary, only one The bit is 1 and the remaining bits are 0; a multiplier for multiplying the converted multiplier by the multiplicand to obtain a product; an accumulator for accumulating the product The cumulative result of the product.
  • the multiplier converter converts the multiplier, retains 1 of the binary highest bit of the multiplier, and sets the remaining bits to 0.
  • the multiplier converter converts the multiplier, and the multiplier converter performs the following operations:
  • multiplier array comprising at least two of the above multipliers.
  • the multipliers are connected in series.
  • the multipliers are connected in parallel.
  • a digital filter including the above-described multiplier. .
  • Embodiments of the present invention have the following beneficial effects: By converting the multiplier of the multiplier, only one bit of the binary bit of the converted multiplier is 1, and the other bits are all 0. Thus, the multiplier is doing the multiplication operation. Regardless of the number of bits of the multiplier and the multiplicand, the multiplier only needs one bit of space, and one multiplication operation can be completed in one chirp cycle. The power consumption and area of the multiplier are greatly reduced, but the speed is greatly increased.
  • FIG. 1 is a block diagram showing the structure of a multiplier of a first embodiment provided by the present invention
  • FIG. 2 is a schematic diagram of a multiplier conversion structure of a first embodiment provided by the present invention.
  • 3 is a schematic diagram of a multiplier conversion structure of a first embodiment provided by the present invention
  • 4 is a schematic structural diagram of a multiplier array of a second embodiment provided by the present invention
  • FIG. 5 is a schematic structural diagram of a multiplier array of a second embodiment provided by the present invention.
  • FIG. 6 is a schematic structural diagram of a digital filter according to a third embodiment of the present invention.
  • FIG. 7 is a flow chart of a multiplication and addition calculation method according to a fourth embodiment of the present invention.
  • Embodiment 1 Multiplier
  • the present embodiment provides a multiplier and adder.
  • the multiplier 100 includes: a multiplier converter 11, a multiplier 12, and an accumulator 13.
  • the multiplier converter 11 is used to convert the multiplier A to obtain the converted multiplier A'.
  • the converted multiplier A' is expressed in binary ⁇ , with only one bit being 1, and the remaining bits being 0.
  • the multiplier 12 is for multiplying the converted multiplier A' by the multiplicand X to obtain a product.
  • the accumulator 13 is for accumulating the product to output an accumulated result ⁇ .
  • the multiplier A may include L (L is a natural number) number ai , a 2 ... a L , and the multiplicand X may also include N numbers X l , x 2 ... x N .
  • the accumulator 13 needs to accumulate the L products, and the calculation formula is as follows
  • the manner in which the multiplier converter 11 converts the multiplier A includes the following two modes:
  • the binary highest bit of the multiplier A is reserved for 1, and the remaining bits are all set to zero.
  • the multiplier A be an 8-bit (bo ⁇ b 7 ) number, and the value of A be 26, then represent A ⁇ in binary, it! ⁇ , b ⁇ nb 5 bits are 1, and the remaining bits are 0.
  • 1 ⁇ 5 bits of 1 are directly reserved, and the remaining bits are set to 0. That is to say, the value of the converted multiplier A' is 16.
  • Method 2 First, the two numbers 2 closest to the multiplier A are obtained according to the value of the multiplier A. And 2 ⁇ , wherein the multiplier is in the range of 2 " ⁇ 2"+1, n is an integer; then it is determined that the multiplier A is closer to which of 2 n and 2, if it is closer to 2", then Multiplier is converted to 2", otherwise the multiplier is converted to 2 ⁇
  • the multiplier A When the multiplier A is converted in the above manner, the multiplication between the multiplier A and the multiplicand X becomes very simple, and it is only necessary to shift the X according to the position of 1 in A'. Just right. If A is a number greater than 1, then X is shifted to the left; if A is less than 1, then X is shifted to the right. That is to say, the multiplier 12 does not only implement the multiplication calculation, but actually implements the division calculation. Since the converted multiplier A' is always longer than the converted multiplier A' (8bit, 9bit, lObit...), the converted multiplier A' always has only one bit with a value of 1, so the multiplier 12 only needs to occupy lbit. Resources. That is, the multiplier 12 can be simplified into a lbit shift register. Therefore,
  • the input and output of data may be either a serial mode or a parallel mode, or a combination of serial and parallel.
  • Embodiment 2 Multiplier array
  • This embodiment provides a multiplier array, as shown in FIGS. 4 and 5, the multiplier array may include at least two The multiplier adder 100 in the first embodiment.
  • the multiplier array 200 includes seven parallel multipliers 100.
  • the inputs X1 ⁇ X7 of the seven multipliers 100 can be identical, partially identical or completely different. If the input X1 X7 of the multiplier 100 is the same, a different multiplier A can be multiplied by the multiplicand X to achieve different filtering effects. If the inputs X1 ⁇ X7 of the multiplier 100 are different, then different attribute items of the same thing can be filtered.
  • X1 ⁇ X7 can represent frequency, spatial position (X-axis, y-axis, and z-axis), current, voltage, rate, and so on.
  • the multiplier array 300 includes four serial multipliers 100.
  • the multipliers A1 ⁇ A4 of the four multipliers 100 can be identical, partially identical or completely different.
  • a multi-stage filtering of the multiplicand XI can be achieved.
  • the multiplier array may also include a plurality of multipliers 100 connected in parallel and in series.
  • multipliers 100 are for illustrative purposes only and is not intended to limit the present invention. Those skilled in the art, under the teachings of the present application, can select the number of multipliers 100 according to actual needs, which does not require creative labor.
  • Embodiment 3 Digital Filter
  • This embodiment provides a digital filter.
  • the digital filter 400 includes the multiplier adder 100 described in the first embodiment.
  • the multiplier is a core module of the digital filter.
  • the multiplication and addition operations of the filter coefficient A of the digital filter and the sampled data X are accurately calculated.
  • the applicant has made a lot of exploration and research and found that the accuracy of the filter coefficient A has little effect on the final filtering accuracy of the digital filter. Therefore, the present application explores and designs a digital filter based on fuzzy calculation, which can obtain good filtering precision, can greatly reduce the amount of calculation, increase the calculation speed and save resources.
  • Embodiment 4 Multiply and add calculation method
  • Step S1 the multiplier is converted to obtain the converted multiplier, and the converted multiplier is expressed in binary, ⁇ , only one bit is 1, and the remaining bits are 0;
  • the remaining highest digit of the multiplier is reserved, and the remaining bits are set to 0 to implement the above multiplier conversion.
  • multiplier conversion can also be realized by the following steps:
  • Step S1 l obtaining two numbers 2 n and 2 ⁇ + ⁇ closest to the multiplier according to the value of the multiplier, wherein the multiplier is in the range of 2 " ⁇ 2"", n is an integer;
  • Step S12 Determine which of the 2 n and 2 ⁇ multipliers is closer to, and if it is closer to 2 ", convert the multiplier to 2 ", otherwise convert the multiplier to 2 ⁇ .
  • the multiplication and addition calculation method prepared in the embodiment the multiplication calculation can be completed quickly, the calculation speed is improved, and the power consumption of the multiplication and addition operation is reduced.

Abstract

Disclosed are a multiplier-accumulator, a multiplier-accumulator array and a digital filter. The multiplier-accumulator comprises a multiplier converter for converting a multiplier to obtain a converted multiplier, wherein when the converted multiplier is expressed in binary, only one bit is 1 and the remaining bits are 0; a multiplier for multiplying the converted multiplier by a multiplicand to obtain a product; and an accumulator for adding the product to output an accumulation result of the product. By converting a multiplier of a multiplier-accumulator, when the multiplier-accumulator carries out multiplication, the multiplier needs only one bit of space, regardless of the number of bits of the multiplier and the multiplicand, and the multiplication can be completed in one clock cycle. The power consumption and area of a multiplier-accumulator are greatly reduced, while the speed is greatly increased.

Description

发明名称:一种乘加器、 乘加器阵列及数字滤波器  Title of Invention: A Multiplier Adder, Multiplier Adder Array, and Digital Filter
技术领域  Technical field
[0001] 本发明涉及数字滤波技术领域, 尤其涉及一种乘加器、 乘加器阵列及数字滤波 器。  [0001] The present invention relates to the field of digital filtering technologies, and in particular, to a multiplier, a multiplier array, and a digital filter.
背景技术  Background technique
[0002] 在现有移动通信技术的数字基带技术中, 数字滤波技术是较为重要的一种技术 。 众所周知, 数字滤波过程主要是滤波系数和采样数据的相乘操作以及累加操 作来实现。 因此, 乘加器是数字滤波器非常核心的模块, 它往往决定了数字滤 波器的速度和资源消耗 (如面积、 功耗等) 。  [0002] In the digital baseband technology of the existing mobile communication technology, digital filtering technology is an important technology. As is well known, the digital filtering process is mainly realized by the multiplication operation of the filter coefficient and the sampled data, and the accumulation operation. Therefore, the multiplier is a very core module of the digital filter, which often determines the speed and resource consumption of the digital filter (such as area, power consumption, etc.).
[0003] 然而, 在现有的数字滤波器中, 乘加器都是基于精确计算原理来工作的, 滤波 系数通常是一个非常精确的、 而且会随着采样数据的变化而变化的数字。 但是 , 滤波系数对数字滤波器最终的滤波精确度的影响是一个相对的关系, 并不是 一个绝对的关系。 这样, 使用精确的滤波系数计算, 就会使乘加计算, 尤其是 乘法计算的计算量非常大, 进而导致数字滤波器存在速度慢、 功耗大、 面积大 等缺陷。 因此, 需要设计一种既能保证数字滤波器的有效精度, 又能简化乘法 计算的乘加器  [0003] However, in the existing digital filter, the multiplier is operated based on the principle of precise calculation, and the filter coefficient is usually a very accurate number which changes with the change of the sampled data. However, the effect of the filter coefficients on the final filtering accuracy of the digital filter is a relative relationship and is not an absolute relationship. In this way, the use of accurate filter coefficient calculations will make the calculation of multiplication and addition, especially the multiplication calculation, very large, which leads to the defects of digital filter, such as slow speed, large power consumption and large area. Therefore, it is necessary to design a multiplier that can ensure the effective accuracy of the digital filter and simplify the multiplication calculation.
技术问题  technical problem
[0004] 针对现有技术中乘加器计算量大、 占用资源多的缺陷, 本发明提供一种能大大 简化乘法计算、 降低乘加器面积和功耗的乘加器、 乘加器阵列及数字滤波器。 问题的解决方案  [0004] In view of the defects in the prior art that the multiplier is computationally intensive and occupies a large amount of resources, the present invention provides a multiplier, a multiplier array and a multiplier that can greatly simplify multiplication calculation, reduce the area of the multiplier and power consumption, and Digital filter. Problem solution
技术解决方案  Technical solution
[0005] 本发明就上述技术问题而提出的技术方案如下: [0005] The technical solution proposed by the present invention with respect to the above technical problems is as follows:
[0006] 一方面, 提供了一种乘加器, 包括: 乘数转换器, 用于对乘数进行转换以获得 转换后的乘数, 所述转换后的乘数以二进制表示吋, 只有一个比特位上是 1, 其 余比特位都是 0; 乘法器, 用于将所述转换后的乘数与被乘数相乘以获得乘积; 累加器, 用于将所述乘积进行累加以输出所述乘积的累加结果。 [0007] 优选地, 所述乘数转换器对所述乘数进行转换吋, 保留所述乘数的二进制最高 位的 1, 其余位都置 0。 [0006] In one aspect, a multiplier is provided, including: a multiplier converter for converting a multiplier to obtain a converted multiplier, the converted multiplier being represented by a binary, only one The bit is 1 and the remaining bits are 0; a multiplier for multiplying the converted multiplier by the multiplicand to obtain a product; an accumulator for accumulating the product The cumulative result of the product. [0007] Preferably, the multiplier converter converts the multiplier, retains 1 of the binary highest bit of the multiplier, and sets the remaining bits to 0.
[0008] 优选地, 所述乘数转换器对所述乘数进行转换吋, 所述乘数转换器执行以下操 作:  [0008] Preferably, the multiplier converter converts the multiplier, and the multiplier converter performs the following operations:
[0009] 根据所述乘数的值获得与所述乘数最邻近的两个数 2 ^与 2 , 其中所述乘数在 2 η~2 "+ι范围内, n为整数; 以及  Obtaining two numbers 2^ and 2 closest to the multiplier according to the value of the multiplier, wherein the multiplier is in the range of 2 η~2 "+ι, n is an integer;
[0010] 判断所述乘数更接近所述 2 n与 2 ^中的哪一个, 若更接近 2 ", 则将所述乘数转 换为 2 ", 否则将所述乘数转换为 2 ^。 [0010] determining which of the 2 n and 2 ^ is closer to the multiplier, if it is closer to 2 ", the multiplier is converted to 2 ", otherwise the multiplier is converted to 2 ^.
[0011] 另一方面, 还提供了一种乘加器阵列, 包括至少两个上述乘加器。 [0011] In another aspect, there is also provided a multiplier array comprising at least two of the above multipliers.
[0012] 优选地, 在所述乘加器阵列中, 所述乘加器串联。 [0012] Preferably, in the multiplier array, the multipliers are connected in series.
[0013] 优选地, 在所述乘加器阵列中, 所述乘加器并联。 [0013] Preferably, in the multiplier array, the multipliers are connected in parallel.
[0014] 又一方面, 还提供了一种数字滤波器, 包括上述乘加器。 。 In still another aspect, a digital filter is provided, including the above-described multiplier. .
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0015] 实施本发明实施例, 具有如下有益效果: 通过将乘加器的乘数进行转换, 使得 转换后的乘数的二进制比特位上只有一位是 1, 其他比特位上都是 0。 这样, 乘 加器在做乘法运算吋, 不管乘数和被乘数有多少位, 乘法器就只需要 1个比特的 空间, 1个吋钟周期就能完成一个乘法运算。 乘加器的功耗和面积都大大降低, 而速度却大大增加。  [0015] Embodiments of the present invention have the following beneficial effects: By converting the multiplier of the multiplier, only one bit of the binary bit of the converted multiplier is 1, and the other bits are all 0. Thus, the multiplier is doing the multiplication operation. Regardless of the number of bits of the multiplier and the multiplicand, the multiplier only needs one bit of space, and one multiplication operation can be completed in one chirp cycle. The power consumption and area of the multiplier are greatly reduced, but the speed is greatly increased.
对附图的简要说明  Brief description of the drawing
附图说明  DRAWINGS
[0016] 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或 现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创 造性劳动的前提下, 还可以根据这些附图获得其他的附图。  [0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
[0017] 图 1是本发明提供的第一实施例乘加器结构方框图;  1 is a block diagram showing the structure of a multiplier of a first embodiment provided by the present invention;
[0018] 图 2是本发明提供的第一实施例乘数转换结构示意图;  2 is a schematic diagram of a multiplier conversion structure of a first embodiment provided by the present invention;
[0019] 图 3是本发明提供的第一实施例乘数转换结构示意图; [0020] 图 4是本发明提供的第二实施例乘加器阵列结构示意图; 3 is a schematic diagram of a multiplier conversion structure of a first embodiment provided by the present invention; 4 is a schematic structural diagram of a multiplier array of a second embodiment provided by the present invention;
[0021] 图 5是本发明提供的第二实施例乘加器阵列结构示意图;  [0021] FIG. 5 is a schematic structural diagram of a multiplier array of a second embodiment provided by the present invention;
[0022] 图 6是本发明提供的第三实施例数字滤波器结构示意图;  6 is a schematic structural diagram of a digital filter according to a third embodiment of the present invention;
[0023] 图 7是本发明提供的第四实施例乘加计算方法流程图。  7 is a flow chart of a multiplication and addition calculation method according to a fourth embodiment of the present invention.
本发明的实施方式 Embodiments of the invention
[0024] 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳 动的前提下所获得的所有其他实施例, 都属于本发明保护的范围。  [0024] The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
[0025] 实施例一: 乘加器  [0025] Embodiment 1: Multiplier
[0026] 本实施例提供了一种乘加器, 参见图 1~3, 该乘加器 100包括: 乘数转换器 11、 乘法器 12和累加器 13。  The present embodiment provides a multiplier and adder. Referring to FIGS. 1 to 3, the multiplier 100 includes: a multiplier converter 11, a multiplier 12, and an accumulator 13.
[0027] 乘数转换器 11用于对乘数 A进行转换以获得转换后的乘数 A'。 转换后的乘数 A' 以二进制表示吋, 只有一个比特位上是 1, 其余比特位都是 0。  The multiplier converter 11 is used to convert the multiplier A to obtain the converted multiplier A'. The converted multiplier A' is expressed in binary 吋, with only one bit being 1, and the remaining bits being 0.
[0028] 乘法器 12用于将转换后的乘数 A'与被乘数 X相乘以获得乘积。 [0028] The multiplier 12 is for multiplying the converted multiplier A' by the multiplicand X to obtain a product.
[0029] 累加器 13用于将乘积进行累加以输出累加结果¥。 [0029] The accumulator 13 is for accumulating the product to output an accumulated result ¥.
[0030] 在本实施例中, 乘数 A可包括 L (L为自然数) 个数 a i、 a 2...a L, 被乘数 X也可 包括 N个数 X l、 x 2...x N。 累加器 13需要对这 L个乘积进行累加, 其计算公式如下 [0030] In this embodiment, the multiplier A may include L (L is a natural number) number ai , a 2 ... a L , and the multiplicand X may also include N numbers X l , x 2 ... x N . The accumulator 13 needs to accumulate the L products, and the calculation formula is as follows
[0031] [0031]
纖: - 」 ¾ 箭 : Fiber: - ” 3⁄4 arrow :
[0032] 具体地, 如图 2和 3所示, 乘数转换器 11对乘数 A进行转换的方式包括以下两种 方式: [0032] Specifically, as shown in FIGS. 2 and 3, the manner in which the multiplier converter 11 converts the multiplier A includes the following two modes:
[0033] 方式一, 保留乘数 A的二进制最高位的 1, 其余位都置 0。 例如, 如图 2所示, 假 设乘数 A是一个 8bit (b o~b 7) 的数, A的值为 26, 那么以二进制方式表示 A吋, 其!^、 b ^nb 5位为 1, 其余位为 0。 在转换吋, 直接保留1^ 5位的 1, 其余位都置 0 。 也就是说, 转换后的乘数 A'的值为 16。 [0033] In the first mode, the binary highest bit of the multiplier A is reserved for 1, and the remaining bits are all set to zero. For example, as shown in Figure 2, fake Let the multiplier A be an 8-bit (bo~b 7 ) number, and the value of A be 26, then represent A吋 in binary, it! ^, b ^nb 5 bits are 1, and the remaining bits are 0. After conversion, 1^ 5 bits of 1 are directly reserved, and the remaining bits are set to 0. That is to say, the value of the converted multiplier A' is 16.
[0034] 方式二: 首先根据乘数 A的值获得与乘数 A最邻近的两个数 2。与 2 ^, 其中所述 乘数在 2 "~2 "+1范围内, n为整数; 然后判断乘数 A更接近 2 n与 2 中的哪一个, 若更接近 2 ", 则将所述乘数转换为 2 ", 否则将所述乘数转换为 2 ^  [0034] Method 2: First, the two numbers 2 closest to the multiplier A are obtained according to the value of the multiplier A. And 2 ^, wherein the multiplier is in the range of 2 "~2"+1, n is an integer; then it is determined that the multiplier A is closer to which of 2 n and 2, if it is closer to 2", then Multiplier is converted to 2", otherwise the multiplier is converted to 2^
。 例如, 如图 3所示, 同样假设乘数 A是一个 8bit (b o~b 7) 的数, A的值为 26, 那么与乘数 A最邻近的两个数为 2 5=32和 24 . For example, as shown in Figure 3, also assume that the multiplier A is a number of 8 bits (bo~b 7 ), and the value of A is 26, then the two nearest neighbors to the multiplier A are 2 5 =32 and 2 4
= 16。 因为 26更接近 32, 所以 A'的值为 32。  = 16. Since 26 is closer to 32, the value of A' is 32.
[0035] 当对乘数 A进行了上述方式的转换后, 乘数 A与被乘数 X之间的乘法将变得非常 简单, 只需要根据 A'中 1所在的位置而相应对 X进行移位即可。 如果 A是大于 1的 数, 那么 X就向左移位; 如果 A小于 1, 那么 X向右移位。 也就是说, 乘法器 12不 单单实现了乘法计算, 其实还可以实现除法计算。 由于不管转换后的乘数 A'有多 长 (8bit、 9bit、 lObit...) , 转换后的乘数 A'始终只有一个比特位上的值为 1, 因 此乘法器 12只需要占用 lbit的资源。 也就是说, 乘法器 12可以简化成 lbit的移位 寄存器。 因此,  [0035] When the multiplier A is converted in the above manner, the multiplication between the multiplier A and the multiplicand X becomes very simple, and it is only necessary to shift the X according to the position of 1 in A'. Just right. If A is a number greater than 1, then X is shifted to the left; if A is less than 1, then X is shifted to the right. That is to say, the multiplier 12 does not only implement the multiplication calculation, but actually implements the division calculation. Since the converted multiplier A' is always longer than the converted multiplier A' (8bit, 9bit, lObit...), the converted multiplier A' always has only one bit with a value of 1, so the multiplier 12 only needs to occupy lbit. Resources. That is, the multiplier 12 can be simplified into a lbit shift register. Therefore,
[0036] 在现有技术中, 如果用一个 8bit的乘数 A进行乘法运算, 其实是需要对乘数 A的 每个位分别进行乘法运算, 即便这个位上是 0。 那么完成一个 8bit的乘数的乘法 运算, 至少需要 8个吋钟周期。 而采用本申请转换后的乘数 A'进行计算吋, 只需 要进行一次移位操作来完成乘法运算。 也就是说, 本申请不管乘数 A有多长, 都 只需要一个吋钟周期来完成一次乘法运算。 这样, 大大提高了计算速度, 而且 明显降低了功耗。  [0036] In the prior art, if an 8-bit multiplier A is used for multiplication, it is necessary to multiply each bit of the multiplier A, even if this bit is 0. Then, to complete an 8-bit multiplier multiplication operation, it takes at least 8 clock cycles. With the multiplier A' after the conversion of the present application, it is only necessary to perform a shift operation to complete the multiplication operation. That is to say, regardless of how long the multiplier A is, this application requires only one clock cycle to complete a multiplication operation. This greatly increases the computational speed and significantly reduces power consumption.
[0037] 应理解, 在本申请中, 数据的输入和输出既可以采用串行模式, 也可以采用并 行模式, 还可以采用串并结合的方式。 这属于本领域的现有技术, 本领域技术 人员可以根据实际需求, 在本申请的基础上进行相应的设计, 这并不需要付出 创造性劳动。  [0037] It should be understood that in the present application, the input and output of data may be either a serial mode or a parallel mode, or a combination of serial and parallel. This belongs to the prior art in the art, and those skilled in the art can carry out corresponding design on the basis of the present application according to actual needs, which does not require creative labor.
[0038] 实施例二: 乘加器阵列  Embodiment 2: Multiplier array
[0039] 本实施例提供了一种乘加器阵列, 如图 4和 5所示, 该乘加器阵列可包括至少两 个实施例一中的乘加器 100。 [0039] This embodiment provides a multiplier array, as shown in FIGS. 4 and 5, the multiplier array may include at least two The multiplier adder 100 in the first embodiment.
[0040] 具体地, 如图 4所示, 乘加器阵列 200包括 7个并联乘加器 100。 7个乘加器 100的 输入 X1~X7可以完全相同、 部分相同或完全不同。 如果乘加器 100的输入 X1 X7 相同, 则可以用不同的乘数 A与被乘数 X相乘, 从而达到不同的滤波效果。 如果 乘加器 100的输入 X1~X7不同, 那么就可以对同一事物的不同属性项进行滤波。 例如, X1~X7可以表示频率、 空间位置 (X轴、 y轴和 z轴) 、 电流、 电压、 速率 等等。 实施本实施例的乘加器阵列, 就可以用很少的资源来描述一个非常复杂 的事项。 [0040] Specifically, as shown in FIG. 4, the multiplier array 200 includes seven parallel multipliers 100. The inputs X1~X7 of the seven multipliers 100 can be identical, partially identical or completely different. If the input X1 X7 of the multiplier 100 is the same, a different multiplier A can be multiplied by the multiplicand X to achieve different filtering effects. If the inputs X1~X7 of the multiplier 100 are different, then different attribute items of the same thing can be filtered. For example, X1~X7 can represent frequency, spatial position (X-axis, y-axis, and z-axis), current, voltage, rate, and so on. By implementing the multiplier array of the present embodiment, a very complicated matter can be described with few resources.
[0041] 具体地, 如图 5所示, 乘加器阵列 300包括 4个串联的乘加器 100。 4个乘加器 100 的乘数 A1~A4可以完全相同、 部分相同或完全不同。 通过串联连接的方式来构 建乘加器阵列 300, 可以实现对被乘数 XI的多级滤波。  Specifically, as shown in FIG. 5, the multiplier array 300 includes four serial multipliers 100. The multipliers A1~A4 of the four multipliers 100 can be identical, partially identical or completely different. By constructing the multiplier array 300 in series, a multi-stage filtering of the multiplicand XI can be achieved.
[0042] 在本发明提供的其他优选实施例中, 乘加器阵列还可以同吋包括并联和串联连 接的多个乘加器 100。  [0042] In other preferred embodiments provided by the present invention, the multiplier array may also include a plurality of multipliers 100 connected in parallel and in series.
[0043] 应理解, 本实施例所给出的乘加器 100的具体个数只是为了举例说明, 并不是 为了限制本发明。 本领域技术人员在本申请的教导下, 可根据实际需要选择乘 加器 100的数量, 这并不需要付出创造性劳动。  [0043] It should be understood that the specific number of the multipliers 100 given in this embodiment is for illustrative purposes only and is not intended to limit the present invention. Those skilled in the art, under the teachings of the present application, can select the number of multipliers 100 according to actual needs, which does not require creative labor.
[0044] 实施例三: 数字滤波器  Embodiment 3: Digital Filter
[0045] 本实施例提供了一种数字滤波器, 参见图 6, 该数字滤波器 400包括实施例一中 所描述的乘加器 100。  [0045] This embodiment provides a digital filter. Referring to FIG. 6, the digital filter 400 includes the multiplier adder 100 described in the first embodiment.
[0046] 乘加器是数字滤波器的核心模块。 在现有技术中, 数字滤波器的滤波系数 A与 采样数据 X的乘加运算都是精确计算的。 但是在本申请中, 申请人经过大量的探 索和研究发现, 滤波系数 A的精确度对数字滤波器最后的滤波精度的影响并没有 那么明显。 因此, 本申请探索并设计了一种基于模糊计算的数字滤波器, 这种 滤波器既可以获得很好的滤波精度, 又可以大大减少计算量、 提高计算速度并 节约资源。  [0046] The multiplier is a core module of the digital filter. In the prior art, the multiplication and addition operations of the filter coefficient A of the digital filter and the sampled data X are accurately calculated. However, in this application, the applicant has made a lot of exploration and research and found that the accuracy of the filter coefficient A has little effect on the final filtering accuracy of the digital filter. Therefore, the present application explores and designs a digital filter based on fuzzy calculation, which can obtain good filtering precision, can greatly reduce the amount of calculation, increase the calculation speed and save resources.
[0047] 实施例四: 乘加计算方法  Embodiment 4: Multiply and add calculation method
[0048] 本实施例提供了一种乘加计算方法, 参见图 7, 该乘加计算方法包括以下步骤 [0049] 步骤 Sl, 将乘数转换以获得转换后的乘数, 转换后的乘数以二进制表示吋, 只 有一个比特位上是 1, 其余比特位都是 0; [0048] This embodiment provides a multiplication and addition calculation method. Referring to FIG. 7, the multiplication and addition calculation method includes the following steps. [0049] Step S1, the multiplier is converted to obtain the converted multiplier, and the converted multiplier is expressed in binary, 只有, only one bit is 1, and the remaining bits are 0;
[0050] 进一步地, 保留乘数的二进制最高位的 1, 其余位都置 0, 以实现上述乘数转换 [0050] Further, the remaining highest digit of the multiplier is reserved, and the remaining bits are set to 0 to implement the above multiplier conversion.
[0051] 进一步地, 还可通过如下步骤实现乘数转换: [0051] Further, the multiplier conversion can also be realized by the following steps:
[0052] 步骤 Sl l, 根据乘数的值获得与乘数最邻近的两个数 2 n与 2 η+ι, 其中所述乘数 在 2 "~2 ""范围内, n为整数; 以及  [0052] Step S1 l, obtaining two numbers 2 n and 2 η+ι closest to the multiplier according to the value of the multiplier, wherein the multiplier is in the range of 2 "~2"", n is an integer;
[0053] 步骤 S12, 判断乘数更接近 2 n与 2 ^ι中的哪一个, 若更接近 2 ", 则将所述乘数 转换为 2 ", 否则将所述乘数转换为 2 ^。 [0053] Step S12: Determine which of the 2 n and 2 ^ι multipliers is closer to, and if it is closer to 2 ", convert the multiplier to 2 ", otherwise convert the multiplier to 2 ^.
[0054] 通过本实施例制备的乘加计算方法, 可快速地完成乘法计算, 提升计算速度, 而且降低了乘加运算的功耗。 [0054] By the multiplication and addition calculation method prepared in the embodiment, the multiplication calculation can be completed quickly, the calculation speed is improved, and the power consumption of the multiplication and addition operation is reduced.
[0055] 以上所揭露的仅为本发明一种较佳实施例而已, 当然不能以此来限定本发明之 权利范围, 本领域普通技术人员可以理解实现上述实施例的全部或部分流程, 并依本发明权利要求所作的等同变化, 仍属于发明所涵盖的范围。 The above disclosure is only a preferred embodiment of the present invention, and of course, the scope of the present invention is not limited thereto, and those skilled in the art can understand all or part of the process of implementing the above embodiments, and Equivalent variations of the claims of the invention are still within the scope of the invention.

Claims

权利要求书 Claim
[权利要求 1] 一种乘加器, 其特征在于, 包括:  [Claim 1] A multiplier, comprising:
乘数转换器, 用于对乘数进行转换以获得转换后的乘数, 所述转换后 的乘数以二进制表示吋, 只有一个比特位上是 1, 其余比特位都是 0; 乘法器, 用于将所述转换后的乘数与被乘数相乘以获得乘积; 累加器, 用于将所述乘积进行累加以输出所述乘积的累加结果。  a multiplier converter for converting the multiplier to obtain a converted multiplier, the converted multiplier being represented by a binary representation, only one bit is 1 and the remaining bits are 0; a multiplier, And a multiplier for multiplying the converted multiplier by a multiplicand to obtain a product; an accumulator for accumulating the product to output an accumulated result of the product.
[权利要求 2] 根据权利要求 1所述的乘加器, 其特征在于, 所述乘数转换器对所述 乘数进行转换吋, 保留所述乘数的二进制最高位的 1, 其余位都置 0。  [Claim 2] The multiplier and adder according to claim 1, wherein the multiplier converter converts the multiplier, and retains 1 of the binary highest bit of the multiplier, and the remaining bits are Set to 0.
[权利要求 3] 根据权利要求 1所述的乘加器, 其特征在于, 所述乘数转换器对所述 乘数进行转换吋, 所述乘数转换器执行以下操作: 根据所述乘数的值获得与所述乘数最邻近的两个数 2 n与 2 -' , 其中所 述乘数在 2 ^2 ^范围内, n为整数; 以及  [Claim 3] The multiplier and adder according to claim 1, wherein the multiplier converter converts the multiplier, the multiplier converter performs the following operations: according to the multiplier a value that obtains two numbers 2 n and 2 -' that are closest to the multiplier, wherein the multiplier is in the range 2^2^, n is an integer;
判断所述乘数更接近所述 2 n与 2 ^中的哪一个, 若更接近 2 ", 则将所 述乘数转换为 2 n, 否则将所述乘数转换为 2 ^。  It is judged which of the 2 n and 2 ^ is closer to the multiplier, and if it is closer to 2 ", the multiplier is converted to 2 n , otherwise the multiplier is converted to 2 ^.
[权利要求 4] 一种乘加器阵列, 其特征在于, 包括至少两个如权利要求 1至 3任意一 项所述的乘加器。 [Attachment 4] A multiplier array comprising at least two multipliers according to any one of claims 1 to 3.
[权利要求 5] 根据权利要求 4所述的乘加器阵列, 其特征在于, 所述乘加器串联。  [Claim 5] The multiplier adder array according to claim 4, wherein the multipliers are connected in series.
[权利要求 6] 根据权利要求 4所述的乘加器阵列, 其特征在于, 所述乘加器并联。  [Claim 6] The multiplier adder array according to claim 4, wherein the multipliers are connected in parallel.
[权利要求 7] —种数字滤波器, 其特征在于, 包括如权利要求 1至 3任意一项所述的 乘加器。  [Claim 7] A digital filter comprising the multiplier according to any one of claims 1 to 3.
PCT/CN2016/077530 2016-03-28 2016-03-28 Multiplier-accumulator, multiplier-accumulator array and digital filter WO2017166026A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/077530 WO2017166026A1 (en) 2016-03-28 2016-03-28 Multiplier-accumulator, multiplier-accumulator array and digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/077530 WO2017166026A1 (en) 2016-03-28 2016-03-28 Multiplier-accumulator, multiplier-accumulator array and digital filter

Publications (1)

Publication Number Publication Date
WO2017166026A1 true WO2017166026A1 (en) 2017-10-05

Family

ID=59963320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/077530 WO2017166026A1 (en) 2016-03-28 2016-03-28 Multiplier-accumulator, multiplier-accumulator array and digital filter

Country Status (1)

Country Link
WO (1) WO2017166026A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10284991A (en) * 1997-04-07 1998-10-23 Nec Ic Microcomput Syst Ltd Thinning filter
JP2009065515A (en) * 2007-09-07 2009-03-26 Toshiba Corp Digital filter
CN104778028A (en) * 2014-01-15 2015-07-15 Arm有限公司 Multiply adder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10284991A (en) * 1997-04-07 1998-10-23 Nec Ic Microcomput Syst Ltd Thinning filter
JP2009065515A (en) * 2007-09-07 2009-03-26 Toshiba Corp Digital filter
CN104778028A (en) * 2014-01-15 2015-07-15 Arm有限公司 Multiply adder

Similar Documents

Publication Publication Date Title
CN103176767B (en) The implementation method of the floating number multiply-accumulate unit that a kind of low-power consumption height is handled up
CN105471433B (en) The method of sampling rate converter, analog-digital converter and converting data streams
CN104539263B (en) Reconfigurable low-power dissipation digital FIR filter
CN106374879A (en) FIR filter optimization method based on effective CSE
CN208190613U (en) A kind of fractional order integrator realized based on FPGA
CN101877577A (en) Method for realizing finite impulse response filter and finite impulse response filter
CN103762828B (en) A kind of control method and device of multistage power electronic converter system
CN102158451B (en) High-speed multi-carrier multiphase interpolation filter method and device
CN204316468U (en) A kind of multi-path digital filter
WO2017166026A1 (en) Multiplier-accumulator, multiplier-accumulator array and digital filter
CN102811035B (en) Limited impulse response digital filter and its implementation
CN105867876A (en) Multiply accumulator, multiply accumulator array, digital filter and multiply accumulation method
CN108897526B (en) Compound finite field inverter based on multiple square operations and inversion method thereof
CN101242168A (en) A realization method and device for FIR digital filter direct-connection
KR101050108B1 (en) Filtering method, apparatus and recording medium of low complexity finite impulse response filter
CN103580647A (en) Filter structure
CN208369545U (en) General mode filter
CN101729042A (en) Method for increasing speed and method for reducing speed
CN106788332A (en) A kind of multiphase interpolation filter and filtering method
CN102055325B (en) Multiphase voltage reduction converter with phase compensation and phase compensation method thereof
Abdelgawad et al. A low-power multiplication algorithm for signal processing in wireless sensor networks
TWI566523B (en) Finite impulse response filter and filtering method
WO2023004799A1 (en) Electronic device and neural network quantization method
CN105790728A (en) Multi-path digital filter
CN203225719U (en) Filter

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16895807

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16895807

Country of ref document: EP

Kind code of ref document: A1