One more enhancement addition for BTF - B3 "Add swrite"

From: Adam Krolnik (adamk@cyrix.com)
Date: Wed Apr 08 1998 - 21:28:01 PDT


Good morning:

With the addition of extra capabilities for reading data and writing data, I though
that the only thing one can't do is getting a formatted string.

I would like to propose an enhancement with BTF - B3, adding capabilities
of sprintf(), I.e. accessing the text formatting capabilities of $display
or $write to return the formatted text to a variable instead of to a file handle.

My motivation is that most of the work is already being done by the built in
code. If one wanted to add this functionality through a system task or function,
they would have to rewrite the entire functionality of the format specifiers.

I propose the system task $swrite(). The syntax is

$swrite(string_var, "format string with format specifiers (%fmt)", arguments);

This system task is like $fwrite, except that the first argument is a variable
for holding the resulting string instead of a variable holding a file number.

<p><p> Adam Krolnik
     Verification Engineer
     Cyrix - NSM.
     Richardson TX. 75085



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:52:47 PDT and
sponsored by Boyd Technology, Inc.