CN1831791B - Method for quickly changing address by software - Google Patents

Method for quickly changing address by software Download PDF

Info

Publication number
CN1831791B
CN1831791B CN200610011644A CN200610011644A CN1831791B CN 1831791 B CN1831791 B CN 1831791B CN 200610011644 A CN200610011644 A CN 200610011644A CN 200610011644 A CN200610011644 A CN 200610011644A CN 1831791 B CN1831791 B CN 1831791B
Authority
CN
China
Prior art keywords
data
described method
buffer zone
address
pointer
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.)
Expired - Fee Related
Application number
CN200610011644A
Other languages
Chinese (zh)
Other versions
CN1831791A (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.)
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN200610011644A priority Critical patent/CN1831791B/en
Publication of CN1831791A publication Critical patent/CN1831791A/en
Application granted granted Critical
Publication of CN1831791B publication Critical patent/CN1831791B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Image Input (AREA)

Abstract

A method of utilizing fast changing address by software includes initializing parameter used in method, initializing data of buffer region, selecting mode of data address conversion, carrying out data operation, inputting new data, judging and ending process.

Description

A kind of software implementation method of quickly changing address
Technical field
The present invention relates to the computer addressing technology, relate in particular to a kind of method of utilizing software to realize quickly changing address.
Background technology
Computer technology has been applied to every field, owing to different application process and various restrictions, the computer addressing technology is had different requirements in each different field.For example, in digital signal processing, digital signal is carried out filtering, convolution, Fourier transform or the like operation.Carry out these action needs historical data is preserved, being used for follow-up computing, and data are gone up if having time the requirement of alignment.
Especially digital filtering is a rudimentary algorithm during voice and Flame Image Process, pattern-recognition, analysis of spectrum etc. are used.
With a convolution algorithm is example.
y ( n ) = Σ k = 0 N x ( n - k ) · h ( k )
For must preserving former N data, computing y (n) carries out computing.In order to make data carry out computing on computers, need constantly make amendment to the data address of being preserved.Fig. 1 will be when n=i and n=i+1, and h (k) and x (n) corresponding relation show.
In order to achieve the above object, the most direct amending method is exactly directly overall data to be carried out moving corresponding to the address of a chronomere.This method relatively adapts to the relatively shorter situation of data length; If will expensive extra expense under the long situation of data length.
Above-mentioned convolution algorithm is an example, as shown in Figure 1.After the n=i computing finishes, when need carry out n=i+1, whole data carry out the address move be exactly with figure in express the same, during with n=i, the locational data of N of corresponding h (k) row abandon, successively each data are moved to the right, soared for 0 position of corresponding h (k) row, then new data sample i+1 is placed on 0 position of corresponding h (k) row.Computing finishes and all will carry out the computing that move the lot of data address like this, at every turn.
In order to reduce calculated amount, a kind of thought of cyclic addressing is extensively used.Requirement is opened up a buffer zone as sliding window in storer, participate in computing in order to preserve a up-to-date batch data.If there are new data to arrive, it will cover data the earliest.It is annular in logic that specific implementation is regarded the storage space of one section physically continuous linearity as.When the end address of amount of physical memory is arrived in data addressing, return the start address of pointing to amount of physical memory automatically like this, form the storage space of annular in logic.
Among Fig. 2, Fig. 2-when (a) being depicted as n=i, the corresponding relation between h (k) and the x (n).Be without loss of generality, the start position of x (i) is not in the starting position in physical buffer district.Fig. 2-when (b) being depicted as n=i+1, the corresponding relation between h (k) and the x (n).Can see that data x this moment (i-N) have not needed, so according to the thinking of cyclic addressing is exactly that the sample data of input newly is put into the residing and h (2) of the unwanted historical data x of current time (i-N) on the deserved position, the buffer circle on so just can analog logic.
Some specialized apparatus and device provide the cyclic addressing function of low expense by hardware now.But a lot of general processors do not provide this function, need realize by software engineering.
Above-mentioned first method, under the relatively short situation of historical data length, the calculated amount of directly carrying out data-moving is little, if but under the long situation of historical data, the data-moving that need carry out will very big calculated amount.
Above-mentioned second method because new data is stored in the storage unit of the historical data that does not re-use, makes that each reference position of participating in a series of historical datas of computing all is different, when carries out map addresses so can't predict.Whether the address that at first will judge these data before calculating is the end address of buffer zone, if buffer zone moral end address, next address will use mapping mode.Each participates in the address of computing will judge that all expense is very big.
Now, the computer technology develop rapidly, powerful electronic product enters among people's the life, such as mobile phone, Digital Video or the like.These products are provided amenities for the people, because these products all are to use powered battery, this just has higher requirement to the energy consumption of processor simultaneously.In above-mentioned two methods loaded down with trivial details calculating is arranged all, this just makes the product working time shorten, and uses inconvenient.
Summary of the invention
In view of this, in order to reduce the expense of processor, carry out address mapping fast, the present invention proposes a kind of method of utilizing software to realize quickly changing address.
A kind of method of utilizing software to realize quickly changing address is characterized in that: comprise step:
Parameter in the A initial method;
The initialization of B buffer data;
C data address mapping mode is selected, data operation;
The input of D new data;
E judges and end process.
Further, need initialized parameter to comprise among the described method step A: buffer length, buffer zone start element, buffer zone ending unit.
Further, among the described method step B, the data that needs are handled deposit in the buffer zone successively.When data are filled with whole buffer zone successively or the data that require calculation carry out data operation when all having stored.
Further, data operation among the described method step C when required historical data length is long, according to the position of current pointer, is divided into the data in the whole buffer zone part of two linearities.Two parts are carried out computing respectively and then gather obtaining final result.After data operation finished, whether the judgement of the address of need circulating had arrived the ending of buffer zone with the decision pointer.If pointer has arrived the ending of buffer zone, pointer is mapped to the starting position of buffer zone.When circulating map addresses, when pointer arrives the buffer zone ending, under some situation, can use mapping method fast, promptly directly pointer is mapped to the starting position of buffer zone.
Further, data operation among the described method step C, when required historical data length more in short-term, directly carry out data-moving.
Further, among the described method step D, the data sample of new input, the data operation situation according to having finished leaves on the position of the historical data that does not re-use.
Further, the storage space of described buffer zone adopts physically continuous address location, also can be continuous in logic address location; Described processed data can be a storage unit, also the data block that can combine for several storage unit.
By the present invention, significantly reduced the address in the calculating process and relatively adjudicated calculating, reduced the computing cost of processor, can save the processing time, reduced the processor energy consumption, strong backing the working long hours of electronic product of present use battery.
Description of drawings
Fig. 1 is h (k) and x (n) corresponding relation synoptic diagram when n=i and n=i+1;
Fig. 2 cyclic addressing mode is h (k) and x (n) corresponding relation synoptic diagram when n=i and n=i+1;
The discontinuous buffer zone synoptic diagram of Fig. 3 physics;
The physics consecutive data block synoptic diagram that the several storage unit of Fig. 4 combine;
The physics discrete date piece synoptic diagram that the several storage unit of Fig. 5 combine.
Embodiment
With a convolution algorithm is example.
y ( n ) = Σ k = 0 N x ( n - k ) · h ( k )
At first initialization length register (BK), effective base address (EFB), tail address (EOB).Then, according to the order of presentation of buffer zone data are filled successively.
According to the size of length register (BK), decide and adopt data-moving to carry out addressing, the cyclic addressing of still adopting the present invention to mention.If employing data-moving, as shown in Figure 1, after the n=i computing finishes, will carry out the calculating of n=i+1, because and the corresponding data of h (N) become otiose historical data, will and the corresponding data-moving of h (N-1) to and the storage unit of h (N) correspondence.So successively after the moving data, will and the corresponding storage unit of h (0) free out, new sample data i+1 just can be deposited in this storage unit.And then carry out computing, finish up to computing.
If the cyclic addressing of adopting the present invention to mention as shown in Figure 2, is without loss of generality, the starting point of x (n) is not at the start address in physical buffer district, in the corresponding storage unit of h (3).Like this according to decomposition thought of the present invention.Whole serial data is divided into two parts, and h (0)~h (3) and h (4)~h (N) is not interrupted owing to the centre in these two parts, so need not carry out the judgement of address in computation process, directly computing.
After this computing finishes, IP address moves after needing, at this moment just carry out primary address and relatively decide IP address whether to arrive the border of buffer zone (mode shown in Figure 2 is the beginning border of buffer zone), according to shown in Fig. 2-(a), next IP address is h (a 2) corresponding address.If this computing is the border of buffer zone,, just use the circulation map addresses that the computing IP address is mapped to h (N) such as h (0) corresponding address.
So constantly carry out computing, finish up to whole data computation.
In the foregoing description, when circulating map addresses, if the length of buffer zone is 2 integral number power, 4 powers such as 2, buffer length is 16, and promptly N=15 can adopt the fast address mapping, directly the address is added 1, get back four that the address adds after 1 and just got back to the another one border of buffer zone.Distribute to and h (0), h (1) ..., the binary form of h (15) corresponding buffer region address is shown 1111,1110 ..., 0000.When the start address of this computing was 1111, next IP address should be 0000 just.Adding 1 to 1111 becomes 10000, and getting back four has been exactly 0000, need not carry out other calculating just directly fast mapping to correct address.
The foregoing description is that buffer zone is a physically continuous storage unit.It also can be physically discontinuous storage unit.As shown in Figure 3, in this case, address increment is not simply to add 1 operation, but address pointer is to next address.All the other calculate a same specific embodiment.
The foregoing description is that data to be processed are single storage unit. the data block that deal with data also can combine for several storage unit, as shown in Figure 4, data block can be a continuous memory cell physically, A among the figure, B, C represent the data of forming data block respectively, the A that comprises that only represents data block herein, B, three identical data divisions of structure of C are not represented identical concrete data; As shown in Figure 5, data block also can be physically discontinuous storage unit. under first kind of situation, address increment neither add 1, but adds a fixing constant; Under second kind of situation, be that address pointer points to next address. processing procedure is with above-mentioned embodiment.
The above, only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, so protection domain of the present invention is as the criterion with the protection domain of claims.

