|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbyucc.edif.EdifBusNameOps
Contains methods for parsing bus-related information from String Objects.
| Constructor Summary | |
EdifBusNameOps()
|
|
| Method Summary | |
static java.lang.String |
getBaseName(java.lang.String name)
Returns the base name of this port if it is part of a bus (but isn't). |
static int |
getBitPosition(java.lang.String name)
Returns the position this port is within a bus if it is part of a bus (but isn't). |
private static int |
getLeftRange(java.lang.String oldName)
If this port is a bus then this method returns the position on the left side of the colon (:). |
static int |
getLSB(EdifNameable name)
Returns the lower range value of the bus, if not a bus then -1 is returned. |
static int |
getMSB(EdifNameable name)
Returns the higher range value of the bus, if not a bus -1 is returned. |
private static int |
getRightRange(java.lang.String oldName)
If this port is a bus then this method returns the position on the right side of the colon (:). |
static boolean |
isBus(EdifNameable name)
Returns true if the EdifNameable passed-in corresponds to that of a bus. |
static boolean |
isBus(java.lang.String name)
Returns true if the String passed-in corresponds to that of a bus. |
static boolean |
isPartOfBus(java.lang.String name)
Returns true if this port is part of a bus. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EdifBusNameOps()
| Method Detail |
public static java.lang.String getBaseName(java.lang.String name)
name - The String to bus-parse
public static int getBitPosition(java.lang.String name)
This method will return the original bit position of an EdifPort
or EdifNet.
For example, (rename diff_0 "diff(0)") will return 0, a return value of -1 means no bit position has been designated or it's a bus.
name - The String to bus-parse
public static int getLSB(EdifNameable name)
This method will return the LSB of an bus version EdifPort.
For example, (rename test_data_out "test_data_out(63:60)") 4) will return 63, a return value of -1 means no LSB has been designated.
name - The EdifNameable Object that contains name
information to bus-parse
public static int getMSB(EdifNameable name)
This method will return the MSB of an bus version EdifPort, or -1 if it isn't a bus.
For example, (rename test_data_out "test_data_out(63:60)") 4) will return 60, a return value of -1 means no MSB has been designated.
name - The EdifNameable Object that contains name
information to bus-parse
private static int getRightRange(java.lang.String oldName)
oldName - The String to bus-parse
EdifPort.getMSB(),
EdifPort.getLSB()private static int getLeftRange(java.lang.String oldName)
oldName - The String to bus-parse
EdifPort.getMSB(),
EdifPort.getLSB()public static boolean isBus(java.lang.String name)
name - The String to bus-parse
public static boolean isBus(EdifNameable name)
name - The EdifNameable Object that contains name
information to bus-parse
public static boolean isPartOfBus(java.lang.String name)
name - The String to bus-parse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||