Merge from master

This commit is contained in:
Wilson Snyder 2018-07-14 19:27:51 -04:00
commit 22939d7473
11 changed files with 16 additions and 14 deletions

View File

@ -1043,7 +1043,7 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump) {
{ // Write log & close
UINFO(2,"Dumping "<<filename<<endl);
const vl_unique_ptr<std::ofstream> logsp (V3File::new_ofstream(filename, append));
if (logsp->fail()) v3fatalSrc("Can't write "<<filename);
if (logsp->fail()) v3fatal("Can't write "<<filename);
*logsp<<"Verilator Tree Dump (format 0x3900) from <e"<<std::dec<<editCountLast()<<">";
*logsp<<" to <e"<<std::dec<<editCountGbl()<<">"<<endl;
if (editCountGbl()==editCountLast()

View File

@ -494,7 +494,7 @@ private:
string filename = v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__cdc_edges.txt";
const vl_unique_ptr<std::ofstream> ofp (V3File::new_ofstream(filename));
if (ofp->fail()) v3fatalSrc("Can't write "<<filename);
if (ofp->fail()) v3fatal("Can't write "<<filename);
*ofp<<"Edge Report for "<<v3Global.opt.prefix()<<endl;
std::deque<string> report; // Sort output by name
@ -736,7 +736,7 @@ public:
// Make report of all signal names and what clock edges they have
string filename = v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__cdc.txt";
m_ofp = V3File::new_ofstream(filename);
if (m_ofp->fail()) v3fatalSrc("Can't write "<<filename);
if (m_ofp->fail()) v3fatal("Can't write "<<filename);
m_ofFilename = filename;
*m_ofp<<"CDC Report for "<<v3Global.opt.prefix()<<endl;
*m_ofp<<"Each dump below traces logic from inputs/source flops to destination flop(s).\n";

View File

@ -135,7 +135,7 @@ V3FileDependImp dependImp; // Depend implementation class
inline void V3FileDependImp::writeDepend(const string& filename) {
const vl_unique_ptr<std::ofstream> ofp (V3File::new_ofstream(filename));
if (ofp->fail()) v3fatalSrc("Can't write "<<filename);
if (ofp->fail()) v3fatal("Can't write "<<filename);
for (std::set<DependFile>::iterator iter=m_filenameList.begin();
iter!=m_filenameList.end(); ++iter) {
@ -171,7 +171,7 @@ inline void V3FileDependImp::writeDepend(const string& filename) {
inline void V3FileDependImp::writeTimes(const string& filename, const string& cmdlineIn) {
const vl_unique_ptr<std::ofstream> ofp (V3File::new_ofstream(filename));
if (ofp->fail()) v3fatalSrc("Can't write "<<filename);
if (ofp->fail()) v3fatal("Can't write "<<filename);
string cmdline = stripQuotes(cmdlineIn);
*ofp<<"# DESCR"<<"IPTION: Verilator output: Timestamp data for --skip-identical. Delete at will."<<endl;

View File

@ -306,7 +306,7 @@ void V3Graph::dumpDotFile(const string& filename, bool colorAsSubgraph) const {
// This generates a file used by graphviz, http://www.graphviz.org
// "hardcoded" parameters:
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
// Header
*logp<<"digraph v3graph {\n";

View File

@ -153,7 +153,7 @@ void V3Hashed::dumpFilePrefixed(const string& nameComment, bool tree) {
void V3Hashed::dumpFile(const string& filename, bool tree) {
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
std::map<int,int> dist;

View File

@ -134,7 +134,7 @@ public:
if (debug()>=6 || force) {
string filename = v3Global.debugFilename(nameComment)+".txt";
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
std::ostream& os = *logp;
m_syms.dump(os);
bool first = true;

View File

@ -1501,7 +1501,7 @@ void OrderVisitor::processEdgeReport() {
// Make report of all signal names and what clock edges they have
string filename = v3Global.debugFilename("order_edges.txt");
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
//Testing emitter: V3EmitV::verilogForTree(v3Global.rootp(), *logp);
std::deque<string> report;
@ -1776,7 +1776,7 @@ void OrderVisitor::process() {
if (0 && debug()) {
string dfilename = v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"_INT_order";
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(dfilename));
if (logp->fail()) v3fatalSrc("Can't write "<<dfilename);
if (logp->fail()) v3fatal("Can't write "<<dfilename);
m_graph.dump(*logp);
}
}

View File

@ -244,7 +244,7 @@ void V3Stats::statsReport() {
// Open stats file
string filename = v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__stats.txt";
std::ofstream* ofp (V3File::new_ofstream(filename));
if (ofp->fail()) v3fatalSrc("Can't write "<<filename);
if (ofp->fail()) v3fatal("Can't write "<<filename);
StatsReport reporter (ofp);

View File

@ -284,7 +284,7 @@ public:
string filename = v3Global.debugFilename(nameComment)+".txt";
UINFO(2,"Dumping "<<filename<<endl);
const vl_unique_ptr<std::ofstream> logp (V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
dump(*logp, "");
}
}

View File

@ -385,7 +385,7 @@ public:
if (v3Global.opt.dumpTree()) {
string filename = v3Global.debugFilename(nameComment)+".txt";
const vl_unique_ptr<std::ofstream> logp(V3File::new_ofstream(filename));
if (logp->fail()) v3fatalSrc("Can't write "<<filename);
if (logp->fail()) v3fatal("Can't write "<<filename);
dumpGraph(*logp, nameComment);
}
}

View File

@ -591,7 +591,6 @@ sub compile_vlt_flags {
my @verilator_flags = @{$param{verilator_flags}};
unshift @verilator_flags, "--gdb" if $opt_gdb;
unshift @verilator_flags, "--gdbbt" if $opt_gdbbt;
unshift @verilator_flags, @Opt_Driver_Verilator_Flags;
unshift @verilator_flags, "--x-assign unique"; # More likely to be buggy
unshift @verilator_flags, "--trace" if $opt_trace;
if (defined $opt_optimize) {
@ -615,6 +614,9 @@ sub compile_vlt_flags {
@{$param{verilator_flags3}},
@{$param{v_flags}},
@{$param{v_flags2}},
# Flags from driver cmdline override default flags and
# flags from the test itself
@Opt_Driver_Verilator_Flags,
$param{top_filename},
@{$param{v_other_filenames}},
($param{stdout_filename}?"> ".$param{stdout_filename}:""),