edu.byu.ece.edif.util.export.jhdl
Class BuildWrapper

java.lang.Object
  extended by edu.byu.ece.edif.util.export.jhdl.JHDLWrapper
      extended by edu.byu.ece.edif.util.export.jhdl.BuildWrapper

public class BuildWrapper
extends JHDLWrapper

Includes functionality for loading a design directly into cvt.

TODO:

Version:
$Id: BuildWrapper.java 83 2008-05-30 16:30:32Z brianpratt $
Author:
Welson Sun, Tyler Anderson

Field Summary
private static int _gndcnt
           
private static int _netcnt
           
private static int _pullupcnt
           
static java.lang.String BACK_TO_EDIF
           
static java.lang.String CLASSNAME_EXTENSION
          Extension to add onto the created .java file for the wrapper.
static javax.swing.JMenuItem edifMenu
           
static java.lang.String MENU_EDIF
           
private static int MINARGNUMBER
          The minimum argument number for this class.
 
Fields inherited from class edu.byu.ece.edif.util.export.jhdl.JHDLWrapper
VALID_TECHNOLOGY
 
Constructor Summary
BuildWrapper()
           
 
Method Summary
static void connectDanglingPorts(InstanceHierarchy hier)
           
static void createJHDLdotJavaFile(java.lang.String newFileName, java.lang.String technologyName, EdifCell topcell, java.lang.String topFileName, java.util.Collection subFiles)
          Prints out a *_wrapper.java file for the passed-in EdifCell.
static java.util.Collection findTrueInputPortRefs(EdifNet net)
           
static java.util.Collection findTrueOutputPortRefs(EdifNet net)
           
static void gndPort(EdifCell parent, EdifPort inPort)
           
static void main(java.lang.String[] args)
           
static java.lang.String oneUnderScorize(java.lang.String name)
           
static void openCircuitInCVT(java.lang.String technologyName, EdifCellInstance topCellInstance)
           
static void openCircuitInCVT(java.lang.String technologyName, EdifCellInstance topCellInstance, boolean addEdifCellInstanceAsProperty)
          Opens the given EdifCellInstance in a cvtFrame.
private static void parseArgs(java.lang.String[] args)
          Parses the arguments passed to the wrapper.
private static void printHelp()
          Prints a help message, describing the options to pass to this class.
private static void printUsage()
          Prints out information on how to pass the options to this class.
static void pullupFloatingOutputs(InstanceHierarchy hier)
           
static void pullupPort(EdifCell parent, EdifNet net)
           
static void pullupTopIOPorts(InstanceHierarchy heir)
           
private static void testLoadCount(byucc.jhdl.base.Cell top)
           
private static void testNaming(byucc.jhdl.base.Cell test)
           
private static void testWireToAllWires(byucc.jhdl.base.Cell top)
           
private static void testWireXilinxName(byucc.jhdl.base.Cell top)
           
private static void writeCellInterface(java.io.PrintWriter fp, EdifCell topcell)
          Writes the wrapper's CellInterface.
private static void writeClassGuts(java.io.PrintWriter fp, EdifCell topcell, java.lang.String technologyName, java.lang.String className, java.lang.String topFileName, java.util.Collection subFiles)
          Writes the wrapper's body.
private static void writeClassHeader(java.io.PrintWriter fp, java.lang.String technology, java.lang.String className)
          Writes the wrapper's class header.
private static void writeConstructor(java.io.PrintWriter fp, EdifCell topcell, java.lang.String className)
          Writes the wrapper's Constructor.
private static void writePortWires(java.io.PrintWriter fp, EdifCell topcell)
          Writes the wrapper's port wires.
 
Methods inherited from class edu.byu.ece.edif.util.export.jhdl.JHDLWrapper
buildWrapper, buildWrapper, checkTechnologyValidity, createWiresFromPorts, JHDL_ID, listValidTechnologies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BACK_TO_EDIF

public static final java.lang.String BACK_TO_EDIF
See Also:
Constant Field Values

CLASSNAME_EXTENSION

public static final java.lang.String CLASSNAME_EXTENSION
Extension to add onto the created .java file for the wrapper. *

See Also:
Constant Field Values

edifMenu

public static javax.swing.JMenuItem edifMenu

MENU_EDIF

public static final java.lang.String MENU_EDIF
See Also:
Constant Field Values

MINARGNUMBER

private static final int MINARGNUMBER
The minimum argument number for this class. *

See Also:
Constant Field Values

_gndcnt

private static int _gndcnt

_pullupcnt

private static int _pullupcnt

_netcnt

private static int _netcnt
Constructor Detail

BuildWrapper

public BuildWrapper()
Method Detail

connectDanglingPorts

public static void connectDanglingPorts(InstanceHierarchy hier)

createJHDLdotJavaFile

public static void createJHDLdotJavaFile(java.lang.String newFileName,
                                         java.lang.String technologyName,
                                         EdifCell topcell,
                                         java.lang.String topFileName,
                                         java.util.Collection subFiles)
Prints out a *_wrapper.java file for the passed-in EdifCell.

Parameters:
newFileName - The file name for the wrapper
technologyName - The technology this wrapper will use
topcell - The Top cell of the design for the wrapper file
subFiles - The sub files, if any, needed by the top EdifFile

findTrueInputPortRefs

public static java.util.Collection findTrueInputPortRefs(EdifNet net)

findTrueOutputPortRefs

public static java.util.Collection findTrueOutputPortRefs(EdifNet net)

gndPort

public static void gndPort(EdifCell parent,
                           EdifPort inPort)

main

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

oneUnderScorize

public static java.lang.String oneUnderScorize(java.lang.String name)

openCircuitInCVT

public static void openCircuitInCVT(java.lang.String technologyName,
                                    EdifCellInstance topCellInstance)

openCircuitInCVT

public static void openCircuitInCVT(java.lang.String technologyName,
                                    EdifCellInstance topCellInstance,
                                    boolean addEdifCellInstanceAsProperty)
Opens the given EdifCellInstance in a cvtFrame. First a JHDL cell will be created, and then it will be passed to cvtFrame's constructor.

Parameters:
technologyName - The technology of the circuit for library finding purposes.
topCellInstance - The cell instance that will be the root to the root cell to the cvtFrame.

pullupFloatingOutputs

public static void pullupFloatingOutputs(InstanceHierarchy hier)

pullupPort

public static void pullupPort(EdifCell parent,
                              EdifNet net)

pullupTopIOPorts

public static void pullupTopIOPorts(InstanceHierarchy heir)

parseArgs

private static void parseArgs(java.lang.String[] args)
Parses the arguments passed to the wrapper.

Parameters:
args - The passed arguments.

printHelp

private static void printHelp()
Prints a help message, describing the options to pass to this class.


printUsage

private static void printUsage()
Prints out information on how to pass the options to this class.


testLoadCount

private static void testLoadCount(byucc.jhdl.base.Cell top)

testNaming

private static void testNaming(byucc.jhdl.base.Cell test)

testWireToAllWires

private static void testWireToAllWires(byucc.jhdl.base.Cell top)

testWireXilinxName

private static void testWireXilinxName(byucc.jhdl.base.Cell top)

writeCellInterface

private static void writeCellInterface(java.io.PrintWriter fp,
                                       EdifCell topcell)
Writes the wrapper's CellInterface.

Parameters:
fp - The PrintWriter Object used to print the wrapper
topcell - The Top cell of the design for the wrapper file

writeClassGuts

private static void writeClassGuts(java.io.PrintWriter fp,
                                   EdifCell topcell,
                                   java.lang.String technologyName,
                                   java.lang.String className,
                                   java.lang.String topFileName,
                                   java.util.Collection subFiles)
Writes the wrapper's body.

Parameters:
fp - The PrintWriter Object used to print the wrapper
topcell - The Top cell of the design for the wrapper
technologyName - The technology this wrapper will use
className - The name of the class file
subFiles - The sub files, if any, needed by the top EdifFile

writeClassHeader

private static void writeClassHeader(java.io.PrintWriter fp,
                                     java.lang.String technology,
                                     java.lang.String className)
Writes the wrapper's class header.

Parameters:
fp - The PrintWriter Object used to print the wrapper
technology - The technology used by the wrapper
className - The name of the class

writeConstructor

private static void writeConstructor(java.io.PrintWriter fp,
                                     EdifCell topcell,
                                     java.lang.String className)
Writes the wrapper's Constructor.

Parameters:
fp - The PrintWriter Object used to print the wrapper
topcell - The Top cell of the design for the wrapper
className - The name of the class file

writePortWires

private static void writePortWires(java.io.PrintWriter fp,
                                   EdifCell topcell)
Writes the wrapper's port wires.

Parameters:
fp - The PrintWriter Object used to print the wrapper
topcell - The Top cell of the design for the wrapper