Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

engine
Class UserModuleDescription  view UserModuleDescription download UserModuleDescription.java

java.lang.Object
  extended byengine.DefaultNameSpaceDescription
      extended byengine.UserModuleDescription
All Implemented Interfaces:
ModuleFactory, NameSpaceDescription, java.io.Serializable
Direct Known Subclasses:
ModuleDescription, UDPDescription

abstract class UserModuleDescription
extends DefaultNameSpaceDescription
implements ModuleFactory

A 'user module' is a module whose inner structure is accessible by the user (UDPs and modules). By contrast, standard primitives do not have an 'internal structure', and the links between ports are not made using intermediary DataHolders.


Field Summary
(package private)  java.util.Vector always
           
(package private)  java.util.Hashtable connectionHash
          Contains the same data as connectionList, but only if this module supports named connections.
(package private)  java.util.Vector connectionList
          Contains the list of the connections to the outside world
(package private)  java.util.Hashtable events
           
(package private)  java.util.Vector functions
           
(package private)  java.util.Vector initial
           
(package private)  java.util.Vector monitors
           
(package private)  java.lang.String name
          The name of this namespace.
(package private)  java.util.Vector ports
          The list of ports & their types
(package private)  java.util.Hashtable regs
           
(package private)  java.util.Vector regsVector
           
(package private)  java.util.Hashtable subScopes
           
 
Constructor Summary
(package private) UserModuleDescription(java.lang.String name)
           
 
Method Summary
 void addAlways(InstructionDescription ins, int lineNo)
           
 void addConnection(int lineNo, AssignableSelection lValue, ExpressionDescription rValue, Delay3Description delays, byte strength)
           
 void addConnection(java.lang.String name, int lineNo, ExpressionDescription portExp)
           
 void addEvent(java.lang.String name, int lineNo)
           
 void addFunction(java.lang.String name, int lineNo)
           
 void addInitial(InstructionDescription ins, int lineNo)
           
 void addInteger(java.lang.String name, int lineNo, ExpressionDescription arrayStart, ExpressionDescription arrayEnd)
           
 void addModuleArray(java.lang.String moduleName, int lineNo, java.lang.String descName, ExpressionDescription arrayStart, ExpressionDescription arrayEnd, java.util.Vector portsVector, java.util.Hashtable portsHash, java.util.Vector parameters, byte strength, Delay3Description delays)
           
 void addParameter(java.lang.String name, int lineNo)
           
 void addPort(java.lang.String name, int lineNo, int type)
           
 void addPort(java.lang.String name, int lineNo, int type, ExpressionDescription msb, ExpressionDescription lsb)
           
 void addReal(java.lang.String name, int lineNo)
           
 void addRealTime(java.lang.String name, int lineNo)
           
 void addRegister(java.lang.String name, int lineNo, ExpressionDescription msb, ExpressionDescription lsb, ExpressionDescription arrayStart, ExpressionDescription arrayEnd)
           
 void addScope(NameSpaceDescription theScope, int lineNo)
          Adds a new sub-scope within this nameSpace.
 void addSubModule(java.lang.String moduleName, int lineNo, java.lang.String descName, java.util.Vector portsVector, java.util.Hashtable portsHash, java.util.Vector parameters, byte strength, Delay3Description delays)
          Adds a submodule into this nameSpace.
 void addTime(java.lang.String name, int lineNo)
           
 void addWire(java.lang.String name, int lineNo, ExpressionDescription msb, ExpressionDescription lsb, int expandType, int netType, Delay3Description delays)
           
(package private)  void checkPorts(NameSpace ns)
          The default implementation here does nothing
(package private)  void checkSymbolUnique(java.lang.String name, int lineNo)
           
(package private)  void checkSymbolUnique(java.lang.String name, int lineNo, boolean checkPorts)
          Checks whether this name is unique inside this namespace.
 void checkup()
          the default here implementation does nothing
 void defParam(java.lang.String name, ExpressionDescription ex)
           
 java.lang.String getFileName()
           
 void instantiateAll(NameSpace ns, middle.ScopeNode thisScope)
           
 PortDescription isPort(java.lang.String name)
           
 boolean isTop()
           
(package private)  void linkModule(Module m, NameSpace parent, byte strength, ModuleInstanceDescription miDesc)
          Creates the links between ports and their corresponding expressions
(package private)  void linkModuleArray(Module[] modules, NameSpace parent, ModuleInstanceDescription miDesc, byte strength, int ars, int are, int n, int increment)
           
 java.lang.String name()
           
 java.lang.String toString(int line)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface engine.ModuleFactory
createNewModule, createNewModuleArray, isTop, name, setParams, unsetParams
 

Field Detail

name

java.lang.String name
The name of this namespace.


regs

java.util.Hashtable regs

regsVector

java.util.Vector regsVector

events

java.util.Hashtable events

subScopes

java.util.Hashtable subScopes

monitors

java.util.Vector monitors

initial

java.util.Vector initial

always

java.util.Vector always

functions

java.util.Vector functions

ports

java.util.Vector ports
The list of ports & their types


connectionList

java.util.Vector connectionList
Contains the list of the connections to the outside world


connectionHash

java.util.Hashtable connectionHash
Contains the same data as connectionList, but only if this module supports named connections.

Constructor Detail

UserModuleDescription

UserModuleDescription(java.lang.String name)
Method Detail

linkModule

void linkModule(Module m,
                NameSpace parent,
                byte strength,
                ModuleInstanceDescription miDesc)
          throws ParseException
