CN109583581A - Data conversion device and Related product - Google Patents
Data conversion device and Related product Download PDFInfo
- Publication number
- CN109583581A CN109583581A CN201811459240.2A CN201811459240A CN109583581A CN 109583581 A CN109583581 A CN 109583581A CN 201811459240 A CN201811459240 A CN 201811459240A CN 109583581 A CN109583581 A CN 109583581A
- Authority
- CN
- China
- Prior art keywords
- fixed
- significant
- point number
- floating
- points
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Neurology (AREA)
- Molecular Biology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Nonlinear Science (AREA)
- Artificial Intelligence (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
This disclosure relates to data conversion device and Related product, described device is used to floating fixed points being converted to fixed-point number, and described device includes: fixed-point number significant figure determining module, and index and significant figure for being counted according to the floating fixed determine significant figure undetermined;Fixed-point number obtains module, according to symbol and the significant figure undetermined that floating fixed is counted, determines the fixed-point number.Floating fixed can be counted and quickly and accurately be converted to fixed-point number by the embodiment of the present disclosure.Relative to fixed-point number, floating fixed is counted under the premise of guaranteeing precision, improves the expression range of data.
Description
Technical field
This disclosure relates to technical field of information processing more particularly to a kind of data conversion device and Related product.
Background technique
With the continuous development of information technology, the demand for completing various processor active tasks using arithmetic unit is increasing.?
In a variety of different processor active tasks, the data format different to operational data is for the operation efficiency of arithmetic unit and operation essence
Degree, can generate different influences, not adapt to the demand of nonidentity operation task.Data format to operational data can be fixed point
Number, for the number of same bit wide, the expression range and precision of fixed-point number are negatively correlated, can when using fixed-point number to carry out operation
Can there is a problem of indicating range deficiency.
Summary of the invention
In view of this, the present disclosure proposes a kind of data conversion device and Related product, to guarantee data precision
Under the premise of, the expression range of data is improved,
According to the one side of the disclosure, a kind of data conversion device is provided, described device is used to count floating fixed and convert
For fixed-point number, described device includes:
Fixed-point number significant figure determining module, index and significant figure for being counted according to the floating fixed determine undetermined effective
Number;
Fixed-point number obtains module, according to symbol and the significant figure undetermined that floating fixed is counted, determines the fixed-point number.
In one possible implementation, the fixed-point number significant figure determining module, comprising:
Highest non-zero digit determines submodule, the numerical digit of the highest nonzero digit for determining floating fixed points significant figure;
Shift value determines submodule, the highest of index, floating fixed points significant figure for being counted according to the floating fixed
The numerical digit of nonzero digit, determines shift value;
Fixed-point number significant figure determines submodule, for the significant figure according to the mobile floating fixed points of the shift value, obtains
To significant figure undetermined.
In one possible implementation, the shift value determines submodule, index for the floating fixed to be counted,
The sum that the numerical digit of the highest nonzero digit of the floating fixed points significant figure is added with 1, is determined as shift value.
In one possible implementation, the fixed-point number significant figure determines submodule, for the floating fixed to be counted
Significant figure be moved to the left the digit of the shift value, obtain significant figure undetermined.
In one possible implementation, the fixed-point number obtains module, comprising:
Significant figure acquisition submodule obtains institute for the symbol of the points of floating fixed described in root and the complement code of the significant figure undetermined
State the significant figure of fixed-point number;
Fixed-point number acquisition submodule, the significant figure of fixed-point number described in the symbol for being counted according to the floating fixed, is determined
Points.
In one possible implementation, the fixed-point number is 16 binary forms, and the floating fixed points are 8 two
Binary form.
In one possible implementation, the sign bit in the floating fixed points is 1, and exponent bits are 1.
According to the one side of the disclosure, a kind of neural network computing device, the neural network computing device packet are provided
One or more above-mentioned data conversion devices are included, the neural network computing device is used to complete the neural network computing of setting.
According to the one side of the disclosure, provide a kind of combinatorial operation device, the combinatorial operation device include one or
The neural network computing device of multiple any of the above-described, general interconnecting interface and other processing units;
The neural network computing device is interacted with other described processing units, the common calculating completing user and specifying
Operation.
According to the one side of the disclosure, a kind of neural network chip is provided, the neural network chip includes:
Data conversion device described in any of the above embodiments;Or
Above-mentioned neural network computing device;Or
Combinations of the above processing unit.
According to the one side of the disclosure, a kind of electronic equipment is provided, the electronic equipment includes:
Data conversion device described in any of the above embodiments;Or
Above-mentioned neural network computing device;Or
Combinations of the above processing unit;Or
Above-mentioned neural network chip.
In the embodiments of the present disclosure, data conversion device, for floating fixed points to be converted to fixed-point number, described device packet
Include: fixed-point number significant figure determining module, index and significant figure for being counted according to the floating fixed determine significant figure undetermined;It is fixed
Points obtain module, according to symbol and the significant figure undetermined that floating fixed is counted, determine the fixed-point number.Data conversion device can
Floating fixed points are quickly and accurately converted to fixed-point number.Relative to fixed-point number, floating fixed is counted under the premise of guaranteeing precision,
Improve the expression range of data.
In some embodiments, the electronic equipment includes data processing equipment, robot, computer, printer, scanning
Instrument, tablet computer, intelligent terminal, mobile phone, automobile data recorder, navigator, sensor, camera, server, cloud server,
Camera, video camera, projector, wrist-watch, earphone, mobile storage, wearable device, the vehicles, household electrical appliance, and/or medical treatment
Equipment.
In some embodiments, the vehicles include aircraft, steamer and/or vehicle;The household electrical appliance include electricity
Depending on, air-conditioning, micro-wave oven, refrigerator, electric cooker, humidifier, washing machine, electric light, gas-cooker, kitchen ventilator;The Medical Devices include
Nuclear Magnetic Resonance, B ultrasound instrument and/or electrocardiograph.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, the other feature and aspect of the disclosure will become
It is clear.
Detailed description of the invention
Comprising in the description and constituting the attached drawing of part of specification and specification together illustrates the disclosure
Exemplary embodiment, feature and aspect, and for explaining the principles of this disclosure.
Fig. 1 shows the block diagram of the data conversion device according to one embodiment of the disclosure;
Fig. 2 shows the block diagrams according to the data conversion device of one embodiment of the disclosure;
Fig. 3 shows the block diagram of the combined treatment device according to one embodiment of the disclosure.
Specific embodiment
Various exemplary embodiments, feature and the aspect of the disclosure are described in detail below with reference to attached drawing.It is identical in attached drawing
Appended drawing reference indicate element functionally identical or similar.Although the various aspects of embodiment are shown in the attached drawings, remove
It non-specifically points out, it is not necessary to attached drawing drawn to scale.
Dedicated word " exemplary " means " being used as example, embodiment or illustrative " herein.Here as " exemplary "
Illustrated any embodiment should not necessarily be construed as preferred or advantageous over other embodiments.
In addition, giving numerous details in specific embodiment below to better illustrate the disclosure.
It will be appreciated by those skilled in the art that without certain details, the disclosure equally be can be implemented.In some instances, for
Method, means, element and circuit well known to those skilled in the art are not described in detail, in order to highlight the purport of the disclosure.
Fig. 1 shows the block diagram of the data conversion device according to one embodiment of the disclosure, and described device is for counting floating fixed
Fixed-point number is converted to, as shown in Figure 1, described device includes:
Fixed-point number significant figure determining module 10, index and significant figure for being counted according to the floating fixed, determining undetermined has
Imitate number.
In one possible implementation, fixed-point number is 16 binary forms, the fixed-point number Y of 16 binary forms
Are as follows: Y15Y14Y13Y12Y11Y10Y9Y8Y7Y6Y5Y4Y3Y2Y1Y0, wherein Y15For sign bit, Y14Y13Y12Y11Y10Y9Y8Y7Y6Y5Y4Y3Y2Y1Y0For significant digit.
In one possible implementation, floating fixed points are 8 binary forms.Sign bit in the floating fixed points
It is 1, exponent bits are 1, and significant digit is 6.Sign bit and exponent bits in floating fixed points, can be located at floating fixed points
The position not being overlapped arbitrarily in 8 digits.The disclosure does not limit this.For example, floating fixed points since right-to-left the logarithm from 0
Position is counted, the floating fixed points X of 8 binary forms are as follows: X7X6X5X4X3X2X1X0, wherein X7For sign bit, X6For index
Position.X5X4X3X2X1X0For significant digit.In one possible implementation, then the value of floating fixed points can following formula (1)
It is shown:
±m·basep+e+1=± 1.dbase2p+e+1Formula (1)
Wherein, m is the symbol of floating fixed points, base is bottom, usually 2.E is the index of floating fixed points, and p is floating fixed points
The numerical digit of highest nonzero digit in significant figure, d are the fractional part of the significant figure of floating fixed points.
For example, floating fixed points are " 01010101 ", then the numerical value of floating fixed points is 010101*24+1+1=1.0101*22 *4+1+1。
In one possible implementation, the significant figure of fixed-point number is related to index and significant figure that floating fixed is counted, fixed
The index and significant figure that significant figure determining module of counting can count according to floating fixed, determine significant figure undetermined.It can be by floating fixed point
Number directly inputs fixed-point number significant figure determining module, by the index in fixed-point number significant figure determining module identification floating fixed points and has
Imitate number.Index and significant figure in the floating fixed identified can also being counted input fixed-point number significant figure respectively and determine mould
Block, the index and significant figure counted by fixed-point number significant figure determining module according to the floating fixed of input, determines significant figure undetermined.This public affairs
It opens and does not limit this.
Fixed-point number obtains module 20, according to symbol and the significant figure undetermined that floating fixed is counted, determines the fixed-point number.
In one possible implementation, fixed-point number obtains module and can be had according to the symbol and fixed-point number of floating fixed points
The significant figure undetermined that effect number determining module is determined, determines the significant figure of fixed-point number.Fixed-point number obtains module can be according to fixed point
The symbol of several significant figures and floating fixed points, obtains final fixed-point number.
In the present embodiment, data conversion device is used to being converted to floating fixed points into fixed-point number, and described device includes: fixed point
Number significant figure determining module, index and significant figure for being counted according to the floating fixed determine significant figure undetermined;Fixed-point number obtains
Module determines the fixed-point number according to symbol and the significant figure undetermined that floating fixed is counted.Data conversion device can be by floating fixed
Points are quickly and accurately converted to fixed-point number.Relative to fixed-point number, floating fixed is counted under the premise of guaranteeing precision, improves number
According to expression range.
Fig. 2 shows the block diagrams according to the data conversion device of one embodiment of the disclosure, as shown in Fig. 2, a kind of possible
In implementation, the fixed-point number significant figure determining module 10, comprising:
Highest non-zero digit determines submodule 11, the numerical digit of the highest nonzero digit for determining floating fixed points significant figure.
In one possible implementation, highest non-zero digit determines that submodule may include shift unit, can incite somebody to action
In the significant figure input shift unit of floating fixed points, shift since the highest order of significant figure from left to right, in shifting process, most
High non-zero digit determines that submodule can be using the numerical digit of first " 1 " appearance as the numerical digit of highest nonzero digit.For example, floating fixed
Points are " 10101100 ", and significant figure is " 101100 ", and the numerical digit of highest nonzero digit is 5.
Shift value determines submodule 12, and the index, floating fixed points significant figure for being counted according to the floating fixed are most
The numerical digit of high nonzero digit, determines shift value.
In one possible implementation, shift value determine index that submodule can be used for counting the floating fixed,
The sum that the numerical digit of the highest nonzero digit of the floating fixed points significant figure is added with 1, is determined as shift value.For example, floating fixed point
The numerical digit of the highest nonzero digit of number " 10101100 " is 5, index 0, then shift value are as follows: 5+0+1=6.
In one possible implementation, shift value determine index that submodule can be used for counting the floating fixed,
The sum that the numerical digit of the highest nonzero digit of the floating fixed points significant figure is added, is determined as shift value undetermined.For example, floating fixed point
The numerical digit of the highest nonzero digit of number " 10101100 " is 5, index 0, then shift value undetermined are as follows: 5+0=5.
Fixed-point number significant figure determines submodule 13, the significant figure for being counted according to the mobile floating fixed of the shift value,
Obtain significant figure undetermined.
In one possible implementation, the fixed-point number significant figure determines that submodule can be used for the floating fixed point
Several significant figures is moved to the left the digit of the shift value, obtains significant figure undetermined.For example, fixed-point number significant figure determines submodule
Floating fixed can be counted as the significant figure of " 10101100 " is " 101100 ", is moved to the left shift value 6, obtains significant figure undetermined
“101100000000”。
In one possible implementation, the fixed-point number significant figure determines that submodule can be used for the floating fixed point
Several significant figures is moved to the left the shift value undetermined and adds 1 resulting digit, obtains significant figure undetermined.For example, fixed-point number is effective
It is " 101100 " that number, which determines that submodule can count floating fixed as the significant figure of " 10101100 ", is moved to the left shift value 5 undetermined
Position+1=6, is similarly obtained significant figure undetermined " 101100000000 ".
In one possible implementation, the fixed-point number obtains module 20, comprising:
Significant figure acquisition submodule 21 is obtained for the symbol of the points of floating fixed described in root and the complement code of the significant figure undetermined
The significant figure of the fixed-point number.
In one possible implementation, when the symbol of floating fixed points is 0, floating fixed points are positive number, undetermined effective
Several complement codes is true form.For example, fixed-point number significant figure determines that submodule can count floating fixed as the significant figure of " 00101100 "
For " 101100 ", shift value 6 are moved to the left, obtains significant figure undetermined " 101100000000 ", the significant figure of fixed-point number is
“000101100000000”。
In one possible implementation, when the symbol of floating fixed points is 1, floating fixed points are negative, undetermined effective
Several complement codes is radix-minus-one complement+1.For example, fixed-point number significant figure determines that submodule can count floating fixed as the effective of " 10101100 "
Number is " 101100 ", is moved to the left shift value 6, obtains significant figure undetermined " 101100000000 ", the radix-minus-one complement of significant figure undetermined
" 111010011111111 "+1=" 111010100000000 ", the significant figure of fixed-point number are " 111010100000000 ".
Fixed-point number acquisition submodule 22, the significant figure of fixed-point number described in the symbol for being counted according to the floating fixed, obtains
Fixed-point number.
In one possible implementation, the symbol that floating fixed is counted can be determined as pinpointing by fixed-point number acquisition submodule
Several symbols.Fixed-point number acquisition submodule can obtain fixed-point number according to the symbol of fixed-point number and the significant figure of fixed-point number.Example
Such as, the fixed-point number of floating fixed points " 00101100 " is " 0000101100000000 ", the fixed-point number of floating fixed points " 10101100 "
For " 1111010100000000 ".
In the present embodiment, fixed-point number significant figure determining module includes that highest non-zero digit determines submodule, shift value
Determine that submodule and fixed-point number significant figure determine submodule.Fixed-point number obtains module, including significant figure acquisition submodule and fixed point
Number acquisition submodule.Using each submodule, floating fixed can be counted and fast and accurately be converted to fixed-point number by data conversion device.
In one possible implementation, the data conversion device includes:
Data acquisition module, for obtaining the index and significant figure of floating fixed points;
Data outputting module, for exporting the fixed-point number.
In one possible implementation, the input data that floating fixed can be counted obtains module, by data acquisition module
Identify the index and significant figure in floating fixed points.The index and significant figure difference input data that floating fixed can also be counted obtain mould
Block.The disclosure does not limit this.The index and significant figure for the floating fixed points that data acquisition module can will acquire are sent to
Fixed-point number significant figure determining module.
In one possible implementation, data outputting module can export fixed-point number and obtain the fixed point that module determines
Number.Data outputting module can export fixed-point number to system on chip, piece external system etc..The disclosure does not limit this.
In one possible implementation, described device can be also used for being converted to fixed-point number into floating fixed points, described
Device further include:
Highest nonzero digit determining module 100, the numerical digit of the highest nonzero digit for determining the fixed-point number significant figure.
In one possible implementation, highest nonzero digit determining module may include shift unit, can be by floating fixed point
In several significant figure input shift units, shift since the highest order of significant figure from left to right, in shifting process, highest non-zero
Digit determines that submodule can be using the numerical digit of first " 1 " appearance as the numerical digit of highest nonzero digit.For example, floating fixed points are
" 10101100 ", significant figure are " 101100 ", and the numerical digit of highest nonzero digit is 5.
Index significant figure determining module 200, for according to the effective of the numerical digit of the highest nonzero digit and the fixed-point number
Number determines the index of the floating fixed points and the significant figure of floating fixed points.
In one possible implementation, index significant figure determining module can be according to the numerical digit of the highest nonzero digit
Determine the index of floating fixed points.Index significant figure determining module can be according to the numerical digit of highest nonzero digit and the significant figure of fixed-point number
Determine the significant figure of floating fixed points.
Floating fixed points determining module 300, the index and the floating fixed counted according to the symbol of fixed-point number, the floating fixed are counted
Significant figure, obtain floating fixed points.
In one possible implementation, the symbol of fixed-point number can be determined as floating fixed point by floating fixed points determining module
Several symbols.Symbol, the significant figure that floating fixed points determining module can count according to floating fixed determine the floating fixed that submodule is determined
The significant figure and index of points determine the index for the floating fixed points that submodule is determined, obtain floating fixed point corresponding with fixed-point number
Number.The sign bit and exponent bits of floating fixed points can be located at the position not being overlapped arbitrarily in 8 numerical digits.
In the present embodiment, data conversion device, for fixed-point number to be converted to floating fixed points, described device includes: most
High nonzero digit determining module, the numerical digit of the highest nonzero digit for determining the fixed-point number significant figure;Index significant figure determines mould
Block, for determining index and the institute of the floating fixed points according to the numerical digit of the highest nonzero digit and the significant figure of the fixed-point number
State the significant figure of floating fixed points;Floating fixed is counted determining module, the index and described counted according to the symbol of fixed-point number, the floating fixed
The significant figure of floating fixed points obtains the floating fixed points.Highest nonzero digit determining module, index significant figure determining module and floating fixed
Fixed-point number quickly and accurately can be converted to floating fixed points by points determining module.Relative to fixed-point number, floating fixed points are being protected
Under the premise of demonstrate,proving precision, the expression range of data is improved.
In one possible implementation, the index significant figure determining module 200, comprising:
Index determines submodule 210, for being added and except remainder after 2 with 1 by the numerical digit of the highest nonzero digit,
Remainder is obtained, the remainder is determined as to the index of the floating fixed points.
In one possible implementation, the numerical digit of highest nonzero digit is PX, then the index of floating fixed points is EY=(PX
+ 1) %2.For example, the numerical digit PX of the highest nonzero digit of fixed-point number " 0000000000111101 " is 5, then the index that floating fixed is counted
For EY=(5+1) %2=0.
In one possible implementation, the index significant figure determining module 200, comprising:
Significant figure determines submodule 220, for determining shift value according to the numerical digit of the highest nonzero digit, according to institute's rheme
The significant figure of the fixed-point number is displaced by shifting value, obtains the significant figure of the floating fixed points.
In one possible implementation, the bit length of the significant figure of fixed-point number is 15, the significant figure of floating fixed points
Bit length is 6.Significant figure determines that submodule can move right the numerical digit of highest nonzero digit according to the significant figure of fixed-point number, determine
Shift value.Shift value can be according to for the significant figure of fixed-point number to be displaced, to obtain the effective of reasonable floating fixed points
Several expression.
In one possible implementation, the significant figure determines submodule 220, comprising:
Shift value determination unit 2210, what the sum for the numerical digit of the highest nonzero digit to be added with 1 was obtained except 2
As a result it is determined as shift value.
In one possible implementation, the numerical digit of the highest nonzero digit of fixed-point number is PX, shift value=(PX+1)/2.
For example, the numerical digit of the highest nonzero digit of fixed-point number " 0000000000111101 " is 5, then shift value determination unit obtains shift value
=(5+1)/2=3.
Displacement unit 2220 obtains institute for the significant figure of the fixed-point number to move right the digit of the shift value
State the significant figure of floating fixed points.
In one possible implementation, for example, the shift value of fixed-point number " 0000000000111101 " is 3, then position
It moves unit the significant figure " 000000000111101 " of fixed-point number " 0000000000111101 " moves right 3, obtains floating fixed
The significant figure of points is " 000111 ".
For example, the symbol of fixed-point number " 0000000000111101 " is 0, floating fixed points index be 0, floating fixed points have
Imitating number is " 000111 ", then the floating fixed points of fixed-point number " 0000000000111101 " can be " 00000111 ", wherein most left
The numerical digit of side is sign bit, and the numerical digit adjacent with sign bit is exponent bits.The floating fixed point of fixed-point number " 0000000000111101 "
Wherein, the numerical digit of the rightmost side is sign bit for number or " 00011100 ", and the numerical digit adjacent with sign bit is exponent bits.
In the present embodiment, index determines that submodule and significant figure determine that submodule can be according to the highest non-zero of fixed-point number
The numerical digit of position determines the index and significant figure of floating fixed points, and fixed-point number is converted to floating fixed points.Conversion process is efficient, quasi-
Really.
Fig. 3 shows the block diagram of the combined treatment device according to one embodiment of the disclosure, as shown in figure 3, the combined treatment
Device, including above-mentioned neural network computing device, general interconnecting interface and other processing units.
Neural network computing device is interacted with other processing units, the common operation completing user and specifying.Its elsewhere
Device is managed, including one in the general/application specific processors such as central processor CPU, graphics processor GPU, neural network processor
Kind or above processor type.Processor quantity included by other processing units is with no restrictions.Other processing unit conducts
The interface of neural network computing device and external data and control, including data are carried, and are completed to this neural network computing device
The basic control such as unlatching, stopping;Other processing units can also cooperate with neural network computing device and complete operation times jointly
Business.General interconnecting interface, for transmitting data and control instruction between the neural network computing device and other processing units.
The neural network computing device obtains required input data from other processing units, and neural network computing device on piece is written
Storage device;Control instruction can be obtained from other processing units, the control of write-in neural network computing device on piece is slow
It deposits;The data in the memory module of neural network computing device can also be read and be transferred to other processing units.
Combined treatment device can also include storage device, storage device respectively with the neural network computing device and institute
State the connection of other processing units.Storage device is used to be stored in the neural network computing device and other processing units
Data, the data of operation required for being particularly suitable for are in the storage inside of this neural network computing device or other processing units
The data that can not all save.
The combined treatment device can be used as the SOC on piece of the equipment such as mobile phone, robot, unmanned plane, video monitoring equipment
The die area of control section is effectively reduced in system, improves processing speed, reduces overall power.When this situation, the combined treatment
The general interconnecting interface of device is connected with certain components of equipment.Certain components for example camera, display, mouse, keyboard,
Network interface card, wifi interface.
In one possible implementation, the disclosure also provides neural network chip comprising above-mentioned neural network
Arithmetic unit or combined treatment device.
In one possible implementation, the disclosure also provides chip-packaging structure comprising said chip.
In one possible implementation, the disclosure also provides board comprising said chip encapsulating structure.
In one possible implementation, the disclosure also provides electronic equipment comprising above-mentioned board.
Electronic equipment include data processing equipment, robot, computer, printer, scanner, tablet computer, intelligent terminal,
Mobile phone, automobile data recorder, navigator, sensor, camera, server, cloud server, camera, video camera, projector, hand
Table, earphone, mobile storage, wearable device, the vehicles, household electrical appliance, and/or Medical Devices.
The vehicles include aircraft, steamer and/or vehicle;The household electrical appliance include TV, air-conditioning, micro-wave oven,
Refrigerator, electric cooker, humidifier, washing machine, electric light, gas-cooker, kitchen ventilator;The Medical Devices include Nuclear Magnetic Resonance, B ultrasound instrument
And/or electrocardiograph.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the disclosure is not limited by the described action sequence because
According to the disclosure, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to alternative embodiment, the related actions and modules not necessarily disclosure
It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided by the disclosure, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of
Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can
To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit,
It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the disclosure can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product
When, it can store in a computer-readable access to memory.Based on this understanding, the technical solution of the disclosure substantially or
Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products
Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment
(can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the disclosure
Step.And memory above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory
The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory
May include: flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English:
Random Access Memory, referred to as: RAM), disk or CD etc..
The embodiment of the present disclosure is described in detail above, specific case used herein to the principle of the disclosure and
Embodiment is expounded, disclosed method that the above embodiments are only used to help understand and its core concept;
At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the disclosure
There is change place, in conclusion the content of the present specification should not be construed as the limitation to the disclosure.
Referring herein to according to the flow chart of the method, apparatus (system) of the embodiment of the present disclosure and computer program product and/
Or block diagram describes various aspects of the disclosure.It should be appreciated that flowchart and or block diagram each box and flow chart and/
Or in block diagram each box combination, can be realized by computer-readable program instructions.
The flow chart and block diagram in the drawings show system, method and the computer journeys according to multiple embodiments of the disclosure
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
One module of table, program segment or a part of instruction, the module, program segment or a part of instruction include one or more use
The executable instruction of the logic function as defined in realizing.In some implementations as replacements, function marked in the box
It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel
Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or
The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic
The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
The presently disclosed embodiments is described above, above description is exemplary, and non-exclusive, and
It is not limited to disclosed each embodiment.Without departing from the scope and spirit of illustrated each embodiment, for this skill
Many modifications and changes are obvious for the those of ordinary skill in art field.The selection of term used herein, purport
In principle, the practical application or to the technological improvement in market for best explaining each embodiment, or make the art its
Its those of ordinary skill can understand each embodiment disclosed herein.
Claims (11)
1. a kind of data conversion device, which is characterized in that described device is used to floating fixed points being converted to fixed-point number, described device
Include:
Fixed-point number significant figure determining module, index and significant figure for being counted according to the floating fixed, determines significant figure undetermined;
Fixed-point number obtains module, according to symbol and the significant figure undetermined that floating fixed is counted, determines the fixed-point number.
2. the apparatus according to claim 1, which is characterized in that the fixed-point number significant figure determining module, comprising:
Highest non-zero digit determines submodule, the numerical digit of the highest nonzero digit for determining floating fixed points significant figure;
Shift value determines submodule, the highest non-zero of index, floating fixed points significant figure for being counted according to the floating fixed
The numerical digit of position, determines shift value;
Fixed-point number significant figure determines submodule, for the significant figure according to the mobile floating fixed points of the shift value, obtain to
Determine significant figure.
3. the apparatus of claim 2, which is characterized in that the shift value determines submodule, is used for the floating fixed
The sum that the numerical digit of the highest nonzero digit of the index of points, floating fixed points significant figure is added with 1, is determined as shift value.
4. the apparatus of claim 2, which is characterized in that the fixed-point number significant figure determines submodule, is used for institute
The significant figure for stating floating fixed points is moved to the left the digit of the shift value, obtains significant figure undetermined.
5. the apparatus according to claim 1, which is characterized in that the fixed-point number obtains module, comprising:
Significant figure acquisition submodule, it is described fixed to obtain for the symbol of the points of floating fixed described in root and the complement code of the significant figure undetermined
The significant figure of points;
Fixed-point number acquisition submodule, the significant figure of fixed-point number described in the symbol for being counted according to the floating fixed, obtains fixed-point number.
6. the apparatus according to claim 1, which is characterized in that the fixed-point number is 16 binary forms, the floating fixed
Points are 8 binary forms.
7. the apparatus according to claim 1, which is characterized in that the sign bit in the floating fixed points is 1, and exponent bits are
1.
8. a kind of neural network computing device, which is characterized in that the neural network computing device includes one or more as weighed
Benefit requires the described in any item data conversion devices of 1-7, and the neural network computing device is used to complete the neural network of setting
Operation.
9. a kind of combinatorial operation device, which is characterized in that the combinatorial operation device includes one or more as claim 8 is appointed
Neural network computing device described in one, general interconnecting interface and other processing units;
The neural network computing device is interacted with other described processing units, the common calculating behaviour for completing user and specifying
Make.
10. a kind of neural network chip, which is characterized in that the neural network chip includes:
Such as the described in any item data conversion devices of claim 1-7;Or
Neural network computing device as claimed in claim 8;Or
Combined treatment device as claimed in claim 9.
11. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
Such as the described in any item data conversion devices of claim 1-7;Or
Neural network computing device as claimed in claim 8;Or
Combined treatment device as claimed in claim 9;Or
Neural network chip as claimed in claim 10.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811459240.2A CN109583581B (en) | 2018-11-30 | 2018-11-30 | Data conversion device and related product |
PCT/CN2019/120879 WO2020108470A1 (en) | 2018-11-30 | 2019-11-26 | Operation method and apparatus, and relevent product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811459240.2A CN109583581B (en) | 2018-11-30 | 2018-11-30 | Data conversion device and related product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109583581A true CN109583581A (en) | 2019-04-05 |
CN109583581B CN109583581B (en) | 2021-07-09 |
Family
ID=65926463
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811459240.2A Active CN109583581B (en) | 2018-11-30 | 2018-11-30 | Data conversion device and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109583581B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020108470A1 (en) * | 2018-11-30 | 2020-06-04 | 上海寒武纪信息科技有限公司 | Operation method and apparatus, and relevent product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102436365A (en) * | 2010-12-20 | 2012-05-02 | 中国电子科技集团公司第四十一研究所 | Method and device for transforming high-speed linear spectrum data to logarithm data |
CN107451658A (en) * | 2017-07-24 | 2017-12-08 | 杭州菲数科技有限公司 | Floating-point operation fixed point method and system |
CN107992284A (en) * | 2017-11-27 | 2018-05-04 | 中国航空无线电电子研究所 | A kind of division function implementation method of programming device |
CN109582279A (en) * | 2018-11-30 | 2019-04-05 | 上海寒武纪信息科技有限公司 | Data operation device and Related product |
-
2018
- 2018-11-30 CN CN201811459240.2A patent/CN109583581B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102436365A (en) * | 2010-12-20 | 2012-05-02 | 中国电子科技集团公司第四十一研究所 | Method and device for transforming high-speed linear spectrum data to logarithm data |
CN107451658A (en) * | 2017-07-24 | 2017-12-08 | 杭州菲数科技有限公司 | Floating-point operation fixed point method and system |
CN107992284A (en) * | 2017-11-27 | 2018-05-04 | 中国航空无线电电子研究所 | A kind of division function implementation method of programming device |
CN109582279A (en) * | 2018-11-30 | 2019-04-05 | 上海寒武纪信息科技有限公司 | Data operation device and Related product |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020108470A1 (en) * | 2018-11-30 | 2020-06-04 | 上海寒武纪信息科技有限公司 | Operation method and apparatus, and relevent product |
Also Published As
Publication number | Publication date |
---|---|
CN109583581B (en) | 2021-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109740739B (en) | Neural network computing device, neural network computing method and related products | |
CN109740754B (en) | Neural network computing device, neural network computing method and related products | |
CN109189474A (en) | Processing with Neural Network device and its method for executing vector adduction instruction | |
CN108205519B (en) | Matrix multiply-add operation device and method, processing device, chip and electronic device | |
CN110163363A (en) | A kind of computing device and method | |
CN109522052A (en) | A kind of computing device and board | |
CN109543825A (en) | Neural network model algorithm Compilation Method, device and Related product | |
CN109685201A (en) | Operation method, device and Related product | |
CN109726822B (en) | Operation method, device and related product | |
CN109583579A (en) | Computing device and Related product | |
CN109583581A (en) | Data conversion device and Related product | |
CN109558110A (en) | Data conversion device and Related product | |
CN109558109A (en) | Data operation device and Related product | |
CN109582279A (en) | Data operation device and Related product | |
CN109740730A (en) | Operation method, device and Related product | |
CN109582277A (en) | Data processing method, device and Related product | |
CN110222391A (en) | Electrical equipment drawing practice, system and terminal device | |
CN109326324A (en) | A kind of detection method of epitope, system and terminal device | |
CN111260070B (en) | Operation method, device and related product | |
CN111260046B (en) | Operation method, device and related product | |
CN114201727A (en) | Data processing method, processor, artificial intelligence chip and electronic equipment | |
CN109542837A (en) | Operation method, device and Related product | |
CN109558565A (en) | Operation method, device and Related product | |
CN109543835A (en) | Operation method, device and Related product | |
CN111258641A (en) | Operation method, device and related product |
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 |