TW466407B - Multiple variable address mapping circuit - Google Patents
Multiple variable address mapping circuit Download PDFInfo
- Publication number
- TW466407B TW466407B TW89117832A TW89117832A TW466407B TW 466407 B TW466407 B TW 466407B TW 89117832 A TW89117832 A TW 89117832A TW 89117832 A TW89117832 A TW 89117832A TW 466407 B TW466407 B TW 466407B
- Authority
- TW
- Taiwan
- Prior art keywords
- address
- register
- array
- length
- output
- Prior art date
Links
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
A7 466407 五、發明說明(ί ) 【本發明之領域】 本發明係關於一種處理位址映射之電路,尤其對於處 理結構性非連續之位址映射可大量減少以軟體方式之位址 運算。 【本發明之背景】 目前處理器對記憶體或週邊存取,都採用單一固定位 址映射存取方式’在硬體電路設計時,便將記憶體或週^ 的存取位址固定下來。有些電路在位址解碼時採用不完全 解碼技巧,只解碼部分位址線,讓相同的周邊或記憶體可 以對應到不同的位址,但這種技巧下,不同位址的資料排 列方式卻是相同的。 有些崁入式處理器(Embedded CPU),將位址解碼 電路内建在處理器内。可用程式設定方式,指定所接的記 憶體或週邊的位址,但所存取的都是連續位址空間。 、習知技術對於處理結構性非連續之位址映射仍以軟體 方式之位址運算處理,而大量增加以軟體方式之位址運 算,對於經常處理如陣列資料而言,增加處理器之負荷。 _ 【本發明之概述】 本發明之主要目的係在提供一種多重可變位址映射電 路,俾在處理結構性非連續資料時,由硬體的位址映射 電路取代大量的軟體位址運算。 本發明之次要目的係在提供一種多重可變位址映射電 路’俾能增加程式的可移植性(Portability),由於可以 將實體位址映射到邏輯位址,程式設計師設計主要系統裎 本紙張尺度適用中_^7^ΓΑ4規格⑵0 x 297祕 (請先閱讀背面之注意事項再填寫本頁) · — I — I I — 訂----- ii . 經濟部智慧財產局員工消費合作社印製 經濟部智慧財產局員工消費合作社印製 466407 A7 --------------------- 五、發明說明(2 ) 式時直接採用邏輯位址,僅需在初始設定時,設定位址映 射電路之映射函數,因此可以快速移植程式到不同平台設 備。 本發明之另-目的係在多重可變位址映射電路之位址 映射電路内,設有複數之暫存器,使得改變暫存器的内 谷’便可改變映射函數。 為達成上述之目的,本發明多重可變位址映射電路主 要包括至少-個位址映射器,用以負貴處理陣列中某一搁 位陣列之輸入邏輯位址與輸出實體位址的轉換;一映射器 選擇器,負貴選擇輸出的實體位址是採用何組的位址映射 器;以及一控制及介面電路,用以設定基底位移暫存 器’邏輯基底暫存器位長度暫存器以及記錄長度暫存 器I内容,並控制位址映射器及映射器選擇器的動作。 其中位址映射器包括基底位移暫存器,邏輯基底暫存 器,攔位長度暫存器,記錄長度暫存器,減法器,除法/ 餘數產生器,乘法器,以及加法器。 由於本發明確有增進功效,故依法申請發明專利。 【圖·式簡單説明】 第1圖係本發明多重可變位址映射電路之方塊圓實施例。 弟2圖係§无明.本發明應用於陣列中資料存取之例子。 第3圖係本發明關於位址映射器電路之方塊圖實施例。 第4圖係本發明關於映射器選擇器的電路方塊圖實施例。 第5圖係本發明關於〇 r閘遮罩電路實施例。 第6圖係本發明關於控制及介面電路方塊圖實施例。 本紙張尺度適用中國國家標準(CNS)A4規格(2Κ) X 297办Μ ) (請先閱讀背面之注意事項再填寫本頁> I -------1 訂· —---— I— «A7 466407 V. Description of the Invention (Field of the Invention) The present invention relates to a circuit for processing address mapping, especially for processing structural non-continuous address mapping, which can greatly reduce software address operations. [Background of the present invention] At present, the processor uses a single fixed-address-mapped access method for memory or peripheral access. When the hardware circuit is designed, the memory or peripheral access address is fixed. Some circuits use incomplete decoding techniques when decoding addresses, and only decode part of the address lines, so that the same peripheral or memory can correspond to different addresses, but under this technique, the arrangement of data at different addresses is identical. Some embedded processors have an address decoding circuit built into the processor. You can use the program setting method to specify the address of the connected memory or its surroundings, but all accesses are continuous address space. 2. Conventional technologies still use software-based address calculation to handle structural non-continuous address mapping, and a large increase in software-based address calculation. For frequent processing such as array data, it increases the load on the processor. _ [Outline of the present invention] The main purpose of the present invention is to provide a multiple variable address mapping circuit. When processing structural discontinuous data, hardware address mapping circuits replace a large number of software address operations. The secondary object of the present invention is to provide a multiple variable address mapping circuit, which can increase the portability of the program. Since the physical address can be mapped to the logical address, the programmer designs the main system copy Paper size applicable _ ^ 7 ^ ΓΑ4 size ⑵0 x 297 (please read the precautions on the back before filling out this page) · — I — II — Order ----- ii. Printed by the Intellectual Property Bureau Employees Consumer Cooperatives Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economics and Industry 466407 A7 --------------------- V. Description of invention (2) The logical address is used directly, only The mapping function of the address mapping circuit needs to be set during the initial setting, so the program can be quickly ported to different platform devices. Another object of the present invention is to provide a plurality of temporary registers in the address mapping circuit of the multiple variable address mapping circuit, so that the mapping function can be changed by changing the inner valley of the temporary registers. In order to achieve the above object, the multi-variable address mapping circuit of the present invention mainly includes at least one address mapper, which is used to convert the input logical address and the output physical address of a shelf array in the expensive processing array; A mapper selector, which set of address mappers are used to select the physical address of the output; and a control and interface circuit for setting the substrate displacement register, the logical substrate register, and the bit length register. It also records the contents of the length register I and controls the actions of the address mapper and the mapper selector. The address mapper includes a base shift register, a logical base register, a block length register, a record length register, a subtractor, a division / remainder generator, a multiplier, and an adder. Since the present invention does have an enhanced effect, an invention patent is applied for in accordance with the law. [Figure · Simplified description] Figure 1 is a block circle embodiment of the multiple variable address mapping circuit of the present invention. The second figure is § ignorance. The present invention is applied to an example of data access in an array. FIG. 3 is a block diagram embodiment of the address mapper circuit according to the present invention. FIG. 4 is a circuit block diagram embodiment of a mapper selector according to the present invention. FIG. 5 is an embodiment of the ohm gate mask circuit of the present invention. Fig. 6 is a block diagram embodiment of the control and interface circuit of the present invention. This paper size applies to China National Standard (CNS) A4 (2K) X 297 Office M) (Please read the precautions on the back before filling this page > I ------- 1 Order · ------ I— «
466407 -------- 五、發明說明(3 ) 【圖號説明】 多重可變位址映射電路1〇 基底位移暫存器2 1 攔位長度暫存器2 3 減法器2 5 乘法器2 7 映射器選擇器30 0 R閘遮罩電路3 2 優先權編碼器3 4 控制及介面電路4 〇 輸入邏輯位址5 1 記憶體9 1 位址匯流排9 3 位址映射器20 邏輯基底暫存器22 記錄長度暫存器24 除法/餘數產生器26 加法器2 8 位址組解碼器3 1 . 映射區域位址遮罩暫存器33 多工器35 輸出/入解碼器4 1 輸出實體位址5 2 輸出/入設備92 資料匯流排94 -------I------裝--------訂. (請先閱讀背面之ί±意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 【較佳具體實施例之詳細說明 如先參考第1圖有關本發明多重可變位址映射電路i 〇 之方塊圖。 •對於多重可變位址映射電路10而言,輸入邏輯位址 5 1是指電腦之處理器或主機板位址匯流排93 (L〇gicai Address Bus)所認定的位址,而輸出實體位址52 (Physical Address)即為多重可變位址映射電路1〇將輸 入邏輯位址5 1轉換後之位址,輸出實體位址5 2為眞正送 到記憶體9 1或輸出/入設備9 2的位址信號。輸入邏輯位址 5 1與輸出實體位址5 2之對應關係是可變的,而且可以是 連續或非連續的對應關係。如第丨圖所示,有五組位址映 本紙張尺度適用中國國家標準<CNS)A4規格(210 X 297去爱丁 ι, ϋ Ό 4 Ο 7466407 -------- V. Description of the invention (3) [Illustration of drawing number] Multiple variable address mapping circuit 10 Base shift register 2 1 Block length register 2 3 Subtractor 2 5 Multiplication 2 7 Mapper selector 30 0 R Gate mask circuit 3 2 Priority encoder 3 4 Control and interface circuit 4 〇 Input logical address 5 1 Memory 9 1 Address bus 9 3 Address mapper 20 Logic Base register 22 record length register 24 division / remainder generator 26 adder 2 8 address group decoder 3 1. Mapped area address mask register 33 multiplexer 35 output / input decoder 4 1 Output entity address 5 2 I / O device 92 Data bus 94 ------- I ------ Install -------- Order. (Please read the 意 Note on the back first Refill this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economics [For detailed description of the preferred embodiment, please refer to FIG. 1 for a block diagram of the multiple variable address mapping circuit i 0 of the present invention. • For the multiple variable address mapping circuit 10, the input logical address 5 1 refers to the address identified by the computer's processor or motherboard address bus 93 (LOGicai Address Bus), and the output physical bit Address 52 (Physical Address) is the multi-variable address mapping circuit 10, which is the address converted from the input logical address 5 1 and the output physical address 5 2 is being sent to the memory 9 1 or the input / output device. 9 2 address signal. The correspondence between the input logical address 51 and the output entity address 5 2 is variable, and it can be continuous or discontinuous. As shown in Figure 丨, there are five sets of address mapping. The paper size is applicable to the Chinese National Standard < CNS) A4 specification (210 X 297 to Edinburgh, ϋ Ό 4 Ο 7
經濟部智慧財產局員工消費合作社印製 五、發明說明(4 ) 射器 2〇a,20b,20c,2〇d, 20e (Addr Mpper),每一個 位址映射器20都可以個別設定映射方式,將虛擬的輸入邏 輯位址5 1映射到輸出實體位址5 2。侃設要將輸出實體位 址52 如,4000,4008,4016,4024,4032,…等對應到 邏輯位址0,1,2,3,4,5,〜等,可設定位址映射器2〇&如下: 位址映射器 20a : PA = F1(LA) , Fl(x) = 4000 + (x) * 8 並將映射器選擇器30 (Mapper Selector)設為 CS0是採用位址映射器20a,當處理器在存取輸入邏輯位 址5 1 : 0,1,2,3,…等時’實際存取到輸出實體位址5 2 : 4000,4008,40 1 6,…等等的資料。 對於記憶體9 1或輸出/入設備9 2,可以有多種邏輯 位址(也可稱為虛擬位址)與實體位址的對應關係。也就是 多重位址功能,而每一種位址的定址方式都可以不相同。 如第1圖所示,外部的處理器的位址匯流排9 3 (即 Logical Addr. Bus, LA)可以透過多重可變位址映射電 路10的三組位址映射器20a,20b, 20c,以三種不同的 映射方式,轉換成到記憶體(Memory)的實體位址 (Physical Address, PA),存取記憶體資料。而輸出/入 設備92則用到兩組位址映射器20d, 20e。 位址映射器20a: PA = F1(LA) 位址映射器20b: PA = F2(LA)Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs. 5. Description of the invention (4) The transmitters 20a, 20b, 20c, 20d, 20e (Addr Mpper), each address mapper 20 can set the mapping method individually. , Map the virtual input logical address 5 1 to the output physical address 5 2. For example, if you want to output the physical address 52, such as 4000, 4008, 4016, 4024, 4032, etc., to the logical address 0, 1, 2, 3, 4, 5, etc., you can set the address mapper 2 〇 & is as follows: Address mapper 20a: PA = F1 (LA), Fl (x) = 4000 + (x) * 8 and set the mapper selector 30 (Mapper Selector) to CS0 is to use the address mapper 20a, when the processor is accessing the input logical address 5 1: 0, 1, 2, 3, ... etc., 'the actual access to the output physical address 5 2: 4000, 4008, 40 1 6, ... and so on data. For the memory 91 or the input / output device 92, there can be multiple correspondences between logical addresses (also called virtual addresses) and physical addresses. That is, multiple address functions, and each address can be addressed differently. As shown in FIG. 1, the address bus 9 3 of the external processor (ie, Logical Addr. Bus, LA) can pass through three sets of address mappers 20 a, 20 b, and 20 c of the multi-variable address mapping circuit 10. Use three different mapping methods to convert to physical address (PA) of memory (Memory) and access memory data. The I / O device 92 uses two sets of address mappers 20d, 20e. Address mapper 20a: PA = F1 (LA) Address mapper 20b: PA = F2 (LA)
位址映射器20c: PA = LA FI, F 2,為不同映射函數,而位址映射器2 0c則不做 任何轉換。 本紙張尺度適用中固國家標準(CNS)A4規格(210 X 297签釐) (請先閱讀背面之注意事項再填寫本頁) -14^·-------訂·-------- 經濟部智慧財產局員工消費合作杜印製 A 〇 6 4 0 7 A7 --— B7 五、發明說明(5 ) 透過不同的映射函數設定,可將記憶體91映射到輸 出/入設備92位址範圍或將輸出/入設備92映射到記憶體 9 1範圍。Address mapper 20c: PA = LA FI, F 2, is a different mapping function, while address mapper 2 0c does not perform any conversion. This paper size applies to China Solid National Standard (CNS) A4 specification (210 X 297 sign cents) (Please read the precautions on the back before filling this page) -14 ^ · ------- Order · ---- ---- Consumption Cooperation by Employees of Intellectual Property Bureau of the Ministry of Economic Affairs, printed by A 〇6 4 0 7 A7 --- B7 V. Description of the Invention (5) Through different mapping function settings, memory 91 can be mapped to output / input The device 92 address range or the I / O device 92 is mapped to the memory 91 range.
使用者可以採用位址區域對應方式,將不同的位址空 間映射到不同的映射器,比如位址〇 0 〇 〇 · 3 fff自動使用位 址映射器20a,4000-BFFF不做任何映射,COOO-DFFF 為使用位址映射器20b,F000-FFFF使用位址映射器 2 0c。· 以上這些邏輯位址與實體位址的轉換,是利用硬體電 路芫成,可節省大量的軟體運算及存取時間。譬如在處理 結構性非連續資料時,由硬體的位址映射電路取代大量的 軟體位址運算。假設要存取4000,4008,4016,4024, 4 〇 3 2,_·_位址内的資料,以下列簡單的位址轉換函數為 例: F1(x)=4000+ (x) * 8 以軟體計算位址時,需要做一次乘法或位移運算及一 次的加法運算,以下即為以8 0 X 8 6組合語言説明進行一 次存·取時,所需要的指令如下 MOV ΒΧ,χ SHL BX,3 ; Multiply 8 ADD BX,4000 MOV AX,[BX] 若函數更為複雜,則所需的運算更多。若以本技術方 式存取,在Addr Mapper設定後,僅需下列指令即可完 成 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) ----- --------^ \ ^ i I ----1-------'^ί {請先閱讀背面之注意事項再填寫本頁) A7 B7 466407 五、發明說明(έ> ) MOV ΒΧ,χ MOV AX,[BX] 如果疋較複雜的万式,比如母隔2 0位址取連喷3位 址的内容資料,也可利用此電路來完成存取。這在使用迴 路(1 0 〇 P)存取大量資料時,將節省大量時間。 另外此本發明亦可增加程式的可移植性 (Portability),由於可以將實體位址映射到邏輯位址, 红式遗計師設計主要系統程式時直接採用邏輯位址,僅需 在初始設定時,設定位址映射器2 0之映射函數,因此可 以快速移植程式到不同平台設備。 為説明本技術之特點,請參考第2圖有關本發明應用 於陣列中資料存取之例子,譬如將表A ( Table A )的姓 名A (NameA)攔位資料取出放入表B (TableB)的客 户B (CustomB)欄中為例: 在位址4 0 0 0 h位址處,有一組多攔位資料τ a b 1 e a, TableA有三組欄位,攔位名稱及欄位長度分別為n〇a佔 4位元組(bytes) ,NameA佔16位元組,NIDA佔8 位元•組。此外在位址600Oh處,有另一组多欄位資料 TableB,TableB有兩欄位,SIDB佔4位元組, C u s t 〇 m B佔1 6位元組。The user can use the address area mapping method to map different address spaces to different mappers, such as address 〇00 〇 · 3 fff automatically use the address mapper 20a, 4000-BFFF does not do any mapping, COOO -DFFF uses the address mapper 20b, F000-FFFF uses the address mapper 2 0c. · The conversion of the above logical address and physical address is made by hardware circuit, which can save a lot of software calculation and access time. For example, when dealing with structural discontinuous data, a large number of software address operations are replaced by hardware address mapping circuits. Assume that you want to access the data in the addresses 4000, 4008, 4016, 4024, 4 〇3, _ · _, take the following simple address conversion function as an example: F1 (x) = 4000 + (x) * 8 When the software calculates the address, it needs to do a multiplication or shift operation and an addition operation. The following is the instruction to save and fetch in 80 x 8 6 combination language. The instructions required are as follows: MOV Βχ, χ SHL BX, 3; Multiply 8 ADD BX, 4000 MOV AX, [BX] If the function is more complicated, more operations are required. If it is accessed by this technology, after the setting of Addr Mapper, only the following instructions are needed to complete this paper size. Applicable to China National Standard (CNS) A4 specification (210 X 297 mm) ----- ----- --- ^ \ ^ i I ---- 1 ------- '^ ί {Please read the notes on the back before filling this page) A7 B7 466407 V. Description of the invention (έ >) MOV ΒΧ, χ MOV AX, [BX] If it is more complicated, such as the content data of 20-bit address and 3-bit address, you can also use this circuit to complete access. This will save a lot of time when accessing a large amount of data using the loop (100p). In addition, the present invention can also increase the portability of the program. Since the physical address can be mapped to the logical address, the red type engineer uses the logical address directly when designing the main system program. , Set the mapping function of the address mapper 20, so you can quickly port programs to different platform devices. In order to explain the characteristics of this technology, please refer to FIG. 2 for an example of the present invention applied to data access in an array. For example, the name A (Name A) data of Table A (Table A) is fetched into Table B (Table B). For example, in the column of Customer B (CustomB): At the address 4 00 h, there is a set of multi-block data τ ab 1 ea, and Table A has three sets of fields. The block name and field length are n respectively. 〇a occupies 4 bytes, NameA occupies 16 bytes, and NIDA occupies 8 bytes. In addition, at the address 600Oh, there is another set of multi-column data TableB, TableB has two fields, SIDB occupies 4 bytes, Custo omb B occupies 16 bytes.
NameA 起始位址:4000h + 4 + (ICh * i) ,j =〇, 1,2,…(丨代表列數),各NameA起始位址即 4004h, 4020h,403 ch,405 Bh, .…NameA starting address: 4000h + 4 + (ICh * i), j = 〇, 1, 2, ... (丨 represents the number of columns), the starting address of each NameA is 4004h, 4020h, 403 ch, 405 Bh,. ...
CustomB 起始位址:6000h + 4 + (14h * j), j_〇,l,2,…_ (j代表列數)’各CustomB起始位址即 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297 1¾ ) -------------^ -裝-------—訂--I I I I---象 t請先閱讀背面之注意事項再填寫本頁} 經濟部智慧財產局員工消費合作社印製 經濟部智慧財產局員工消費合作社印製 46640 7 A7 ___B7 五、發明說明(7 ) 6004h, 601 8h,602ch,6040h,..... 對每一個Table中任一欄位的起始位址及攔寬,可用 下列公式表示:CustomB starting address: 6000h + 4 + (14h * j), j_〇, 1, 2, ..._ (j represents the number of columns) 'The starting address of each CustomB is the paper standard applicable to the Chinese National Standard (CNS) A4 Specification (210 X 297 1¾) ------------- ^ -Installation --------- Order--III I --- Please read the precautions on the back first Fill out this page} Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economy Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economy 46640 7 A7 ___B7 V. Invention Description (7) 6004h, 601 8h, 602ch, 6040h, ... The starting address and width of any field in each Table can be expressed by the following formula:
Addr_start= Base + FieldOffset + η * RecordLen =(Base + FieldOffset) + n * RecordLen 备參數如下:Addr_start = Base + FieldOffset + η * RecordLen = (Base + FieldOffset) + n * RecordLen The parameters are as follows:
Base : Table 起始位址,如 TableA 為 4000h, TableB 為 6000hBase: The starting address of the table, such as Tableh is 4000h, TableB is 6000h
FieldOffset :攔位在該筆資料中的位移値, TableA及TableB各欄位移如下:FieldOffset: the displacement of the block in the data, the displacement of each column of TableA and TableB is as follows:
NoA: 0,Name A : 4,NID A : 14h SIDB : 0 ,CustomB : 4NoA: 0, Name A: 4, NID A: 14h SIDB: 0, CustomB: 4
RecordLen :每筆資料的長度,在TableA為 ICh,TableB 為 14h 右要將所有該欄資料的位址以連續資料來存取,則公 式修•改如下: 公式(一): S[x]-(Base + FieldOffset) + INT(x / FieldLen) * RecordLen + (x mod FieldLen),其中: x為資料在邏輯陣列S中的位移値。RecordLen: the length of each data, in TableA is ICh, TableB is 14h. To access the address of all data in this column as continuous data, the formula is modified and modified as follows: Formula (1): S [x]- (Base + FieldOffset) + INT (x / FieldLen) * RecordLen + (x mod FieldLen), where: x is the displacement 资料 of the data in the logical array S.
FieldLen :攔寬。各攔的FieldLen如下: N 〇 A: 4 ,NameA : 10h,NIDA : 8 SIDB : 4 ,CustomB : 10h 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297 I釐) — — — — — — — —---L -裝!| 訂_1-------良 (請先閱讀背面之注#事項再填寫本頁) A7 466407 _一 五、發明說明(名) 現假設Tab 1 e A有η筆資料,若以傳統軟體方式來複 製此欄位,程式虚擬碼片段如下 char * ptr A, * ptrB ; unsigned long tempA,tempB,count,x,η; tempA = Base(TableA) + F i e 1 d O f fs e t (Nam e A ); tempB = Base(TableB) +FieldLen: Wide. The FieldLen of each block is as follows: NOA: 4, NameA: 10h, NIDA: 8 SIDB: 4, CustomB: 10h This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 I centimeters) — — — — — — — — --- L-Outfit! Order_1 ------- Good (please read the note # on the back before filling this page) A7 466407 _15. Description of the Invention (Name) Now suppose that Tab 1 e A has η records. The traditional software way to copy this field, the program virtual code snippet is as follows char * ptr A, * ptrB; unsigned long tempA, tempB, count, x, η; tempA = Base (TableA) + F ie 1 d O f fs et ( Nam e A); tempB = Base (TableB) +
FieldOffset(CustomB); count = n * FieldLen(NameA); for (x = 0 ; x < count ; x + +) { ptr A = (char * U tempA + (i n t)( x L FieldLen(NameA)) * RecordLen(TahleA> + (x % FieldLenfNameA))); ptrB = (char *UtempB + f i n t Π \ /FieldOffset (CustomB); count = n * FieldLen (NameA); for (x = 0; x <count; x + +) {ptr A = (char * U tempA + (int) (x L FieldLen (NameA)) * RecordLen (TahleA > + (x% FieldLenfNameA))); ptrB = (char * UtempB + fint Π \ /
Field LenfCustomB)) * Record Len(TahleB) 十 fx % FieidLen(CustomB)^ ; * ptrB = * ptr A ; } .上述程式中有底線的程式碼部分,若能以硬體計算, 我們可以精簡上述的for迴路程式 ptrA = VbaseA ; // VbaseA 為 NameA 欄位之邏 輯起始位址 ptrB = VbaseB ; // VbaseA 為 CustomB 攔位之邏 輯起始位址 count = η * F i e 1 d L e η (N am e A); 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公釐) I ^ — — — — — — — — — — I 111[1]1^OJ— — — — — — — (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 466407 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(q) for (x = 0 ; x < count ; x + + ) { * ptrB + + = * ptr A 十 + } 本發明便是採用硬體方式,達成此一快速運算之目 的’由於本發明對於非連續性之陣列資料存取相當有用, 為了達成上述所舉的例子之目的,位址映射器2 〇之方塊 圖實施例請參考第3圖,該位址映射器20之方塊圖所代 表之分式清參考上述之公式(一): 根據前述的公式(一): S[x] = (Base + FieldOffset) + INT(x / FieldLen) * RecordLen + (x mod FieldLen),其中: X為資料在某一邏輯陣列s (譬如T a b 1 e A之 N a m e A攔位陣列)中的位移値,因此可作為陣列指標; S[x]為輸出實體位址52 ; 邏輯陣列S之輸入邏輯位址51以SBase + X表示, 其中S b a s e代表元錄該欄位降列要做位址映射之起始邏輯 位址’因此X可被計算出,亦即輸入邏輯位址5 1 _ Sbase 〇 位址缺射器2 0以下列暫存器來存放相關參數: 基底位移暫存器2 1,記錄該攔位陣列要做位址映射 之起始實體位址,亦即Base + Fieid〇ffset 値’以上述實施例則為4 〇 〇 〇 h + 4 = 4 0 0 4 h ; 邏輯基底暫存器2 2,記錄該欄位陣列要做位址映射 之起始邏輯位址,亦即Sbase,譬如設為c〇OOh 或〇 (視進入之位址線為完整位址線C 〇 〇 〇 h或僅 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297这发)"~------ c請先閲讀背面之注意事項再填窝本頁) 裝 訂: 466407 A7 _______B7 _ 五、發明說明() (請先閲讀背面之注意事項再填寫本頁) 低階位址部分而定);若邏輯位址陣列起始位址 自〇〇〇〇開始或所取的有效低階位址為〇 (比如邏 輯位址陣列開始位址為C000h,但因只用低階 12條位址線’因此傳入之Address為〇〇〇),電 路上便不需要邏輯基底暫存器22及減法器25 ; 欄位長度暫存器2 3,記錄該陣列之長度,亦即 FieldLen値,以上述實施例則為1〇h : 圮錄長度暫存器2 4,記錄該陣列之長度,亦即 R e c 〇 r d L e η値,以上述實施例則為】c h ; 位址映射器20以下列之數學運算器完成: 減法器25,將輸入邏輯位址51與邏輯基底暫存器22 所儲存之邏輯基底位址進行減法之運算,亦即求 出陣列指標X =輸入邏輯位址5 1 _ s b a s e ,譬 如輸入邏輯位址51為c〇04h ,則χ = C004h — C〇〇〇h = 4 ° 經濟部智慧財產局員工消費合作社印製 除法/餘數產生器2 6,將減法器2 5之輸出値與欄位 長度暫存器2 3所儲存之欄位之長度進行除法/餘 數之運算,亦即求出INT(x / FieldLen)商數 1 之値’以及(X mod FieldLen)餘數之値。譬如 X = Uh ’則求出商數之値=1 ,餘數之値=2 乘法器2 7,將記錄長度暫存器2 4所儲存之陣列之長 度與除法/餘數產生器2 6之商數輸出値進行乘法 之運算,亦即求出INT(x / FieldLen) * RecordLen之値,譬如x = i2h ,商數之値= 1 ’乘法器輸出=ICh。 本紙張尺度適用中國國家標準(CNS)A4規格(210 x 297 ) 經濟部智慧財產局員工消費合作社印製 4 6 640 7 A7 B7 五、發明說明(II ) 加法器2 8,將基底位移暫存器2 1所儲存之起始實體 位址’除法/餘數產生器2 6之餘數輸出値,與乘 法器2 7之輸出値進行加法之運算以得到輸出實體 位址5 2,亦即求出S [ X ],譬如輸入邏輯位址5 ! 為C012h,輸出實體位址52為4022h。 由以上可知,只要傳入一個邏輯位址,電路便可輸出 所對應到的實體位址。在此邏輯位址範圍内,‘處理器可以 是連續存取或隨意存取資料。不需要再做複雜的軟體位址 運算。並且只要改變基底位移暫存器21,邏輯基底暫存器 22,欄位長度暫存器23及記錄長度暫存器24的内容,便 可改變映射函數。 在上述第2圖之實施例,由於需要求得τ ab 1 e a的 NameA欄位之實體位址,以及TableB的CustomB攔位之 實體位址,因此最好利用兩個位址映射器2 〇。 第4圖為映射器選擇器30的電路方塊圖。主要功能為 透過位址組解碼器31將區塊位址Bank Address(即為輸 入邏輯位址5 1的高階位址線)解碼,根據解碼結果及映射 區域位址遮罩暫存器33 (Bank Mask Register)的内 容,.決定所選用的位址映射器2 0。電路説明如下,區塊位 址經過位址組解碼器31 (Address Bank Decode)解 碼’ X 〇到X m表示不同的解碼範圍,比如解碼到〇⑼〇 _ 0 f ff 會使 X。為 1 ’ XjjXm則為0。1000-1 f f f 會使 X ^ 為 1,其他為0,以此類推。這些腳位會送到多组〇 R閘罩電 路32 (MASK OR),此電路是將映射區域位址遮罩暫存 器3 3内容先和位址組解碼器3 1的輸出相對應的位元先做 邏輯AND運算,再將輸出一起做〇R運算。這是用來控制 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297这蜚) (請先閱讀背面之注意事項再填寫本頁) 裝-------訂- ---Field LenfCustomB)) * Record Len (TahleB) Ten fx% FieidLen (CustomB) ^; * ptrB = * ptr A;}. The bottom line of the code in the above program, if it can be calculated in hardware, we can simplify the above for loop program ptrA = VbaseA; // VbaseA is the logical starting address of the NameA field ptrB = VbaseB; // VbaseA is the logical starting address of the CustomB block count = η * F ie 1 d L e η (N am e A); This paper size applies Chinese National Standard (CNS) A4 specification (210 X 297 mm) I ^ — — — — — — — — — — I 111 [1] 1 ^ OJ— — — — — — — (Please read the notes on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, printed 466407 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, printed A7 B7 V. Invention Description (q) for (x = 0; x <count; x + +) {* ptrB + + = * ptr A ten +} The present invention uses a hardware method to achieve the purpose of this fast operation. 'As the present invention accesses non-continuous array data, Quite useful, to achieve the purpose of the examples given above, address mapping For an example of a block diagram of 0, please refer to FIG. 3. For the fractional formula represented by the block diagram of the address mapper 20, refer to the above formula (1): According to the foregoing formula (1): S [x] = ( Base + FieldOffset) + INT (x / FieldLen) * RecordLen + (x mod FieldLen), where: X is the displacement of the data in a certain logical array s (such as the Tab 1 e A's Name A stop array) 値Therefore, it can be used as an array index; S [x] is the output entity address 52; the input logical address 51 of the logical array S is represented by SBase + X, where S base represents the field of the meta record and the address is delineated to be used for address mapping. The starting logical address' so X can be calculated, that is, the input logical address 5 1 _ Sbase 〇 address misser 2 0 uses the following registers to store related parameters: base displacement register 2 1, record The stop array is the starting physical address of the address mapping, that is, Base + Fieid〇ffset 値 'In the above embodiment, it is 4 00h + 4 = 4 0 4 h; the logic base register 2 2. Record the starting logical address of the field array to be mapped, that is, Sbase, for example, set to cOOh or (Depending on the address line entered is the complete address line C 00h or only this paper size applies Chinese National Standard (CNS) A4 specifications (210 X 297)) " ~ ------ c please Read the notes on the back and then fill in this page) Binding: 466407 A7 _______B7 _ V. Description of the invention () (Please read the notes on the back before filling this page) Low-order address part depends); if the logical address array The starting address starts from 20000 or the effective lower-order address taken is 0 (for example, the starting address of the logical address array is C000h, but because only the lower-order 12 address lines are used, the address passed in 〇〇〇〇), the circuit does not need the logic base register 22 and subtractor 25; field length register 23, record the length of the array, that is, FieldLen 値, in the above embodiment is 1〇 h: the record length register 24, which records the length of the array, that is, Rec 0rd Le e η 値, in the above embodiment] ch; the address mapper 20 is completed by the following mathematical operator: The subtractor 25 subtracts the input logical address 51 and the logical base address stored in the logical base register 22 The calculation of the method is to find the array index X = input logical address 5 1 _ sbase. For example, if the input logical address 51 is c〇04h, then χ = C004h — C〇〇〇h = 4 ° Intellectual Property Bureau of the Ministry of Economic Affairs The employee consumer cooperative prints the division / remainder generator 26, and divides / remainders the output of the subtractor 25 and the length of the field stored in the field length register 2 3, so that INT ( x / FieldLen) 値 of the quotient 1 and (X mod FieldLen) of the remainder. For example, X = Uh 'then find the quotient 値 = 1 and the remainder 値 = 2 multiplier 2 7 and the length of the array stored by the record length register 2 4 and the quotient of the division / remainder generator 2 6 The output is multiplied, that is, the 値 of INT (x / FieldLen) * RecordLen is obtained, for example, x = i2h and quotient 値 = 1 'multiplier output = ICh. This paper size applies to China National Standard (CNS) A4 (210 x 297) printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 4 6 640 7 A7 B7 V. Description of the invention (II) Adder 2 8 to temporarily store the base displacement The starting entity address stored by the generator 21 is divided by the remainder output of the division / remainder generator 2 6 and the output of the multiplier 27 is added to obtain the output entity address 5 2, that is, S is obtained. [X], for example, the input logical address 5! Is C012h, and the output entity address 52 is 4022h. From the above, as long as a logical address is passed in, the circuit can output the corresponding physical address. Within this logical address range, ‘processors can access data continuously or randomly. No need to do complicated software address calculation. And as long as the contents of the base displacement register 21, the logical base register 22, the field length register 23 and the record length register 24 are changed, the mapping function can be changed. In the embodiment of FIG. 2 above, since it is required to obtain the physical address of the NameA field of τ ab 1 e a and the physical address of the CustomB block of TableB, it is better to use two address mappers 20. FIG. 4 is a circuit block diagram of the mapper selector 30. The main function is to decode the block address Bank Address (that is, the high-order address line of the input logical address 51) through the address group decoder 31, and according to the decoding result and the mapping area address mask register 33 (Bank The contents of the Mask Register) determine the selected address mapper 2 0. The circuit description is as follows. The block address is decoded by the Address Group Decoder 31 (Address Bank Decode). X 〇 to X m represent different decoding ranges. For example, decoding to 〇 〇 _ 0 f ff will make X. For 1 ′ XjjXm it is 0. 1000-1 f f f will make X ^ 1 and others 0, and so on. These pins will be sent to multiple sets of OR gate mask circuit 32 (MASK OR). This circuit is the bit corresponding to the output of the address mask register 3 3 of the mapping area and the output of the address group decoder 31 1 The yuan first performs a logical AND operation, and then performs an OR operation on the outputs together. This is used to control the size of this paper to Chinese National Standard (CNS) A4 (210 X 297) (please read the precautions on the back before filling this page)
C 466407 經濟部智慧財產局員工消費合作社印製 A7 B7 五、發明說明(12 ) 哪些B a n k解碼位址可送到z的輸出。比如將映射區域位址 遮罩暫存器33的YG,Y]及I設為!,設為〇,表示 Χ〇,Χι,Χ2此三個位址解碼範圍有效,其餘無效。一但位 址範圍落在X^XhX2中的任一範圍,z輸出便成為i,否 則為0,OR閘罩電路32如第5圖所示。每個位址映射器2〇 會有一個映射區域位址遮罩暫存器3 3及一個〇R閉罩電路 32,若有三個位址映射器20便有三個映射區域位址遮罩 暫存莽33及三個〇R閘遮罩電路32。 每組OR閘遮罩電路32的輸出會送到優先權編碼器34 (Priority Encode),它會以優先權的方式加以编碼, 比如Z2的輸出為1,其餘輸入為〇,則優先權編碼器34 的輸出為2。若有兩組以上的輸入同時為丨,則依照優先 次序編碼輸出。 多工益3 5根據優先權編碼器3 4的輸出,決定所選用 的位址映射器20,而輸出該組映射器的實體映射位址。 當優先權编碼器34的輸出為〇時,輸出的位址即為輸 入的位址,電路不做位址映射轉換。 第6圖係本發明關於控制及介面電路4〇 ((:〇ntr〇1 & I n t e.r fa c e)方塊圖實施例,控制及介面電路* 〇用以設定及 存取位址映射器20及映射器選擇器30内部暫存器的資 料’輸出/入解碼器41 (10 Decoder)用來解碼各暫存器 的位址,以進行存取。資料緩衝器42 (Data Buffer )則 將外界資料匯流排94 (Data Bus)的資料,存入暫存 器,或將暫存器資料送到外界資料匯流排94。 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297这餐) (諳先閱讀背面之注意事項再填寫本頁) .‘ · n n I n ϋ n A7 466407 五、發明說明(8 ) 需注意的是,上述僅為實施例,而非限制於 、貫袍例 譬如此不脱離本發明基本架構者,皆應為本專利所主張 之權利範圍,而應以專利申請範圍為準。 ------------1' 裝--------訂—-------^ (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 本紙張尺度用中國國家標準(CNS)A4規格(210 X 297这釐)C 466407 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 B7 V. Description of the invention (12) Which B a n k decoding addresses can be sent to the output of z. For example, set the address YG, Y] and I of the mask register 33 in the mapping area! , Set to 0, which means that the three address decoding ranges of X0, Xι, and X2 are valid, and the rest are invalid. Once the address range falls within any of X ^ XhX2, the z output becomes i, otherwise it is 0, and the OR gate circuit 32 is shown in Figure 5. Each address mapper 20 will have a mapping area address mask register 33 and an OR closing circuit 32. If there are three address mappers 20, there will be three mapping area address mask temporary storages. Mang 33 and three OR gate mask circuits 32. The output of each OR gate mask circuit 32 will be sent to a priority encoder 34 (Priority Encode), which will be encoded in a priority manner. For example, if the output of Z2 is 1, the remaining inputs are 0, then the priority encoding The output of the device 34 is two. If more than two sets of inputs are 丨 at the same time, the outputs are coded according to the priority order. The multiplexer 35 determines the selected address mapper 20 according to the output of the priority encoder 34, and outputs the physical mapping address of the set of mappers. When the output of the priority encoder 34 is 0, the output address is the input address, and the circuit does not perform address mapping conversion. FIG. 6 is a block diagram embodiment of a control and interface circuit 40 ((: 〇ntr〇1 & Forward) in the present invention. The control and interface circuit * 〇 is used to set and access the address mapper 20 And the data of the internal register of the mapper selector 30 'output / input decoder 41 (10 Decoder) is used to decode the address of each register for access. The data buffer 42 (Data Buffer) The data of the data bus 94 (Data Bus) is stored in the temporary register, or the register data is sent to the external data bus 94. This paper size is applicable to the Chinese National Standard (CNS) A4 specification (210 X 297 meal) (谙 Please read the notes on the back before filling in this page). '· Nn I n ϋ n A7 466407 V. Description of the invention (8) It should be noted that the above is only an example, not a limitation. Those who do not depart from the basic structure of the present invention should all be the scope of rights claimed by this patent, but should be based on the scope of the patent application. ------------ 1 ' --- Order —------- ^ (Please read the notes on the back before filling out this page) Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs This paper uses the Chinese National Standard (CNS) A4 size (210 X 297 centimeters)
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW89117832A TW466407B (en) | 2000-08-31 | 2000-08-31 | Multiple variable address mapping circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW89117832A TW466407B (en) | 2000-08-31 | 2000-08-31 | Multiple variable address mapping circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
TW466407B true TW466407B (en) | 2001-12-01 |
Family
ID=21660998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW89117832A TW466407B (en) | 2000-08-31 | 2000-08-31 | Multiple variable address mapping circuit |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW466407B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI484627B (en) * | 2010-04-30 | 2015-05-11 | Hewlett Packard Development Co | Connection and addressing of multi-plane crosspoint devices |
TWI722613B (en) * | 2018-11-15 | 2021-03-21 | 美商美光科技公司 | Address obfuscation for memory |
-
2000
- 2000-08-31 TW TW89117832A patent/TW466407B/en not_active IP Right Cessation
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI484627B (en) * | 2010-04-30 | 2015-05-11 | Hewlett Packard Development Co | Connection and addressing of multi-plane crosspoint devices |
TWI722613B (en) * | 2018-11-15 | 2021-03-21 | 美商美光科技公司 | Address obfuscation for memory |
US11042490B2 (en) | 2018-11-15 | 2021-06-22 | Micron Technology, Inc. | Address obfuscation for memory |
US11853230B2 (en) | 2018-11-15 | 2023-12-26 | Micron Technology, Inc. | Address obfuscation for memory |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TW470914B (en) | Executing partial-width packed data instructions | |
TW310406B (en) | ||
CN108268422A (en) | For handling the hardware accelerator framework of very sparse and supersparsity matrix data | |
TW484074B (en) | Vector register file with arbitrary vector addressing | |
CN100410919C (en) | Processor | |
KR101513380B1 (en) | Memories and methods for performing atomic memory operations in accordance with configuration information | |
JPS62208146A (en) | Digital signal processor memory managing unit and method thereof | |
TWI550508B (en) | Apparatus and method for replicating data structures | |
CN105993000B (en) | Processor and method for floating point register aliasing | |
JP3729540B2 (en) | Image processing device | |
KR101517712B1 (en) | Layer blending with alpha values of edges for image translation | |
JPH10187661A (en) | Method for entering scalar value of computer into vector | |
CN108604211B (en) | System and method for multiblock data transactions in a system-on-chip | |
Garrido et al. | An FPGA-based architecture for the versatile video coding multiple transform selection core | |
TW201701151A (en) | Packed finite impulse response (FIR) filter processors, methods, systems, and instructions | |
Bocco et al. | Smurf: Scalar multiple-precision unum risc-v floating-point accelerator for scientific computing | |
WO2024187629A1 (en) | Method and apparatus for vector instruction table filling and lookup in processor, and electronic device | |
TW466407B (en) | Multiple variable address mapping circuit | |
TW516020B (en) | Digital signal processor | |
JP2000322235A (en) | Information processor | |
CN101751356B (en) | Method, system and apparatus for improving direct memory access transfer efficiency | |
US6427200B1 (en) | Multiple changeable addressing mapping circuit | |
JP2000122919A (en) | Processor and memory control method | |
Daroui | A loosely-timed tlm-2.0 model of a jpeg encoder on a checkerboard gpc | |
US20060104361A1 (en) | Variable-length coding apparatus and variable-length coding method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent | ||
MK4A | Expiration of patent term of an invention patent |