Claims (9)

1. one kind is applied in the computer addressing, utilizes software to realize the method for quickly changing address, it is characterized in that: may further comprise the steps:
Parameter in the A initial method;
The initialization of B buffer data;
C data address mapping mode is selected, data operation is when required historical data length is long, according to the position of current pointer, data in the whole buffer zone are divided into the part of two linearities, two parts are carried out computing respectively and then gather obtaining final result;
The input of D new data;
E judges and end process.
2. according to the described method of claim 1, it is characterized in that: need initialized parameter to comprise among the described method step A: buffer length, buffer zone start element, buffer zone ending unit.
3. according to the described method of claim 1, it is characterized in that: among the described method step B, the data that needs are handled deposit in the buffer zone successively, when data are filled with whole buffer zone successively or the data that require calculation carry out data operation when all having stored.
4. according to the described method of claim 1, it is characterized in that: after data operation finishes among the described method step C, the judgement of address need circulate, whether arrived the ending of buffer zone with the decision pointer, if pointer has arrived the ending of buffer zone, pointer is mapped to the starting position of buffer zone.
5. according to the described method of claim 4, it is characterized in that: among the described method step C, when pointer arrives the buffer zone ending, use mapping method fast, promptly directly pointer is mapped to the starting position of buffer zone.
6. according to the described method of claim 1, it is characterized in that: data operation among the described method step C, when required historical data length more in short-term, directly carry out data-moving.
7. according to the described method of claim 1, it is characterized in that: among the described method step D, the data sample of new input, the data operation situation according to having finished leaves on the position of the historical data that does not re-use.
8. according to the described method of claim 1, it is characterized in that: the storage space of described buffer zone adopts physically continuous address location or continuous in logic address location.
9. according to the described method of claim 1, it is characterized in that: described processed data are the data block that a storage unit or several storage unit combine.
CN200610011644A 2006-04-12 2006-04-12 Method for quickly changing address by software Expired - Fee Related CN1831791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200610011644A CN1831791B (en) 2006-04-12 2006-04-12 Method for quickly changing address by software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200610011644A CN1831791B (en) 2006-04-12 2006-04-12 Method for quickly changing address by software

