From af84c975f121824ecfdd7bdf007cdc01c75a16a5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 23 Feb 2020 19:57:28 -0500 Subject: [PATCH] Misc style cleanup. --- bin/verilator | 23 ++++++++++++----------- src/V3LinkDot.cpp | 4 ++-- src/V3LinkParse.cpp | 2 +- test_regress/t/t_split_var_1_bad.out | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/verilator b/bin/verilator index 653f63c32..febb96fb9 100755 --- a/bin/verilator +++ b/bin/verilator @@ -4410,24 +4410,25 @@ calls. =item SPLITVAR Warns that a variable with a C metacomment was not split. -Typical reasons are +Some possible reasons for this are: - The datatype of the variable is not supported for splitting. (e.g. is a - real). +* The datatype of the variable is not supported for splitting. (e.g. is a +real). - The access pattern of the variable can not be determined - statically. (e.g. is accessed as a memory). +* The access pattern of the variable can not be determined +statically. (e.g. is accessed as a memory). - The index of the array exceeds the array size. +* The index of the array exceeds the array size. - The variable is accessed from outside using dotted reference. - (e.g. top.instance0.variable0 = 1). +* The variable is accessed from outside using dotted reference. +(e.g. top.instance0.variable0 = 1). - The variable is not declared in a module, but in a package or an interface. +* The variable is not declared in a module, but in a package or an +interface. - The variable is one of parameter, localparam, genvar, or queue. +* The variable is a parameter, localparam, genvar, or queue. - The variable is tirstate or bidirectional. (e.g. inout or ref). +* The variable is tirstate or bidirectional. (e.g. inout or ref). =item STMTDLY diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 112247766..88019d233 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -2070,8 +2070,8 @@ private: refp->varp(varp); if (varp->attrSplitVar()) { refp->v3warn(SPLITVAR, varp->prettyNameQ() - << " has split_var metacomment but will not be split because " - "it is accessed from other module via dot.\n"); + << " has split_var metacomment but will not be split because" + << " it is accessed from another module via a dot."); varp->attrSplitVar(false); } m_ds.m_dotText = ""; diff --git a/src/V3LinkParse.cpp b/src/V3LinkParse.cpp index fdb6e7f9a..33e02ce9e 100644 --- a/src/V3LinkParse.cpp +++ b/src/V3LinkParse.cpp @@ -309,7 +309,7 @@ private: UASSERT_OBJ(m_varp, nodep, "Attribute not attached to variable"); if (!VN_IS(m_modp, Module)) { m_varp->v3warn(SPLITVAR, m_varp->prettyNameQ() << " has split_var metacomment, " - "but will not be split because it is not declared in a module.\n"); + "but will not be split because it is not declared in a module."); } else { m_varp->attrSplitVar(true); } diff --git a/test_regress/t/t_split_var_1_bad.out b/test_regress/t/t_split_var_1_bad.out index 27cedceca..c1f27f014 100644 --- a/test_regress/t/t_split_var_1_bad.out +++ b/test_regress/t/t_split_var_1_bad.out @@ -11,7 +11,7 @@ logic [7:0] should_show_warning_global1 [1:0] /*verilator split_var*/ ; %Warning-SPLITVAR: t/t_split_var_1_bad.v:11: 'should_show_warning_ifs1' has split_var metacomment, but will not be split because it is not declared in a module. logic [7:0] should_show_warning_ifs1 [1:0] /*verilator split_var*/ ; ^~~~~~~~~~~~~~~~~~~~~~~~ -%Warning-SPLITVAR: t/t_split_var_1_bad.v:37: 'cannot_split1' has split_var metacomment but will not be split because it is accessed from other module via dot. +%Warning-SPLITVAR: t/t_split_var_1_bad.v:37: 'cannot_split1' has split_var metacomment but will not be split because it is accessed from another module via a dot. i_sub0.cannot_split1[0] = 0; ^~~~~~~~~~~~~ %Warning-SELRANGE: t/t_split_var_1_bad.v:82: Selection index out of range: 13 outside 12:10