Product Documentation
Virtuoso Technology Data SKILL Reference
Product Version IC23.1, June 2023

tcRegPreDumpTrigger

tcRegPreDumpTrigger(
s_function
[ x_priority ]
) 
=> t / nil

Description

Registers a trigger function the system calls before dumping a technology database. The s_function argument is a SKILL procedure with three arguments: the database identifier of the technology database, the port (or print destination) for the dump file, and the name of the dump file. Trigger functions are called in order of priority, with 0 having the highest priority. If you do not specify a priority argument, the default is the lowest priority (that is, it executes after any other trigger function that specifies a priority).

You can use this function to add header information to the dumped technology file. You can also use this function to dump the technology data into your preferred format and prevent the system-provided dumping.

Arguments

s_function

Symbol indicating the name of the trigger function. The format of the function is as follows:

function( d_techID p_port t_dumpName )
=> t / nil

where,

  • d_techID is the database identifier of the technology database.
  • p_port is the port for the dump file. (You can use the infile function to get port data for a file.)
  • t_dumpName is the name of the dump file.

x_priority

Priority of this trigger function.

Valid values: Any integer

Value Returned

t

The trigger function registers.

nil

The SKILL procedure does not exist or is incomplete; the trigger function did not register.

Example

procedure(MYPreDumpTrigger(techID techport 
    techfile)
if(techID~>owner == "sysAdmin"
  && techID~>MYTechName 
  && techID~>MYversion then
    ; write header info at top of dumped file.
    fprintf(techport "Tech Name = %s.\nVer. %f\n"
    techID~>MYTechName techID~>MYversion)
)
t
)
tcRegPreDumpTrigger(’MYPreDumpTrigger)

Registers a predump trigger that writes the header information at the top of the dumped technology file.


Return to top
 ⠀
X