Methods and systems for applications to interact with hardware
First Claim
1. A computer implemented method of providing Java application layer access a fixed memory address space comprising:
- constructing a Java object having elements which occupy said fixed memory address space;
whereby a Java application is provided access to the hardware peripheral'"'"'s memory mapped registers directly through said Java object;
wherein constructing a Java object comprises;
creating an object descriptor;
creating an object handle for the Java object which points to the object descriptordefining a new Java class having base address, length, and type parameters, which is used in constructing said Java object; and
wherein new class is substantially defined in pseudocode as follows;
Class AnchoredArray{public int element[ ];
public AnchoredArray(int baseaddress, int length){element=lockDownElements(baseAdress,length);
Static private native int[ ] lockDownElements(int baseAddress, intlength);
}void AnchoredArray_lockDownelements( ){int base=popstack( );
int length=popstack( );
int *handle=malloc(SIZE_OF_HEADER);
(instance*) handle->
type=DEFAULT_TYPE;
(arrayStruct*) handle->
arrayBase=base;
(arrayStruct*) handle->
length=length;
push handle;
}.
6 Assignments
0 Petitions
Accused Products
Abstract
A method of providing Java application layer access to hardware peripheral memory mapped registers is provided together with a processor adapted to implement such a method. A fixed memory address space for a hardware peripheral'"'"'s memory mapped registers is identified, and a Java object is constructed having elements which occupy this fixed memory address space. This allows a Java application to be provided with access to the hardware peripheral'"'"'s memory mapped registers directly through the Java object. A new Java class is defined having base address and length parameters and in some cases also having a type parameter. This is used in constructing the Java object. When a Java object has an object descriptor which is effectively an object header and a pointer to where the object data is located, constructing the Java object may be done by creating an object descriptor, and then creating an object handle for the Java object which points to the object descriptor. Alternatively, a level of indirection may be removed, and the object handle created to point directly to the object created so as to exist in memory mapped register space.
-
Citations
4 Claims
-
1. A computer implemented method of providing Java application layer access a fixed memory address space comprising:
-
constructing a Java object having elements which occupy said fixed memory address space; whereby a Java application is provided access to the hardware peripheral'"'"'s memory mapped registers directly through said Java object; wherein constructing a Java object comprises; creating an object descriptor; creating an object handle for the Java object which points to the object descriptor defining a new Java class having base address, length, and type parameters, which is used in constructing said Java object; and wherein new class is substantially defined in pseudocode as follows; Class AnchoredArray { public int element[ ]; public AnchoredArray(int baseaddress, int length) { element=lockDownElements(baseAdress,length); Static private native int[ ] lockDownElements(int baseAddress, int length); } void AnchoredArray_lockDownelements( ) { int base=popstack( ); int length=popstack( ); int *handle=malloc(SIZE_OF_HEADER); (instance*) handle->
type=DEFAULT_TYPE;(arrayStruct*) handle->
arrayBase=base;(arrayStruct*) handle->
length=length;push handle; }.
-
-
2. A computer implemented method of providing lava application layer access a fixed memory address space comprising:
-
constructing a Java object having elements which occupy said fixed memory address space; whereby a Java application is provided access to the hardware peripheral'"'"'s memory mapped registers directly through said Java object; identifying the fixed memory address space to be a hardware peripheral'"'"'s memory mapped registers; wherein constructing a lava object comprises; defining a memory map having a predetermined address space for the hardware peripheral, and allocating at least one additional address space contiguous with the predetermined address space; storing object header information for the Java object directly in the additional address space; creating an object handle for the lava object which points to the object header; defining a new Java class having a base address parameter which is used in constructing said Java object; wherein the new Java class is substantially defined in pseudocode as follows; Class AnchoredArray { public int element[ ]; public AnchoredArray(int baseAddress) { element=lockDownElements(type,baseAddress); Static private native int[ ] lockDownElements(int baseAddress); } Void AnchoredArray-lockdownElements( ) { int base=popstack( ); pushStack(base); }.
-
-
3. A computer implemented method of providing application layer access to a fixed memory address space for an application in a language designed to prevent accessing particular memory locations directly, the method comprising:
-
constructing an object in the context of the language having elements which occupy said fixed memory address space; whereby the application is provided access to the fixed memory address space directly through said object; defining a new class having a class name <
class name>
as follows;<
class name>
(base, length);where <
class name>
is the name assigned to the new class, base is a parameter which specifies a type of object, base is a parameter which specifies a beginning address, and length is a parameter specifying a number of elements in the object, which when constructed, generates an object descriptor specifying base, length, and a generates a handle which points to the object descriptor;wherein the new class is substantially defined in pseudocode as follows; Class AnchoredArray { public int element[ ]; public AnchoredArray(int baseaddress, int length) { element=lockDownElements(baseAdress,length); Static private native int[ ] lockDownElements(int baseAddress, int length); } void AnchoredArray_lockDownelements( ) { int base=popstack( ); int length=popstack( ); int *handle=malloc(SIZE_OF_HEADER); (instance*) handle->
type=DEFAULT_TYPE;(arrayStruct*) handle->
arrayBase=base;(arrayStruct*) handle->
length=length;push handle; }.
-
-
4. A computer implemented method of providing application layer access to a fixed memory address space for an application in a language designed to prevent accessing particular memory locations directly, the method comprising:
-
constructing an object in the context of the language having elements which occupy said fixed memory address space; whereby the application is provided access to the fixed memory address space directly through said object; identifying the fixed memory address space to be a hardware peripheral'"'"'s memory mapped registers; wherein constructing an object comprises; defining a memory map having a predetermined address space for the hardware peripheral, and allocating at least one additional address space contiguous with the predetermined address space; storing object header information for the Java object directly in the additional address space; creating an object handle for the object which points to the object header; defining a new class having a base address parameter which is used in constructing said object; wherein the new class is substantially defined in pseudocode as follows; Class AnchoredArray { public int element[ ]; public AnchoredArray(int baseAddress) { element=lockDownElements(type,baseAddress); Static private native int[ ] lockDownElements(int baseAddress); } Void AnchoredArray_lockdownElements( ) { int base=popstack( ); pushStack(base); }.
-
Specification