Publications (2)

Publication Number Publication Date
CN1831791A CN1831791A (en) 2006-09-13
CN1831791B true CN1831791B (en) 2010-05-12

Family

ID=36994100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200610011644A Expired - Fee Related CN1831791B (en) 2006-04-12 2006-04-12 Method for quickly changing address by software

Country Status (1)

Country Link
CN (1) CN1831791B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268381B (en) * 2017-12-15 2021-12-24 中国航空工业集团公司西安飞行自动控制研究所 Method for safely realizing fast addressing of data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122703A (en) * 1997-08-15 2000-09-19 Amati Communications Corporation Generalized fourier transform processing system
US20030200414A1 (en) * 2002-03-15 2003-10-23 Thomas Harley Address generators for mapping arrays in bit reversed order
CN1201251C (en) * 1997-01-15 2005-05-11 艾利森电话股份有限公司 Method and apparatus for FFT computation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1201251C (en) * 1997-01-15 2005-05-11 艾利森电话股份有限公司 Method and apparatus for FFT computation
US6122703A (en) * 1997-08-15 2000-09-19 Amati Communications Corporation Generalized fourier transform processing system
US20030200414A1 (en) * 2002-03-15 2003-10-23 Thomas Harley Address generators for mapping arrays in bit reversed order

Also Published As

