vrq
Public Member Functions | Static Public Member Functions

CModule Class Reference

#include <cmodule.h>

Inheritance diagram for CModule:
CBlock CDecl CObject

List of all members.

Public Member Functions

 CModule (CSymbol *symbol, Coord_t *aLoc)
 Create a module declaration.
virtual CDeclClone (CObstack *heap)
 Create a clone of this declaration.
void InlineParamDecls (int v)
 Set inline parameter attribute.
int InlineParamDecls ()
 Get inline parameter attribute.
void InlinePortDecls (int v)
 Set inline port attribute.
int InlinePortDecls ()
 Get inline port attribute.
void ModuleDirectlyDefined (int v)
 Set directly defined attribute.
int ModuleDirectlyDefined ()
 Get directly defined attribute.
int IsDefined (void)
 Get defined attribute.
void SetDefined (int flag)
 Set defined attribute.
void ModuleIncluded (int v)
 Set included attribute.
int ModuleIncluded ()
 Get included attribute.
int IsMacroModule (void)
 Get macro module attribute.
void SetMacroModule (int flag)
 Set macro module attribute.
int IsPrimitive (void)
 Get primitive attribute.
void SetPrimitive (int flag)
 Set primitive attribute.
virtual void Dump (FILE *f)
 Dump macro info to file descriptor.
void SetPorts (CNode *ports)
 Set module port list.
CNodeGetPorts ()
 Get modules port list.
virtual vector< CFunction * > * GetFunctionList ()
 Get list of functions/tasks.
virtual vector< CInstance * > * GetInstanceList ()
 Get list if module instances.
virtual vector< CPort * > * GetPortList ()
 Get list if module ports.
virtual vector< CPortDir * > * GetPortDirList ()
 Get list if module ports declarations.
CDeclFindDecl (CSymbol *sym)
 Find declaration in modules scope for given symbol.
int Cell ()
 Get cell attribute.
void Cell (int v)
 Set cell attribute.
int Protect ()
 Get protect attribute.
void Protect (int v)
 Set protect attribute.
int Precision ()
 Get timescale precision.
void Precision (int v)
 Set timescale precision.
int Unit ()
 Get timescale unit.
void Unit (int v)
 Set timescale unit.
int HasTimescale ()
 Get timescale present attribute.
int DefaultNetType ()
 Get default net type attribute.
void DefaultNetType (int v)
 Set default net type attribute.
int UnconnectedDrive ()
 Get unconnected drive attribute.
void UnconnectedDrive (int v)
 Set unconnected drive attribute.
virtual void Add (CFunction *function)
virtual void Add (CInstance *instance)
virtual void Add (CFref *fref)
virtual void Add (CVar *var)
virtual void Add (CNet *net)
virtual void Add (CNode *n)
virtual void Add (CParam *param)

Static Public Member Functions

static CModuleLookupModule (CSymtab< CDecl > &symtab, char *aName)
 Find module declaration from name.

Constructor & Destructor Documentation

CModule::CModule ( CSymbol symbol,
Coord_t aLoc 
)

Create a module declaration.

Parameters:
symbol name of module.
aLoc file coordinates of declaration.

Member Function Documentation

