TW426832B - Central processing unit having an extension instruction - Google Patents
Central processing unit having an extension instruction Download PDFInfo
- Publication number
- TW426832B TW426832B TW088105623A TW88105623A TW426832B TW 426832 B TW426832 B TW 426832B TW 088105623 A TW088105623 A TW 088105623A TW 88105623 A TW88105623 A TW 88105623A TW 426832 B TW426832 B TW 426832B
- Authority
- TW
- Taiwan
- Prior art keywords
- expansion
- register
- data
- instruction
- column
- Prior art date
Links
- 230000015654 memory Effects 0.000 claims abstract description 79
- 230000006870 function Effects 0.000 claims abstract description 19
- 238000004364 calculation method Methods 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims description 21
- 230000008859 change Effects 0.000 claims description 13
- 230000002079 cooperative effect Effects 0.000 claims description 13
- 230000008901 benefit Effects 0.000 claims description 3
- 230000000295 complement effect Effects 0.000 claims 11
- 230000004048 modification Effects 0.000 claims 9
- 238000012986 modification Methods 0.000 claims 9
- 102100022595 Broad substrate specificity ATP-binding cassette transporter ABCG2 Human genes 0.000 claims 1
- 101000823298 Homo sapiens Broad substrate specificity ATP-binding cassette transporter ABCG2 Proteins 0.000 claims 1
- 239000008186 active pharmaceutical agent Substances 0.000 claims 1
- 230000015572 biosynthetic process Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 3
- 101150012056 OPRL1 gene Proteins 0.000 description 2
- 230000001276 controlling effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 239000002023 wood Substances 0.000 description 2
- VXPSARQTYDZXAO-CCHMMTNSSA-N (4s,4ar,5s,5ar,12ar)-4-(dimethylamino)-1,5,10,11,12a-pentahydroxy-6-methylidene-3,12-dioxo-4,4a,5,5a-tetrahydrotetracene-2-carboxamide;hydron;chloride Chemical compound Cl.C=C1C2=CC=CC(O)=C2C(O)=C2[C@@H]1[C@H](O)[C@H]1[C@H](N(C)C)C(=O)C(C(N)=O)=C(O)[C@@]1(O)C2=O VXPSARQTYDZXAO-CCHMMTNSSA-N 0.000 description 1
- DEXFNLNNUZKHNO-UHFFFAOYSA-N 6-[3-[4-[2-(2,3-dihydro-1H-inden-2-ylamino)pyrimidin-5-yl]piperidin-1-yl]-3-oxopropyl]-3H-1,3-benzoxazol-2-one Chemical compound C1C(CC2=CC=CC=C12)NC1=NC=C(C=N1)C1CCN(CC1)C(CCC1=CC2=C(NC(O2)=O)C=C1)=O DEXFNLNNUZKHNO-UHFFFAOYSA-N 0.000 description 1
- 101150034941 AURKB gene Proteins 0.000 description 1
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 206010011469 Crying Diseases 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
經濟部智慧財i局員工消費合泎fi印製 426832 A7 _____ B7 _______ 五、發明説明() ' —- 發明領域: …本發明有關於提供—具有固定長度指令之中央處理 卓元用^改變1己憶體拉址1偏移及立即資料。 發明背景 ,如由呆5圖所*,一傳统中央處理單元包含—暫存器 標案7’ g其包含GPR(—般目的暫存器)被架構以合適於一 架構其疋區域以令使用者可容易存取及一 SPR(特殊目的 暫存器)’用以特殊目的;一指令暫存器4,用以栓鎖由記 憶體所補上之指令;-解碼/控制部5,用以解碼一 〇p碼 及一運算元,該運算元係被栓鎖於指令暫存器4之中,部 h )也用以依據一指令產生預定控制信號;一運算部6 , 用以處理被解碼於解碼/控制部5中之指令;一記憶體資料 η存器1 $寫入資料於記憶體或由記憶體讀取資料時’ 用以栓鎖爰衝資料;一記憶體位址暫存器2 ,用以拴鎖/ 輸出一計算於程式計算器中之位址:及一控制信號暫存器 3 ’用以緩衝輪入自外侧源之控制信號。 由進制仏元之配置所代表之中央處理單元之指a 係被稱為”機器語言 '其包含一 OP碼,以代表作用,戈 一運算元作為由0P碼所作動之目標。 以add指令’作為〇p碼及運算元之例子,,A=B+c,是 加B及C並儲存結果於,於此1 + 1是一 QP碼’用以代表 運算,及I1及’B'及’c’是為運算元,作為予以運算於其上 之物件。以及,表示法可以以一機器語言加以代表,例如 第4頁 本紙条尺度適用中國國豕標準(CNS〉A4規格(210x297公楚) -----^---1---1------訂------線 (請先聞讀背面之注意事項再填寫本頁} A7 42683 2 五、發明説明() '0001 0000 0001 0010、,0001,代表— 双~ 〇P碼,其# & , 符號代表。_000,,'0001,及,0010_均件 ' A + ^Printed by employees of the Ministry of Economic Affairs, Bureau of Intellectual Property and Finance, printed by Fi 426832 A7 _____ B7 _______ V. Description of the invention () '--- Field of invention:… The invention relates to the provision of central processing with fixed-length instructions. Zhuo Yuan ^ Change 1 Jiyi body pull site 1 offset and immediate data. BACKGROUND OF THE INVENTION As shown in Figure 5 *, a traditional central processing unit contains a register of 7'g which contains a GPR (general purpose register) that is structured to fit a structured area for use. One can easily access and an SPR (Special Purpose Register) for special purposes; an instruction register 4 for latching instructions filled by the memory;-a decoding / controlling section 5 for Decode a 10p code and an operand, which is locked in the instruction register 4 (part h) is also used to generate a predetermined control signal according to an instruction; an arithmetic part 6 is used to process the decoded Instructions in the decoding / controlling section 5; a memory data n register 1 $ when writing data in the memory or reading the data from the memory 'to latch and flush the data; a memory address register 2 For latching / outputting an address calculated in the program calculator: and a control signal register 3 'for buffering the control signal from the outside source. The designation of the central processing unit represented by the configuration of the base unit is called "machine language", which contains an OP code to represent the role, and an operand is the target of the action performed by the OP code. Add command 'As an example of oop code and operands, A = B + c, add B and C and store the result here, where 1 + 1 is a QP code' to represent the operation, and I1 and 'B' and 'c' is an operand, as an object to be calculated on it. And, the representation can be represented by a machine language, for example, the note size on page 4 applies the Chinese national standard (CNS> A4 specification (210x297) ) ----- ^ --- 1 --- 1 ------ Order ------ line (please read the notes on the back before filling in this page) A7 42683 2 V. Description of the invention () '0001 0000 0001 0010 ,, 0001, represents — double ~ 〇P code, its # &, symbol represents. _000 ,,' 0001, and 0010_ equal parts' A + ^
及C係被符號化。二進制數字之代 A * BAnd C are symbolized. Generation of binary numbers A * B
了乂 常被實祐A 六進制數字’因為二進制數太長並很 〜十 , , '遺取。於上述例子 中十7T進制數字之代表變成’Ox .入, 於该機器語言中, 運算元包含一暫存器’ 一記憶體位 料。 ~僞移及立即資 於很多例子中,暫存器之數量係 于被限制至32個。例 如,若暫存器之數量為16,則其可以被 、衣為4位几之運 算元(2“4=16)。但,當記憶體位址中,_ „„ — j2位元中央處 理早7G可以使用4G位元組之記憶體’它將需要位元俨 址作為其代表。因此,定義它的運算元長度變得更長,t 偏置及立即資料中,運算元長度作為記憶體時變得更長於 若運算元長度變長’機器碼之長度也合 若機器語言 之長度更長’則程式之大小增加及效率變差。 因為這些原因,每一中央處理單元應具有—技術方 法,用以有效地代表該運算元3用於iBM個人電腦中之 803 86具有多位元組長度指令。例如,8〇3 86之指令機器 語言’MOV'係基於運算元長度而被定義如下: MOV AL ! 12 BO 12 MOV AX’ 1 2 3 4 — B83412 MOV EAX ’ 1 2345678 — 66B8 78 56 34 n 同時,MC68000具有一類似於8〇386之多個16位元 長度指令。如上所述之可變長度指令具有能代表—運算之 本紙張尺度適用中國國家椟準(CNS ) Α4規格(2】〇χ297公釐) (請先閱讀背面之注意事項再填寫本頁j -% 線 經濟部智慧財產苟員工消費合作社卬製 經濟部智慧財產局員工消費合作7i印製 4 268 3 2 A7 -_______ Β7 五、發明説明() 任何長度之優點,但其缺點在於其變得困難以處理指令解 碼及例外狀態等,因為機器語言之長度被改變了。具有可 變長度指令之中央處理單元被稱為CISC(複雜指令組電 腦)。 另一方面’於RISC(精簡指令集電腦)中,機器語言之 長度是固定的=例如’ MIPS-R3000,SPARC,ARM-7等 具有一 〇2位元固定長度指令’由日立公司所製造之sh_3 具有16位元固定長度之指令。這些固定長度指令使得指 令解碼’例外處理及管路線之採用容易,以實現中央處理 單元之高效能’因為機器語言之定長度之故。相反地,因 為指令長度為固定’所以伴隨著對運算元長度之限制。 例如,MIPS-R3000具有32位元容量之記憶體》但是, 一偏置能夠於機器語言中之代表者為一 16位元,並且為 一 32位元中央處理單元’但立即常數之長度被限制為16 位元"因此,其變成程式編碼困難及其效率降低之原因之 -~~* 〇 同時’ MOVE之指令是一運算,用以拷貝—暫存器之 内各至另一暫存器’其中暫存器運算元具有5位元長度, 因為MIPS-R3000具有32暫存器。假設用於代表,move, 之運算碼係定義為6位元,則固定長度指令可以被定義為 16位元指令。但,為了使用固定長度指令,可〗6位元代 表指令係被代表為3 2位元。但3 2位元固定長度指令具有 運算元長度被限制及具有不必要冗長指令之缺點。 以TR-4101作為另一例子’ TR-4101具有16位元固 __ _ 第e頁 本紙張尺度顧;關家辟(CNS )八4祕(2丨0X297公釐7" I ______ _ ______ 士-n _ n n I K T n n n n I I (請先¾讀背面之注意事項再填寫本頁) 426832 A7 ________B7 五、發明説明() 定長度指令及延伸一部份之固定長度指令及運算元之功 能。例如,一指令'LO AR強制資料被由記憶體來擷取,該 指令包含一 〇P碼’用以代表,L〇AD,及一目標暫存器代表 一暫存器擷取並儲存,一索引暫存器指示一運算元及—記 憶體之位置’以及’一偏置運算元代表離開該運算元及索 引之偏置。為了於16位元長度指令上代表這些〇p碼及各 種運算元,TR-4 1 〇 1限制偏置為5位元,該5位元偏置係 不足以代表記憶體位置^因此,TR-4 1 0 1使用一,擴充,指 0 ‘擴充t指令包含5位元之OP碼及丨丨位元之立即常數 運算元。於此,該11位元立即常數運算元係被依據於,擴 充'指令不一個之指令加以解釋。例如,當丄〇AD,為,擴充τ 之下一指令時’指令ΈΧΤΕΝΙν< η位元即時常數運算元 及指令’L0AD'之5位元偏置彼此連結,以代表1 6位_难 置。 嶝濟部智慧財4¾員工消費合作社印製 TR-410丨之指令擴充技術係只擴充該偏置及立即常數 成為一 16位元並未對傳統RISC中央處理單元所具有之運 算元長度之限制。運算元可擴充指令使得依據指令 ’EXTEND'之出現,所作出運算元之指出。被連結在—起i 先前指令'EXTEND'係被以一指令扣以考量。換句話說於 指令'EXTEND,下一個之例外處理有不能動作之缺點,以及 反應於週邊設備之要求不能即時處理。 因此’為了解決這些缺點及問題 > 本發明之目的係提 供一中央處理單元,其具有一擴充指令,其可以 ^ 1 〇 ^紙浪尺度適用中國Ϊ家標準(CNS )八4说格(210X29?公釐) ^---^__ 4 268 3 2 五、 A7 B7 發明説明() 及RIS C之優點,以代表所有長度之記憶體位址’及偏置 及即時資料,以簡化使用固定指令之指令解碼器’並使得 例外處理容易’使得一管路及Μ M U (记憶體管理單元)被簡 化。 本發明之另一目的係提供一中央處理單元,其具有一 擴充指令,以能夠回到下一常式1其處理擴充指令’哪一 擴充指令處理被停止,在執行一例外處理程序後’即使一 在擴充指令旁之例外狀態發生。 爱1明目的及概述: 為了完成這些目標,具有一擴充指令之中央處理單 元,包含一暫存器檔案,小規模之記憶體單元之暫存器之 集合,其中存取速度是快速的;一内匯流#,連接至暫存 器檔案,以傳送/接收資訊:一外匯流排緩衝器連接至内匯 流排,以連接至一外匯流排;一功能方塊連接至内部匯流 排並用以執行計算功能;一指令暫存器連接至内匯流排並 用以記憶被執行程序中之指令;一控制方塊連接至指令暫 存器並用以解釋指令並產生/輸出一控制信號至暫存器檔 案’内匯流排’外匯流排緩衝器,功能方塊及指令暫存器; 及一或多數狀態旗標,用以代表功能方塊之計算結果狀 態’指令暫存器之狀態,控制方塊之狀態,其中暫存器標 案包含一或多數可存取一般狀態,用以儲存計算源資料及 計算結果並記憶於記憶體位址中,一或多數特殊暫存器, 用以兒憶需用以中央處理單元之操作所需之資訊,及一咬 第8頁 (請先閲讀背面之注意事項再填寫本買) ,?τ 經濟部智慧財產局員工消費合作社印製 * 4 268 3 2 A7 B7 五、發明説明( 多數内暫存器,用以記憶中 作於, 夹處理單元操作所需之特殊功 也於一程式規劃者不能接 罢.壯能暫存器中,計算中間程序 旁,狀態旗標包含可為或 艾户 s 了為程式规劃者所接近之狀態 旗標,及一程式計數器,用 由一特殊暫存器所進行 之程式 < 記憶體位址;程式 从山χ〜 冲數器所指出之程式位址係被 輸出至内匯流排;輸出至 ..,,^ L叫排之程式位址係經由外匯 流排緩衝器輸出至記憶程 、义外C憶體位址;指令係由上 &万法所指出之外記憶體 v 斤凟出並經由外匯流排緩衝器 傳达至内1己憶體;指令係被,… 存在?反畴釋於控制方塊中之 内暫存器之—之指令暫存装 ^ 。,以產生控制信號’以執行指 々並改變一相關狀態旗標,並 '、中被储存於指令暫存器中及 被鲆釋於控制方塊中之指乂 乂 is often used as a hexadecimal number ’because the binary number is too long and very ~ ten,, 'Leave. In the above example, the representative of the ten-digit decimal number becomes 'Ox. In, in this machine language, the operand contains a register' and a memory location. ~ Pseudo-shift and immediate. In many examples, the number of registers is limited to 32. For example, if the number of registers is 16, it can be used as a 4-bit operand (2 "4 = 16). However, when the memory address, _„ „— j2 bit central processing early 7G can use 4G bytes of memory. It will require the bit address as its representative. Therefore, the operand length that defines it becomes longer, and in offsets and immediate data, the operand length is used as the memory. Becomes longer than if the length of the operand becomes longer, 'the length of the machine code is also longer than the length of the machine language', the size of the program increases and the efficiency becomes worse. For these reasons, each central processing unit should have a technical method, 803 86 used in iBM personal computers to effectively represent this operand 3 has multibyte length instructions. For example, the instruction machine language 'MOV' of 803 86 is defined based on the operand length as follows: MOV AL! 12 BO 12 MOV AX '1 2 3 4 — B83412 MOV EAX' 1 2345678 — 66B8 78 56 34 n At the same time, the MC68000 has a number of 16-bit length instructions similar to 8086. It can be changed as described above. The length instruction has the ability to represent-operation Zhang scale is applicable to China National Standards (CNS) Α4 specifications (2) 0 × 297 mm) (Please read the notes on the back before filling out this page. Bureau ’s consumer cooperation printing 7i 4 268 3 2 A7 -_______ Β7 V. Description of the invention () Any advantage of length, but its disadvantage is that it becomes difficult to handle instruction decoding and exception status, because the length of the machine language is changed The central processing unit with variable-length instructions is called CISC (Complex Instruction Set Computer). On the other hand, in RISC (Reduced Instruction Set Computer), the length of the machine language is fixed = For example, 'MIPS-R3000, SPARC, ARM-7, etc. have a 102-bit fixed-length instruction 'sh_3 manufactured by Hitachi has a 16-bit fixed-length instruction. These fixed-length instructions make the decoding of instructions' exception handling and the use of management routes easy, Achieving the high performance of the central processing unit 'because of the fixed length of the machine language. Conversely, because the instruction length is fixed', it is accompanied by a pair of operands For example, MIPS-R3000 has a 32-bit memory. However, the representative of a bias in machine language is a 16-bit, and it is a 32-bit central processing unit. The length is limited to 16 bits. Therefore, it becomes the reason for the difficulty in programming and the decrease in efficiency-~~ * 〇 At the same time, the instruction of 'MOVE is an operation for copying-each in the scratchpad A register, where the register operand has a length of 5 bits, because MIPS-R3000 has 32 registers. Assuming that the operation code for the move is defined as 6 bits, fixed-length instructions can be defined as 16-bit instructions. However, in order to use a fixed-length instruction, a 6-bit representative instruction may be represented as a 32-bit instruction. However, 32-bit fixed-length instructions have the disadvantages of limited operand length and unnecessary lengthy instructions. Take TR-4101 as another example. 'TR-4101 has a 16-bit solid __ _ page e paper size Gu; Guan Jia Pi (CNS) 8 4 secret (2 丨 0X297 mm 7 " I ______ _ ______ -n _ nn IKT nnnn II (please read the precautions on the back before filling this page) 426832 A7 ________B7 V. Description of the invention () Fixed-length instructions and extended part of the functions of fixed-length instructions and operands. For example, A command 'LO AR forces data to be retrieved from memory, the command contains a 0P code' to represent, LOAD, and a target register to retrieve and store on behalf of a register, an index temporary The register indicates an operand and the location of the memory 'and' an offset operand represents an offset from the operand and the index. In order to represent these Op codes and various operands on a 16-bit length instruction, TR -4 1 〇1 Limits the offset to 5 bits. The 5-bit offset is not enough to represent the memory location ^ Therefore, TR-4 1 0 1 uses one, which means that the 0 extension t instruction contains 5 bits. OP code and 丨 丨 bit immediate constant operand. Here, the 11-bit immediate constant operand It is interpreted based on the fact that the 'instruction' is not a single instruction. For example, when 扩充 〇AD is to extend the next instruction of τ, 'instruction ΝΤΤΝΙν < η-bit real-time constant operand and instruction 5 bits Yuan offsets are connected to each other to represent 16 digits_difficult. The Ministry of Economic Affairs and Intellectual Property Co., Ltd. 4¾ printed the TR-410 丨 instruction expansion technology only expands the offset and the immediate constant becomes a 16-bit Limits on the length of operands in traditional RISC central processing units. Operands can be extended to make instructions based on the appearance of the instruction 'EXTEND'. Linked to—from the previous instruction 'EXTEND' A command is taken into consideration. In other words, in the command 'EXTEND, the next exception processing has the disadvantage of being unable to operate, and cannot be processed immediately in response to the requirements of peripheral equipment. Therefore,' to solve these disadvantages and problems > The system provides a central processing unit, which has an extended instruction, which can be applied to the Chinese standard (CNS) standard (210X29? Mm) ^ 1 ^^^ 4 268 3 2 V. A7 B7 Invention description () and the advantages of RIS C to represent memory addresses of all lengths' and offset and real-time data to simplify the use of instruction decoders with fixed instructions' and make exception handling easy ' This simplifies a pipeline and MU (memory management unit). Another object of the present invention is to provide a central processing unit with an expansion instruction to enable return to the next routine 1 to process the expansion instruction ' Which extended instruction processing is stopped after executing an exception handler 'even if an exception occurs next to the extended instruction. Aim1's purpose and overview: In order to achieve these goals, a central processing unit with an extended instruction, including a register file, a small-scale memory unit, a set of registers, where the access speed is fast; a内 汇流 #, connected to the register file to send / receive information: a foreign exchange bus buffer is connected to the internal bus to connect to a foreign exchange bus; a function block is connected to the internal bus and used to perform calculation functions ; A command register is connected to the internal bus and used to memorize the instructions in the executed program; a control block is connected to the instruction register and used to interpret the instruction and generate / output a control signal to the register file 'internal bus 'Forex stream buffer, function block and instruction register; and one or more status flags to represent the status of the calculation result of the function block' The state of the instruction register controls the state of the block, where the register flag The program contains one or more accessible general states for storing calculation source data and calculation results and memorizing them in memory addresses, and one or more special registers It is used to recall the information required for the operation of the central processing unit, and a bite page 8 (please read the precautions on the back before filling in this purchase), printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs * 4 268 3 2 A7 B7 V. Description of the invention (most internal registers are used to memorize, and the special functions required for the operation of the processing unit are not accessible to a program planner. In the strong register, Next to the calculation intermediate procedure, the status flag contains the status flag that can be accessed by the program planner, and a program counter, using a program performed by a special register < memory address; program The address of the program pointed from the mountain χ ~ punch counter is output to the internal bus; output to .. ,, ^ L called the program address is output to the memory process through the foreign exchange buffer, Yiwai C The memory address; the instruction is output from the external memory v indicated by the above & Wanfa and transmitted to the internal memory via the foreign exchange buffer; the instruction is, ... Existed? Explained to the control The instructions in the register in the box—the temporary storage ^., To generate a control signal ’to execute a command and change a related status flag, and the keys stored in the instruction register and interpreted in the control block
7匕〇用以代表運算之0P碼或 0P碼及一運算元攔,其 I ^ 尺多數乜元攔,受到與相 經 濟 部 智 慧 財 產 局 員 工 消 合 作 社 印 製 歸系統作業之運算:〇PM運算元包含—或多數二進 制位兀’其中運算元被解釋/執行為代表記憶體位址之—位 址運算元’代表由記憶於一般暫存器或特殊暫存器中之記 億體位址之偏|,一立即常數運算元代表用以計算或記憶 妞位止或控制,或一代表琢暫存器之暫存器運算元等之立 即:數1包含:-擴充暫存器,只具有-擴充資料欄, 或一擴充暫存器具有擴充資料襴,作為用以記憶擴充資料 於可存取暫存器中之一元件,可存取暫存器中,包含用以 代表1己憶擴充資料及立即常數運算元於擴充暫存器中之 擴充資料櫚中之運算之0P碼之指令係被解釋於控制方塊 中°己憶體互即常數運具元於擴充暫存器之擴充資料欄 -—------ 第9頁 本紙張尺度遥财ϋ國家鱗(CNS ) A4· ( 2lQx297公董) ^268 3 2 五、 發明説明( A7 B7 中’該擴充指令包含〇p^ 馗古把 鳴及運异欄連結於控制方塊中之 擴充 <日令中之運算欄至 糊 於擴无暫存器中之擴充資料 1中之擴充資料,以形成—舶 .運异櫚並被解釋/執行具有新 化成運算攔之指令。 5匕° op碼及運异元欄之修正指令連結記憶於 2暫存器之擴充資料铜中之擴充資料至包含於修正指 :運算元襴’以形成-新指+,使得新形成指令可以 破解釋及執行。 同時’依據本發明’具有一擴充指令之中央處理單元 更I含#无旗標’用以代表擴充暫存器之擴充資料欄之 2態:其係包含程式設計者已經存取之一或多數位元之狀 :旗*中’包含用以代表記憶擴充資料於擴充暫 圩器《擴无資料攔中及立即常數運算元之操作《0P碼係 被解釋於控制方塊中,以記憶立即常數運算元於擴充暫存 R擴充資料糊並執行於㈣方塊中’以改變擴充旗標之 狀態H 0P碼及運算元糊之可擴充指令係依據擴充旗 標狀態被解釋/執行具有唯_包含於可擴充指令於控制方 鬼中之運算元攔之指令,或連結包含於可擴充指令中之運 舁兀欄至被記憶於擴充暫存器中之擴充資料攔之擴充資 ,料,以形成一新運算元棚並被解釋/執行為具有新形成運算 襴之指令,以執行可擴充指令於控制方塊中並改變擴充旗 標狀態。 ' 本發明包含一中央處理翠元·具有一擴充暫存器 ER,用以代表擴充暫存器狀態之機構,一指令用以儲存一 本紙張尺度適用中國國家操率(CNS)八4祕(2!ox 297公董) (請先閲讀背面之注意事項再填寫本頁) 訂 經濟部智慧財產局員工消費合作社印製 第10頁 經濟部智慧財4局員工涓費合作社印製 4 2 68 3 2 4, A7 B7 五、發明説明() 值於ER中,及一指 令用 以 強迫 運算元基於擴充暫存器 狀態不同而加以解釋 0本 發 明可 以實現一具有固定長度. 令之中央處理單元, 並用 以 改變 一記憶體位址,偏置及 即常數之長度。 圖式簡單說明: 本發明將參考附圖加 以說 明 ,其 中: 第 I圖為依據本發明 之中 央 處理 單元之方塊圖11 第: 2圖為中央處理單 元之 管 線之 操作之方塊圖。 第: 3圖為一時序圖^ 例示 出 指令 之執行及管線之解碼。 第‘ 4圖為一方塊圖, 例示 出 一指 令格式,其中擴充旗標 被設定至一狀 ‘態旗 標 〇 第 5圖為一方塊圖, 例示 先 前技 藝之中央處理單元° 圖號對照說明: 1 記憶體資料暫存 器 2 記憶體位址暫存器 3 控制信號暫存器 4 指令暫存器 5 解碼/控制部 6 作業系統 7 暫存器檔案 1 0 資料栓鎖部 20 預指令暫存器 3 0 預解碼器 40 指令暫存器 50 解碼器/控制部 60 算術邏輯敘述單元 70 除法/乘法器 80 暫存器檔案 90 位址產生單元 (請先閱讀背面之注意事項再填寫本頁) 第11頁 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 4268 3 2 Μ Β7 ______ .—-— 五、發明説明() 發明詳細說明: 第1圖為一方塊圖,例帝出具有依據本發明之擴充指 令之中央處理單元之實施例’其中β貫秘例採用一 3 2位 元架構之MCU。這也可能使得MClJ作出以相同方式一匯 流排路徑及寬度擴充及降低’以及,其詳細方塊可以以各 種方法加以定義。但使用32位元MCU之實施例係為簡化 說明之目的。 依據本發明之實施例,/具有擴充栺令之32位元中 央處理單元,包含一暫存器檔案S0,一 32位元匯流排, 一解碼器/控制部5 0,一算術邏輯敘述單元6 0 (此後稱 ALSU),一乘法器/除法器70及一位址產生部90,其中其 指令包含一 1 ό位元並使用〆三階段T線,及一記憶體結 構包含四個8位元記憶體彼此成聯連接。 從現在起,具有一擴充指令之32位元中央處理單元 之每一單元之基本功能及操作將加以說明。 當系統係首先重置時,MC U由一記憶體讀取一開始 位址並將其儲存於資料栓鎖部1 0 3然後,位址值係被儲存 於暫存器擋案8 0中之程式計數器(P C)。只要程式係由以 下週期依序進行,該值係依墟記憶體配置加以增加。位址 產生部9 0指示該值並自該記憶體讀取一使用者所要之程 式。位址產生部90選擇相當於以下指令之元件並資料記 憶體位址,使用它們用於程式之序向及非序向造行’讀取 於該位址之指令並將其栓鎖於前指令暫存器20 ’以順序進 行該程式,或由該記憶體取出必須資料,益將其栓鎖於資 ________第 12 頁- --------------- 本紙張尺度適用中國國家標舉(CNS ) A4規格(210 X 297公釐} (請先閱讀背面之注意事項再填寫本頁} 訂 經濟部智慧財產局員工消骨合作社印製 經濟部智慧財4局員工消費合作社印製 4268 3 2 Λ7 B7 五、發明説明() 料栓鎖部1 0,以執行適當運算。 事實上,若指令開始執行時,用於管線之指令係㈣ 取入預指令暫存器(PIR)20中。預解碼器3〇分類該指令成 為大類型。於此點,大類型係用以基於一管線數量及予以 執行之方法,而分類定義指令成為幾項類似類型,以決定 執行哪一狀態轉換被執行。隨後,指令係被栓鎖於指令暫 存器(IR)40中。解碼器/控制部50指示栓鎖值及來自=解 碼3 0之輸出,並決定相對指令之狀態轉換,以依據每一 狀態產生一控制信號。32位元ALSU60及乘法器/除法器 7〇係被控制信號所作動’以儲存其輸出結果於暫存器樓案 80中。 暫存器檔案80之詳細結構係如第4圖所示。暫存器 檔案80係被區分為GPR及SPR。GPR為一使用者可以容 易存取之區域並包含十六個32位元暫存器。相反地,spR 為一暫存器’其係用於特殊目的並包含一 p c (程式計數 器)’ 一 SP(使用者/監督者堆疊指標),一 LR(連結暫存器), 一 ML/MH(乘法結果低/高暫存器),一 SR(狀態暫存器) 等。於這些暫存器中之LR’ ML/MH及SR係作用如下: L R (連結暫存器):當一分支以非序向程式流發生時, 如上所述程式計數器之值係被儲存於記憶體(堆疊區域)7 D0 is used to represent the 0P code or 0P code of the operation and an operator block. The I ^ rule of the majority block is calculated by the system operation printed and returned to the system by the Consumers' Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs: 0PM operation. The element contains—or most of the binary bits, where the operand is interpreted / executed to represent the memory address—the address operand 'represents the bias of the memory address stored in the general register or the special register | An immediate constant operand is used to calculate or memorize the bit position or control, or an instantaneous register operand that represents the scratch register, etc .: The number 1 contains:-extended register, only-extended data Column, or an expansion register with expansion data, as a component for storing the expansion data in an accessible register, the accessible register contains the expansion data representing 1 The instruction of the 0P code of the operation of the constant operand in the extended data register of the extended register is explained in the control block. ° The memory body is the constant data element of the extended register in the extended register of the extended register. ----- Page 9 The scale remote wealth national scale (CNS) A4 · (2lQx297 public director) ^ 268 3 2 V. Description of the invention (A7 B7 'The expansion instruction contains 0p ^ Extend the operation column in the Japanese order to the expansion data in the expansion data 1 in the expansion register to form -port.yunyi palm and be interpreted / execute the instruction with the new operation block. 5 Dagger ° The correction instructions in the op code and the different element column link the expansion data stored in the expansion data of the 2 register copper to the correction finger: operator 襕 'to form -new finger +, so that the newly formed instruction can be interpreted. At the same time, according to the present invention, the central processing unit with an expansion instruction includes # non-flag to represent the two states of the expansion data column of the expansion register: it contains the data that the programmer has accessed. The state of one or more bits: the flag * contains the data used to represent the memory expansion data in the expansion register "the operation of expanding the data block and immediate constant operands". The 0P code is interpreted in the control block to remember Instantaneous constant operands are stored in the expansion temporary R expansion Fill the data and execute it in the 'box' to change the status of the expansion flag. The H 0P code and the operands of the extensible instruction are interpreted / executed according to the status of the expansion flag. The instruction of the operand block in the instruction, or the expansion data linking the operation column contained in the expandable instruction to the expansion data block stored in the expansion register, is expected to form a new operand shed and be interpreted / Execute is an instruction with a newly formed operation to execute the expandable instruction in the control block and change the status of the extension flag. 'The present invention includes a central processing unit and an extension register ER to represent the extension temporary. Register state organization, an instruction to store a paper size applicable to China National Standards (CNS) Eighty-fourth Secret (2! Ox 297 public director) (Please read the precautions on the back before filling this page) Order the Ministry of Economic Affairs Printed by the Intellectual Property Bureau employee consumer cooperatives page 10 Printed by the Ministry of Economic Affairs ’s Smart Finance 4 Bureau employees' fee cooperatives 4 2 68 3 2 4, A7 B7 V. Description of the invention () Values in the ER, and an instruction to force calculations Motoki Extended register to the state of 0 is explained inventions can be achieved with a fixed length. The central processing unit of order, and changing the length of the address, i.e. the offset, and constants used in a memory. Brief description of the drawings: The present invention will be described with reference to the accompanying drawings, wherein: Fig. I is a block diagram of a central processing unit according to the present invention. Fig. 11: Fig. 2 is a block diagram of the operation of the pipeline of the central processing unit. Figure 3 is a timing diagram ^ illustrates the execution of instructions and decoding of the pipeline. Fig. 4 is a block diagram illustrating an instruction format in which the expansion flag is set to a state flag. Fig. 5 is a block diagram illustrating the central processing unit of the prior art. 1 Memory data register 2 Memory address register 3 Control signal register 4 Instruction register 5 Decoding / control section 6 Operating system 7 Register file 1 0 Data latch section 20 Pre-instruction register 3 0 pre-decoder 40 instruction register 50 decoder / control unit 60 arithmetic logic description unit 70 division / multiplier 80 register file 90 address generation unit (please read the precautions on the back before filling this page) 11 pages of this paper are in accordance with Chinese National Standards (CNS) A4 specifications (210X297 mm) 4268 3 2 Μ B7 ______. --- 5. Description of the invention () Detailed description of the invention: Figure 1 is a block diagram. An embodiment of a central processing unit with extended instructions according to the present invention, wherein the β-pass secret uses a 32-bit MCU. This may also allow MClJ to make a bus path and width expansion and reduction 'in the same way and its detailed blocks can be defined in various ways. However, the embodiment using a 32-bit MCU is for the purpose of simplifying the description. According to an embodiment of the present invention, a 32-bit central processing unit with an expansion command includes a register file S0, a 32-bit bus, a decoder / controller 50, and an arithmetic logic narrative unit 6 0 (hereafter referred to as ALSU), a multiplier / divider 70 and an address generation unit 90, wherein the instruction includes a 1 bit and uses a three-stage T line, and a memory structure includes four 8 bits The memories are connected to each other. From now on, the basic functions and operations of each unit of a 32-bit central processing unit with an extended instruction will be explained. When the system is first reset, the MC U reads the start address from a memory and stores it in the data latch section 103. Then, the address value is stored in the register file 80. Program counter (PC). As long as the program is performed sequentially from the following cycle, the value is increased according to the memory configuration. The address generating section 90 indicates the value and reads a program desired by the user from the memory. The address generation unit 90 selects the components equivalent to the following instructions and the data memory addresses, and uses them for program direction and non-sequence direction to read the instructions at the address and lock them in the previous instruction temporary. Register 20 'to carry out the program in order, or take out the necessary data from the memory, and lock it in the ________ page 12---------------- This paper Standards are applicable to China National Standards (CNS) A4 specifications (210 X 297 mm) (Please read the notes on the back before filling out this page) Order the staff of the Intellectual Property Bureau of the Ministry of Economic Affairs, print the bones of the cooperative, and print the employees of the Ministry of Economic Affairs, the Smart Assets 4th Bureau Printed by the Consumer Cooperative 4268 3 2 Λ7 B7 V. Description of the invention () The material latches 10 to perform appropriate calculations. In fact, if the instruction starts to execute, the instruction for the pipeline is fetched into the pre-instruction register (PIR) 20. The pre-decoder 30 classifies the instruction into a large type. At this point, the large type is used based on the number of pipelines and the method to be executed, and the classification definition instruction becomes several similar types to determine the execution Which state transition is performed. Then the instruction is tied Locked in the instruction register (IR) 40. The decoder / controller 50 instructs the latch value and the output from = decode 30, and determines the state transition of the relative instruction to generate a control signal according to each state. 32 Bit ALSU60 and multiplier / divider 70 are actuated by the control signal to store their output results in register case 80. The detailed structure of register file 80 is shown in Figure 4. Temporary storage The device file 80 is divided into GPR and SPR. GPR is an area that can be easily accessed by the user and contains sixteen 32-bit registers. On the contrary, spR is a register. It is used for special purposes And includes a pc (program counter) 'an SP (user / supervisor stacking index), an LR (link register), an ML / MH (multiplication result low / high register), and an SR (status temporary Register) etc. The functions of LR 'ML / MH and SR in these registers are as follows: LR (Link Register): When a branch occurs in a non-sequential program flow, the value of the program counter as described above Stored in memory (stacked area)
I 中。然後’於遠端函數中,用以接收位址回來之運算及呼 叫葉函數之運算是容易被作動。考量這些點,當呼叫葉函 數時’位址並未儲存於記憶體中。相反地’連結暫存器係 用以其暫時儲存。當功能之操作經由上述處理停止及位址 ___第彳3頁 本紙張尺度適用中國國家標率{ CNS ) A4規格(210X297公釐) - -----^---^----i,------訂------線 (請先閣讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 4 2 68 3 / at B7_ 五、發明説明() 值被取回時,系統效能係因為記憶體不必再讀取而被加 強。 ML/MH(乘法結果低/高暫存器):於MCU中,有一乘 法器及除法器》因此,這兩暫存器係用以暫時儲存其操作 結果。 S R(狀態暫存器):這暫存器係用以儲存各種於計算程 序中之狀態值於所有M C U中,其係為代表中央處理單元 之狀態之狀態旗標之集合。 依據本發明之具有一擴充指令之中央處理單元更包 含一擴充暫存器(ER)於暫存器檔案80中及一擴充旗標代 表指令之擴充狀態。於此實施例中,擴充暫存器係被安排 於S P R中,但其位址是無關於任何程式師所能存取之位 址,但於此實施例中係定位於SR中。 擴充暫存器(ER):擴充暫存器係用以暫時地儲存一偏 置或立即資料值,並產生一預定量之運算元。於此實施例 中,代表擴充暫存器之擴充旗標係被包含於狀態暫存器 中 。 ER之總長度係依據中央處理單元之字元長度加以改 變並於16位元之中央處理單元中具有等於或少於16位元 之長度,一等於或少於32位元中央處理單元中之32位元 及一等於或少於64位元中央處理單元中之64位元。於 此,E R之3 2位元長度係被解釋成為一例子,但應注意的 是其係試著去使說明容易而不是限定中央處理單元之ER 長度及字元長度。 第14頁 本紙伖尺度適用中國國家標率(CNS ) Α4規格(2! Ο X 297公嫠) ----^-------V.------訂------線 (請先閱讀背面之注意事項再填寫本頁) 426832 A7 B7 五、發明説明( EF應為具有超過可以容易為規劃者存取之!位元長 度之形狀。於中央處理單元中之一些旗標及暫存器包含不 (請先閲讀背面之注意事項再填寫本頁) 可以為規劃者所存取者。於本發明之f施例中,Η係被 解釋為狀態暫存器之一仕分.力庳泞立认3 位疋及應立思的是其係想要使說 明容易’而不是限#1] EF之實施方式。同時,本發明之中 央處理單元儲存資料於ER中並包含擴充旗標(Μ),以代 表擴充暫存器之使用與非使用,並分離指令以有效地使用 ER ’而不&使用EF。於此實施例中’ & EF被使用之例子 係被說明。 本發月之中央處理單元具有指令’用以同時儲存資料 於ER中’设定EF於”厂,,其係被稱為"Lderp,為了解釋 方便。同時’假設16位元固定長度指令是用於32位元中 央處理單元中’及指令_LDERI,之運算係被定義為一 M位 元立即常數,該指令句係如下: LDERI #123 锒 經濟部智慧財產局貞工消費合作社印製 算術位移ER左移14位元長並操作以加入運算元部之 '123’至ER,若EF為於執行指令前=算術位移是利用用 於本發明之ER之一例子。另外,也有一方法,以運算元 量由低效位元填充,一種用以以被放置於固定位置之運算 元來利用ER,用於每一指令,eR可以被一方法所使用’ 使得規劃者可存取於各種方式,若E F為_,0"於執行指令 前,中央處理單元擴充'123,符號,其係為指令之一運算元 部份’以完成一 3 2位元並將其存於E R中。於兩例子中’ E F被設定為"1 ” s 第15頁 本纸張尺度適用中國國家標準(CNS ) A4規格(210 X 297公釐) 4 ? RB 3 2 A7 B7 五、發明説明() 指令"IDERi"之運算元長度係依據另一指令之定義加 以決定,該指令於本發明中並未限制其長度。若用於立即 常數作為於指令’LDERI1之運算元之例予被採用,則應注意 的是不同類型之運算元,例如一記憶體位址等,可以被使 用β例如,一 p C相對定址可以被使用。其表示本發明可 以具有一或多數指令機構,用以加載資料至ER中。 依據本發明之具有擴充指令之中央處理單元具有一 般指令之先前技藝,於其間,一需要改變運算元之指令具 有不同點在於依據EF狀態解釋運算元。例如,於具有1 6 位元固定長度指令之32位元中央處理單元中,一指令 ’JMP'具有8位元固定長度者係被表示如下: JMP 偏置 指令'JMP'係為一指令,用以改變程式之順序,其執行 定位開於指令下一個之現行程式位置偏置。跳動之偏置位 置係被限制於-1 2 8位元組至-1 2 7位元組之範圍内,因為 偏置長度係被一 8位元所指定。 於此例子中,其係依據EF之狀態,而偏置被解釋為 2,若ΈΓ為’01,則偏置長度被解釋為一 8位元。若'EF1為 'Γ,則中央處理單元算術移位ER之值向左8位元並隨後 加入於指令中所代表之8位元偏置,以計算偏置。因此, 指令之運算元係被擴充,以具有一 3 2位元偏置。實施例 採用利用ER之方法,藉由使用於各種ER利用方法中之 算術移位法。 移動ER至左之距離係依據指令而不同=於先前例子 第16頁 本紙張尺度適用中國國家標準(CNS ) Α4規格(210XW7公釐} (請先閲讀背面之注意事項再填寫本頁) • -Μ- 、1Τ 線 經濟部智慧財4局員工消費合作杜印製 ^268 3 2 Α7 Β7 五、發明説明() 中’指令’LDERI’移動14位元,及指令1JMP1多動8位元。 EF旗標為指令_LDERI‘所變成'1'及於所有指示EF暫 存器除了指令’LDERI,外之指令為但是,EF旗標可以 依據所實施之方法而具有不同值,以及’不同實施方式, 代表指令擴充之狀態。 考量另一例子,當TDERI’之運算元長度是於具有16 位元固定長度指令之64位元中央處理單元中之12位元 時’其假設程式之操作如下: LDERI #oprl : INSTRUCTION-1 LDERI #opr2 : INSTRUCTION-2 LDERI #opr3 : INSTRUCTION-3 LDERI #opr4 : INSTRUCTION-4 JMP Offset : INSTRUCTION-5 假設於執行,INSTRUCTION-Γ前EF為,0,,ER具有一 值延伸至’oprl·之符號至一 64位元為’INSTRUCTION-11, 以及,EF於'INSTRUCTI0N-1_中變成'Γ並具有一加入 'opC之一值。於ER利用法Φ,例如算術位移至左也是一 例子。同時,若例外發生、則例外處理應於事先被執行, 而不必執行,INSTRUCT ION-3、 於具有依據本發明之具有擴充指令之中央處理單元 中,因為EF及ER係為暫存器並規劃以允許程式設計師存 取’其内容係可以保留於儲存其於記憶體之堆疊及缓衝器 中之方式。於完成例外處理後,若儲存於堆疊及記憶體中 之ER及EF係被再加載為iNSTRUCTION-3'之後之下一 第17頁 本紙張尺度適用中國國家標隼(CNS ) A4規格(2!(TX 297公釐) (請先閱讀背面之注意事項再填寫本頁) -1Τ 經濟部智慧財產局員工消費合作社印製 426 8 3 2 A7 B7 經濟部智慧財產Βε-R工消費合作社印製 五、發明説明() 指令可以適當地執行。同時,即使於例外處理之另一例外 發生時,ER及EF係被依序儲存並再加載,以確保程式之 正確執行。’INSTRUCTION-5,之偏置長度是48位元’導敌 由,INSTRUCTI〇N-l_ 至,INSTRL'CTI0N-4_之運算元係被彼 此相加,其中instruction-s'所有之8位元偏置係被加 入,以取得56位元之長度。 結果,具有依據本發明之擴充指令之中央處理單元係 被認為所有指令具有固定長度並被獨立地執行並可以具 有可變長度之運算元。 第4圖為一方塊圖,例示出一暫存器檔案架構及—指 令格式,其中依據具有擴充指令之中央處理單元之實施例 被設定有一擴充旗標。 如於圖中所示,一狀態暫存器之每一位元代表_預定 狀態。於此,應注意第19位元是一如上述之擴充旗標, 其決定下一指令採一較短值或一擴充值作為—偏置咬— 立即值。當然’於狀態暫存器中之一位元之實施例中,例 如第1 9位元係被使用作為一旗標,但其只能有—例 可以經由各種方法實際實施於硬體中。 第2圖例示用於該實施例中之MCU之管路如何操作 之例子。如上所述’三階段管路擷取—解碼—執行係被 用°這表示為每一週期所取之指令被稱為,符罡 J 叫+寄係被揭 取,解碼及執行》LD/ST係為指令,其由々惜袖)、 U ?買取/寫入 資料’該記憶體另外需求一陪段以取得—右 w双位址。同 時’中央處理單元協助多重移位指令,而不 跑 求,除及遞 第18頁 各紙张尺度適用中國國家標準(CNS ) A4規格(21〇X297公釐) ί靖先開讀背面之注意事硕再填寫本頁) -支 -=° 織I. Then, in the remote function, the operation for receiving the return address and the operation of the call leaf function can be easily operated. Considering these points, the 'address' is not stored in memory when calling the leaf function. Conversely, the 'link register' is used for its temporary storage. When the operation of the function is stopped by the above processing and address ___ page 3, this paper size applies the Chinese national standard {CNS) A4 specification (210X297 mm)------ ^ --- ^ --- -i, ------ Order ------ line (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 4 2 68 3 / at B7_ V. DESCRIPTION OF THE INVENTION When the () value is retrieved, the system performance is enhanced because the memory no longer needs to be read. ML / MH (multiplication result low / high register): In the MCU, there is a multiplier and divider. Therefore, these two registers are used to temporarily store their operation results. S R (state register): This register is used to store various state values in the calculation program in all MCUs. It is a collection of state flags representing the state of the central processing unit. The central processing unit having an expansion instruction according to the present invention further includes an expansion register (ER) in the register file 80 and an expansion flag representing the expansion status of the instruction. In this embodiment, the expansion register is arranged in SPR, but its address is not related to the address that any programmer can access, but it is located in SR in this embodiment. Expansion Register (ER): The expansion register is used to temporarily store a biased or immediate data value and generate a predetermined amount of operands. In this embodiment, the expansion flag representing the expansion register is included in the status register. The total length of the ER is changed according to the character length of the central processing unit and has a length of 16 bits or less in a 16-bit central processing unit, and a length of 32 or less in a 32-bit central processing unit. And 64 bits in a central processing unit equal to or less than 64 bits. Here, the 32-bit length of ER is explained as an example, but it should be noted that it tries to make the description easier rather than limiting the ER length and character length of the central processing unit. Page 14 The standard of this paper is applicable to China National Standards (CNS) Α4 specifications (2! 〇 X 297 Gong) ---- ^ ------- V .------ Order ---- --- line (please read the notes on the back before filling this page) 426832 A7 B7 V. Description of the invention (EF should be a shape with a length that exceeds the length that can be easily accessed by planners! Bits in the central processing unit Some flags and registers contain no (please read the notes on the back before filling out this page) and can be accessed by planners. In the embodiment of the present invention, it is not interpreted as the status register One official point. It is important to recognize the three positions and it should be considered that it is an implementation of EF that is not limited to # 1] EF. At the same time, the central processing unit of the present invention stores data in the ER and The extension flag (M) is included to represent the use and non-use of the expansion register, and separate instructions to effectively use ER 'without & using EF. In this embodiment, the example of' & EF being used is It is explained that the central processing unit of this month has the instruction 'to store data in ER at the same time' to set EF in the factory, which is called " Lderp, for convenience of explanation. At the same time, 'assuming that a 16-bit fixed-length instruction is used in a 32-bit central processing unit' and the instruction _LDERI, the operation system is defined as an M-bit immediate constant, the instruction sentence system It is as follows: LDERI # 123 智慧 The Intellectual Property Bureau of the Ministry of Economic Affairs and the Jeonggong Consumer Cooperative Co., Ltd. prints the arithmetic shift ER to the left by 14 bits and operates to add the '123' to the ER of the arithmetic unit. If EF is before the execution of the instruction = arithmetic shift It is an example of using the ER used in the present invention. In addition, there is also a method for filling an inefficient bit with an operand amount, and using an ER with an operand placed at a fixed position for each instruction , ER can be used by a method to allow planners to access various methods. If EF is _, 0 " Before executing the instruction, the central processing unit expands the '123, symbol, which is an operand part of the instruction. 'To complete a 32-bit and store it in the ER. In both examples' EF is set to " 1 s s page 15 This paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 Mm) 4? RB 3 2 A7 B7 V. Hair It is clearly stated that the length of the operand of the () instruction " IDERi " is determined according to the definition of another instruction, which does not limit its length in the present invention. If used for an immediate constant as an example of the operand in the instruction 'LDERI1' If it is adopted, it should be noted that different types of operands, such as a memory address, etc., can be used. For example, a p C relative addressing can be used. It means that the present invention can have one or more instruction mechanisms, using To load data into the ER. The central processing unit with extended instructions according to the present invention has the prior art of general instructions. Among them, an instruction that needs to change an operand is different in that it interprets the operands based on the EF state. For example, in a 32-bit central processing unit with a 16-bit fixed-length instruction, an instruction 'JMP' having an 8-bit fixed length is represented as follows: JMP Offset instruction 'JMP' is an instruction, using In order to change the sequence of the program, its execution positioning starts at the current program position offset next to the instruction. The run-out offset position is limited to -12 8 bytes to -12 7 bytes, because the offset length is specified by an 8-bit. In this example, it is based on the state of EF, and the offset is interpreted as 2. If ΈΓ is '01, the offset length is interpreted as an 8-bit. If 'EF1 is' Γ, the value of the arithmetic shift ER of the central processing unit is 8 bits to the left and then added to the 8-bit offset represented in the instruction to calculate the offset. Therefore, the operand system of the instruction is expanded to have a 32-bit offset. Example The method using ER is adopted, and the arithmetic shift method used in various ER using methods is adopted. The distance of moving ER to the left is different according to the instructions. = In the previous example, page 16 of this paper applies Chinese National Standard (CNS) Α4 specification (210XW7 mm) (Please read the precautions on the back before filling this page) Μ-, 1T Consumer Finance Department of Wisdom and Finance Bureau of the Ministry of Economics, Printed with DuPont ^ 268 3 2 Α7 Β7 V. Description of the Invention () Instruction 'LDERI' moves 14 bits, and instruction 1JMP1 moves 8 bits. EF The flag is changed to '1' by the instruction _LDERI 'and all instructions that indicate the EF register except the instruction' LDERI 'are, however, the EF flag can have different values depending on the method implemented, and' different implementations' , Represents the state of instruction expansion. Consider another example, when TDERI's operand length is 12 bits in a 64-bit central processing unit with a 16-bit fixed-length instruction, its hypothetical program operates as follows: LDERI #oprl: INSTRUCTION-1 LDERI # opr2: INSTRUCTION-2 LDERI # opr3: INSTRUCTION-3 LDERI # opr4: INSTRUCTION-4 JMP Offset: INSTRUCTION-5 Assume that the EF before INSTRUCTION-Γ is 0, and ER has a Extends the symbol of 'oprl · to a 64-bit element' INSTRUCTION-11 ', and EF becomes' Γ in 'INSTRUCTI0N-1_' and has a value of 'opC'. It is used in ER, such as arithmetic shift To the left is also an example. At the same time, if an exception occurs, the exception processing should be performed in advance without having to execute, INSTRUCT ION-3, in the central processing unit with extended instructions according to the present invention, because EF and ER are It is a register and is planned to allow programmers to access' the content can be retained in the stack and buffer stored in memory. After the exception processing is completed, if stored in the stack and memory, ER and EF are reloaded as iNSTRUCTION-3. The next page of this page applies to the Chinese National Standard (CNS) A4 specification (2! (TX 297 mm). (Please read the precautions on the back before (Fill in this page) -1Τ Printed by the Intellectual Property Bureau of the Ministry of Economic Affairs' Consumer Cooperatives 426 8 3 2 A7 B7 Printed by the Intellectual Property of the Ministry of Economic Affairs ε-R Industrial Cooperative Cooperatives 5. Inventive Instructions () The instructions can be properly implemented. At the same time, even if Exception When another exception occurs, ER and EF are sequentially stored and reloaded to ensure the correct execution of the program. 'INSTRUCTION-5, the offset length is 48 bits' leading enemy, INSTRUCTION-l_ to The arithmetic units of INSTRL'CTI0N-4_ are added to each other, in which all 8-bit offsets of instruction-s' are added to obtain a length of 56 bits. As a result, the central processing unit having the extended instructions according to the present invention is considered to be that all instructions have a fixed length and are executed independently and can have variable length operands. Fig. 4 is a block diagram illustrating a register file structure and an instruction format, in which an expansion flag is set according to an embodiment of a central processing unit having an expansion instruction. As shown in the figure, each bit of a state register represents a predetermined state. Here, it should be noted that the 19th bit is an extended flag as described above, which determines that the next instruction adopts a shorter value or an extended value as the -offset bit-immediate value. Of course, in the one-bit embodiment of the state register, for example, the 19th bit system is used as a flag, but it can only have-examples can be actually implemented in hardware through various methods. Fig. 2 illustrates an example of how the pipeline used for the MCU in this embodiment operates. As mentioned above, the “three-stage pipeline fetching-decoding-executing system” is used. This means that the instruction fetched for each cycle is called, the symbol 罡 J is called + the host system is uncovered, decoded and executed. LD / ST It is an instruction, which is composed of regret sleeves.) U? Buy / write data. This memory also needs a companion segment to obtain-right w double address. At the same time, the 'Central Processing Unit' assists multiple shift instructions without running requests, except that the paper dimensions on page 18 apply the Chinese National Standard (CNS) A4 specifications (21 × 297 mm). Master then fill out this page)-支-= ° 织
,^'移’其中多重係為一指令,其不能於此一單循環内冗 成執仃,其中典型管路係代表該指令。第3圖為一管路如 可強迨指令被擷取,解碼及執行之時序圖。 、現在為此,本發明之一般運算流係被討論。再者,於 依據本發明之32位元中央處理單元中之擴充指令之運算 將加以詳細說明如下: 於般彳曰令執行時’無上述之無擴充指令,一 MCU 執行以下兩運算,當擴充指令被產生時。 。首先,狀態暫存器之第]9位元係被改變至,丨•(於負邏 輯中為’〇_)。若第19暫存器被設定為,「,則下一指令檢測 孩旗標。隨後,若指令代表READ/WRITE之運算,則其 運异強迫ER表示其為-偏置值’若指令為ALsu之内部 操作時,則其操作以強度ER以表示為一立即值。 第二,想要之偏置或立即值係被帶入£R中,其中有 兩狀態。第一狀態中,擴充指令係被啟始使用,, ^ 'Move' where the multiple system is an instruction, which cannot be redundantly executed in this single cycle, where a typical pipeline system represents the instruction. Figure 3 is a timing diagram of a pipeline that can be fetched, decoded and executed. To this end, the general computational flow of the present invention is discussed. Furthermore, the operation of the extended instructions in the 32-bit central processing unit according to the present invention will be described in detail as follows: When executed in a general order, 'there are no extended instructions mentioned above, an MCU performs the following two operations. When the instruction is generated. . First, the 9th bit system of the state register is changed to 丨 • ('0_ in negative logic). If the 19th register is set to, ", the next instruction detects the child flag. Then, if the instruction represents the operation of READ / WRITE, its operation forces the ER to indicate that it is a -bias value '. If the instruction is ALsu In the internal operation, the operation is expressed by the intensity ER as an immediate value. Second, the desired offset or immediate value is brought into £ R, which has two states. In the first state, the extended instruction system Is being used,
^考 E R 之值已經被使用,即使擴充指令係事先被發出,於—_ ^ 狀 態中,E R值並未被使用離然擴充指令已經被事先執 為了解釋它 '假設擴充指令係被定義如下表。 — t------訂------緣 (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財4笱費合作社印製^ The value of ER has been used, even if the extended instruction is issued in advance, in the __ ^ state, the ER value has not been used. The extended instruction has been executed in advance to explain it. 'Assume that the extended instruction system is defined as follows. . — T ------ Order ------ Fate (Please read the notes on the back before filling out this page) Printed by the Ministry of Economic Affairs 4
* : IR[13 : 0],立即資料 表1.擴充指令之例子 第1S頁 本紙張尺度適用中國國家標隼(CNS ) A4規格ί 210X297公釐) A7 4 2 5-0 B7 五、發明説明() 於第1例子中,表示於表1中之14位元係被填入於 ER之0位元之1 3位元中,其高效位元係被立即資料之最 高效位元所填滿作為符號擴充。於第二例子中,因為1 4 位元已經被填於13位元至ER之0位元,於移動14位元 至左時,以保留該值=·算術移位係被用作為一例子。除了 該方法,如上所述,2 7位元至1 4位元可以填滿用於擴充, 以1 3位元至0位元被保持於其本身。經由上述處理,擴 充指令之重覆執行可以無限地擴充該偏置及立即值。 再者,可以發生於擴充指令後之一指令之運算將加以 說明。 首先,來看於資料移位指令中之指令係如何由記憶體 讀取資料或寫資料於記憶體上係如何操作成為一位址偏 移,該指令將如表2所定義,為方法說明起見。 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 & & & & U 木 * * * % 卜 % % & : IR[15 : 12],OP-Code(負載 / 儲存) # : IR[1 1 : 8],起源/目的暫存器 * : IR[7 : 4],偏移資料 % : IR[3 : 0],索引暫存器 表2,一 32位元負載/儲存指令例 當指令被執行時,於狀態暫存器之第1 9位元之擴充 旗標係首先被指向一解碼器'控制部50。若旗標值為(負 第20頁 太紙張尺度適用中國國家標单(CNS ) A4規格(210X 297公釐) ---- ----^----R------訂------線 (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產苟員工消費合作^.;'·'" A7 426832 B7 五、發明説明() 邏輯時為'Γ)時,則有效位址代表予以加偏移至索引暫存 器之值之一值。於此,有一項目考量了有關記憶體之資料 寬度,因為各種之架構均為可用的 '例如架構於四個8位 元記憶體可以被彼此並聯連接,令使用者方便使用,或 者,兩個ί 6位元記憶體可以.彼此並聯連接。如上所述, 假設於四個8位元記憶體可以彼此並聯連接之實施例中。 此時,當加入偏移之時,必須移動偏移值向左兩位元。因 此,低效之兩位元並無意義,因為現行予以執行之指令為 一 32位元負載/儲存指令。但於旗標值為'1'(於負邏輯為W) 時,則表示擴充指令被隨後執行,以移位該予以擴充之偏 移於ER。因此,有效位址移動ER值向左四位元,其中包 含於該指令中之四位元之低效兩位元係被向左移2位元, 以加入索引暫存器之值至其中,然後,取得有效位址。當 然,予以向左位移之ER之量係基於定義加以改變,但於 此為了指令之一貫性係被定義為只移位 4 位元。於此例 子中,3 2位元負載/儲存指令使得一予以存取之使用者定 址,直到索引暫存器+63。但,若偏移超過63 ',則超過15 之值係被移位入ER,使用擴充指令及3 2位元負載/儲存指 令被執行,以使得使用者可存取想要之位址。這代表一如 下之簡單算術表示法: 當Ε旗標為; EAe(零擴充[R[7: 4]&"00") + Rindex 當E旗標為’11 ; EA<i=(ER<<4&IR[5 : 4 ] & " Ο Ο " ) + R, n dex 第21頁 r、紙張尺度逋用中國國家標準ί CNS ) ,\4規格(210X 297公釐) (請先閒讀背面之注意事項再填寫本頁 τ Ί 線 經濟部智慧时每!"員工消費合"让印製 4 2 68 3 ? A7 B7 五、發明説明() 再者,考量當資料移位指令之立即資料值被立即加載 時,指令將被定義為如表3所指示。 15 14 13 12 11 10 9 8 7 6 5 4 •η 2 1 0 IR[15:0] & & !& & U -U. # # * * 丰 * t 木 * &: IR[15: 12],OP-Code(負載立即值資料) # : IR[11 : 8],目的暫存器 * : IR[7 : 0],編碼立即資料 表3,負載立即資料指令之例子 可由表3明顯看出,例如,一具正負號7位元立即值’ -256至+25 5可以經由該負載立即指令負載至目的暫存器 中。但,若想要之立即值係超出-25 6至+255之範圍,則 擴充指令係首先被執行以移動想要立即值至ER ’然後’ 負載立即指令被執行,以取得想要之立即值。於此例子 中,負載立即指令係被栓鎖至指令暫存器40。為了執行 它,狀態暫存器之第1 9位元係被指稱’當解碼器/控制部 5 0產生一控制信號時。若旗標值為’ 〇'(負邏輯為'1 '),於指 令中之7位元立即值’例如-2 5 6至+ 2 5 5係被加載至目標 暫存器中並被向左移位4位元’然後指令之低效4位元係 被填入於移位位置中,以加載一想要大小之立即值。當 然,予以移位向左之ER量或予以填入其中之值係可基於 指令之定義而可改變的。若3 2位元立即值係被所定義之 指令所要求,則擴充指令係被執行兩次,以移動高效24 第22頁 氏張尺度適用中國國家標準(CNS ) A4規格(210X 297公釐) ------1---是,-------訂------後 (請先閱讀背面之注意事項再填寫本頁) 426832 A7 B7 五、發明説明() 位元進入ER。此後,負載立即指令係被執行,以取得32 位元立即值。其係被表示為如下之簡單算術表示法·_ (#先閱讀背面之注意事項再填寫本頁) 當E旗標為W ;*: IR [13: 0], immediate data sheet 1. Examples of extended instructions Page 1S The paper size is applicable to China National Standard (CNS) A4 specifications 210X297 mm A7 4 2 5-0 B7 V. Description of the invention () In the first example, the 14 bits shown in Table 1 are filled in the 13 bits of the 0 bit of the ER, and the most significant bits are filled with the most efficient bits of the immediate data. As a sign extension. In the second example, since 14 bits have been filled from 13 bits to 0 bits of ER, when shifting 14 bits to the left, keeping the value = · Arithmetic shift system is used as an example. In addition to this method, as described above, 27 bits to 14 bits can be filled for expansion, and 13 bits to 0 bits are held in itself. Through the above processing, repeated execution of the extended instruction can extend the offset and immediate value indefinitely. Furthermore, the operation of an instruction that can occur after the extended instruction will be explained. First, let's see how the instruction in the data shift instruction reads data from the memory or writes data to the memory and how it operates as a bit offset. The instruction will be as defined in Table 2 for the method description. see. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 & & & & U wood * * *%%%% &: IR [15: 12], OP-Code (Load / Storage ) #: IR [1 1: 8], origin / destination register *: IR [7: 4], offset data%: IR [3: 0], index register table 2, a 32-bit payload / Sample instruction example When the instruction is executed, the expansion flag of the 19th bit in the state register is first directed to a decoder 'control section 50. If the flag value is (negative page 20, the paper size is applicable to China National Standard (CNS) A4 size (210X 297 mm) ---- ---- ^ ---- R ------ order ------ line (please read the notes on the back before filling out this page) Intellectual property of the Ministry of Economic Affairs and employee cooperation ^ .; '·' " A7 426832 B7 V. Description of invention () Logic is' Γ ), The effective address represents one of the values added to the index register. Here, one item considers the data width of the memory, because various architectures are available. For example, four 8-bit memories can be connected in parallel to each other for user convenience, or two 6-bit memory can be connected in parallel with each other. As described above, it is assumed in the embodiment that four 8-bit memories can be connected in parallel with each other. At this time, when adding an offset, the offset value must be shifted to the left by two bits. Therefore, the inefficient two bits are meaningless because the current instruction to be executed is a 32-bit load / store instruction. However, when the flag value is '1' (when negative logic is W), it means that the expansion instruction is subsequently executed to shift the offset to be expanded to the ER. Therefore, the effective address shift ER value is four bits to the left, and the inefficient two bits of the four bits included in the instruction are shifted to the left by two bits to add the value of the index register to it. Then, obtain a valid address. Of course, the amount of ER to be shifted to the left is changed based on the definition, but here for consistency of instructions it is defined to shift by only 4 bits. In this example, a 32-bit load / store instruction causes an accessed user to be addressed until the index register +63. However, if the offset exceeds 63 ', the value exceeding 15 is shifted into the ER, and the expansion instruction and 32-bit load / store instruction are executed so that the user can access the desired address. This represents a simple arithmetic notation as follows: When the E flag is; EAe (zero extension [R [7: 4] & " 00 ") + Rindex When the E flag is '11; EA < i = (ER < < 4 & IR [5: 4] & " Ο Ο ") + R, n dex p. 21r, paper size adopts Chinese national standard CNS), \ 4 specifications (210X 297 mm) (Please read the precautions on the back before you fill out this page. Τ Ί The Ministry of Online Economy is smart every time! &Quot; Employee Consumption " Let's print 4 2 68 3? A7 B7 V. Description of the invention () Furthermore, consider when When the immediate data value of a data shift instruction is loaded immediately, the instruction will be defined as indicated in Table 3. 15 14 13 12 11 10 9 8 7 6 5 4 • η 2 1 0 IR [15: 0] & &! & & U -U. # # * * 丰 * t 木 * &: IR [15: 12], OP-Code (load immediate value data) #: IR [11: 8], purpose temporarily *: IR [7: 0], encoding immediate data table 3, an example of an immediate data instruction can be clearly seen in table 3, for example, a 7-bit immediate value with a sign '-256 to +25 5 can pass through this The load immediately instructs the load to the destination register. But If the desired immediate value exceeds the range of -25 6 to +255, the extended instruction is first executed to move the desired immediate value to ER 'then' the load immediate instruction is executed to obtain the desired immediate value. In this example, the load immediate instruction is latched to the instruction register 40. In order to execute it, the 19th bit of the state register is referred to as' when the decoder / controller 50 generates a control signal. If the flag value is' 0 '(negative logic is' 1'), the 7-bit immediate value in the instruction ', for example -2 5 6 to + 2 5 5 is loaded into the target register and left. Shift 4 bits' Then the inefficient 4 bits of the instruction are filled in the shift position to load an immediate value of the desired size. Of course, the ER amount to the left is shifted or filled into it The value can be changed based on the definition of the instruction. If the 32-bit immediate value is required by the defined instruction, the extended instruction is executed twice to move efficiently. Standard (CNS) A4 specification (210X 297 mm) ------ 1 --- Yes, --------- Order --- after (please read first Note the surface to fill out this page) 426832 A7 B7 V. invention is described in () bit into the ER. Thereafter, the load immediate instruction is executed to obtain the 32-bit immediate value. It is expressed as a simple arithmetic notation as follows. (#Read the notes on the back before filling this page) When the E flag is W;
Rdstf具正負號擴充1尺[7 : 〇] 當E旗標為’ Γ ;Rdstf has a plus and minus extension of 1 foot [7: 〇] when the E flag is ‘Γ;
Rds t ¢= E R<<4& IR [ 3 : 0] 第3,見ALU指令例,指今將定義如以下之表4所示: 15 14 13 12 11 10 9 8 7 6 5 4 λ 2 1 0 IR[15:0] & & & & & & & & # # * 本 本 & : IR[15 : 8],OP Code(ALU 指令) #:IR[7:4],目的暫存器 * : IR[3 : 0],若E ,源暫存器,除了它為一立即 暫存器 表4 ALU指令例 一般而言,ALU指令之操作係被分類為幾個如下之類 經濟部智慧財4苟8工消費合作吐.;']-製 型: ① 計算兩暫存器 ② 計算一暫存器之值與立即值 ③ 計算一暫存器及一記憶體之内容Rds t ¢ = E R < < 4 & IR [3: 0] The third, see the ALU instruction example, the instruction will be defined as shown in Table 4 below: 15 14 13 12 11 10 9 8 7 6 5 4 λ 2 1 0 IR [15: 0] & & & & & & & &## * Books &: IR [15: 8], OP Code (ALU instruction) #: IR [7 : 4], destination register *: IR [3: 0], if E, source register, except it is an immediate register Table 4 ALU instruction example Generally speaking, the operation of the ALU instruction is classified as The following are the following types of wisdom and wealth of the Ministry of Economic Affairs and Consumer Cooperation:; ']-type: ① Calculate two temporary registers ② Calculate the value and immediate value of a temporary register ③ Calculate a temporary register and a memory Content
但於一般RISC架構中,除了負載/儲存指令外,這些 並不能由記憶體存取"因此.於此所例示之架構中,ALU __第 231:_ 張尺度適用中國國家標準(CN'S ) Λ4規格(210X297公釐] 4 2 A7 B7 五、發明説明( 計算同時依據一般RIS C之特徵而分為兩類型,如於表4 所示其代表一指令° ALU指令被栓鎖於指令暫存器40。 當解碼器/控制部5 0產生用於執行之控制信號時,狀態暫 存器之E旗標被表示。若E旗標為_0'(於正邏輯中)時,則 指令表示於兩暫存器間之計算。若E旗標為1 ’,則指令表 示一暫存器之值與立即資料間之計算。於第一狀況中’ 1 6 暫存器之任一係經由4位元之選擇由指令之第三位元至最 低位元,以便執行具有目的暫存器9(IR[7 : 4])之計算,使 得所得值被記錄在目的暫存器中。相反地,第二狀況中, 目的暫存器及ER暫存器係被指定,以將其内容加至立即 值。換句話說,當計算予以以立即資料值執行時,擴充指 令係首先被執行,以移位一想要量至ER,然後,ALU指 令被執行。這例子將被以一簡單算衛表示法表示如下: 當E旗標為'0'時,But in the general RISC architecture, except for the load / store instructions, these cannot be accessed by the memory ". Therefore, in the architecture exemplified here, the ALU __Article 231: _ Zhang scale is applicable to the Chinese National Standard (CN'S) Λ4 specification (210X297 mm) 4 2 A7 B7 V. Description of the invention (Calculation is divided into two types according to the characteristics of general RIS C. As shown in Table 4, it represents an instruction ° ALU instruction is locked in the instruction temporary storage Device 40. When the decoder / controller 50 generates a control signal for execution, the E flag of the status register is indicated. If the E flag is _0 '(in positive logic), the instruction is indicated Calculation between two registers. If the E flag is 1 ', the instruction indicates the calculation between the value of a register and the immediate data. In the first situation, any of the' 1 6 registers is passed 4 The bit is selected from the third bit to the lowest bit of the instruction in order to perform the calculation with the destination register 9 (IR [7: 4]) so that the resulting value is recorded in the destination register. Conversely, In the second case, the destination register and the ER register are specified to add their contents to the immediate value. In other words, when the calculation is performed with the immediate data value, the extended instruction is first executed to shift a desired amount to the ER, and then the ALU instruction is executed. This example will be expressed in a simple arithmetic guard notation as follows: When the E flag is '0',
Rdst θ Rsrc+Rdst 當E旗標為W ’時,Rdst θ Rsrc + Rdst When the E flag is W ′,
Rdst0(ER<<4&iR[3 : 0])卞Rd“ 第四,注意一分枝之例子中,指令將被定義如表5所 表示。 15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 IR[15:0] 1 & & & & | & | & & & 木 * 氺 * + & : IR[15 : 8],OP-Code(分支指令) * : IR[7 : 0],偏置資料 表5 .分支指令例 各泜張尺度適用中國國家標準(CNS ) Α·4規格(:M〇x297公釐 (請先閱讀背面之注意事項再填寫本頁) 装 線 426332Rdst0 (ER < < 4 & iR [3: 0]) 卞 Rd "Fourth, note that in the example of a branch, the instructions will be defined as shown in Table 5. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 IR [15: 0] 1 & & & & | & | & & & wood * 氺 * + &: IR [15: 8], OP-Code (branch instruction ) *: IR [7: 0], offset data table 5. The size of each branch instruction example is subject to the Chinese National Standard (CNS) Α · 4 specification (: M〇x297 mm (please read the precautions on the back first) (Fill in this page)
發明説明( 經濟部智慧时產苟g(工消費合作吐印製 其中可能有各種分去此人, 刀文伯令’但相關於該指令之程式計 數器(pc)係被用於如表5中所侃-丄 人 中所例不。指令係被栓鎖於指令 暫存器40。當解碼器/控制却才丄 制部〕0產生用於該指令之控制信 號時’E旗標同時被指向並中。若 ^ ' T 右Ε旗標為’0’,則具正負 號之8位元係被加入程式料哭士 飞°十数备中3例如-512至+511範 圍可以分支至程式計數器中。於并 , 此原因為資料長度為8 位元及範圍係由-512至+ 511导丘几由 、 )U疋為什麼被採用至實施例中 之架構使用16位元指令及且古s > 7及具有8疋資料寬度之四記惊體 係被認為予以彼此並聯連接n因為最低效位元為無 意義,所以由於以,〇,填入最低效位元,所以大致偏置值變 成9位几。相反地,若E旗標為,r,則於程式計數器上之 ER暫存器係被表示加入偏置值中, . ^钟有政位址被分 支。換句話說,若予以分支之位址係超 ^ 〜w > 12 至 +51 1 ’ 則 擴充指令被首先執行,以移位想要量 ’然後,分支 指令被執行’以得到必要偏置,該例子 』丁埘以如下一簡單算 術表TF加以代表: 當E旗標為1 〇'時, E A ¢=1 (具正負號 I r [ 7 : 〇 ] &,◦,) + p 匸 當E旗標為’ 1 ’時, EA<=i(ER<<9&IR[7 : 0]&'〇') + pc 到目前為止,於幾個典型之指令中, ^ 撕无指令將經由 一些實例加以解釋。雖然並未於此加以說明,作,' 需之指令或者用於相同上述方法中之擴 ’’ 斤 如々之立即值 第2S頁 本纸張尺度適用中國®家標準(CNS ) ‘Μ規格(2l〇x 297公釐 (諸先閱讀背面之注意事項再填寫本買) 、-0 線 .4268,' A7 137 五、發明説明() 為可取得,因此,擴充量並未被限制。 現在看,當擴充指令被執行若例外發生則如何處理, 問題之核心是有關於若例外發生於執行擴充指令時,狀態 如何被保持直到例外處理完成,及於例外處理後偏置或立 即值係如何回復之兩個項目。如上所述,本發明使用一 E 旗標及一 E R,以解決以上這些問題。為了實施這些解答, ER係被放置於SPR中並於狀態暫存器之一位元中係被指 定,以使用作為如第4圖所示之「1旗標。當然,這是用以 於各種方法中,實施這些解答目的之簡單例子,以實施本 發明之硬體。 依據本發明,多數M U C係用以儲存一些元件於堆疊 區域中,以防止程式流程於例外發生時之例外處理前遣 失。實施例之架構同時儲存程式計數器及狀態暫存器之值 於堆疊區域中。因此,當程式計數器及狀態暫存器之值被 取回時1本發明可以解決於被指稱有關保持狀態之Ε旗標 值中之問題,若例外發生於擴充指令執行之時,及ER係 可以由軟體取得,以移位HR值至堆疊區域,於例外處理 以前,然後,於例外處理發生後,由堆昼區域回復ER值。 請先閱蜻背而之注意事項再填f-:?本&: 訂 經濟部智总财是局Μ工消货合作社印製 本紙張尺度適用中國國家#準(CNS ) Λ4現格(210Χ 297公絶)Description of the invention (Ministry of Economics, Smart Production, and Industrial Cooperative Printing may include various divisions of this person, Swordsman's Order, but the program counter (pc) related to the instruction is used as shown in Table 5 This is not the case. The instruction is locked in the instruction register 40. Only when the decoder / control unit is in control] 0 when the control signal for the instruction is generated, the 'E flag is also pointed at If the ^ 'T right E flag is' 0', then the 8-bit system with a sign is added to the program. Crying to fly ° Ten digits in the middle 3 For example -512 to +511 range can be branched to the program counter In this case, the reason is that the data length is 8 bits and the range is from -512 to +511. The reason why U 疋 is adopted is that the architecture in the embodiment uses 16-bit instructions and the ancient s > 7 and the four alarm systems with a data width of 8 被 are considered to be connected in parallel with each other. N Because the least significant bit is meaningless, because the least significant bit is filled with 0, the approximate bias value becomes 9 bits. Conversely, if the E flag is r, the ER register on the program counter is indicated to be added. In the setting,. ^ Zhong Youzheng address is branched. In other words, if the branched address is super ^ ~ w > 12 to +51 1 ', the expansion instruction is executed first to shift the desired amount. 'Then, the branch instruction is executed' to get the necessary offset. This example is represented by a simple arithmetic table TF as follows: When the E flag is 1 0 ', EA ¢ = 1 (with the sign I r [ 7: 〇] &, ◦,) + p 匸 When the E flag is '1', EA < = i (ER < &9; IR &7; IR [7: 0] & '〇') + pc to the present So far, in several typical instructions, the ^ Tearless instruction will be explained through some examples. Although it is not explained here, do, 'required instructions or extensions used in the same method as above' ' Immediately on page 2S This paper size applies to China® Home Standard (CNS) 'M specifications (2l0x 297 mm (please read the precautions on the back before filling in this purchase), -0 line. 4268,' A7 137 5. Description of the invention () is available, so the amount of expansion is not limited. Now look at what to do if an exception occurs when an expansion instruction is executed The core of the question is two items about how the state is maintained until the exception processing is completed if the exception occurs during the execution of the extended instruction, and how the offset or immediate value is restored after the exception processing. As mentioned above, the present invention uses An E flag and an ER to solve these problems. In order to implement these solutions, the ER system is placed in the SPR and designated in a bit of the state register to be used as shown in Figure 4. "1 flag. Of course, this is a simple example used to implement these solutions in various methods to implement the hardware of the present invention. According to the present invention, most MCUs are used to store some components in the stacking area to prevent the program flow from being lost before the exception when the exception occurs. The architecture of the embodiment simultaneously stores the values of the program counter and status register in the stack area. Therefore, when the values of the program counter and status register are retrieved, the present invention can solve the problem of the E flag value that is alleged to be related to maintaining the state. If the exception occurs when the extended instruction is executed, and the ER system can Obtained by software to shift the HR value to the stacking area. Before the exception processing, and then after the exception processing occurs, the ER value is restored from the daylight area. Please read the precautions before you fill in the f- :? This &: Order printed by the Ministry of Economic Affairs, Intellectual Property and Finance, Bureau of Industrial and Commercial Cooperatives, printed on paper standards applicable to the Chinese country # 准 (CNS) 4 4 (210 × 297 males)
Claims (1)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1019980049999A KR100322277B1 (en) | 1998-11-20 | 1998-11-20 | Central processing unit having expansion instruction |
| US09/238,234 US6499099B1 (en) | 1998-11-20 | 1999-01-27 | Central processing unit method and apparatus for extending general instructions with extension data of an extension register |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| TW426832B true TW426832B (en) | 2001-03-21 |
Family
ID=26634353
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW088105623A TW426832B (en) | 1998-11-20 | 1999-04-08 | Central processing unit having an extension instruction |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TW426832B (en) |
-
1999
- 1999-04-08 TW TW088105623A patent/TW426832B/en not_active IP Right Cessation
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI706255B (en) | Hardware processors and methods for tightly-coupled heterogeneous computing | |
| TW470914B (en) | Executing partial-width packed data instructions | |
| TW594569B (en) | Load/move duplicate instructions for a processor | |
| TWI804200B (en) | Systems and methods for executing a fused multiply-add instruction for complex numbers | |
| TWI639952B (en) | Method, apparatus and non-transitory machine-readable medium for implementing and maintaining a stack of predicate values with stack synchronization instructions in an out of order hardware software co-designed processor | |
| TWI475480B (en) | Vector frequency compress instruction | |
| KR100327777B1 (en) | Data processing device using multiple instruction sets | |
| TWI610229B (en) | Apparatus and method for vector broadcast and mutual exclusion or logical instructions | |
| TWI841041B (en) | Systems, apparatuses, and methods for fused multiply add | |
| TWI617976B (en) | Processor-based apparatus and method for processing bit streams | |
| TWI462007B (en) | Systems, apparatuses, and methods for performing conversion of a mask register into a vector register | |
| TWI476682B (en) | Apparatus and method for detecting identical elements within a vector register | |
| CN115421686A (en) | FP16-S7E8 hybrid precision for deep learning and other algorithms | |
| CN104756068A (en) | merge adjacent gather/scatter operations | |
| TWI740859B (en) | Systems, apparatuses, and methods for strided loads | |
| CN104137061B (en) | For performing method, processor core and the computer system of vectorial frequency expansion instruction | |
| CN104204989B (en) | Apparatus and method for selecting elements for vector calculations | |
| TW201337740A (en) | Instructions for storing in general purpose registers one of two scalar constants based on the contents of vector write masks | |
| TWI590154B (en) | Calculate the vector instruction of the coordinates of the next point in the Z-order curve | |
| CN104011671B (en) | Apparatus and methods for performing replacement operations | |
| JPS6097435A (en) | Arithmetic processor | |
| CN109086073A (en) | Floating-point rounding treatment device, method, system and instruction | |
| TW201346731A (en) | Multi-register scatter instruction | |
| US9946540B2 (en) | Apparatus and method of improved permute instructions with multiple granularities | |
| TW201810034A (en) | Systems, apparatuses, and methods for cumulative summation |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| GD4A | Issue of patent certificate for granted invention patent | ||
| MK4A | Expiration of patent term of an invention patent |