A method of selecting registers is proposed, which is used to gain access to a register in a primitive register set which is used to provide a plurality of physical registers, virtual registers, physical program counters, and virtual program counters arranged into six modes. The primitive register set is first mapped to a converted register set which contains only two modes of registers that are mapped to the six modes of registers in the primitive register set. The access to the primitive register set is carried out by a bit sequence. If converted mode 0 in the converted register set is selected, the selection is mapped to one of the physical registers and physical program counter in the converted mode 0; and if converted mode 1 is selected, the selection is mapped to one of the virtual registers and virtual program counter in the converted mode 1.
|
4. A method for selecting registers from a primitive register set including a number of modes of physical registers and virtual registers;
the method comprising the step of: (1) mapping the primitive register set to a converted register set; the converted register set including a reduced number of modes of physical registers and virtual registers that are mapped to the physical registers and virtual registers in a predetermined correspondence; (2) issuing a bit sequence indicating the mode and register to be selected from the primitive register set; (3) issuing a bit sequence indicating the mode and register to be selected from the primitive register set; (4) mapping the mode in the primitive register set indicated by the bit sequence to the corresponding mode in the converted register set; (5) mapping the register in the primitive register set indicated by the bit sequence to the corresponding register in the converted register set. 1. A method for selecting registers from a primitive register set; the primitive register set including six modes of registers, including a mode 0, a mode 1, a mode 2, a mode 3, a mode 4, and a mode 5; wherein the mode 0 contains 15 physical registers and one physical program counter; the mode 1 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 2 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 3 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 4 contains 13 virtual registers, two physical registers, and one virtual program counter; and the mode 5 contains 8 virtual registers, 7 physical registers, and one virtual program counter; and wherein the selection of one of one of the 13 virtual registers and the virtual program counter in the mode 0, the 13 virtual registers and the virtual program counter in the mode 1, the 13 virtual registers and the virtual program counter in the mode 2, the 13 virtual registers and the virtual program counter in the mode 3, the 13 virtual registers and the virtual program counter in the mode 4, and the 8 virtual registers and the virtual program counter in the mode 5 is mapped to one of the 15 physical registers and the one physical program counter in the mode 0;
the method comprising the step of: (1) mapping the primitive register set to a converted register set; the converted register set including two converted modes of registers, including a converted mode 0 and a converted mode 1; wherein the converted mode 0 contains 15 physical registers and one physical program counter; and the converted mode 1 contains 15 physical registers and one virtual program counter; wherein the 15 physical registers in the converted mode 0 are mapped to the 15 physical registers in the mode 0 of the primitive register set; the one physical program counter in the converted mode 0 is mapped to the one physical program counter in the mode 0 of the primitive register set; the 15 physical registers in the converted mode 1 are mapped in a predetermined one-to-one correspondence to the 2 physical registers in the mode 1 of the primitive register set, the 2 physical registers in the mode 2 of the primitive register set, the 2 physical registers in the mode 3 of the primitive register set, the 2 physical registers in the mode 4 of the primitive register set, and the 7 physical registers in the mode 5 of the primitive register set; the one virtual program counter in the converted mode 1 is mapped to one of the 5 virtual program counters respectively in the mode 1, the mode 2, the mode 3, the mode 4, and the mode 5 of the primitive register set; (2) issuing a mode-selection bit whose value indicates the mode that contains the register to be selected; (3) issuing a 4-bit register-selection bit sequence whose value indicates the register to be selected from the selected mode; and (4) selecting either the converted mode 0 or the converted mode 1 based on the value of the mode-selection bit; and then selecting one of the registers in the selected mode indicated by the 4-bit register-selection bit sequence. 2. A method for selecting registers from a primitive register set which is mapped to a converted register set; wherein the primitive register set includes six modes of registers, including a mode 0, a mode 1, a mode 2, a mode 3, a mode 4, and a mode 5; wherein the mode 0 contains 15 physical registers and one physical program counter; the mode 1 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 2 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 3 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 4 contains 13 virtual registers, two physical registers, and one virtual program counter; and the mode 5 contains 8 virtual registers, 7 physical registers, and one virtual program counter; and wherein the selection of one of the 13 virtual registers and the virtual program counter in the mode 0, the 13 virtual registers and the virtual program counter in the mode 1, the 13 virtual registers and the virtual program counter in the mode 2, the 13 virtual registers and the virtual program counter in the mode 3, the 13 virtual registers and the virtual program counter in the mode 4, and the 8 virtual registers and the virtual program counter in the mode 5 is mapped to one of the 15 physical registers and the one physical program counter in the mode 0; and wherein the converted register set includes two converted modes of registers, including a converted mode 0 and a converted mode 1; wherein the converted mode 0 contains 15 physical registers and one physical program counter; and the converted mode 1 contains 15 physical registers and one virtual program counter;
the method comprising the steps of: (1) issuing a selection bit sequence which includes a first part for mode selection and a second part for register selection; (2) if the first part of the selection bit sequence selects the mode 0, converting it for selection of mode 0, and then the register indicated by the second part of the selection bit sequence is mapped to one of the physical registers and physical program counter in the converted mode 0; (3) if the first part of the selection bit sequence selects one of the mode 1, the mode 2, the mode 3, the mode 4, and the mode 5, mapping it to the converted mode 1; and if the second part of the selection bit sequence selects one of the two physical registers in the mode 1, the two physical registers in the mode 2, the two physical registers in the mode 3, the two physical register in mode 4, or the 7 physical registers in the mode 5, mapping it to one of the 15 physical registers in the converted mode 1; and (4) if the first part of the selection bit sequence selects one of the mode 1, the mode 2, the mode 3, the mode 4, the mode 5, and the second part thereof selects one of the 13 virtual registers and one virtual program counter in mode 1, or one of the 13 virtual registers and one virtual program counter in mode 2, or one of the 13 virtual registers and one virtual program counter in mode 3, or one of the 13 virtual registers and one virtual program counter in mode 4, or one of the 13 virtual registers and virtual program counter in mode 5, mapping it to one of the 15 physical registers and one physical program counter in the converted mode 0. 3. The method of
5. The method of
the primitive register set including six modes of registers, including a mode 0, a mode 1, a mode 2, a mode 3, a mode 4, and a mode 5; wherein the mode 0 contains 15 physical registers and one physical program counter; the mode 1 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 2 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 3 contains 13 virtual registers, two physical registers, and one virtual program counter; the mode 4 contains 13 virtual registers, two physical registers, and one virtual program counter; and the mode 5 contains 8 virtual registers, 7 physical registers, and one virtual program counter; and wherein the selection of one of the 13 virtual registers and the virtual program counter in the mode 0, the 13 virtual registers and the virtual program counter in the mode 1, the 13 virtual registers and the virtual program counter in the mode 2, the 13 virtual registers and the virtual program counter in the mode 3, the 13 virtual registers and the virtual program counter in the mode 4, and the 8 virtual registers and the virtual program counter in the mode 5 is mapped to one of the 15 physical registers and the one physical program counter in the mode 0; and wherein the converted register set includes two converted modes of registers, including a converted mode 0 and a converted mode 1; wherein the converted mode 0 contains 15 physical registers and one physical program counter; and the converted mode 1 contains 15 physical registers and one virtual program counter; the 15 physical registers in the converted mode 0 are mapped to the 15 physical registers in the mode 0 of the primitive register set; the one physical program counter in the converted mode 0 is mapped to the one physical program counter in the mode 0 of the primitive register set; the 15 physical registers in the converted mode 1 are mapped in a predetermined one-to-one correspondence to the 2 physical registers in the mode 1 of the primitive register set, the 2 physical registers in the mode 2 of the primitive register set, the 2 physical registers in the mode 3 of the primitive register set, the 2 physical registers in the mode 4 of the primitive register set, and the 7 physical registers in the mode 5 of the primitive register set; the one virtual program counter in the converted mode 1 is mapped to one of the 5 virtual program counters respectively in the mode 1, the mode 2, the mode 3, the mode 4, and the mode 5 of the primitive register set. |
1. Field of the Invention
This invention relates to computer technology, and more particularly, to a method of selecting registers.
2. Description of Related Art
To gain access to one of the registers shown in
It is therefore an objective of this invention to provide a new method of selecting registers, which can help reduce the number of access bits and reduce access time by rearranging the physical registers in the same mode.
In accordance with the foregoing and other objectives, the invention proposes a new method of selecting registers.
In one preferred embodiment, the method according to the invention is used for selecting registers from a primitive register set; the primitive register set including six modes of registers, including a Mode 0, a Mode 1, a Mode 2, a Mode 3, a Mode 4, and a Mode 5; wherein the Mode 0 contains 15 physical registers and one physical program counter; the Mode 1 contains 13 virtual registers, two physical registers, and one virtual program counter; the Mode 2 contains 13 virtual registers, two physical registers, and one virtual program counter; the Mode 3 contains 13 virtual registers, two physical registers, and one virtual program counter; the Mode 4 contains 13 virtual registers, two physical registers, and one virtual program counter; and the Mode 5 contains 8 virtual registers, 7 physical registers, and one virtual program counter; and wherein the selection of one of one of the 13 virtual registers and the virtual program counter in the Mode 0, the 13 virtual registers and the virtual program counter in the Mode 1, the 13 virtual registers and the virtual program counter in the Mode 2, the 13 virtual registers and the virtual program counter in the Mode 3, the 13 virtual registers and the virtual program counter in the Mode 4, and the 8 virtual registers and the virtual program counter in the Mode 5 is mapped to one of the 15 physical registers and the one physical program counter in the Mode 0.
The first preferred embodiment of the method according to the invention comprises the step of: (1) mapping the primitive register set to a converted register set; the converted register set including two converted modes of registers, including a Converted Mode 0 and a Converted Mode 1; wherein the Converted Mode 0 contains 15 physical registers and one physical program counter; and the Converted Mode 1 contains 15 physical registers and one virtual program counter; wherein the 15 physical registers in the Converted Mode 0 are mapped to the 15 physical registers in the Mode 0 of the primitive register set; the one physical program counter in the Converted Mode 0 is mapped to the one physical program counter in the Mode 0 of the primitive register set; the 15 physical registers in the Converted Mode 1 are mapped in a predetermined one-to-one correspondence to the 2 physical registers in the Mode 1 of the primitive register set, the 2 physical registers in the Mode 2 of the primitive register set, the 2 physical registers in the Mode 3 of the primitive register set, the 2 physical registers in the Mode 4 of the primitive register set, and the 7 physical registers in the Mode 5 of the primitive register set; the one virtual program counter in the Converted Mode 1 is mapped to one of the 5 virtual program counters respectively in the Mode 1, the Mode 2, the Mode 3, the Mode 4, and the Mode 5 of the primitive register set.
Next, a mode-selection bit is issued, whose value indicates the mode that contains the register to be selected; and then, a register-selection bit sequence is issued, whose value indicates the register to be selected from the selected mode. Based on these selection bits, either the Converted Mode 0 or the Converted Mode 1 is selected based on the value of the mode-selection bit; and then selecting one of the registers in the selected mode indicated by the 4-bit register-selection bit sequence.
In another preferred embodiment, the method according to the invention is used for selecting registers from a primitive register set. The primitive register set includes six modes of registers including a Mode 0, a Mode 1, a Mode 2, a Mode 3, a Mode 4, and a Mode 5; wherein the Mode 0 contains 15 physical registers and one physical program counter; the Mode 1 contains 13 virtual registers, two physical registers, and one virtual program counter; the Mode 2 contains 13 virtual registers, two physical registers, and one virtual program counter; the Mode 3 contains 13 virtual registers, two physical registers, and one virtual program counter, the Mode 4 contains 13 virtual registers, two physical registers, and one virtual program counter; and the Mode 5 contains 8 virtual registers, 7 physical registers, and one virtual program counter; and wherein the selection of one of one of the 13 virtual registers and the virtual program counter in the Mode 0, the 13 virtual registers and the virtual program counter in the Mode 1, the 13 virtual registers and the virtual program counter in the Mode 2, the 13 virtual registers and the virtual program counter in the Mode 3, the 13 virtual registers and the virtual program counter in the Mode 4, and the 8 virtual registers and the virtual program counter in the Mode 5 is mapped to one of the 15 physical registers and the one physical program counter in the Mode 0; and wherein the converted register set includes two converted modes of registers, including a Converted Mode 0 and a Converted Mode 1; wherein the Converted Mode 0 contains 15 physical registers and one physical program counter; and the Converted Mode 1 contains 15 physical registers and one virtual program counter.
The second preferred embodiment of the method according to the invention comprises the steps of: issuing a selection bit sequence which includes a first part for mode selection and a second part for register selection; if the first part of the selection bit sequence selects the Mode 0, converting it for selection of Mode 0, and then the register indicated by the second part of the selection bit sequence is mapped to one of the physical registers and physical program counter in the Converted Mode 0; if the first part of the selection bit sequence selects one of the Mode 1, the Mode 2, the Mode 3, the Mode 4, and the Mode 5, mapping it to the Converted Mode 1; and if the second part of the selection bit sequence selects one of the two physical registers in the Mode 1, the two physical registers in the Mode 2, the two physical registers in the Mode 3, the two physical register in Mode 4, or the 7 physical registers in the Mode 5, mapping it to one of the 15 physical registers in the Converted Mode 1; and if the first part of the selection bit sequence selects one of the Mode 1, the Mode 2, the Mode 3, the Mode 4, the Mode 5, and the second part thereof selects one of the 13 virtual registers and one virtual program counter in Mode 1, or one of the 13 virtual registers and one virtual program counter in Mode 2, or one of the 13 virtual registers and one virtual program counter in Mode 3, or one of the 13 virtual registers and one virtual program counter in Mode 4, or one of the 13 virtual registers and virtual program counter in Mode 5, mapping it to one of the 15 physical registers and one physical program counter in the Converted Mode 0.
Compared to the prior art, since the invention needs just to select between 2 modes from the converted register set, rather than 6 modes from the primitive register set, it needs a reduced number of bits for the selection and allows a reduced access time.
The invention can be more fully understood by reading the following detailed description of the preferred embodiments, with reference made to the accompanying drawings, wherein:
Referring to
In the next step S204, a mode-selection bit is issued, whose value determines the selection of either Converted Mode 0 or Converted Mode 1. For example, if the mode-selection bit is 0, Converted Mode 0 is selected; and if 1, Converted Mode 1 is selected.
In the next step S206, a 4-bit register-selection bit sequence is issued for the selection of one of the 16 registers in Converted Mode 0 or Converted Mode 1.
The procedure then goes to the step S208, which includes two substeps S210 and S212. In the substep S210, if the mode-selection bit is a first binary value, for example 0, Converted Mode 0 is selected; and if a second binary value, for example 1, Converted Mode 1 is selected. In the next substep S212, register selection is carried out by mapping the 4-bit register-selection bit sequence to the corresponding register. For example, if the mode-selection bit is 0 and the 4-bit register-selection bit sequence is (1111), then the physical program counter PC in Converted Mode 0 is selected.
After the primitive register set of
The procedure then goes to the step S30, which includes two substeps S306 and S308. In the substep S306, the first part of the selection bit sequence is used for mode selection; and then in the next substep S308, the second part of the selection bit sequence is used for register selection.
If the first part of the selection bit sequence selects Mode 0, then it is mapped to Converted Mode 0, and then the second part of the selection bit sequence is mapped to one of the physical registers R0∼R14 and physical program counter PC in Converted Mode 0. For example, if the physical register R0 in Mode 0 is to be selected, it is mapped to the physical register R0 in Converted Mode 0.
If the first part of the selection bit sequence selects either Mode 1, or Mode 2, or Mode 3, or Mode 4, or Mode 5, it is mapped to Converted Mode 1; and if the second part of the selection bit sequence selects one register from the group of R13_SVC and R14_SVC in Mode 1, R13_ABORT and R14_ABORT in Mode 2, R13_UNDEF and R14_UNDEF in Mode 3, R13_IRQ and R14_IRQ in Mode 4, or R13_FIQ∼R14_FIQ in Mode 5, it is mapped to one of the physical registers in Converted Mode 1. For example, if the physical register R13_SVC in Mode 1 is to be selected, it is mapped to the physical register R13_SVC in Converted Mode 0.
If the first part of the selection bit sequence selects either Mode 1, or Mode 2, or Mode 3, or Mode 4, or Mode 5, while the second part thereof selects one register from the group of the virtual registers R0∼R12 and virtual program counter PC in Mode 1, the virtual registers R0∼R12 and virtual program counter PC in Mode 2, the virtual registers R0∼R12 and virtual program counter PC in Mode 3, the virtual registers R0∼R12 and virtual program counter PC in Mode 4, the virtual registers R0∼R7 and virtual program counter PC in Mode 5, it is mapped to one of the physical registers R0∼R14 and physical program counter PC in Converted Mode 0. For example, if the virtual program counter PC in Mode 5 is to be selected, it is mapped to the physical program counter PC in Converted Mode 0.
Compared to the prior art, the invention needs just one bit, rather than 3 bits, for mode selection, which can help reduce the required number of access bits. Moreover, the invention can help reduce the access time by 25% as compared to the prior art. The invention is therefore more advantageous to use than the prior art.
The invention has been described using exemplary preferred embodiments. However, it is to be understood that the scope of the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements. The scope of the claims, therefore, should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5434972, | Jan 11 1991 | GEC-Marconi Limited | Network for determining route through nodes by directing searching path signal arriving at one port of node to another port receiving free path signal |
5857183, | Jan 09 1993 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Processor for sequential data retrieval from a relational database |
6499076, | Jul 25 1997 | Canon Kabushiki Kaisha | Memory management for use with burst mode |
6499123, | Feb 24 1989 | Advanced Micro Devices, Inc. | Method and apparatus for debugging an integrated circuit |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Aug 08 2001 | LIANG, CHING-JER | Faraday Technology Corp | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 012125 | /0215 | |
Aug 27 2001 | Faraday Technology Corp. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
May 24 2007 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Sep 26 2011 | REM: Maintenance Fee Reminder Mailed. |
Feb 10 2012 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Mar 12 2012 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Feb 10 2007 | 4 years fee payment window open |
Aug 10 2007 | 6 months grace period start (w surcharge) |
Feb 10 2008 | patent expiry (for year 4) |
Feb 10 2010 | 2 years to revive unintentionally abandoned end. (for year 4) |
Feb 10 2011 | 8 years fee payment window open |
Aug 10 2011 | 6 months grace period start (w surcharge) |
Feb 10 2012 | patent expiry (for year 8) |
Feb 10 2014 | 2 years to revive unintentionally abandoned end. (for year 8) |
Feb 10 2015 | 12 years fee payment window open |
Aug 10 2015 | 6 months grace period start (w surcharge) |
Feb 10 2016 | patent expiry (for year 12) |
Feb 10 2018 | 2 years to revive unintentionally abandoned end. (for year 12) |