edu.byu.ece.edif.arch.xilinx
Class EdifXPowerParser

java.lang.Object
  extended by edu.byu.ece.edif.arch.xilinx.EdifXPowerParser

public class EdifXPowerParser
extends java.lang.Object

Since:
Created on Jun 14, 2005
Author:
nhr2

Field Summary
private  java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _capacitances
           
private  java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _currents
           
private  java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _frequencies
           
private  java.util.ArrayList<java.util.ArrayList<java.lang.String>> _names
           
private  int _numLineElements
          This is the number of items in an entry of the given file section
private  java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _powers
           
private  java.lang.String _section
          This string represents the XPower file section to parse
private  java.util.ArrayList _xpowerNames
          This List contains the XPower names for a given file section
static int[] xpowerLineElements
           
static java.lang.String[] xpowerSections
          This is the list of possible XPower file sections
 
Constructor Summary
EdifXPowerParser(java.lang.String fileName)
           
EdifXPowerParser(java.lang.String fileName, java.lang.String section)
           
 
Method Summary
protected  java.util.List _parseXPowerFileSectionFull(java.lang.String fileName, int sectionIdx)
          This is a helper method to help parse the different sections of the XPower file.
protected  void _printXPowerSection(java.io.PrintWriter pw, int section)
           
 java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getCapactiances()
           
 java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getCurrents()
           
 java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getFrequencies()
           
 java.util.ArrayList<java.util.ArrayList<java.lang.String>> getNames()
           
 java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getPowers()
           
 java.util.ArrayList getXPowerNames()
           
static void main(java.lang.String[] argv)
           
static java.util.List parseXPowerFile(java.lang.String fileName)
          This method will open the given "power" file and parse the contents to create a List of String objects where each String is a Net name or instance name in the file.
static java.util.List parseXPowerFileSection(java.lang.String fileName, java.lang.String section, int numLineElements)
          This is a helper method to help parse the different sections of the XPower file.
static void printXPowerFile(java.lang.String xpowerFile)
           
static void printXPowerFileSection(java.lang.String xpowerFile, java.lang.String section, int elements)
           
 void printXPowerNames()
          This method prints the signal names parsed from the XPower file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xpowerLineElements

public static int[] xpowerLineElements

xpowerSections

public static java.lang.String[] xpowerSections
This is the list of possible XPower file sections


_numLineElements

private int _numLineElements
This is the number of items in an entry of the given file section


_section

private java.lang.String _section
This string represents the XPower file section to parse


_xpowerNames

private java.util.ArrayList _xpowerNames
This List contains the XPower names for a given file section


_names

private java.util.ArrayList<java.util.ArrayList<java.lang.String>> _names

_capacitances

private java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _capacitances

_frequencies

private java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _frequencies

_currents

private java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _currents

_powers

private java.util.ArrayList<java.util.ArrayList<java.lang.Double>> _powers
Constructor Detail

EdifXPowerParser

public EdifXPowerParser(java.lang.String fileName,
                        java.lang.String section)

EdifXPowerParser

public EdifXPowerParser(java.lang.String fileName)
Method Detail

getNames

public java.util.ArrayList<java.util.ArrayList<java.lang.String>> getNames()

getCapactiances

public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getCapactiances()

getFrequencies

public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getFrequencies()

getCurrents

public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getCurrents()

getPowers

public java.util.ArrayList<java.util.ArrayList<java.lang.Double>> getPowers()

getXPowerNames

public java.util.ArrayList getXPowerNames()

main

public static void main(java.lang.String[] argv)

parseXPowerFile

public static java.util.List parseXPowerFile(java.lang.String fileName)
This method will open the given "power" file and parse the contents to create a List of String objects where each String is a Net name or instance name in the file.

Parameters:
fileName -
Returns:
List of names

printXPowerFile

public static void printXPowerFile(java.lang.String xpowerFile)

printXPowerFileSection

public static void printXPowerFileSection(java.lang.String xpowerFile,
                                          java.lang.String section,
                                          int elements)

printXPowerNames

public void printXPowerNames()
This method prints the signal names parsed from the XPower file


parseXPowerFileSection

public static java.util.List parseXPowerFileSection(java.lang.String fileName,
                                                    java.lang.String section,
                                                    int numLineElements)
This is a helper method to help parse the different sections of the XPower file.

Parameters:
fileName -
section -
numLineElements -
Returns:

_parseXPowerFileSectionFull

protected java.util.List _parseXPowerFileSectionFull(java.lang.String fileName,
                                                     int sectionIdx)
This is a helper method to help parse the different sections of the XPower file.

Parameters:
fileName -
section -
numLineElements -
Returns:

_printXPowerSection

protected void _printXPowerSection(java.io.PrintWriter pw,
                                   int section)