byucc.jhdl.parsers.edif.sablecc.translation
Class EdifToJHDLTranslator

java.lang.Object
  extended bybyucc.jhdl.parsers.edif.sablecc.analysis.AnalysisAdapter
      extended bybyucc.jhdl.parsers.edif.sablecc.analysis.DepthFirstAdapter
          extended bybyucc.jhdl.parsers.edif.sablecc.translation.EdifToJHDLTranslator
All Implemented Interfaces:
Analysis, Switch

public class EdifToJHDLTranslator
extends DepthFirstAdapter

This class will walk the abstract syntax tree of a EdifFile and create a data structure that represents the semantic contents of this file. Specifically, this class will create a new EdifCell object that encapsulates all the circuit information for the top-level cell in the Edif file. This class uses the factory design pattern for generating EdifCell class objects. This allows users of the parser to force this class to generate application-specific variants of EdifCell. The DefaultEdifFactory will create the generic EdifCell object. The JHDLEdifFacotry will create JHDL-specific verisions of the EdifCell object.

See Also:
EdifCell

Field Summary
static JHDLOutput jout
          JHDLOutput for EdifParser
 JHDLOutput jout_ignore
           
 JHDLOutput jout_ignore_loud
           
static java.lang.String JOUT_IGNORE_LOUD_NAME
           
static java.lang.String JOUT_IGNORE_NAME
           
static java.lang.String MESSAGE
           
 
Constructor Summary
EdifToJHDLTranslator()
           
EdifToJHDLTranslator(EdifFactory factory)
          The constructor creates two JHDLOutput object and enable/disable them
 
Method Summary
static void addToMergePortList(java.lang.String nam)
           
 void caseACellref(ACellref node)
          f0 -> f1 -> f2 -> cellNameRef() f3 -> [ libraryRef() ] f4 ->
 void caseAContents(AContents node)
           
 void caseADontcare(ADontcare node)
           
 void caseAIdent(AIdent node)
          This method will set the currName variable from each node name definition
 void caseAInoutDirection(AInoutDirection node)
          f0 -> f1 -> f2 -> ( | | ) f3 ->
 void caseAInputDirection(AInputDirection node)
           
 void caseAMember(AMember node)
          f0 -> f1 -> f2 -> nameRef() f3 -> integerValue() f4 -> ( integerValue() )* f5 ->
 void caseAOutputDirection(AOutputDirection node)
           
 void caseAProperty(AProperty node)
          This method will add all the property (name, value) into the current instance cell's property list.
 void caseTIntegertoken(TIntegertoken node)
          f0 -> | valueNameRef() | floor() | ceiling() | fix() | mod() | xCoord() | yCoord() | abs() | max() | min() | negate() | product() | subtract() | sum()
 void caseTStringtoken(TStringtoken node)
           
static void clearMergePortList()
           
 JHDLEdifCell getRootCell()
          Return the root cell of the whole EDIF tree
 EdifCell getRootEdifCell()
           
 void inAArray(AArray node)
          f0 -> f1 -> f2 -> nameDef() f3 -> integerValue() f4 -> ( integerValue() )* f5 ->
 void inACell(ACell node)
          f0 -> f1 -> f2 -> cellNameDef() f3 -> cellType() f4 -> ( status() | view() | vixewMap() | property() | comment() | userData() )* f5 ->
 void inADontcare(ADontcare node)
           
 void inAEdif(AEdif node)
          f0 -> f1 -> f2 -> edifFileName() f3 -> edifVersion() f4 -> edifLevel() f5 -> keywordMap() f6 -> ( status() | external() | library() | design() | comment() | userData() )* f7 ->
 void inAInstance(AInstance node)
          f0 -> f1 -> f2 -> instanceNameDef() f3 -> ( viewRef() | viewList() ) f4 -> ( transform() | parameterAssign() | portInstance() | designator() | timing() | property() | comment() | userData() )* f5 ->
 void inAInstanceref(AInstanceref node)
          f0 -> f1 -> f2 -> instanceNameRef() f3 -> [ instanceRef() | viewRef() ] f4 ->
 void inANet(ANet node)
          f0 -> f1 -> f2 -> netNameDef() f3 -> joined() f4 -> ( criticality() | netDelay() | figure() | net() | instance() | commentGraphics() | property() | comment() | userData() )* f5 ->
 void inAPort(APort node)
          f0 -> f1 -> f2 -> portNameDef() f3 -> ( direction() | unused() | designator() | dcFaninLoad() | dcFanoutLoad() | dcMaxFanin() | acLoad() | portDelay() | property() | comment() | userData() )* f4 ->
 void inAPortref(APortref node)
          f0 -> f1 -> f2 -> portNameRef() f3 -> [ portRef() | instanceRef() | viewRef() ] f4 ->
 void inARename(ARename node)
          f0 -> f1 -> f2 -> ( ident() | name() ) f3 -> ( | stringDisplay() ) f4 ->
 void inAView(AView node)
          f0 -> f1 -> f2 -> viewNameDef() f3 -> viewType() f4 -> myInterface() f5 -> ( status() | contents() | comment() | property() | userData() )* f6 ->
