|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.dms.kjc.spacetime.Address
public class Address
This class represents an unsigned 32-bit address in the SpaceTime backend. It has functions for adding, subtracting, aligning, and printing unsigned 32-bit values. Conceptually, it is used to represent a 32-bit address for memory that is byte-addressable.
| Field Summary | |
|---|---|
static Address |
MAX_ADDRESS
|
static Address |
ZERO
|
| Method Summary | |
|---|---|
Address |
add(Address i)
Add the value of i to this address and return a new address with this value. |
Address |
add(int i)
Add the value of i to this address and return a new address with this value. |
Address |
add32Byte(int i)
Add the value of i to this address and return a new address with this value, round up the value to the next 32-byte boundary. |
Address |
ceil32()
Return a new Address whose value is the next 32-byte aligned Address greater than this. |
Address |
div(int i)
Return a new Address whose value is this / i. |
static boolean |
inRange(Address addr,
Address lb,
Address ub)
Return true if addr is within the range [lb, ub]. |
Address |
mult(int i)
Return a new Address whose value is this * i. |
static String |
toHex(long addr)
Return the hexadecimal string that represents this 32-bit unsigned value addr. |
String |
toString()
Return the hexadecimal representation of the unsigned int. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Address MAX_ADDRESS
public static Address ZERO
| Method Detail |
|---|
public String toString()
toString in class ObjecttoHex(long)public static String toHex(long addr)
addr - The 32-bit unsigned value.
public Address add(Address i)
i - The value to add to this address.
public Address add(int i)
i - The value to add to this address.
public Address add32Byte(int i)
i - The value to add to this address.
public Address ceil32()
public Address div(int i)
i - The divisor.
public Address mult(int i)
i - The multiplier
public static boolean inRange(Address addr,
Address lb,
Address ub)
addr - The address to test.lb - The lower bound.ub - The upper bound.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||