CN111198673A - Word length adjusting method, device, equipment and storage medium - Google Patents

Word length adjusting method, device, equipment and storage medium Download PDF

Info

Publication number
CN111198673A
CN111198673A CN201811373931.0A CN201811373931A CN111198673A CN 111198673 A CN111198673 A CN 111198673A CN 201811373931 A CN201811373931 A CN 201811373931A CN 111198673 A CN111198673 A CN 111198673A
Authority
CN
China
Prior art keywords
word length
signal
block
processed
field
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201811373931.0A
Other languages
Chinese (zh)
Other versions
CN111198673B (en
Inventor
胡赛桂
王瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhipu Micro Technology Co ltd
Original Assignee
Beijing Zhipu Micro Technology Co ltd
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 Beijing Zhipu Micro Technology Co ltd filed Critical Beijing Zhipu Micro Technology Co ltd
Priority to CN201811373931.0A priority Critical patent/CN111198673B/en
Publication of CN111198673A publication Critical patent/CN111198673A/en
Application granted granted Critical
Publication of CN111198673B publication Critical patent/CN111198673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/74Selecting or encoding within a word the position of one or more bits having a specified value, e.g. most or least significant one or zero detection, priority encoders
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses a word length adjusting method, a word length adjusting device, word length adjusting equipment and a storage medium. The method comprises the following steps: obtaining an original word length M and a target word length N of a signal to be processed; partitioning a field with the width of X of a signal to be processed from the most significant bit after the sign bit, wherein X is the difference value of the original word length M and the target word length N; and carrying out word length adjustment on the signal to be processed according to the blocks and the target word length N. The word length adjusting method, the word length adjusting device, the word length adjusting equipment and the storage medium can improve the performance of a digital signal processing system and avoid word length waste and signal overflow.

Description

Word length adjusting method, device, equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for adjusting a word length.
Background
In Digital Signal Processing (DSP), the size of the number of bits (word length) occupied by data participating in an operation directly determines the operation amount of an operation module and the size of a storage space for storing an intermediate result, thereby determining the complexity, device cost, and power consumption of a DSP system. On the premise of ensuring that the performance is not lost, reducing the word length of the operation data to the maximum extent is one of the main tasks of DSP algorithm design.
The currently commonly used word length adjustment means is an Automatic Gain Control (AGC) technique. The digital AGC technology adjusts the word length as follows: and calculating the average value of a section of data, adjusting the amplitude of the target data by taking the average value as a basis, and intercepting the adjusted data to adjust the word length so as to achieve the purpose of limiting the word length. For example, assuming that a segment of data includes 1000 digital signals, each digital signal occupies 16 bits, the average value of the segment of data digital signals is calculated to be 234, and the adjustment target word length is 8 bits. It is understood that if the average value is 234, there are digital signals greater than 234 in the 1000 digital signals, and the number of bits corresponding to the maximum value of the digital signals greater than 234 in the 1000 digital signals is not higher than 11 according to the statistical characteristics of the signals. When the target data signal is intercepted, the data with the high 16-11 bit being 5 bits and the data with the low 11-8 bit being 3 bits are discarded, and the middle 8 bits of data are used as the adjusted data signal. For example, assuming that the 16-bit 2-ary data corresponding to the target data signal is 0101111101010101, the 8-bit 2-ary data corresponding to the adjusted data signal is 11101010.
The digital AGC technique adjusts the word length of the subsequent signal by using the current average value, so the word length adjustment effect of the value obtained by the size of the data block used for calculating the average value (i.e. the estimation time for obtaining an average value) is relatively large. Especially for the burst signal scenario, the target signal to be processed may be a useful signal or pure noise, and if the word length of the next useful signal is adjusted by the average value of the current pure noise, the performance of the DSP system may be degraded. In addition, the word length adjustment requires attention to the maximum and minimum values of the signal. At the maximum the signal cannot overflow and at the minimum the accuracy of the data cannot be lost. The average value of the signal cannot completely reflect the maximum value and the minimum value of the signal, especially for a signal with a large peak-to-average ratio, the difference between the average value of the signal and the maximum value or the minimum value is large, and if the difference is not estimated accurately, the word length may be wasted (the effective word length is far smaller than the output word length) or the signal amplitude exceeds the maximum word length, so that overflow occurs.
Disclosure of Invention
Embodiments of the present invention provide a word length adjusting method, apparatus, device, and storage medium, which can improve performance of a digital signal processing system and avoid waste of word length and occurrence of signal overflow.
In one aspect, an embodiment of the present invention provides a word length adjusting method, including:
obtaining an original word length M and a target word length N of a signal to be processed;
partitioning a field with the width of X of a signal to be processed from the most significant bit after the sign bit, wherein X is the difference value of the original word length M and the target word length N;
and adjusting the word length of the signal to be processed according to the blocks and the target word length N.
In one embodiment of the present invention, partitioning a signal to be processed into blocks starting from a most significant bit after a sign bit and having a width X, includes:
and dividing the signal to be processed into Y blocks from the most significant bit after the sign bit and the field with the width of X, wherein Y is equal to the sum of the value of the quotient of X and n after being rounded downwards and 1, and n is the step size of the blocks.
In an embodiment of the present invention, adjusting the word length of the signal to be processed according to the block and the target word length N includes:
starting from the 1 st block field, sequentially judging whether the value corresponding to each block field is zero or not for Y block fields with the total width of X starting from the most significant bit after the sign bit until judging the field blocks with the values not being zero corresponding to the block fields;
and adjusting the word length of the signal to be processed according to the field block with the value not equal to zero corresponding to the block field and the target word length N.
In an embodiment of the present invention, according to a field block whose value corresponding to a block field is not zero and a target word length N, performing word length adjustment on a signal to be processed, including:
extracting data with the word length of N-1 from the highest bit of a field block with the value not equal to zero corresponding to the block field;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, according to a field block whose value corresponding to a block field is not zero and a target word length N, performing word length adjustment on a signal to be processed, including:
searching a bit corresponding to 1 from a high bit to a low bit in a field block with a value not equal to zero corresponding to a block field, and extracting data with the word length of N-1 from the bit corresponding to the first searched 1;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, the word length adjusting method provided in the embodiment of the present invention further includes:
if the values corresponding to the Y block fields are all zero, extracting low N-1 bit data of the signal to be processed;
and splicing the sign bit and the low N-1 bit data of the signal to be processed to obtain a signal with the word length of N corresponding to the signal to be processed.
On the other hand, an embodiment of the present invention provides a word length adjusting device, including:
the device comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for obtaining an original word length M and a target word length N of a signal to be processed;
the block module is used for blocking a field with the width of X from the most significant bit after the sign bit of the signal to be processed, wherein X is the difference value of the original word length M and the target word length N;
and the adjusting module is used for adjusting the word length of the signal to be processed according to the blocks and the target word length N.
In an embodiment of the present invention, the blocking module is specifically configured to:
and dividing the signal to be processed into Y blocks from the most significant bit after the sign bit and the field with the width of X, wherein Y is equal to the sum of the value of the quotient of X and n after being rounded downwards and 1, and n is the step size of the blocks.
In one embodiment of the invention, the adjustment module comprises:
the judging unit is used for sequentially judging whether the value corresponding to each block of field is zero or not from the 1 st block of field data aiming at the Y block of field with the total width of X from the most significant bit after the sign bit until judging the field block of which the value corresponding to the block of field is not zero;
and the adjusting unit is used for adjusting the word length of the signal to be processed according to the field block with the value not equal to zero corresponding to the block field and the target word length N.
In an embodiment of the present invention, the adjusting unit is specifically configured to:
extracting data with the word length of N-1 from the highest bit of a field block with the value not equal to zero corresponding to the block field;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, the adjusting unit is specifically configured to:
searching a bit corresponding to 1 from a high bit to a low bit in a field block with a value not equal to zero corresponding to a block field, and extracting data with the word length of N-1 from the bit corresponding to the first searched 1;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, the adjusting unit is further configured to:
if the values corresponding to the Y block fields are all zero, extracting low N-1 bit data of the signal to be processed;
and splicing the sign bit and the low N-1 bit data of the signal to be processed to obtain a signal with the word length of N corresponding to the signal to be processed.
In another aspect, an embodiment of the present invention provides a word length adjusting apparatus, where the apparatus includes: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor implements the word length adjusting method provided by the embodiment of the invention when executing the computer program.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the word length adjusting method provided in the embodiment of the present invention.
The word length adjusting method, the word length adjusting device, the word length adjusting equipment and the storage medium can improve the performance of a digital signal processing system and avoid word length waste and signal overflow.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a word length adjusting method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating the blocking result provided by the embodiment of the present invention;
FIG. 3 is a diagram illustrating a first result of word size adjustment provided by an embodiment of the present invention;
FIG. 4 is a diagram illustrating a second result of word size adjustment provided by an embodiment of the present invention;
FIG. 5 is a diagram illustrating a third result of word size adjustment provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating a word length adjusting apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the word size adjustment method and apparatus according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As shown in fig. 1, fig. 1 is a schematic flow chart illustrating a word length adjusting method according to an embodiment of the present invention. The word length adjusting method may include:
s101: and obtaining the original word length M and the target word length N of the signal to be processed.
S102: and partitioning the signal to be processed from the most significant bit after the sign bit by using a field with the width of X.
And X is the difference value between the original word length M and the target word length N.
It will be appreciated that the original word length M is greater than the target word length N.
S103: and adjusting the word length of the signal to be processed according to the blocks and the target word length N.
According to the word length adjusting method provided by the embodiment of the invention, how to adjust each signal word length is determined by the own signal, and the situation that the signal amplitude estimation is inaccurate and the useful signal is adjusted by mistake due to the occurrence of pure noise in a burst signal scene can be avoided, so that the performance of a digital signal processing system can be improved.
The following describes in detail the word length adjusting method provided by the embodiment of the present invention with specific examples.
The signal to be processed is assumed to be a complex signal, the complex signal includes a real part I and an imaginary part Q, an original word length of the complex signal is M bits, and a corresponding target word length is N bits. The target word length N in the embodiment of the present invention means that the word length of the adjusted signal is N.
Taking absolute values of the real part I and the imaginary part Q, comparing the absolute values of the real part I and the imaginary part Q, and marking the larger absolute value as MAXIQ
It is understood that MAXIQThe most significant bit of the signal to be processed is the most significant bit after the sign bit.
Will MAXIQDividing the M-N bits from high to low into Y blocks,
Figure BDA0001870224480000061
n is the step size of the block,
Figure BDA0001870224480000062
indicating that the quotient of (M-N) and N is rounded down.
Wherein the first and second phases, 1, 2, … …,
Figure BDA0001870224480000063
blocks, each block comprising n bits; first, the
Figure BDA0001870224480000064
The block contains k bits. If (M-N)/N is a small number, then
Figure BDA0001870224480000065
If (M-N)/N is an integer, k is 0.
The blocking result is shown in fig. 2, and fig. 2 shows a schematic diagram of the blocking result provided by the embodiment of the present invention.
To is directed at
Figure BDA0001870224480000066
The block fields are sequentially judged whether the value corresponding to each block field is zero or not from the 1 st block field until the field block of which the value corresponding to the block field is not zero is judged; according to the field block and the target of which the value corresponding to the block field is not zeroAnd marking the word length N, and adjusting the word length of the signal to be processed.
In an embodiment of the present invention, according to a field block whose value corresponding to a block field is not zero and a target word length N, performing word length adjustment on a signal to be processed may include: extracting data with the word length of N-1 from the highest bit of a field block with the value not equal to zero corresponding to the block field; and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
Assuming that the block of the field with non-zero value corresponding to the block field is the second
Figure BDA0001870224480000071
Block, then from
Figure BDA0001870224480000072
Extracting data with the word length of N-1 from the highest position of the block; and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
From the first
Figure BDA0001870224480000073
Extracting data with the word length of N-1 from the highest position of the block; the sign bit of the signal to be processed and the data with the word length of N-1 are spliced to obtain the result of the signal with the word length of N corresponding to the signal to be processed, as shown in fig. 3. Fig. 3 is a diagram illustrating a first result of word size adjustment according to an embodiment of the present invention.
In an embodiment of the present invention, according to a field block whose value corresponding to a block field is not zero and a target word length N, performing word length adjustment on a signal to be processed may include: searching a bit corresponding to 1 from a high bit to a low bit in a field block with a value not equal to zero corresponding to a block field, and extracting data with the word length of N-1 from the bit corresponding to the first searched 1; and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
Assuming that the block of the field with non-zero value corresponding to the block field is the second
Figure BDA0001870224480000074
Block, then from
Figure BDA0001870224480000075
Looking up the bit corresponding to 1 from high to low in the block, assuming that n is 4, th
Figure BDA0001870224480000076
The binary value corresponding to block data is 0011. Then from the first
Figure BDA0001870224480000077
Extracting data with the word length of N-1 from the 3 rd bit from left to right in the block data; and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed, wherein the word length adjustment result is shown in FIG. 4. Fig. 4 is a diagram illustrating a second result of word size adjustment according to an embodiment of the present invention.
In one embodiment of the present invention, if
Figure BDA0001870224480000078
If the values corresponding to the block fields are all zero, extracting low N-1 bit data of the signal to be processed; and splicing the sign bit and the low N-1 bit data of the signal to be processed to obtain a signal with the word length of N corresponding to the signal to be processed.
The word length adjustment result is shown in fig. 5. Fig. 5 is a diagram illustrating a third result of word size adjustment according to an embodiment of the present invention.
According to the word length adjusting method provided by the embodiment of the invention, how to adjust each signal word length is determined by the own signal, and the situation that the signal amplitude estimation is inaccurate and the useful signal is adjusted by mistake due to the occurrence of pure noise in a burst signal scene can be avoided, so that the performance of a digital signal processing system can be improved. In addition, the embodiment of the invention adjusts the word length according to the field block with the value not equal to zero corresponding to the block field, thereby effectively avoiding the waste of the word length and the occurrence of signal overflow. In addition, the embodiment of the invention can reduce the system overhead and improve the word length adjusting efficiency by searching the bit corresponding to the 1 in a blocking way.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a word length adjusting device. As shown in fig. 6, fig. 6 is a schematic structural diagram of a word length adjusting device according to an embodiment of the present invention. The word length adjusting means may include:
an obtaining module 601, configured to obtain an original word length M and a target word length N of a signal to be processed.
A block module 602, configured to block a field with a width X starting from a most significant bit after a sign bit of the signal to be processed.
Wherein, X is the difference value between the original word length M and the target word length N.
And an adjusting module 603, configured to adjust a word length of the signal to be processed according to the block and the target word length N.
In an embodiment of the present invention, the blocking module 602 may be specifically configured to:
and dividing the signal to be processed into Y blocks from the most significant bit after the sign bit and the field with the width of X, wherein Y is equal to the sum of the value of the quotient of X and n after being rounded downwards and 1, and n is the step size of the blocks.
In an embodiment of the present invention, the adjusting module 603 may include:
the judging unit is used for sequentially judging whether a value corresponding to each block field is zero or not from the 1 st block field aiming at the Y block fields with the total width of n and starting from the most significant bit after the sign bit until the field block with the value not being zero corresponding to the block field is judged;
and the adjusting unit is used for adjusting the word length of the signal to be processed according to the field block with the value not equal to zero corresponding to the block field and the target word length N.
In an embodiment of the present invention, the adjusting unit may specifically be configured to:
extracting data with the word length of N-1 from the highest bit of a field block with the value not equal to zero corresponding to the block field;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, the adjusting unit may specifically be configured to:
searching a bit corresponding to 1 from a high bit to a low bit in a field block with a value not equal to zero corresponding to a block field, and extracting data with the word length of N-1 from the bit corresponding to the first searched 1;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
In an embodiment of the present invention, the adjusting unit may further be configured to:
if the values corresponding to the Y block fields are all zero, extracting low N-1 bit data of the signal to be processed;
and splicing the sign bit and the low N-1 bit data of the signal to be processed to obtain a signal with the word length of N corresponding to the signal to be processed.
According to the word length adjusting device provided by the embodiment of the invention, how to adjust each signal word length is determined by the own signal, and the situation that the signal amplitude estimation is inaccurate and the useful signal is adjusted by mistake due to the occurrence of pure noise in a burst signal scene can be avoided, so that the performance of a digital signal processing system can be improved. In addition, the embodiment of the invention adjusts the word length according to the field block with the value not equal to zero corresponding to the field block data, thereby effectively avoiding the waste of the word length and the occurrence of signal overflow. In addition, the embodiment of the invention can reduce the system overhead and improve the word length adjusting efficiency by searching the bit corresponding to the 1 in a blocking way.
Fig. 7 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the word size adjustment method and apparatus according to an embodiment of the present invention. As shown in fig. 7, computing device 700 includes an input device 701, an input interface 702, a central processor 703, a memory 704, an output interface 705, and an output device 706. The input interface 702, the central processor 703, the memory 25704, and the output interface 705 are connected to each other via a bus 710, and the input device 701 and the output device 706 are connected to the bus 710 via the input interface 702 and the output interface 705, respectively, and further connected to other components of the computing device 700.
Specifically, the input device 701 receives input information from the outside, and transmits the input information to the central processor 703 through the input interface 702; the central processor 703 processes input information based on computer-executable instructions stored in the memory 704 to generate output information, stores the output information temporarily or permanently in the memory 704, and then transmits the output information to the output device 706 through the output interface 705; the output device 706 outputs output information external to the computing device 700 for use by a user.
That is, the computing device shown in fig. 7 may also be implemented as a word length adjusting device that may include: a memory storing computer-executable instructions; and a processor which, when executing computer executable instructions, may implement the word size adjustment method and apparatus described in connection with fig. 1-6.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium has computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement the word size adjustment method provided by embodiments of the present invention.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (14)

1. A word length adjustment method, comprising:
obtaining an original word length M and a target word length N of a signal to be processed;
partitioning a field with the width of X of the signal to be processed from the most significant bit after the sign bit, wherein X is the difference value of the original word length M and the target word length N;
and adjusting the word length of the signal to be processed according to the blocks and the target word length N.
2. The method of claim 1, wherein the blocking the to-be-processed signal from the most significant bit after the sign bit by a field with a width of X comprises:
and dividing the field with the width of X of the signal to be processed into Y blocks from the most significant bit after the sign bit, wherein Y is equal to the sum of the value of the quotient of X and n after being rounded downwards and 1, and n is the step length of the block.
3. The method according to claim 2, wherein said adjusting the word length of the signal to be processed according to the block and the target word length N comprises:
starting from the 1 st block field, sequentially judging whether the value corresponding to each block field is zero or not for Y block fields with the total width of X starting from the most significant bit after the sign bit until judging the field blocks with the values not being zero corresponding to the block fields;
and adjusting the word length of the signal to be processed according to the field block with the value not equal to zero corresponding to the block field and the target word length N.
4. The method according to claim 3, wherein the adjusting the word length of the signal to be processed according to the field block with the value different from zero corresponding to the block field and the target word length N comprises:
extracting data with the word length of N-1 from the highest bit of the field block with the value not equal to zero corresponding to the block field;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
5. The method according to claim 3, wherein the adjusting the word length of the signal to be processed according to the field block with the value different from zero corresponding to the block field and the target word length N comprises:
searching a bit corresponding to 1 from a high bit to a low bit in a field block of which the value corresponding to the block field is not zero, and extracting data with the word length of N-1 from the bit corresponding to the 1 searched first;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
6. The method of claim 3, further comprising:
if all the values corresponding to the Y block fields are zero, extracting low N-1 bit data of the signal to be processed;
and splicing the sign bit of the signal to be processed and the low N-1 bit data to obtain a signal with the word length of N corresponding to the signal to be processed.
7. A character length adjusting apparatus, comprising:
the device comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for obtaining an original word length M and a target word length N of a signal to be processed;
a block module, configured to block a field of the to-be-processed signal, which starts from a most significant bit after a sign bit and has a width of X, where X is a difference between the original word length M and the target word length N;
and the adjusting module is used for adjusting the word length of the signal to be processed according to the blocks and the target word length N.
8. The apparatus of claim 7, wherein the blocking module is specifically configured to:
and dividing the field with the width of X of the signal to be processed into Y blocks from the most significant bit after the sign bit, wherein Y is equal to the sum of the value of the quotient of X and n after being rounded downwards and 1, and n is the step length of the block.
9. The apparatus of claim 8, wherein the adjustment module comprises:
the judging unit is used for sequentially judging whether a value corresponding to each block field is zero or not from the 1 st block field aiming at the Y block fields with the total width of X starting from the most significant bit after the sign bit until judging the field block of which the value corresponding to the block field is not zero;
and the adjusting unit is used for adjusting the word length of the signal to be processed according to the field block corresponding to the block field and the target word length N, wherein the value of the field block is not zero.
10. The apparatus according to claim 9, wherein the adjusting unit is specifically configured to:
extracting data with the word length of N-1 from the highest bit of the field block with the value not equal to zero corresponding to the block field;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
11. The apparatus according to claim 9, wherein the adjusting unit is specifically configured to:
searching a bit corresponding to 1 from a high bit to a low bit in a field block of which the value corresponding to the block field is not zero, and extracting data with the word length of N-1 from the bit corresponding to the 1 searched first;
and splicing the sign bit of the signal to be processed and the data with the word length of N-1 to obtain the signal with the word length of N corresponding to the signal to be processed.
12. The apparatus of claim 9, wherein the adjusting unit is further configured to:
if all the values corresponding to the Y block fields are zero, extracting low N-1 bit data of the signal to be processed;
and splicing the sign bit of the signal to be processed and the low N-1 bit data to obtain a signal with the word length of N corresponding to the signal to be processed.
13. A word size adjusting apparatus, characterized in that the apparatus comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor, when executing the computer program, implements the word size adjustment method of any of claims 1 to 6.
14. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the word size adjusting method according to any one of claims 1 to 6.
CN201811373931.0A 2018-11-19 2018-11-19 Word length adjusting method, device, equipment and storage medium Active CN111198673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811373931.0A CN111198673B (en) 2018-11-19 2018-11-19 Word length adjusting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811373931.0A CN111198673B (en) 2018-11-19 2018-11-19 Word length adjusting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111198673A true CN111198673A (en) 2020-05-26
CN111198673B CN111198673B (en) 2022-07-12

Family

ID=70745381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811373931.0A Active CN111198673B (en) 2018-11-19 2018-11-19 Word length adjusting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111198673B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783579A (en) * 2021-11-12 2021-12-10 成都戎星科技有限公司 Digital signal processing word length truncation method in anti-interference receiver
WO2023030555A1 (en) * 2022-06-16 2023-03-09 加特兰微电子科技(上海)有限公司 Method and apparatus for determining data storage bit width, and method for storing index data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63136850A (en) * 1986-11-28 1988-06-09 Mitsubishi Electric Corp Separation controller for multiplexed data
US6259384B1 (en) * 1999-07-09 2001-07-10 Quantum Corporation High rate runlength limited codes for 10-bit ECC symbols
CN101165510A (en) * 2006-10-18 2008-04-23 中国科学院电子学研究所 Spaceborne synthetic aperture radar variable digit BAQ compression system and method
CN101389027A (en) * 2008-09-28 2009-03-18 华为技术有限公司 Watermark embedding method, watermark extracting method, device and system
CN101997566A (en) * 2010-11-08 2011-03-30 北京理工大学 Maximum absolute value cumulative mean and grid comparison-based adaptive bit cutting method
CN105227190A (en) * 2014-06-20 2016-01-06 北京邮电大学 A kind of building method taking advantage of the LDPC code of cyclic subgroup in group based on finite field
CN106127586A (en) * 2016-06-17 2016-11-16 上海经达信息科技股份有限公司 Vehicle insurance rate aid decision-making system under big data age
CN108734285A (en) * 2017-04-24 2018-11-02 英特尔公司 The calculation optimization of neural network

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63136850A (en) * 1986-11-28 1988-06-09 Mitsubishi Electric Corp Separation controller for multiplexed data
US6259384B1 (en) * 1999-07-09 2001-07-10 Quantum Corporation High rate runlength limited codes for 10-bit ECC symbols
CN101165510A (en) * 2006-10-18 2008-04-23 中国科学院电子学研究所 Spaceborne synthetic aperture radar variable digit BAQ compression system and method
CN101389027A (en) * 2008-09-28 2009-03-18 华为技术有限公司 Watermark embedding method, watermark extracting method, device and system
CN101997566A (en) * 2010-11-08 2011-03-30 北京理工大学 Maximum absolute value cumulative mean and grid comparison-based adaptive bit cutting method
CN105227190A (en) * 2014-06-20 2016-01-06 北京邮电大学 A kind of building method taking advantage of the LDPC code of cyclic subgroup in group based on finite field
CN106127586A (en) * 2016-06-17 2016-11-16 上海经达信息科技股份有限公司 Vehicle insurance rate aid decision-making system under big data age
CN108734285A (en) * 2017-04-24 2018-11-02 英特尔公司 The calculation optimization of neural network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DANIEL B. SEDORY: "6 to 64 Bits: Hexadecimal Numbers Significant to Drive/Partition Limits", 《HTTPS://THESTARMAN.PCMINISTRY.COM/ASM/6TO64BITS.HTM》 *
H. GHARAVI: "Multipriority video transmission for third-generation wireless communication systems", 《PROCEEDINGS OF THE IEEE》 *
石斌斌: "高自由度GNSS抗干扰技术研究", 《中国优秀博硕士学位论文全文数据库(博士)信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783579A (en) * 2021-11-12 2021-12-10 成都戎星科技有限公司 Digital signal processing word length truncation method in anti-interference receiver
WO2023030555A1 (en) * 2022-06-16 2023-03-09 加特兰微电子科技(上海)有限公司 Method and apparatus for determining data storage bit width, and method for storing index data

Also Published As

Publication number Publication date
CN111198673B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN111198673B (en) Word length adjusting method, device, equipment and storage medium
CN110971560B (en) QAM signal modulation method and device and electronic equipment
CN111404853B (en) Carrier frequency offset estimation method, device and computer storage medium
CN109729032B (en) Method and device for correcting frequency offset estimation value and computer readable storage medium
CN107872411B (en) Method and device for estimating intermediate frequency offset of optical transmission channel
CN111614373B (en) Spread spectrum signal transmission method, spread spectrum signal reception method, spread spectrum signal transmission device, spread spectrum signal reception device, and spread spectrum signal reception medium
CN107708145B (en) Synchronous detection method and synchronous detection equipment
CN109345463B (en) Optimization method and system for coordinate rotation digital calculation method
WO2023236610A1 (en) Signal detection method and apparatus, and electronic device and storage medium
CN112235002B (en) Harmonic elimination method and device, storage medium and terminal
US9531577B2 (en) Bit-likelihood calculating apparatus and bit-likelihood calculating method
CN103024888B (en) Digital receiver auto gain control method and device
CN112995073B (en) Channel estimation method, device, equipment and storage medium
JP5454237B2 (en) Receiving apparatus and receiving method
CN107004117B (en) Method for detecting transmission sequence, receiver and receiving equipment
TWI818581B (en) Decoding method and apparatus for polar codes
CN114363134B (en) Signal demodulation method and device, electronic equipment and storage medium
CN112769723B (en) Signal synchronization position determining method, device, equipment and storage medium
CN117395104B (en) Channel estimation method and device in orthogonal frequency division multiplexing system
CN116707582B (en) Ultra-wideband signal precise synchronization method and device
CN111277527B (en) Demodulation method for applying N-order Viterbi idea to M-GFSK phase domain
CN115348141B (en) DSC signal demodulation method, DSC signal demodulation device and storage medium
CN107040240B (en) Digital signal processing method and device
CN115167814A (en) Coordinate rotation digital operation circuit and method, signal processing circuit and chip
CN118138420A (en) Signal frame synchronization method and device, readable storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant