byucc.edif.jhdl
Class BuildWrapper

java.lang.Object
  extended bybyucc.edif.jhdl.JHDLWrapper
      extended bybyucc.edif.jhdl.BuildWrapper

public class BuildWrapper
extends JHDLWrapper

Includes functionality for loading a design directly into cvt. TODO:

Version:
$Id: BuildWrapper.java,v 1.66 2004/12/02 23:43:25 tsa6 Exp $
Author:
Welson Sun, Tyler Anderson

Field Summary
private static boolean addEdifCellInstanceAsProperty
          Arg specifying whether to have the option of going from EDIF to JHDL, and back to EDIF again.
static java.lang.String BACK_TO_EDIF
           
static java.lang.String CLASSNAME_EXTENSION
          Extension to add onto the created .java file for the wrapper.
private static java.util.Collection dirs
          Argument holding the Collection of search directories for merging.
private static java.lang.String edifFileName
          Argument specifying the topEdifFile name for parsing.
static javax.swing.JMenuItem edifMenu
           
static java.lang.String MENU_EDIF
           
private static boolean merge
          Argument specifying whether or not to merge.
private static int MINARGNUMBER
          The minimum argument number for this class.
private static boolean nocvt
          Argument specifying whether or not to load the circuit in cvt.
private static java.util.Collection subFiles
          Argument holding the Collection of sub files for merging.
private static java.lang.String technologyName
          Argument specifying the technology.
private static java.lang.String writeEdifFileName
          Argument specifying the filename to write the completed/merged Edif file to.
private static boolean writeWrapper
          Argument specifying whether or not to write the wrapper.java file.
 
Fields inherited from class byucc.edif.jhdl.JHDLWrapper
VALID_TECHNOLOGY
 
Constructor Summary
BuildWrapper()
           
 
Method Summary
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 void main(java.lang.String[] args)
           
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.
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 byucc.edif.jhdl.JHDLWrapper
addPorts, buildWrapper, buildWrapper, checkTechnologyValidity, JHDL_ID, listValidTechnologies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MENU_EDIF

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

BACK_TO_EDIF

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

edifMenu

public static javax.swing.JMenuItem edifMenu

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

MINARGNUMBER

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

See Also:
Constant Field Values

edifFileName

private static java.lang.String edifFileName
Argument specifying the topEdifFile name for parsing.


writeEdifFileName

private static java.lang.String writeEdifFileName
Argument specifying the filename to write the completed/merged Edif file to.


technologyName

private static java.lang.String technologyName
Argument specifying the technology.


writeWrapper

private static boolean writeWrapper
Argument specifying whether or not to write the wrapper.java file.


dirs

private static java.util.Collection dirs
Argument holding the Collection of search directories for merging.


subFiles

private static java.util.Collection subFiles
Argument holding the Collection of sub files for merging.


merge

private static boolean merge
Argument specifying whether or not to merge.


nocvt

private static boolean nocvt
Argument specifying whether or not to load the circuit in cvt.


addEdifCellInstanceAsProperty

private static boolean addEdifCellInstanceAsProperty
Arg specifying whether to have the option of going from EDIF to JHDL, and back to EDIF again.

Constructor Detail

BuildWrapper

public BuildWrapper()
Method Detail

main

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

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.

openCircuitInCVT

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

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.


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

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

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

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

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