发明授权
- 专利标题: Apparatus and method for generating a modulo address
- 专利标题(中): 用于产生模地址的装置和方法
-
申请号: US388567申请日: 1995-02-14
-
公开(公告)号: US5659700A公开(公告)日: 1997-08-19
- 发明人: Hwang-Chung Chen , Shih-Chang Hsu
- 申请人: Hwang-Chung Chen , Shih-Chang Hsu
- 申请人地址: TWX Hsinchu
- 专利权人: Winbond Electronis Corporation
- 当前专利权人: Winbond Electronis Corporation
- 当前专利权人地址: TWX Hsinchu
- 主分类号: G06F5/10
- IPC分类号: G06F5/10 ; G06F7/72 ; G06F9/355 ; G06F12/00 ; G06F9/26 ; G06F9/34 ; G06F12/02
摘要:
A method and apparatus for generating a modulo address for accessing a circular buffer. The method and apparatus accept as inputs a length L of the circular buffer, a current address A of the circular buffer, and an offset M between the current address and the next address to be generated. The offset M may be positive or negative. During operation of the present invention, the current address A first is broken down into a base address B and an offset from the base address a. Then, in accordance with the length L and the offset M, the invention determines an absolute offset and a wrapped offset. One of these offsets is added to the base address B to generate a next address for the circular buffer. The determination of which offset to add to the base address B is made by performing one of two comparisons. Specifically, either the absolute offset is compared to a predetermined value indicating the beginning of the circular buffer or the absolute offset is compared to a predetermined value indicating the end of the circular buffer, depending on a sign of the offset M. In a second embodiment of the invention, one of the offsets is added to the base address B in accordance with a Wrap flag determined by the circuit.
公开/授权文献
信息查询