Publication number Publication date
CN1831791A (en) 2006-09-13

Similar Documents

Publication Publication Date Title
CN110546611A (en) Reducing power consumption in a neural network processor by skipping processing operations
US20190164043A1 (en) Low-power hardware acceleration method and system for convolution neural network computation
CN109324902B (en) Method for adjusting working frequency of mobile terminal, mobile terminal and storage medium
US8995756B2 (en) 3D vision processing
JP2020532020A (en) Application preloading methods, terminal devices, and media
US11977916B2 (en) Neural processing unit
CN113656179A (en) Scheduling method and device of cloud computing resources, electronic equipment and storage medium
Huang et al. Minimizing makespan in a two-stage flow shop with parallel batch-processing machines and re-entrant jobs
CN101833691A (en) Realizing method of least square support vector machine serial structure based on EPGA (Filed Programmable Gate Array)
CN110689045A (en) Distributed training method and device for deep learning model
US20240220271A1 (en) Method and system for accelerating recurrent neural network based on cortex-m processor, and medium
CN1831791B (en) Method for quickly changing address by software
US20230196086A1 (en) Increased precision neural processing element
Zhao et al. Brief industry paper: Towards real-time 3D object detection for autonomous vehicles with pruning search
CN115809126A (en) Job scheduling method and device in mixed deployment scene and electronic equipment
Hu et al. Remote sensing detection and resource utilisation of urban sewage sludge based on mobile edge computing
CN112413862B (en) Method and device for determining energy consumption coefficient, storage medium and electronic device
Gong et al. An energy-efficient reconfigurable AI-based object detection and tracking processor supporting online object learning
CN111626913B (en) Image processing method, device and storage medium
CN111260070B (en) Operation method, device and related product
Panwar et al. M2DA: a low-complex design methodology for convolutional neural network exploiting data symmetry and redundancy
CN107797831B (en) Background application cleaning method and device, storage medium and electronic equipment
Pan et al. Hierarchical resampling algorithm and architecture for distributed particle filters
Rust et al. Design and Implementation of a Neurocomputing ASIP for Environmental Monitoring in WSN
WO2020263432A1 (en) Neural processing element with single instruction multiple data (simd) compute lanes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100512

Termination date: 20120412