byucc.jhdl.parsers.xnf
Class XNFParser

java.lang.Object
  extended bybyucc.jhdl.parsers.xnf.XNFParser

public class XNFParser
extends java.lang.Object

XNFParser.java

Author:
Anthony Slade The XNFParser class is used as a wrapper for the XNFToJHDLTranslator class so that if we change way most of the classes interact, we don't have to rebuild SableCC-generated code, just this smaller class. This class also contains the static methods to invoke to actually perform the parsing.

Constructor Summary
XNFParser()
           
 
Method Summary
static void main(java.lang.String[] arguments)
           
static void parseXNF(Cell parent, java.lang.Object[] ports, java.lang.String fileName)
          parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file.
static void parseXNF(Cell parent, java.lang.Object[] ports, java.lang.String fileName, boolean pushHierarchy)
          parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file.
static void parseXNF(Cell parent, java.lang.String[] wireNames, Wire[] xnfWires, java.lang.String fileName)
          parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file.
static void parseXNF(Cell parent, java.lang.String[] wireNames, Wire[] xnfWires, java.lang.String fileName, boolean pushHierarchy)
          parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XNFParser

public XNFParser()
Method Detail

main

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

parseXNF

public static void parseXNF(Cell parent,
                            java.lang.Object[] ports,
                            java.lang.String fileName)
parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file. The XNFPrsrVisitor instantiated is an instance of XNFToJHDLVisitor which will build the JHDL wires and cells while it visits the .xnf file components.

Parameters:
parent - The JHDL parent cell of the XNF file
ports - This object can be either an array of Wire or an array of XNFPortInterface. If the user names of the wires (as returned by the getUserName method of the Wire class) match exactly the names of the wires as found in the .xnf file, then an array of Wire is sufficient; otherwise, an array of XNFPortInterface will be necessary in order to pair up the proper names with the instances of Wire. The other option available is to use the parseXNF method that takes two arrays as parameters.
fileName - The name of the .xnf file. It can include or omit the .xnf extension; but either way, the XNFParser expects the actual file name to contain that extension.

parseXNF

public static void parseXNF(Cell parent,
                            java.lang.Object[] ports,
                            java.lang.String fileName,
                            boolean pushHierarchy)
parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file. The XNFPrsrVisitor instantiated is an instance of XNFToJHDLVisitor which will build the JHDL wires and cells while it visits the .xnf file components.

Parameters:
parent - The JHDL parent cell of the XNF file
ports - This object can be either an array of Wire or an array of XNFPortInterface. If the user names of the wires (as returned by the getUserName method of the Wire class) match exactly the names of the wires as found in the .xnf file, then an array of Wire is sufficient; otherwise, an array of XNFPortInterface will be necessary in order to pair up the proper names with the instances of Wire. The other option available is to use the parseXNF method that takes two arrays as parameters.
fileName - The name of the .xnf file. It can include or omit the .xnf extension; but either way, the XNFParser expects the actual file name to contain that extension.
pushHierarchy - If true, then the XNFToJHDLVisitor will create another level of JHDL hierarchy in which it will place the components of the .xnf file.

parseXNF

public static void parseXNF(Cell parent,
                            java.lang.String[] wireNames,
                            Wire[] xnfWires,
                            java.lang.String fileName)
parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file. The XNFPrsrVisitor instantiated is an instance of XNFToJHDLVisitor which will build the JHDL wires and cells while it visits the .xnf file components.

Parameters:
parent - The JHDL parent cell of the XNF file
wireNames - This is an array of the names of the wires found in xnfWires.
xnfWires - This array contains the wires that will be attached to the top-level components of the circuitry found in the .xnf file. These wires must match up with the wire names in wireNames (index for index).
fileName - The name of the .xnf file. It can include or omit the .xnf extension; but either way, the XNFParser expects the actual file name to contain that extension.

parseXNF

public static void parseXNF(Cell parent,
                            java.lang.String[] wireNames,
                            Wire[] xnfWires,
                            java.lang.String fileName,
                            boolean pushHierarchy)
parseXNF will instantiate an XNFPrsr and an XNFPrsrVisitor to parse and visit the elements of an .xnf file. The XNFPrsrVisitor instantiated is an instance of XNFToJHDLVisitor which will build the JHDL wires and cells while it visits the .xnf file components.

Parameters:
parent - The JHDL parent cell of the XNF file
wireNames - This is an array of the names of the wires found in xnfWires.
xnfWires - This array contains the wires that will be attached to the top-level components of the circuitry found in the .xnf file. These wires must match up with the wire names in wireNames (index for index).
fileName - The name of the .xnf file. It can include or omit the .xnf extension; but either way, the XNFParser expects the actual file name to contain that extension.
pushHierarchy - If true, then the XNFToJHDLVisitor will create another level of JHDL hierarchy in which it will place the components of the .xnf file.


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.