vrq
Functions
Utility Routines

Functions

double s2d (char *s)
 Convert char string to double. More...
 
char * d2s (double d, CObstack *heap)
 Convert double to char string allocating storage on given heap. More...
 
const char * Identifier (const char *s)
 Convert a string representing an identifier to an escaped format for printing (if needed). More...
 
const char * VrqVersionString ()
 Plugins should not be using these. More...
 
char * GetPlusArg (const char *prefix)
 Get plusarg from command line that matches prefix. More...
 
void GetPlusArgs (const char *prefix, list< string > &args)
 Get list of plusargs from command line that matche prefix. More...
 
void GetPluginPaths (list< string > &paths)
 Get list of paths to where plugins may reside. More...
 
static MessageMessage::RegisterWarning (CBackend *tool, Action_t defaultAction, const char *abbrev, const char *format,...)
 Register a warning message. More...
 
static MessageMessage::RegisterError (CBackend *tool, const char *abbrev, const char *format,...)
 Register an error message. More...
 
void message (struct Coord_t *location, Message *message,...)
 Print message. More...
 
void vlogprintf (const char *format, va_list args)
 Print to logfile. More...
 
void logprintf (const char *format,...)
 Print to logfile. More...
 

Detailed Description

Function Documentation

◆ d2s()

char * d2s ( double  d,
CObstack heap 
)
inline

Convert double to char string allocating storage on given heap.

Parameters
ddouble to convert.
heapheap to use for allocation.
Returns
pointer to char string.

◆ GetPluginPaths()

void GetPluginPaths ( list< string > &  paths)

Get list of paths to where plugins may reside.

Parameters
pathslist of filesystem paths.

◆ GetPlusArg()

char* GetPlusArg ( const char *  prefix)

Get plusarg from command line that matches prefix.

Parameters
prefixto search for.
Returns
complete plusarg text.

◆ GetPlusArgs()

void GetPlusArgs ( const char *  prefix,
list< string > &  args 
)

Get list of plusargs from command line that matche prefix.

Parameters
prefixto search for.
argslist to populate with matching plusargs.

◆ Identifier()

const char* Identifier ( const char *  s)

Convert a string representing an identifier to an escaped format for printing (if needed).

Verilog identifier escaping rules are used.

Parameters
stext to check and convert if needed.
Returns
converted text. Storage for this result may be from a shared static buffer and must be either used or copied immediately.

◆ logprintf()

void logprintf ( const char *  format,
  ... 
)

Print to logfile.

Parameters
formatformat to use for output.
...additional arguments used by format.

◆ message()

void message ( struct Coord_t location,
Message message,
  ... 
)

Print message.

Parameters
locationfile coordinates to use in message. NULL if none.
messagemessage object to use for message format.
...additional arguments used by format.

◆ RegisterError()

static Message* Message::RegisterError ( CBackend tool,
const char *  abbrev,
const char *  format,
  ... 
)
static

Register an error message.

Policy is set to eERROR and cannot be changed.

Parameters
toolbackend tool owning message, NULL for unowned.
abbrevmessage abbreviation. Must be unique per tool.
formatformat string for printing message.
Returns
message object.

◆ RegisterWarning()

static Message* Message::RegisterWarning ( CBackend tool,
Action_t  defaultAction,
const char *  abbrev,
const char *  format,
  ... 
)
static

Register a warning message.

Parameters
toolbackend tool owning message, NULL for unowned.
defaultActiondefault message behavior.
abbrevmessage abbreviation. Must be unique per tool.
formatformat string for printing message.
Returns
message object.

◆ s2d()

double s2d ( char *  s)
inline

Convert char string to double.

Parameters
schar pointer to string to convert.
Returns
converted real.

◆ vlogprintf()

void vlogprintf ( const char *  format,
va_list  args 
)

Print to logfile.

Parameters
formatformat to use for output.
argsvariable argument list for values.

◆ VrqVersionString()

const char* VrqVersionString ( )

Plugins should not be using these.

Get string containing vrq version number.

Returns
char pointer to vrq version number.