static void main(java.lang.String[] args)
           
 void outACell(ACell node)
           
 void outADontcare(ADontcare node)
           
 void outAEdif(AEdif node)
           
 void outAInstance(AInstance node)
           
 void outAInterface(AInterface node)
          This method only checks the bus definition of the interface
 void outANet(ANet node)
          The method adds the currNet into the currCell's netList if it is not connected to any port
 void outAPort(APort node)
          This method will first add the current port into the portList ( if single wire, just add it, if bus, add bus name and all member wires ), then it processes the bus-look-like wire and create a respected bus if it does not exist or add it to the existing bus.
 void outAPortref(APortref node)
           
static void removeFromMergePortList(java.lang.String nam)
           
static EdifToJHDLTranslator translate(java.lang.String filename)
           
static EdifToJHDLTranslator translate(java.lang.String filename, boolean caseSensitive, EdifFactory factory)
           
 
Methods inherited from class byucc.jhdl.parsers.edif.sablecc.analysis.DepthFirstAdapter
caseAArray, caseAArrayInstancenamedef, caseAArraynamedef, caseAArrayNetnamedef, caseAArrayPortnamedef, caseABoolean, caseABooleanTypedvalue, caseABooleanvalue, caseACell, caseACellExternaloptions, caseACellLibraryoptions, caseACellnamedef, caseACellnameref, caseACelltokenNamedef, caseACelltokenNameref, caseACelltype, caseAComment, caseACommentCelloptions, caseACommentContentsoptions, caseACommentDesignoptions, caseACommentDontcareoptions, caseACommentEdifoptions, caseACommentExternaloptions, caseACommentInstanceoptions, caseACommentLibraryoptions, caseACommentNetbundleop, caseACommentNetoptions, caseACommentNumberdefinitionop, caseACommentPageoptions, caseACommentPortbundleop, caseACommentPortinstanceop, caseACommentPortoptions, caseACommentPropertyoptions, caseACommentProtectionframeop, caseACommentSymboloptions, caseACommentViewoptions, caseAContentsViewoptions, caseADesign, caseADesignEdifoptions, caseADesignnamedef, caseADirectionPortoptions, caseADontCareCelloptions, caseADontcareContentsoptions, caseADontCareDontcareoptions, caseADontCareEdifoptions, caseADontCareInstanceoptions, caseADontCareInterfaceop, caseADontCareNetoptions, caseADontCarePortoptions, caseADontCareViewoptions, caseAEdif, caseAEdiflevel, caseAEdiflevelvalue, caseAEdifnamedef, caseAEdifversion, caseAEee, caseAEScaledinteger, caseAExponent, caseAExternaEdifoptions, caseAExternal, caseAFalse, caseAFalseBooleantoken, caseAIdentDontcareoptions, caseAIdentNamedef, caseAIdentNameref, caseAImpmlementationContentsoptions, caseAInstance, caseAInstanceContentsoptions, caseAInstanceNetoptions, caseAInstancePageoptions, caseAInstancePortimplementationop, caseAInstanceProtectionframeop, caseAInstanceref, caseAInstancerefInstancerefop, caseAInstancerefPortrefop, caseAInstanceSymboloptions, caseAInteger, caseAIntegertokenScaledinteger, caseAIntegerTypedvalue, caseAIntegervalue, caseAInterface, caseAIntTokenDontcareoptions, caseAIssue, caseAJoined, caseAJoinedInterfaceop, caseAKeywordlevel, caseAKeywordlevelvalue, caseAKeywordmap, caseALibrary, caseALibraryEdifoptions, caseALibrarynamedef, caseALibrarynameref, caseALibraryref, caseAListofnets, caseAListofports, caseAMark, caseAMemberInstancenameref, caseAMemberPortnameref, caseANamedefInstancenamedef, caseANamedefInstancenameref, caseANamedefNetnamedef, caseANamedefPortnamedef, caseANamerefPortnameref, caseANet, caseANetbundle, caseANetbundleContentsoptions, caseANetbundlePageoptions, caseANetContentsoptions, caseANetlistNamedef, caseANetlistNameref, caseANetNetoptions, caseANetPageoptions, caseANettokenNamedef, caseANettokenNameref, caseANumber, caseANumberdefinition, caseANumberTypedvalue, caseANumbervalue, caseAOwner, caseAOwnerDontcareoptions, caseAOwnerPropertyoptions, caseAPage, caseAPageContentsoptions, caseAPort, caseAPortbundle, caseAPortbundleInterfaceop, caseAPortbundleListofportsop, caseAPortimplementation, caseAPortimplementationPageoptions, caseAPortimplementationProtectionframeop, caseAPortimplementationSymboloptions, caseAPortinstance, caseAPortinstanceInstanceoptions, caseAPortInterfaceop, caseAPortlist, caseAPortlistJoinedoptions, caseAPortListofportsop, caseAPortnamerefPortimpop, caseAPortnamerefPortinstop, caseAPortnamerefPortlistoptions, caseAPortref, caseAPortrefJoinedoptions, caseAPortrefPortimplementationop, caseAPortrefPortimpop, caseAPortrefPortinstop, caseAPortrefPortlistoptions, caseAPortrefPortrefop, caseAPropertyCelloptions, caseAPropertyDesignoptions, caseAPropertyDontcareoptions, caseAPropertyInstanceoptions, caseAPropertyInterfaceop, caseAPropertynamedef, caseAPropertyNetbundleop, caseAPropertyNetoptions, caseAPropertyPortbundleop, caseAPropertyPortimplementationop, caseAPropertyPortinstanceop, caseAPropertyPortoptions, caseAPropertyPropertyoptions, caseAPropertyProtectionframeop, caseAPropertySymboloptions, caseAPropertyViewoptions, caseAProtectionframe, caseAProtectionInterfaceop, caseARename, caseARenameDontcareoptions, caseARenameNamedef, caseAScale, caseAScaleNumberdefinitionop, caseAStrDontcareoptions, caseAString, caseAStringTypedvalue, caseAStringvalue, caseAStrTokenDontcareoptions, caseASubissue, caseASymbol, caseASymbolInterfaceop, caseATechnology, caseATrue, caseATrueBooleantoken, caseAUnit, caseAView, caseAViewCelloptions, caseAViewlist, caseAViewlistInstanceop, caseAViewlistViewlistop, caseAViewnamedef, caseAViewnameref, caseAViewref, caseAViewrefInstanceop, caseAViewrefInstancerefop, caseAViewrefPortrefop, caseAViewrefViewlistop, caseAViewtype, caseStart, defaultIn, defaultOut, inAArrayInstancenamedef, inAArraynamedef, inAArrayNetnamedef, inAArrayPortnamedef, inABoolean, inABooleanTypedvalue, inABooleanvalue, inACellExternaloptions, inACellLibraryoptions, inACellnamedef, inACellnameref, inACellref, inACelltokenNamedef, inACelltokenNameref, inACelltype, inAComment, inACommentCelloptions, inACommentContentsoptions, inACommentDesignoptions, inACommentDontcareoptions, inACommentEdifoptions, inACommentExternaloptions, inACommentInstanceoptions, inACommentLibraryoptions, inACommentNetbundleop, inACommentNetoptions, inACommentNumberdefinitionop, inACommentPageoptions, inACommentPortbundleop, inACommentPortinstanceop, inACommentPortoptions, inACommentPropertyoptions, inACommentProtectionframeop, inACommentSymboloptions, inACommentViewoptions, inAContents, inAContentsViewoptions, inADesign, inADesignEdifoptions, inADesignnamedef, inADirectionPortoptions, inADontCareCelloptions, inADontcareContentsoptions, inADontCareDontcareoptions, inADontCareEdifoptions, inADontCareInstanceoptions, inADontCareInterfaceop, inADontCareNetoptions, inADontCarePortoptions, inADontCareViewoptions, inAEdiflevel, inAEdiflevelvalue, inAEdifnamedef, inAEdifversion, inAEee, inAEScaledinteger, inAExponent, inAExternaEdifoptions, inAExternal, inAFalse, inAFalseBooleantoken, inAIdent, inAIdentDontcareoptions, inAIdentNamedef, inAIdentNameref, inAImpmlementationContentsoptions, inAInoutDirection, inAInputDirection, inAInstanceContentsoptions, inAInstanceNetoptions, inAInstancePageoptions, inAInstancePortimplementationop, inAInstanceProtectionframeop, inAInstancerefInstancerefop, inAInstancerefPortrefop, inAInstanceSymboloptions, inAInteger, inAIntegertokenScaledinteger, inAIntegerTypedvalue, inAIntegervalue, inAInterface, inAIntTokenDontcareoptions, inAIssue, inAJoined, inAJoinedInterfaceop, inAKeywordlevel, inAKeywordlevelvalue, inAKeywordmap, inALibrary, inALibraryEdifoptions, inALibrarynamedef, inALibrarynameref, inALibraryref, inAListofnets, inAListofports, inAMark, inAMember, inAMemberInstancenameref, inAMemberPortnameref, inANamedefInstancenamedef, inANamedefInstancenameref, inANamedefNetnamedef, inANamedefPortnamedef, inANamerefPortnameref, inANetbundle, inANetbundleContentsoptions, inANetbundlePageoptions, inANetContentsoptions, inANetlistNamedef, inANetlistNameref, inANetNetoptions, inANetPageoptions, inANettokenNamedef, inANettokenNameref, inANumber, inANumberdefinition, inANumberTypedvalue, inANumbervalue, inAOutputDirection, inAOwner, inAOwnerDontcareoptions, inAOwnerPropertyoptions, inAPage, inAPageContentsoptions, inAPortbundle, inAPortbundleInterfaceop, inAPortbundleListofportsop, inAPortimplementation, inAPortimplementationPageoptions, inAPortimplementationProtectionframeop, inAPortimplementationSymboloptions, inAPortinstance, inAPortinstanceInstanceoptions, inAPortInterfaceop, inAPortlist, inAPortlistJoinedoptions, inAPortListofportsop, inAPortnamerefPortimpop, inAPortnamerefPortinstop, inAPortnamerefPortlistoptions, inAPortrefJoinedoptions, inAPortrefPortimplementationop, inAPortrefPortimpop, inAPortrefPortinstop, inAPortrefPortlistoptions, inAPortrefPortrefop, inAProperty, inAPropertyCelloptions, inAPropertyDesignoptions, inAPropertyDontcareoptions, inAPropertyInstanceoptions, inAPropertyInterfaceop, inAPropertynamedef, inAPropertyNetbundleop, inAPropertyNetoptions, inAPropertyPortbundleop, inAPropertyPortimplementationop, inAPropertyPortinstanceop, inAPropertyPortoptions, inAPropertyPropertyoptions, inAPropertyProtectionframeop, inAPropertySymboloptions, inAPropertyViewoptions, inAProtectionframe, inAProtectionInterfaceop, inARenameDontcareoptions, inARenameNamedef, inAScale, inAScaleNumberdefinitionop, inAStrDontcareoptions, inAString, inAStringTypedvalue, inAStringvalue, inAStrTokenDontcareoptions, inASubissue, inASymbol, inASymbolInterfaceop, inATechnology, inATrue, inATrueBooleantoken, inAUnit, inAViewCelloptions, inAViewlist, inAViewlistInstanceop, inAViewlistViewlistop, inAViewnamedef, inAViewnameref, inAViewref, inAViewrefInstanceop, inAViewrefInstancerefop, inAViewrefPortrefop, inAViewrefViewlistop, inAViewtype, inStart, outAArray, outAArrayInstancenamedef, outAArraynamedef, outAArrayNetnamedef, outAArrayPortnamedef, outABoolean, outABooleanTypedvalue, outABooleanvalue, outACellExternaloptions, outACellLibraryoptions, outACellnamedef, outACellnameref, outACellref, outACelltokenNamedef, outACelltokenNameref, outACelltype, outAComment, outACommentCelloptions, outACommentContentsoptions, outACommentDesignoptions, outACommentDontcareoptions, outACommentEdifoptions, outACommentExternaloptions, outACommentInstanceoptions, outACommentLibraryoptions, outACommentNetbundleop, outACommentNetoptions, outACommentNumberdefinitionop, outACommentPageoptions, outACommentPortbundleop, outACommentPortinstanceop, outACommentPortoptions, outACommentPropertyoptions, outACommentProtectionframeop, outACommentSymboloptions, outACommentViewoptions, outAContents, outAContentsViewoptions, outADesign, outADesignEdifoptions, outADesignnamedef, outADirectionPortoptions, outADontCareCelloptions, outADontcareContentsoptions, outADontCareDontcareoptions, outADontCareEdifoptions, outADontCareInstanceoptions, outADontCareInterfaceop, outADontCareNetoptions, outADontCarePortoptions, outADontCareViewoptions, outAEdiflevel, outAEdiflevelvalue, outAEdifnamedef, outAEdifversion, outAEee, outAEScaledinteger, outAExponent, outAExternaEdifoptions, outAExternal, outAFalse, outAFalseBooleantoken, outAIdent, outAIdentDontcareoptions, outAIdentNamedef, outAIdentNameref, outAImpmlementationContentsoptions, outAInoutDirection, outAInputDirection, outAInstanceContentsoptions, outAInstanceNetoptions, outAInstancePageoptions, outAInstancePortimplementationop, outAInstanceProtectionframeop, outAInstanceref, outAInstancerefInstancerefop, outAInstancerefPortrefop, outAInstanceSymboloptions, outAInteger, outAIntegertokenScaledinteger, outAIntegerTypedvalue, outAIntegervalue, outAIntTokenDontcareoptions, outAIssue, outAJoined, outAJoinedInterfaceop, outAKeywordlevel, outAKeywordlevelvalue, outAKeywordmap, outALibrary, outALibraryEdifoptions, outALibrarynamedef, outALibrarynameref, outALibraryref, outAListofnets, outAListofports, outAMark,