Internals: Cleanup some string/model constructors. No functional change.

This commit is contained in:
Wilson Snyder
2022-08-29 23:50:32 -04:00
parent 8658a0d7dc
commit 6a5f77b278
42 changed files with 73 additions and 69 deletions
+6 -5
View File
@@ -149,16 +149,17 @@ private:
// Timescale
if (v3Global.opt.hierChild() && v3Global.rootp()->timescaleSpecified()) {
// Emit timescale for hierarhical verilation if input HDL specifies timespec
txtp->addText(fl, string("timeunit ") + modp->timeunit().ascii() + ";\n");
txtp->addText(fl, string("timeprecision ") + +v3Global.rootp()->timeprecision().ascii()
+ ";\n");
txtp->addText(fl, std::string{"timeunit "} + modp->timeunit().ascii() + ";\n");
txtp->addText(fl, std::string{"timeprecision "}
+ +v3Global.rootp()->timeprecision().ascii() + ";\n");
} else {
addComment(txtp, fl,
"Precision of submodule"
" (commented out to avoid requiring timescale on all modules)");
addComment(txtp, fl, string("timeunit ") + v3Global.rootp()->timeunit().ascii() + ";");
addComment(txtp, fl,
string("timeprecision ") + v3Global.rootp()->timeprecision().ascii()
std::string{"timeunit "} + v3Global.rootp()->timeunit().ascii() + ";");
addComment(txtp, fl,
std::string{"timeprecision "} + v3Global.rootp()->timeprecision().ascii()
+ ";\n");
}