Address Space Expander for a Processor
20170315912 · 2017-11-02
Inventors
- Joseph Wright (Round Rock, TX, US)
- Erik Michael Schlanger (Austin, TX, US)
- Eric DeVolder (Cedar Park, TX, US)
Cpc classification
International classification
Abstract
An address range expander associated with a processor and a physical memory device determines that address transformation has been enabled with respect to an address indicated on the processor's address bus. The expander generates, using one or more address expansion parameter registers, a transformed address corresponding to the untransformed address within an address range of the physical memory device, and transmits the transformed address to a controller of the physical memory device.
Claims
1. A system, comprising: one or more processors, including a first processor; a physical memory device; and one or more address range expanders, including a first address range expander, wherein the first address range expander is coupled to the first processor and the physical memory device; wherein the first address range expander is configured to: determine that address transformation has been enabled with respect to an untransformed address indicated on an address bus of the first processor, wherein the untransformed address comprises a first number of bits corresponding to an address range of the first processor; generate, using one or more address expansion parameter registers, a transformed address corresponding to the untransformed address, wherein the transformed address lies within an address range of the physical memory device, wherein the address range of the physical memory device exceeds the address range of the first processor; transmit the transformed address to a controller of the physical memory device to initiate an operation associated with the transformed address.
2. The system as recited in claim 1, wherein the first address range expander comprises one or more address transformers, wherein individual ones of the one or more address transformers correspond to respective expansion parameter registers of the one or more expansion parameter registers, wherein the first address range expander is configured to: select, to form at least a portion of the transformed address, output generated by a particular address transformer of the one or more address transformers.
3. The system as recited in claim 2, wherein a particular set of one or more bits of a first expansion parameter register of the one or more expansion parameter registers indicates a processor-side base address prefix, wherein the particular address transformer is configured to: verify that a prefix of the untransformed address matches the processor-side base address prefix.
4. The system as recited in claim 2, wherein a particular set of one or more bits of a first expansion parameter register of the one or more expansion parameter registers indicates a memory window size, wherein the particular address transformer is configured to: verify that the untransformed address lies within a range of addresses corresponding to the memory window size.
5. The system as recited in claim 2, wherein a particular set of one or more bits of a first expansion parameter register of the one or more expansion parameter registers indicates a memory-device-side base address prefix, wherein the particular address transformer is configured to: determine the transformed address based at least in part on (a) the memory-device-side base address prefix and (b) an offset indicated in the untransformed address.
6. The system as recited in claim 2, wherein the one or more address transformers comprise a second address transformer, wherein to select the output generated by the particular address transformer, the first address range expander is configured to: determine, based at least in part on a priority associated with the particular address transformer, that output produced by the particular address transformer overrides output produced by the second address transformer.
7. The system as recited in claim 1, wherein the physical memory device comprises one of: (a) a dynamic random access memory device or (b) a static random access memory device.
8. The system as recited in claim 1, further comprising a first data bus coupled to the first processor and the physical memory device and a second data bus coupled to the first processor and the one or more expansion parameter registers.
9. The system as recited in claim 1, wherein the one or more processors comprise a second processor, wherein the one or more address range expanders comprise a second address range expander, wherein the physical memory device comprises (a) a first partition storing a first collection of boot code for the first processor and (b) a second partition storing a second collection of boot code for the second processor, wherein the first address range expander is configured to: generate a first transformed boot code address, based at least in part on a first untransformed boot code address indicated on the address bus of the first processor, wherein the first transformed boot code address is part of the first partition; and transmit the first transformed boot code address to the controller of the physical memory device to initiate an operation associated with the first transformed boot code address; and and wherein the second address range expander is configured to: generate a second transformed boot code address, based at least in part on a second untransformed boot code address indicated on an address bus of the second processor, wherein the second transformed boot code address is part of the second partition; and transmit the second transformed boot code address to the controller of the physical memory device to initiate an operation associated with the second transformed boot code address.
10. A method, comprising: determining, at an address range expander circuit coupled to a processor's address bus, wherein the address range expander circuit is external to the processor, that address transformation has been enabled with respect to an untransformed address indicated on the address bus, wherein the untransformed address comprises a first number of bits corresponding to an address range of the processor; generating, by the address range expander circuit, a transformed address corresponding to the untransformed address, wherein the transformed address lies within an address range of a physical memory device, wherein the address range of the physical memory device exceeds the address range of the processor; transmitting, by the address range expander circuit, the first transformed address to a memory controller of the physical memory device to initiate an operation on data stored at the transformed address.
11. The method as recited in claim 10, wherein the address range expander circuit comprises one or more address transformers, wherein individual ones of the one or more address transformers correspond to respective expansion parameter registers accessible from the processor, further comprising: selecting, at the address expander circuit, a particular address transformer of the one or more address transformers whose output is to form at least a portion of the transformed address.
12. The method as recited in claim 11, wherein a particular set of one or more bits of a first expansion parameter register of the respective expansion parameter registers indicates a processor-side base address prefix, further comprising: prior to generating the output, verifying, by the particular address transformer, that the untransformed address comprises the processor-side base address prefix.
13. The method as recited in claim 11, wherein a particular set of one or more bits of a first expansion parameter register of the respective expansion parameter registers indicates a memory window size, further comprising: prior to generating the output, verifying, by the particular address transformer, that the untransformed address lies within a range of addresses corresponding to the memory window size.
14. The method as recited in claim 11, wherein a particular set of one or more bits of a first expansion parameter register of the respective expansion parameter registers indicates a memory-device-side base address prefix, further comprising: determining, by the address range expander circuit, the first transformed address based at least in part on (a) the memory-device-side base address prefix and (b) an offset indicated in the untransformed address.
15. The method as recited in claim 11, wherein a particular set of one or more bits of a first expansion parameter register of the respective expansion parameter registers indicates that address transformation is enabled with respect to untransformed addresses matching one or more other parameters indicated in the first expansion parameter registers.
16. The method as recited in claim 10, further comprising: issuing, by the address range expander circuit, an error signal indicating that an address range indicated in a first expansion parameter register overlaps with an address range indicated in a second expansion parameter register.
17. An address range expander circuit, comprising: a processor-side interface configured to couple to a processor; a memory-device-side interface configured to couple to a physical memory device; and one or more address transformers, including a first address transformer; wherein the first address transformer is configured to; determine that address transformation has been enabled with respect to an untransformed address indicated at the processor-side interface, wherein the untransformed address comprises a first number of bits corresponding to an address range of the processor; generate a transformed address corresponding to the untransformed address, wherein the transformed address lies within an address range of the physical memory device, wherein the address range of the physical memory device exceeds the address range of the processor; transmit the transformed address to the physical memory device via the memory-device-side interface to initiate an operation associated with the transformed address.
18. The address range expander circuit as recited in claim 17, wherein to generate the first transformed address, the first address transformer is configured to: verify that a prefix of the untransformed address matches a processor-side base address prefix indicated in a particular set of one or more bits of a first expansion parameter register.
19. The address range expander circuit as recited in claim 17, wherein to generate the transformed address, wherein the first address transformer is configured to: verify that the untransformed address lies within a range of addresses corresponding to a memory window size indicated in a particular set of one or more bits of a first expansion parameter register.
20. The address range expander circuit as recited in claim 17, wherein the first address transformer is configured to: determine the transformed address based at least in part on (a) a first memory-device-side base address prefix indicated in a particular set of one or more bits of a first expansion parameter register and (b) an offset indicated in the untransformed address.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021] While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood that the drawings and detailed description hereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the invention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. Any headings used herein are for organizational purposes only and are not meant to limit the scope of the description or the claims. As used herein, the word “may” is used in a permissive sense (i.e., meaning having the potential to) rather than the mandatory sense (i.e. meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to. When used in the claims, the term “or” is used as an inclusive or and not as an exclusive or. For example, the phrase “at least one of x, y, or z” means any one of x, y, and z, as well as any combination thereof.
DETAILED DESCRIPTION OF EMBODIMENTS
[0022]
[0023] In various embodiments, the address range expander circuitry may comprise several subcomponents, including a processor-side interface 181, a memory-device-side interface 182 as well as one or more address transformers (not shown in
[0024] In various embodiments, the expansion parameters which govern the operations of the address range expander may include, among others, transformation enable/disable flags, processor-side base address prefixes, memory-device-side base address prefixes, memory window sizes, and the like. Further details regarding the manner in which the parameters may be expressed and/or programmatically modified in different embodiments are provided below. An enable/disable flag may be used to control whether address transformation is to be attempted, or whether the K-bit address generated by the processor is to be transmitted without modification to the memory controller. The specific ranges of processor-side addresses (e.g., the K-bit addresses of
[0025] As indicated in
[0026] In some embodiments, the address range expansion approach indicated in
[0027] The CPU subsystem 204 may comprise one or more processors or cores in the depicted embodiment. The address range accessible from a given processor of CPU subsystem 204 may in some cases be smaller than the address range of one or more memory devices of on-chip memory subsystem 232. An address range expander 220 may provide programmable mappings between the addresses indicated by one or more of the processors and addresses within the on-chip memory subsystem 232, thereby increasing the range of memory addresses which can be accessed beyond the native memory range supported by the processors. As discussed in the context of
[0028] SOCs designed for various applications may differ in at least some subcomponents, or in their overall layout, from the example illustrated in
[0029]
[0030] In the depicted example, each EPR 314 may comprise 32 bits. In other embodiments, registers of any desired bit-width may be employed. The least significant bit (bit 0) is shown at the right in the EPR bit contents 370, and the most significant bit (bit 31) is shown at the left. Bit 0 may serve as an enable/disable flag. If bit 0 is set to 0, the remainder of the contents of the EPR may be ignored and address transformation may not be attempted based on the parameters indicated in the EPR. If bit 0 is set to 1, in contrast, the address range expander may initiate further operations to check whether the untransformed address meets the criteria indicated in the other parameters of the EPR, and to perform a transformation if the criteria are met.
[0031] Two base address prefixes for the address transformation are indicated in EPR bit contents 370. A four-bit processor-side base address prefix is indicated in bits 9-12, and an eight-bit memory-device-side base address prefix is indicated in bits 1-8. The number of bits used for the base address prefixes (at the processor-side, the memory-device-side, or both sides) may differ from the number of bits shown for illustrative purposes in
[0032] The range of untransformed addresses 350 which are going to be transformed may be indicated via a window size code which occupies bits 28-30 in the depicted example. If bits 28-30 are set to 001, only those untransformed addresses which lie within a window of 256 megabytes from the starting address formed by appending zeroes to the processor-side base address prefix may be mapped. Similarly, if bits 28-30 are set to 010, untransformed addresses within a window of 512 megabytes from the starting address may be mapped, and if bits 28-30 are set to 100, untransformed addresses within a range of a gigabyte from the starting address may be mapped. Untransformed addresses which do not meet the criteria indicated by the combination of the processor-side base address prefix of a given EPR and the window size code of that EPR may not be transformed, even if enable flag of bit 0 is set to 1.
[0033] In the depicted embodiment, EPR bits 13-27 and 31 may be reserved (i.e., these bits may not be used for specifying address range expansion parameters). In various embodiments, the number of bits used for the base address prefixes and/or the window size code may differ from those indicated in
[0034]
[0035] Processor-side physical addresses 402 lie within the four-gigabyte range 0-0xFFFF_FFFF in the depicted example, while the example memory-device-side addresses 404 shown in
EPR 410A: (0x2000_102D or 0010 0000 0000 0000 0001 0000 0010 1101)
[0036] (Bit 0): 1 (address transformation is enabled)
[0037] (Bits 1-8): 0001 0110 or 0x0_16 (memory-device-side base address prefix)
[0038] (Bits 9-12): 1000 or 0x8 (processor-side base address prefix)
[0039] (Bits 28-30): 010 (window size of 512 MB)
EPR 410B: (0x4000_0821 or 0100 0000 0000 0000 0000 1000 0010 0001)
[0040] (Bit 0): 1 (address transformation is enabled)
[0041] (Bits 1-8): 0001 0000 or 0x0_10 (memory-device-side base address prefix)
[0042] (Bits 9-12): 0100 or 0x4 (processor-side base address prefix)
[0043] (Bits 28-30): 100 (window size of 1 GB)
[0044] As indicated by the respective bit 0 values, address translation is enabled with respect to both EPRs in the depicted example. The range of processor-side addresses to be mapped comprises 0x8000_0000 through 0x9FFF_FFFF in the case of EPR 410A (a 512 megabyte window starting from the address formed by appending zeroes to the processor-side base address prefix of 0x8). It is noted that in
[0045] With respect to EPR 410B, the range of processor-side address to be mapped comprises 0x4000_0000 through 0x7FFF_FFFF (a one gigabyte window starting from the address formed by appending zeroes to the processor-side base address prefix of 0x4). As such, the processor-side address ranges indicated in the two EPRs 410 do not overlap.
[0046] The memory-device-side window indicated by EPR 410A comprises addresses 0x1_6000_0000 through 0x1_7FFF_FFFF, while the memory-device-side window indicated in EPR 410B comprises 0x1_1000_0000 through 0x1_3FFF_FFFF. The memory-device-side windows also do not overlap. Since neither the processor-side (to-be-mapped) address ranges nor the memory-device-side (mapping result) address ranges overlap or clash with each other, mappings 420A and 420B may both be applied in the depicted embodiment. Of course, for a given untransformed address indicated on a processor's address bus, at most one of the mappings would be applied, depending on whether the untransformed address lies within EPR 410's processor-side address range, within EPR 410B's processor-side address range or in neither processor-side address range.
[0047]
[0048] If neither address transformer 512A nor address transformer 512B is enabled (e.g., if the enable bit is set to zero in both EPR-0 and EPR-1), the untransformed address may be passed on to the memory device controller 572 without modification. If exactly one of the EPRs has its enable bit set, and the untransformed processor-generated address 551 lies within the processor-side address range or window indicated by the parameters of that EPR, then the transformed address 552 may be generated based on the output of the address transformer corresponding to that EPR.
[0049] If both EPRs EPR-0 and EPR-1 are enabled, the actions taken at the selection/prioritization logic may differ in the depicted embodiment based on whether there is a conflict or overlap between the address ranges of the EPRs (either the processor-side address ranges, or the memory-device-side address ranges). If there is no conflict in the address ranges, and the untransformed address lies within the address range of one of the EPRs, the output of the address transformer for that EPR may be used to form the transformed address. If there is a conflict in the address ranges, a respective priority setting associated with the EPRs may be used in the depicted embodiment to select the particular EPR whose output should be used to form the transformed address. Such priorities may be assigned statically in at least one embodiment: for example, EPR-0 may be given a higher priority than EPR-1. In the latter scenario, in the event of a clash in parameters, the output produced by the address transformer 512A associated with EPR-0 may override or supersede the output produced by address transformer 512B. In one embodiment, the priorities of the different EPRs may be modified dynamically—e.g., a priority encoding may be included within each EPR, or a different register may be used to indicate the relative priorities of the EPRs. In some embodiments, as described in the context of
[0050]
[0051] An untransformed or original address u-addr comprising K bits may be indicated on the processor's address bus (element 604). The address range expander may determine, based on the contents of particular enable bits or bit ranges (such as bit 0), whether address transformation is enabled at any of the EPRs. If address transformation is not enabled at any of the EPRs (as detected in element 607), the processor-generated address u-addr may be transmitted to a physical memory device controller without modification—e.g., as the low-order K bits of a K+L bit address with the bits in positions K+1, K+2, etc. set to zero (element 610).
[0052] If at least one EPR is enabled for address transformation (as also detected in element 607), a determination may be made as to whether any of the address ranges indicated in the EPRs conflict with respect to each other. A conflict may be detected, for example, between two EPRs which are both enabled, and which overlap in either their processor-side address ranges or their memory-device-side address ranges. If a conflict is identified (element 613), one of the EPRs may be selected as the “effective” EPR (i.e., the EPR whose parameters are to override or supersede the other conflicting EPR(s)) based on a priority setting in the depicted embodiment (element 616). For example, individual ones of the EPRs may be assigned respective distinct priorities in the depicted embodiment, and the highest-priority EPR among a group of conflicting EPRs may be selected as the effective EPR.
[0053] If no conflicts are identified (as may also be determined in operations corresponding to element 613), all the non-conflicting enabled EPRs may be deemed effective (element 619) in the depicted embodiment. (It is noted that in some embodiments, only a single EPR may be used, in which case the question of detecting conflicts among EPRs may not arise, and that single EPR may be considered the effective EPR if it is enabled). The address range expander may determine whether the untransformed address u-addr lies within the processor-side transformation window (element 622). If u-addr lies within the window, a K+L bit transformed address t-addr may be generated from the u-addr based on the memory-device-side base address indicated in the EPR whose processor-side transformation window matched u-addr (element 625). The transformed address t-addr may then be transmitted to a memory-device-side subcomponent, such as a memory device controller, to initiate operations associated with the address indicated by t-addr (element 628). In some embodiments, as discussed above in the context of
[0054] If u-addr does not fall within the processor-side transformation window of an effective EPR, as also detected in element 622, in the depicted embodiment the effect would be the same as though address transformation is not enabled at any EPR. That is, u-addr may be transmitted, unchanged, as the low bits of the K+L bit address (element 610).
[0055]
[0056] If at least one EPR is enabled for address transformation (as also detected in element 707), a determination may be made as to whether any of the address ranges indicated in the EPRs conflict with respect to each other. As in
[0057] If the execution environment in which an address range expander is being used comprises multiple applications which are permitted to modify expansion parameter registers, the possibility of conflicts between the applications with respect to address transformations may arise.
[0058] In
[0059] In a second approach towards EPR use illustrated in
[0060] As mentioned earlier in the context of
[0061] Consider an example scenario in which K is 32 and L is 4. That is, at least some 32-bit addresses output by processors 910 are transformed to 36-bit addresses of the physical memory device 950. The physical memory device 950 may be partitioned such that each processor 910 has its own dedicated partition(s) (such as partitions 960A-960D for processors 910A-910D respectively). In some embodiments, each partition 960 may be the same size (e.g., three gigabytes or four gigabytes), while in other embodiments the partitions may have different sizes. Each partition 960 may be used to house the corresponding processor's unique boot and/or application code. This code may be loaded into the memory device 950 by a separate management processor in some embodiments. Alternatively, in one embodiment the code could be loaded to the memory partitions from an external storage device as part of the boot process of the first processor which boots among the set of processors 910A-910D. Once this first processor has booted, it may reset the other processors, allowing them to boot.
[0062] The arrangement shown in
[0063] It is noted that with respect to the techniques for address range expansion discussed above, various modifications and changes may be made as would be obvious to a person skilled in the art having the benefit of this disclosure. It is intended to embrace all such modifications and changes and, accordingly, the above description to be regarded in an illustrative rather than a restrictive sense.