Fix --skip-identical
git-svn-id: file://localhost/svn/verilator/trunk/verilator@820 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
2083c071ce
commit
59141b1678
4
Changes
4
Changes
|
|
@ -3,6 +3,10 @@ Revision history for Verilator
|
|||
The contributors that suggested a given feature are shown in []. [by ...]
|
||||
indicates the contributor was also the author of the fix; Thanks!
|
||||
|
||||
* Verilator 3.62***
|
||||
|
||||
**** Fix --skip-identical without --debug, broken in 3.621. [Andy Meier]
|
||||
|
||||
* Verilator 3.621 10/11/2006
|
||||
|
||||
** Add /*verilator no_inline_task*/ to prevent over-expansion. [Eugene Weber]
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ public:
|
|||
}
|
||||
static ofstream* new_ofstream(const string& filename, bool append=false) {
|
||||
addTgtDepend(filename);
|
||||
return new_ofstream_nodepend (filename, append);
|
||||
}
|
||||
static ofstream* new_ofstream_nodepend(const string& filename, bool append=false) {
|
||||
if (append) {
|
||||
return new ofstream(filename.c_str(), ios::app);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ class V3Options {
|
|||
bool trace() const { return m_trace; }
|
||||
bool traceDups() const { return m_traceDups; }
|
||||
bool outFormatOk() const { return m_outFormatOk; }
|
||||
bool keepTempFiles() const { return (V3Error::debugDefault()!=0); }
|
||||
bool pins64() const { return m_pins64; }
|
||||
bool profileCFuncs() const { return m_profileCFuncs; }
|
||||
bool psl() const { return m_psl; }
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ protected:
|
|||
ostream* osp;
|
||||
if (v3Global.opt.preprocOnly()) {
|
||||
osp = &cout;
|
||||
} else if (!v3Global.opt.keepTempFiles()) { // Must match unlink rule in V3Read.cpp
|
||||
osp = ofp = V3File::new_ofstream_nodepend(vppFilename);
|
||||
} else {
|
||||
osp = ofp = V3File::new_ofstream(vppFilename);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ void V3Read::readFile(FileLine* fileline, const string& modfilename, bool inLibr
|
|||
lexFile (vppfilename, modfilename);
|
||||
}
|
||||
|
||||
if (!V3Error::debugDefault()) {
|
||||
if (!v3Global.opt.keepTempFiles()) { // Must match new_ofstream_nodepend rule in V3PreShell.cpp
|
||||
unlink (vppfilename.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("./driver.pl", @ARGV, $0); die; }
|
||||
# $Id$
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# General Public License or the Perl Artistic License.
|
||||
|
||||
if ($Last_Self->{v3}) {
|
||||
compile ();
|
||||
|
||||
my $outfile = "obj_dir/V".$Last_Self->{name}.".cpp";
|
||||
my @oldstats = stat($outfile);
|
||||
print "Old mtime=",$oldstats[9],"\n";
|
||||
$oldstats[9] or $Last_Self->error("No output file found: $outfile\n");
|
||||
|
||||
sleep (1); # Or else it might take < 1 second to compile and see no diff.
|
||||
|
||||
compile ();
|
||||
|
||||
my @newstats = stat($outfile);
|
||||
print "New mtime=",$newstats[9],"\n";
|
||||
|
||||
($oldstats[9] == $newstats[9])
|
||||
or $Last_Self->error("--skip-identical was ignored -- recompiled\n");
|
||||
}
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// $Id$
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2006 by Wilson Snyder.
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
|
||||
endmodule
|
||||
Loading…
Reference in New Issue