Subject: Re: [sv-cc] VPIs for changing the log file..
From: Michael McNamara (mac@verisity.com)
Date: Wed Apr 16 2003 - 14:07:05 PDT
Whoops, sorry I did not completely read your email; my apologies.
There are still a couple of things you can do. The first thing that
comes to mind is, if you are on unix, you can create a named pipe:
% mknod log_pipe p
Then start your verilog simulation, using the -l option to arrange to
write the output to this named pip "log_pipe" instead of the default
(verilog.log)
% verilog +myswitches -l log_pipe
Then start a process that reads from this pipe, writing the log file
to a series of files based on how many lines in the file:
% split -C 10m - verilog_log. < log_pipe
This says to read from log_pipe, and create files called
verilog_log.aa, verilog_log.ab, .. verilog_log.zz, each with no more
lines than will use 10 megabytes of storage.
[Note I haven't tested this, so your mileage my vary; Also the man
page for split that I refered to is the GNU split, which you get from
the GNU fileutils package, which will run on any unix flavor. Likely
HP & Sun have their own supported split, which may take different
options]
Let me know how it works.
Raghuraman R writes:
> Michael,
>
> Thanks for the response.
>
> I am not talking about the VCD dump but about the messages thrown out by
> simulator and the any $display messsages in the testbench. Especially
> with SDF related warnings that get displayed at run time, the logfile
> bloats up in size. One can supress the warnings, but there may be cases
> where we want to look at the warnings as well.
>
> Michael McNamara wrote:
> > And indeed, manipulating the valuechange dumpfile from the VPI is very
> > likely not the right way to do things; rather one should just handle
> > this right from the Verilog, as we have been doing since 1987
> > (actually, the $swrite stuff is new with '2001, so I've included the
> > Verilog-XL way as well for the troglodytes)
> >
> > initial begin : dump
> > integer i;
> > reg [8*40:0] dump_file_name;
> > for (i = 0; i < 1000; i = i + 1) begin
> > $dumpoff;
> > `ifdef 1364_2001
> > $swrite(dump_file_name,"mydump.%d",i);
> > `else
> > dump_file_name = {"mydump.",i};
> > `endif
> > $dumpfile(buf);
> > $dumpvars;
> > #1000000;
> > end
> > end
> >
> >
> > David W. Smith writes:
> > > This truly sounds like an issue that should be sent to the IEEE 1364
> > > committee. They are the owner of errata and enhancements like this. You may
> > > want to contact Cliff Cummings at Sunburst-Design.
> > > (cliffc@sunburst-design.com).
> > >
> > > The only work that Accellera is doing with VPI is in extending it to support
> > > the SystemVerilog extensions.
> > >
> > > Regards
> > > David
> > >
> > > David W. Smith
> > > Synopsys Scientist
> > >
> > > Synopsys, Inc.
> > > Synopsys Technology Park
> > > 2025 NW Cornelius Pass Road
> > > Hillsboro, OR 97124
> > >
> > > Voice: 503.547.6467
> > > Main: 503.547.6000
> > > FAX: 503.547.6906
> > > Email: david.smith@synopsys.com
> > > http://www.synopsys.com
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org] On Behalf Of
> > > Raghuraman R
> > > Sent: Monday, April 14, 2003 8:39 PM
> > > To: Joao.Geada@Synopsys.COM
> > > Cc: sv-cc@eda.org
> > > Subject: Re: [sv-cc] VPIs for changing the log file..
> > >
> > >
> > > Joao,
> > >
> > > Thanks for the response.
> > >
> > > So, there is no solution to change the log file midway during a
> > > simulation. With whom should this issue be taken up? Should VPI be
> > > enhanced or is it a problem of the simulator vendor and hence the issue
> > > to be taken up with him only?
> > >
> > > Thanks.
> > >
> > > Joao Geada wrote:
> > > > Raghuraman,
> > > >
> > > > as far as I am aware, VPI is currently forbidden to manipulate the log
> > > > file in use by the simulator (this is implicitly described in IEEE
> > > > 1364-2001, section 27.22, vpi_mcd_close)
> > > >
> > > > Specifically, there is an mcd channel describing the simulator log
> > > > file, but vpi cannot modify that stream (ie cannot close the current
> > > > stream and then reopen it to a different file)
> > > >
> > > > However, I believe you can get the name of the log file from
> > > > vpi_mcd_name (use channel descriptor 1 to get the log file)
> > > >
> > > > Joao
> > > >
> > > ============================================================================
> > > ==
> > > > Joao Geada, PhD Principal Engineer Verif Tech
> > > Group
> > > > Synopsys, Inc TEL: (508)
> > > 263-8083
> > > > 377 Simarano Drive, Suite 300, FAX: (508)
> > > 263-8069
> > > > Marlboro, MA 01752, USA
> > > > ======================================================================
> > > > ========
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: owner-sv-cc@eda.org [mailto:owner-sv-cc@eda.org]On Behalf Of
> > > > Raghuraman R
> > > > Sent: Friday, April 11, 2003 4:24 AM
> > > > To: sv-cc@eda.org
> > > > Subject: [sv-cc] VPIs for changing the log file..
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I would like to know if there is any vpi call to change the logfile
> > > > during simulation. I know of the vpi_mcd_* calls but it is for any
> > > > user-specific displays.
> > > >
> > > > For example, if I am running a big simulation job running for 48
> > > > hours, then the log file that gets generated is a 16 GB file or
> > > > so which cannot be edited or read easily. So if there is a vpi
> > > > call to change the log file, it will be good for the users, who
> > > > can look at the smaller log files. This is also needed when
> > > > multiple vector files are simulated in one run and users would
> > > > like to have one log for each file.
> > > >
> > > > The prototype could be
> > > >
> > > > int vpi_change_log("<file name>", mode (append|write));
> > > >
> > > > Similarly there should be a call to get the current log file name
> > > >
> > > > char * vpi_get_logfilename();
> > > >
> > > > Otherwise, logfile could be declared as an object which can be edited
> > > > using the vpi_put_value and value obtained through vpi_get_value. The
> > > > object type could be enumerated on the types of vpiBinStrVal etc.
> > >
> > >
> > > --
> > > Regds,
> > >
> > > Raghuraman R
> > > ASIC
> > > Texas Instruments (India) Ltd.
> > > Phone : +91-80-5099113
> > > http://www.india.ti.com/~raghu
> > >
> > > * Think. *
> >
> >
>
>
> --
> Regds,
>
> Raghuraman R
> ASIC
> Texas Instruments (India) Ltd.
> Phone : +91-80-5099113
> http://www.india.ti.com/~raghu
>
> * Think. *
This archive was generated by hypermail 2b28 : Wed Apr 16 2003 - 08:18:54 PDT