mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 02:23:19 +02:00
Streamline dump control options
- Rename `--dump-treei` option to `--dumpi-tree`, which itself is now a special case of `--dumpi-<tag>` where tag can be a magic word, or a filename - Control dumping via static `dump*()` functions, analogous to `debug()` - Make dumping independent of the value of `debug()` (so dumping always works even without the debug flag) - Add separate `--dumpi-graph` for dumping V3Graphs, which is again a special case of `--dumpi-<tag>` - Alias `--dump-<tag>` to `--dumpi-<tag> 3` as before
This commit is contained in:
+2
-12
@@ -28,6 +28,8 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
VL_DEFINE_DEBUG_FUNCTIONS;
|
||||
|
||||
//######################################################################
|
||||
|
||||
class V3PreShellImp final {
|
||||
@@ -41,21 +43,11 @@ protected:
|
||||
//---------------------------------------
|
||||
// METHODS
|
||||
|
||||
static int debug(bool reset = false) {
|
||||
static int level = -1;
|
||||
if (VL_UNLIKELY(level < 0) || reset) {
|
||||
level = v3Global.opt.debugSrcLevel(__FILE__);
|
||||
if (s_preprocp) s_preprocp->debug(debug());
|
||||
}
|
||||
return level;
|
||||
}
|
||||
|
||||
void boot() {
|
||||
// Create the implementation pointer
|
||||
if (!s_preprocp) {
|
||||
FileLine* const cmdfl = new FileLine(FileLine::commandLineFilename());
|
||||
s_preprocp = V3PreProc::createPreProc(cmdfl);
|
||||
s_preprocp->debug(debug());
|
||||
// Default defines
|
||||
FileLine* const prefl = new FileLine(FileLine::builtInFilename());
|
||||
s_preprocp->defineCmdLine(prefl, "VERILATOR", "1"); // LEAK_OK
|
||||
@@ -88,8 +80,6 @@ protected:
|
||||
|
||||
bool preproc(FileLine* fl, const string& modname, VInFilter* filterp, V3ParseImp* parsep,
|
||||
const string& errmsg) { // "" for no error
|
||||
debug(true); // Recheck if debug on - first check was before command line passed
|
||||
|
||||
// Preprocess the given module, putting output in vppFilename
|
||||
UINFONL(1, " Preprocessing " << modname << endl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user