Creates the links between ports and their corresponding expressions


linkModuleArray

void linkModuleArray(Module[] modules,
                     NameSpace parent,
                     ModuleInstanceDescription miDesc,
                     byte strength,
                     int ars,
                     int are,
                     int n,
                     int increment)
               throws ParseException

name

public java.lang.String name()
Specified by:
name in interface NameSpaceDescription

addParameter

public void addParameter(java.lang.String name,
                         int lineNo)
                  throws ParseException
Specified by:
addParameter in interface NameSpaceDescription

defParam

public void defParam(java.lang.String name,
                     ExpressionDescription ex)
              throws ParseException
Specified by:
defParam in interface NameSpaceDescription

addPort

public void addPort(java.lang.String name,
                    int lineNo,
                    int type)
             throws ParseException
Specified by:
addPort in interface NameSpaceDescription

addPort

public void addPort(java.lang.String name,
                    int lineNo,
                    int type,
                    ExpressionDescription msb,
                    ExpressionDescription lsb)
             throws ParseException
Specified by:
addPort in interface NameSpaceDescription

addConnection

public void addConnection(java.lang.String name,
                          int lineNo,
                          ExpressionDescription portExp)
                   throws ParseException
Specified by:
addConnection in interface NameSpaceDescription

addSubModule

public void addSubModule(java.lang.String moduleName,
                         int lineNo,
                         java.lang.String descName,
                         java.util.Vector portsVector,
                         java.util.Hashtable portsHash,
                         java.util.Vector parameters,
                         byte strength,
                         Delay3Description delays)
                  throws ParseException
Adds a submodule into this nameSpace. portsHash and portsVactor cannot be both non-empty.

Specified by:
addSubModule in interface NameSpaceDescription

addModuleArray

public void addModuleArray(java.lang.String moduleName,
                           int lineNo,
                           java.lang.String descName,
                           ExpressionDescription arrayStart,
                           ExpressionDescription arrayEnd,
                           java.util.Vector portsVector,
                           java.util.Hashtable portsHash,
                           java.util.Vector parameters,
                           byte strength,
                           Delay3Description delays)
                    throws ParseException
Specified by:
addModuleArray in interface NameSpaceDescription

addScope

public void addScope(NameSpaceDescription theScope,
                     int lineNo)
              throws ParseException
Adds a new sub-scope within this nameSpace.

Specified by:
addScope in interface NameSpaceDescription

isTop

public boolean isTop()

addInitial

public void addInitial(InstructionDescription ins,
                       int lineNo)
Specified by:
addInitial in interface NameSpaceDescription

addAlways

public void addAlways(InstructionDescription ins,
                      int lineNo)
Specified by:
addAlways in interface NameSpaceDescription

addFunction

public void addFunction(java.lang.String name,
                        int lineNo)
                 throws ParseException
Specified by:
addFunction in interface NameSpaceDescription

checkSymbolUnique

void checkSymbolUnique(java.lang.String name,
                       int lineNo,
                       boolean checkPorts)
                 throws ParseException
Checks whether this name is unique inside this namespace.


checkSymbolUnique

void checkSymbolUnique(java.lang.String name,
                       int lineNo)
                 throws ParseException

isPort

public PortDescription isPort(java.lang.String name)

addRegister

public void addRegister(java.lang.String name,
                        int lineNo,
                        ExpressionDescription msb,
                        ExpressionDescription lsb,
                        ExpressionDescription arrayStart,
                        ExpressionDescription arrayEnd)
                 throws ParseException
Specified by:
addRegister in interface NameSpaceDescription

addWire

public void addWire(java.lang.String name,
                    int lineNo,
                    ExpressionDescription msb,
                    ExpressionDescription lsb,
                    int expandType,
                    int netType,
                    Delay3Description delays)
             throws ParseException
Specified by:
addWire in interface NameSpaceDescription

addInteger

public void addInteger(java.lang.String name,
                       int lineNo,
                       ExpressionDescription arrayStart,
                       ExpressionDescription arrayEnd)
                throws ParseException
Specified by:
addInteger in interface NameSpaceDescription

addReal

public void addReal(java.lang.String name,
                    int lineNo)
             throws ParseException
Specified by:
addReal in interface NameSpaceDescription

addConnection

public void addConnection(int lineNo,
                          AssignableSelection lValue,
                          ExpressionDescription rValue,
                          Delay3Description delays,
                          byte strength)
                   throws ParseException
Specified by:
addConnection in interface NameSpaceDescription

addTime

public void addTime(java.lang.String name,
                    int lineNo)
             throws ParseException
Specified by:
addTime in interface NameSpaceDescription

addRealTime

public void addRealTime(java.lang.String name,
                        int lineNo)
                 throws ParseException
Specified by:
addRealTime in interface NameSpaceDescription

addEvent

public void addEvent(java.lang.String name,
                     int lineNo)
              throws ParseException
Specified by:
addEvent in interface NameSpaceDescription

checkup

public void checkup()
             throws ParseException
the default here implementation does nothing


checkPorts

void checkPorts(NameSpace ns)
          throws ParseException
The default implementation here does nothing


instantiateAll

public void instantiateAll(NameSpace ns,
                           middle.ScopeNode thisScope)
                    throws ParseException
Specified by:
instantiateAll in interface NameSpaceDescription

toString

public java.lang.String toString(int line)
Specified by:
toString in interface NameSpaceDescription

getFileName

public java.lang.String getFileName()
Specified by:
getFileName in interface NameSpaceDescription