Patent ID: 6725298
Filing Date: 2004-04-20
Classification: G06F

Abstract:
A method of processing at least a filter by ensuring a ring-buffer memory space in a digital signal processor, comprising the step of:releasing a ring-buffer memory space previously reserved for ring-buffer data upon completing a filter-process and determining that the ring-buffer data stored in said ring-buffer memory space is no longer necessary after the filter-process is carried out, wherein a single filter is a process, and said method comprises the steps of: setting a current address at a top of a data region in a ring-buffer memory space for placement of ring-buffer data to carry out an initialization; calculating a top address of a ring-buffer as an object for a filter-process to calculate a ring-buffer address; setting said calculated top address at said calculated ring-buffer address; ensuring a ring-buffer memory space corresponding to a ring-buffer size from said top address of said ring-buffer; setting said ring-buffer size in a ring-buffer register; carrying out a filter-process; and releasing said ring-buffer memory space if said ring-buffer data becomes no longer necessary after said filter-process, and wherein said step of calculating said ring-buffer address comprises the steps of: carrying out a decrement to a buffer size of a ring-buffer as an object of a filter-process; executing calculation of a left shift number, where non-zero bit is MSB, on the basis of a value of said buffer size in accordance with a normalization instruction of a digital signal processor; subtracting said left shift number from a bit number corresponding to a register width in order to obtain a necessary bit number for representing said ring-buffer size; shifting a numerical â€œ1â€  in a left direction by said necessary bit number for representing said ring-buffer size; subjecting said shifted value to a decrement so that bits corresponding to said necessary bit number from an LSB side are made into 1 to calculate mask data as mask values; masking a current address in a data memory space by said mask data; and confirming whether or not said masked address is 0, and if said masked address is 0, then said current address becomes a top address of said ring-buffer, for which said memory space is ensured, thereby calculating a top address of said ring-buffer as said object to said filter process, and if said masked address is not 0, then for said current address, bits corresponding to the above mask value become 0 and further said current address is added with a value obtained by increment to said mask value by the one-bit so that said added current address becomes a top address of said ring-buffer, for which said memory space is ensured, thereby calculating said top address of said ring-buffer as said object to said filter process.