mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 08:24:31 +02:00
Change --main and --binary to use a TOP hierarchy name of "" (#5482).
This commit is contained in:
+2
-5
@@ -52,10 +52,7 @@ private:
|
||||
// Optional main top name argument, with empty string replacement
|
||||
string topArg;
|
||||
string topName = v3Global.opt.mainTopName();
|
||||
if (!topName.empty()) {
|
||||
if (topName == "-") topName = "";
|
||||
topArg = ", \"" + topName + "\"";
|
||||
}
|
||||
if (topName == "-") topName = "";
|
||||
|
||||
// Heavily commented output, as users are likely to look at or copy this code
|
||||
ofp()->putsHeader();
|
||||
@@ -77,7 +74,7 @@ private:
|
||||
|
||||
puts("// Construct the Verilated model, from Vtop.h generated from Verilating\n");
|
||||
puts("const std::unique_ptr<" + topClassName() + "> topp{new " + topClassName()
|
||||
+ "{contextp.get()" + topArg + "}};\n");
|
||||
+ "{contextp.get(), \"" + topName + "\"}};\n");
|
||||
puts("\n");
|
||||
|
||||
puts("// Simulate until $finish\n");
|
||||
|
||||
Reference in New Issue
Block a user