virtual void CModule::Add ( CFunction function  )  [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add function/task to module.

Parameters:
function pointer to function/task object
virtual void CModule::Add ( CInstance instance  )  [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add instance to block.

Parameters:
instance pointer to instance object

Reimplemented from CBlock.

virtual void CModule::Add ( CFref fref  )  [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add fref to block.

Parameters:
fref pointer to forward reference object

Reimplemented from CBlock.

virtual void CModule::Add ( CVar var  )  [inline, virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add variable to block.

Parameters:
var pointer to register object

Reimplemented from CBlock.

virtual void CModule::Add ( CNet net  )  [inline, virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add net to block.

Parameters:
net pointer to net object

Reimplemented from CBlock.

virtual void CModule::Add ( CNode n  )  [virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add parse tree to block.

Parameters:
n parse tree.

Reimplemented from CBlock.

virtual void CModule::Add ( CParam param  )  [inline, virtual]
Todo:
This routine will eventually be eliminated.

Currently the construct must be added with this routine as well as by adding a node to the code tree.

Add parameter to block.

Parameters:
param pointer to parameter object

Reimplemented from CBlock.

int CModule::Cell (  )  [inline]

Get cell attribute.

Returns:
non-zero if module has been tagged as a cell.
void CModule::Cell ( int  v  )  [inline]

Set cell attribute.

Parameters:
v non-zero if module has been tagged as a cell.
virtual CDecl* CModule::Clone ( CObstack heap  )  [inline, virtual]

Create a clone of this declaration.

Parameters:
heap heap to use for allocation.
Returns:
new declaration.

Reimplemented from CBlock.

int CModule::DefaultNetType (  )  [inline]

Get default net type attribute.

Returns:
net type: vpiWire, vpiTri, vpiTri0, vpiWand, vpiTriAnd, vpiTriAnd, vpiTri1, vpiWor, vpiTriOr, VpiTriReg
void CModule::DefaultNetType ( int  v  )  [inline]

Set default net type attribute.

Parameters:
v net type: vpiWire, vpiTri, vpiTri0, vpiWand, vpiTriAnd, vpiTriAnd, vpiTri1, vpiWor, vpiTriOr, VpiTriReg
virtual void CModule::Dump ( FILE *  f  )  [virtual]

Dump macro info to file descriptor.

Parameters:
f file descriptor.

Reimplemented from CBlock.

CDecl* CModule::FindDecl ( CSymbol sym  ) 

Find declaration in modules scope for given symbol.

Parameters:
sym symbol to lookup.
Returns:
declaration with given name, NULL if not found.
virtual vector<CFunction*>* CModule::GetFunctionList (  )  [virtual]

Get list of functions/tasks.

Returns:
vector of functions/tasks.
virtual vector<CInstance*>* CModule::GetInstanceList (  )  [virtual]

Get list if module instances.

Returns:
vector of instances.
virtual vector<CPortDir*>* CModule::GetPortDirList (  )  [virtual]

Get list if module ports declarations.

Returns:
vector of ports declarations.

Reimplemented from CBlock.

virtual vector<CPort*>* CModule::GetPortList (  )  [virtual]

Get list if module ports.

Returns:
vector of ports.
CNode* CModule::GetPorts (  )  [inline]

Get modules port list.

Returns:
port list.
int CModule::HasTimescale (  )  [inline]

Get timescale present attribute.

Returns:
non-zero if timescale has been specified.
int CModule::InlineParamDecls (  )  [inline]

Get inline parameter attribute.

Returns:
non-zero if parameters have been declared inline.
void CModule::InlineParamDecls ( int  v  )  [inline]

Set inline parameter attribute.

Parameters:
v non-zero if parameters have been declared inline.
void CModule::InlinePortDecls ( int  v  )  [inline]

Set inline port attribute.

Parameters:
v non-zero if port have been declared inline.
int CModule::InlinePortDecls (  )  [inline]

Get inline port attribute.

Returns:
non-zero if port have been declared inline.
int CModule::IsDefined ( void   )  [inline]

Get defined attribute.

Returns:
non-zero if module has been defined.
int CModule::IsMacroModule ( void   ) 

Get macro module attribute.

Returns:
non-zero if module has been declare as a macro module.
int CModule::IsPrimitive ( void   ) 

Get primitive attribute.

Returns:
non-zero if module is a udp.
static CModule* CModule::LookupModule ( CSymtab< CDecl > &  symtab,
char *  aName 
) [static]

Find module declaration from name.

If it doesn't exist create an undefined module object and tie it to name.

Parameters:
symtab symbol table to search or insert into.
aName name of module.
int CModule::ModuleDirectlyDefined (  )  [inline]

Get directly defined attribute.

Returns:
non-zero if module has been defined in a input file directly provide by the command line.
void CModule::ModuleDirectlyDefined ( int  v  )  [inline]

Set directly defined attribute.

Parameters:
v non-zero if module has been defined in a input file directly provide by the command line.
void CModule::ModuleIncluded ( int  v  )  [inline]

Set included attribute.

Parameters:
v non-zero if module declaration has been included in a compilation unit.
int CModule::ModuleIncluded (  )  [inline]

Get included attribute.

Returns:
non-zero if module declaration has been included in a compilation unit.
void CModule::Precision ( int  v  )  [inline]

Set timescale precision.

Parameters:
v precision: 0: s, -3: ms, -6: us, -9: ns, -12: ps, -15: fs
int CModule::Precision (  )  [inline]

Get timescale precision.

Returns:
precision: 0: s, -3: ms, -6: us, -9: ns, -12: ps, -15: fs
int CModule::Protect (  )  [inline]

Get protect attribute.

Returns:
non-zero if module has been tagged as protected.
void CModule::Protect ( int  v  )  [inline]

Set protect attribute.

Parameters:
v non-zero if module has been tagged as protected.
void CModule::SetDefined ( int  flag  )  [inline]

Set defined attribute.

Parameters:
flag non-zero if module has been defined.
void CModule::SetMacroModule ( int  flag  ) 

Set macro module attribute.

Parameters:
flag non-zero if module has been declare as a macro module.
void CModule::SetPorts ( CNode ports  ) 

Set module port list.

Parameters:
ports port list.
void CModule::SetPrimitive ( int  flag  ) 

Set primitive attribute.

Parameters:
flag non-zero if module is a udp.
void CModule::UnconnectedDrive ( int  v  )  [inline]

Set unconnected drive attribute.

Parameters:
v unconnected drive attribute: vpiHighZ, vpiPull0, vpiPull1
int CModule::UnconnectedDrive (  )  [inline]

Get unconnected drive attribute.

Returns:
unconnected drive attribute: vpiHighZ, vpiPull0, vpiPull1
void CModule::Unit ( int  v  )  [inline]

Set timescale unit.

Parameters:
v precision: 0: s, -3: ms, -6: us, -9: ns, -12: ps, -15: fs
int CModule::Unit (  )  [inline]

Get timescale unit.

Returns:
unit: 0: s, -3: ms, -6: us, -9: ns, -12: ps, -15: fs

The documentation for this class was generated from the following file: