edu.byu.ece.edif.core
Interface EdifBusNetNamingPolicy

All Known Implementing Classes:
BasicEdifBusNetNamingPolicy

public interface EdifBusNetNamingPolicy

Defines an interface for different naming policies for individual nets within a bus. Since EDIF does not have a standard for naming individual wires of a bus, different tools implement such naming in an ad-hoc way. This interface defines a set of methods required for implementing a "policy" for naming individual nets that are part of a bus. Any class that implements this interface will be able to identify nets that are part of a bus and identify their bit position within the bus.

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

Method Summary
 java.lang.String generateBitSuffix(int bitNum)
          Given a bit number, create a bit suffix that matches the naming policy
 java.lang.String getBusBaseName(java.lang.String name)
          Return the basename of the single bit net without the bit number.
 int getBusPosition(java.lang.String name)
          Returns the bit position of the Net within the bus.
 java.lang.String getRegexString()
          Get the regular expression string used to parse bus net names for this policy
 boolean isValidBusNetName(java.lang.String name)
           
 

Method Detail

isValidBusNetName

boolean isValidBusNetName(java.lang.String name)
Returns:
true if the given name is valid under the given naming policy. This method should only return true if the naming policy can return both the basename and bit position of the net.

generateBitSuffix

java.lang.String generateBitSuffix(int bitNum)
Given a bit number, create a bit suffix that matches the naming policy

Parameters:
bitPos - bit position

getBusPosition

int getBusPosition(java.lang.String name)
Returns the bit position of the Net within the bus. Will return a non-negative value if the string is valid. Otherwise, it returns -1.


getBusBaseName

java.lang.String getBusBaseName(java.lang.String name)
Return the basename of the single bit net without the bit number. 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 net names for this policy