byucc.jhdl.parsers.edif.sablecc
Class EdifParser

java.lang.Object
  extended bybyucc.jhdl.parsers.edif.sablecc.EdifParser

public class EdifParser
extends java.lang.Object

This class provides the basic interface to parsing EDIF files into JHDL.


Field Summary
static JHDLOutput jout
          JHDLOutput for EdifParser
static java.lang.String MESSAGE
          A message prepended to output.
static java.lang.String target
          The default target.
 
Constructor Summary
EdifParser()
           
 
Method Summary
static void addToMergePortList(java.lang.String nam)
          Adds nam to a list of ports that the JHDL Translator will attempt to merge into a single bus port.
static void clearMergePortList()
          Clears the list of ports that the JHDL Translator will attempt to merge into a single bus port.
static void main(java.lang.String[] args)
          Method used to parse an edif file according to the given parameters and build a wrapper file.
static Cell parse(Cell parent, java.lang.String filename, EdifPortInterface[] portWires, java.lang.String targetStr)
          Method to return a JHDL Cell as the result of parsing the given edif file
static Cell parse(Cell parent, java.lang.String filename, java.lang.String subcellname, EdifPortInterface[] portWires, java.lang.String targetStr)
          Method to return a JHDL Cell as the result of parsing the given edif file
static Cell parse(Cell parent, java.lang.String filename, java.lang.String subcellname, Wire[] portWires, java.lang.String targetStr)
          Method to return a JHDL Cell as the result of parsing the given edif file
static Cell parse(Cell parent, java.lang.String filename, Wire[] portWires, java.lang.String targetStr)
          Method to return a JHDL Cell as the result of parsing the given edif file
static Cell parse(java.lang.String filename, java.lang.String targetStr)
          Method to support the automatic parsing of a file to be used by DRC, etc.
static Cell parse(Tbone tbone, java.lang.String filename)
          Method to support the automatic parsing of a file to be a child of Tbone
static void parse(Tbone tbone, java.lang.String filename, java.lang.String targetStr)
          Method to support the automatic parsing of a file to be a child of Tbone
static void parseAndBuildWrapper(java.lang.String filename, java.lang.String targetStr)
          Method that will generate JHDL source code to act as a wrapper for a given edif file.
static void parseAndBuildWrapper(java.lang.String filename, java.lang.String subcellname, java.lang.String targetStr)
          Method that will generate JHDL source code to act as a wrapper for a given edif file.
static void print(java.lang.String filename)
          Method to parse the given file and generate corresponding JHDL source to the "EdifParser" JHDLOutput.
static void removeFromMergePortList(java.lang.String nam)
          Removes nam from a list of ports that the JHDL Translator will attempt to merge into a single bus port.
static void setCaseSensitive(boolean b)
          Method to determine the type of input stream to send into the parser, if b is true, the input stream will maintain the case, if false, the input stream will be all lower case
static EdifToJHDLTranslator translate(java.lang.String filename)
          Method to return a EdifToJHDLTranslator based on the given edif file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jout

public static JHDLOutput jout
JHDLOutput for EdifParser


target

public static java.lang.String target
The default target. Initial value of "Virtex"


MESSAGE

public static final java.lang.String MESSAGE
A message prepended to output.

See Also:
Constant Field Values
Constructor Detail

EdifParser

public EdifParser()
Method Detail

addToMergePortList

public static void addToMergePortList(java.lang.String nam)
Adds nam to a list of ports that the JHDL Translator will attempt to merge into a single bus port.

Parameters:
nam - the name of the port to merge

clearMergePortList

public static void clearMergePortList()
Clears the list of ports that the JHDL Translator will attempt to merge into a single bus port.


removeFromMergePortList

public static void removeFromMergePortList(java.lang.String nam)
Removes nam from a list of ports that the JHDL Translator will attempt to merge into a single bus port.

Parameters:
nam - the name of the port to remove from merge list

setCaseSensitive

public static void setCaseSensitive(boolean b)
Method to determine the type of input stream to send into the parser, if b is true, the input stream will maintain the case, if false, the input stream will be all lower case

Parameters:
b - Case sensitivity enabled if true.

