edu.byu.ece.edif.core
Interface EdifBusNamingPolicy

All Known Implementing Classes:
BasicEdifBusNamingPolicy

public interface EdifBusNamingPolicy

Defines an interface for different naming policies for multi-bit bus names. These names are used for ports as ports are the only object that support multiple bits. This interface defines a set of methods required for implementing a "policy" for naming buses.

Since:
Created on May 13, 2005
Author:
Michael J Wirthlin

Method Summary
 java.lang.String getBusBaseName(java.lang.String name)
          Return the basename of the bus name without all of the bus range information.
 java.lang.String getBusRangeSpecifier(java.lang.String name)
          Return the portion of the bus string that specifies the range of the bus.
 int getLeftBusLimit(java.lang.String name)
          Returns the integer value of the "left" bus limit within the bus string name (i.e.
 java.lang.String getRegexString()
          Get the regular expression string used to parse bus names for this policy
 int getRightBusLimit(java.lang.String name)
          Returns the integer value of the "right" bus limit within the bus string name (i.e.
 boolean isLittleEndian(java.lang.String name)
          Determine the bit ordering of the given EDIF bus name.
 boolean isValidBusName(java.lang.String name)
          Indicates whether the given String is a valid Bus name using the implemented bus naming policy.
 

Method Detail

isValidBusName

boolean isValidBusName(java.lang.String name)
Indicates whether the given String is a valid Bus name using the implemented bus naming policy.


getLeftBusLimit

int getLeftBusLimit(java.lang.String name)
Returns the integer value of the "left" bus limit within the bus string name (i.e. will return a "4" for the following naming example "(4:8)"). Will return a non-negative value if the string is valid. Otherwise, it returns -1.


getRightBusLimit

int getRightBusLimit(java.lang.String name)
Returns the integer value of the "right" bus limit within the bus string name (i.e. will return a "8" for the following naming example "(4:8)"). Will return a non-negative value if the string is valid. Otherwise, it returns -1.


isLittleEndian

boolean isLittleEndian(java.lang.String name)
Determine the bit ordering of the given EDIF bus name. Little endian implies that the "little" end of the bus (i.e. bit 0) comes first. Big endian implies that the "big" end of the bus comes first (i.e. bit 31). LittleEndian:(31:0) BigEndian: (0:31)


getBusRangeSpecifier

java.lang.String getBusRangeSpecifier(java.lang.String name)
Return the portion of the bus string that specifies the range of the bus. This String does not include the basename.


getBusBaseName

java.lang.String getBusBaseName(java.lang.String name)
Return the basename of the bus name without all of the bus range information. This method will should return a null if the name does not match the bus naming policy.


getRegexString

java.lang.String getRegexString()
Get the regular expression string used to parse bus names for this policy