parseAndBuildWrapper

public static void parseAndBuildWrapper(java.lang.String filename,
                                        java.lang.String targetStr)
Method that will generate JHDL source code to act as a wrapper for a given edif file.

Parameters:
filename - The name of the file containing the edif
targetStr - The name of the target technology

parseAndBuildWrapper

public static void parseAndBuildWrapper(java.lang.String filename,
                                        java.lang.String subcellname,
                                        java.lang.String targetStr)
Method that will generate JHDL source code to act as a wrapper for a given edif file.

Parameters:
filename - The name of the file containing the edif
subcellname - The name a subcell of the top-level hierarchy of the edif file, for which the wrapper will be built
targetStr - The name of the target technology

parse

public static Cell parse(Cell parent,
                         java.lang.String filename,
                         EdifPortInterface[] portWires,
                         java.lang.String targetStr)
Method to return a JHDL Cell as the result of parsing the given edif file

Parameters:
parent - This JHDL Cell will be the parent of the Cell generated by the method
filename - Name of the file for the edif to be parsed
portWires - Interface of the cell to be generated
targetStr - Name of the technology to be targetted

parse

public static Cell parse(Cell parent,
                         java.lang.String filename,
                         java.lang.String subcellname,
                         EdifPortInterface[] portWires,
                         java.lang.String targetStr)
Method to return a JHDL Cell as the result of parsing the given edif file

Parameters:
parent - This JHDL Cell will be the parent of the Cell generated by the method
filename - Name of the file for the edif to be parsed
subcellname - Name of subcell of the outermost cell in filename. The name of the subcell to be returned by this method
portWires - Interface of the cell to be generated
targetStr - Name of the technology to be targetted

parse

public static Cell parse(Cell parent,
                         java.lang.String filename,
                         Wire[] portWires,
                         java.lang.String targetStr)
Method to return a JHDL Cell as the result of parsing the given edif file

Parameters:
parent - This JHDL Cell will be the parent of the Cell generated by the method
filename - Name of the file for the edif to be parsed
portWires - Array of Wires to be attached to the ports of the cell generated
targetStr - Name of the technology to be targetted

parse

public static Cell parse(Cell parent,
                         java.lang.String filename,
                         java.lang.String subcellname,
                         Wire[] portWires,
                         java.lang.String targetStr)
Method to return a JHDL Cell as the result of parsing the given edif file

Parameters:
parent - This JHDL Cell will be the parent of the Cell generated by the method
filename - Name of the file for the edif to be parsed
subcellname - Name of subcell of the outermost cell in filename. The name of the subcell to be returned by this method
portWires - Array of Wires to be attached to the ports of the cell generated
targetStr - Name of the technology to be targetted

print

public static void print(java.lang.String filename)
Method to parse the given file and generate corresponding JHDL source to the "EdifParser" JHDLOutput.

Parameters:
filename - Name of the edif file to be parsed

parse

public static Cell parse(java.lang.String filename,
                         java.lang.String targetStr)
Method to support the automatic parsing of a file to be used by DRC, etc.

Parameters:
filename - The file to parse.
targetStr - The target technology ("XC4000" or "Virtex")

parse

public static void parse(Tbone tbone,
                         java.lang.String filename,
                         java.lang.String targetStr)
Method to support the automatic parsing of a file to be a child of Tbone

Parameters:
tbone - An instance of Tbone to be the parent of the parsed cell
filename - The file to parse.
targetStr - The target technology ("XC4000" or "Virtex")

parse

public static Cell parse(Tbone tbone,
                         java.lang.String filename)
Method to support the automatic parsing of a file to be a child of Tbone

Parameters:
tbone - An instance of Tbone to be the parent of the parsed cell
filename - The file to parse.

translate

public static EdifToJHDLTranslator translate(java.lang.String filename)
Method to return a EdifToJHDLTranslator based on the given edif file

Parameters:
filename - Name of the edif file

main

public static void main(java.lang.String[] args)
Method used to parse an edif file according to the given parameters and build a wrapper file. Run without any arguments to see usage.

Parameters:
args - Commandline arguments


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