Internals: Style cleanup. No functional change.

This commit is contained in:
Wilson Snyder 2019-10-18 20:28:59 -04:00
parent 7311c84937
commit 89c3c5f952
7 changed files with 17 additions and 17 deletions

View File

@ -1658,7 +1658,7 @@ static inline IData VL_REPLICATE_III(int, int lbits, int, IData ld, IData rep) V
returndata = returndata << lbits; returndata = returndata << lbits;
returndata |= ld; returndata |= ld;
} }
return (returndata); return returndata;
} }
static inline QData VL_REPLICATE_QII(int, int lbits, int, IData ld, IData rep) VL_PURE { static inline QData VL_REPLICATE_QII(int, int lbits, int, IData ld, IData rep) VL_PURE {
QData returndata = ld; QData returndata = ld;
@ -1666,7 +1666,7 @@ static inline QData VL_REPLICATE_QII(int, int lbits, int, IData ld, IData rep) V
returndata = returndata << lbits; returndata = returndata << lbits;
returndata |= static_cast<QData>(ld); returndata |= static_cast<QData>(ld);
} }
return (returndata); return returndata;
} }
static inline WDataOutP VL_REPLICATE_WII(int obits, int lbits, int, static inline WDataOutP VL_REPLICATE_WII(int obits, int lbits, int,
WDataOutP owp, IData ld, IData rep) VL_MT_SAFE { WDataOutP owp, IData ld, IData rep) VL_MT_SAFE {

View File

@ -258,7 +258,7 @@ AstNode* AstNode::addNext(AstNode* nodep, AstNode* newp) {
nodep->debugTreeChange("-addNextThs: ", __LINE__, false); nodep->debugTreeChange("-addNextThs: ", __LINE__, false);
newp->debugTreeChange("-addNextNew: ", __LINE__, true); newp->debugTreeChange("-addNextNew: ", __LINE__, true);
if (!nodep) { // verilog.y and lots of other places assume this if (!nodep) { // verilog.y and lots of other places assume this
return (newp); return newp;
} else { } else {
// Find end of old list // Find end of old list
AstNode* oldtailp = nodep; AstNode* oldtailp = nodep;

View File

@ -181,7 +181,7 @@ private:
AstNode* senEqnp = createSenseEquation(sensesp->sensesp()); AstNode* senEqnp = createSenseEquation(sensesp->sensesp());
UASSERT_OBJ(senEqnp, sensesp, "No sense equation, shouldn't be in sequent activation."); UASSERT_OBJ(senEqnp, sensesp, "No sense equation, shouldn't be in sequent activation.");
AstIf* newifp = new AstIf(sensesp->fileline(), senEqnp, NULL, NULL); AstIf* newifp = new AstIf(sensesp->fileline(), senEqnp, NULL, NULL);
return (newifp); return newifp;
} }
void clearLastSen() { void clearLastSen() {
m_lastSenp = NULL; m_lastSenp = NULL;

View File

@ -616,7 +616,7 @@ const string V3OutFormatter::indentSpaces(int num) {
} }
*cp++ = '\0'; *cp++ = '\0';
string st (str); string st (str);
return (st); return st;
} }
bool V3OutFormatter::tokenStart(const char* cp, const char* cmp) { bool V3OutFormatter::tokenStart(const char* cp, const char* cmp) {
@ -639,9 +639,9 @@ int V3OutFormatter::endLevels(const char *strg) {
while (isspace(*cp)) cp++; while (isspace(*cp)) cp++;
switch (*cp) { switch (*cp) {
case '\n': // Newlines.. No need for whitespace before it case '\n': // Newlines.. No need for whitespace before it
return (0); return 0;
case '#': // Preproc directive case '#': // Preproc directive
return (0); return 0;
} }
{ {
// label/public/private: Deindent by 2 spaces // label/public/private: Deindent by 2 spaces
@ -671,10 +671,10 @@ int V3OutFormatter::endLevels(const char *strg) {
case ' ': case ' ':
break; // Continue break; // Continue
default: default:
return (levels); // Letter return levels; // Letter
} }
} }
return (levels); return levels;
} }
void V3OutFormatter::puts(const char *strg) { void V3OutFormatter::puts(const char *strg) {

View File

@ -859,7 +859,7 @@ int V3PreProcImp::getRawToken() {
m_rawAtBol = true; m_rawAtBol = true;
yyourtext("\n", 1); yyourtext("\n", 1);
if (debug()>=5) debugToken(VP_WHITE, "LNA"); if (debug()>=5) debugToken(VP_WHITE, "LNA");
return (VP_WHITE); return VP_WHITE;
} }
if (m_lineCmt!="") { if (m_lineCmt!="") {
// We have some `line directive or other processed data to return to the user. // We have some `line directive or other processed data to return to the user.
@ -877,10 +877,10 @@ int V3PreProcImp::getRawToken() {
goto next_tok; goto next_tok;
} else { } else {
if (debug()>=5) debugToken(VP_TEXT, "LCM"); if (debug()>=5) debugToken(VP_TEXT, "LCM");
return (VP_TEXT); return VP_TEXT;
} }
} }
if (isEof()) return (VP_EOF); if (isEof()) return VP_EOF;
// Snarf next token from the file // Snarf next token from the file
m_lexp->curFilelinep()->startToken(); m_lexp->curFilelinep()->startToken();
@ -929,7 +929,7 @@ int V3PreProcImp::getStateToken() {
int tok = getRawToken(); int tok = getRawToken();
// Most states emit white space and comments between tokens. (Unless collecting a string) // Most states emit white space and comments between tokens. (Unless collecting a string)
if (tok==VP_WHITE && state() !=ps_STRIFY) return (tok); if (tok==VP_WHITE && state() !=ps_STRIFY) return tok;
if (tok==VP_BACKQUOTE && state() !=ps_STRIFY) { tok = VP_TEXT; } if (tok==VP_BACKQUOTE && state() !=ps_STRIFY) { tok = VP_TEXT; }
if (tok==VP_COMMENT) { if (tok==VP_COMMENT) {
if (!m_off) { if (!m_off) {
@ -939,7 +939,7 @@ int V3PreProcImp::getStateToken() {
// Need to ensure "foo/**/bar" becomes two tokens // Need to ensure "foo/**/bar" becomes two tokens
insertUnreadback(" "); insertUnreadback(" ");
} else if (m_lexp->m_keepComments) { } else if (m_lexp->m_keepComments) {
return (tok); return tok;
} else { } else {
// Need to ensure "foo/**/bar" becomes two tokens // Need to ensure "foo/**/bar" becomes two tokens
insertUnreadback(" "); insertUnreadback(" ");
@ -1369,7 +1369,7 @@ int V3PreProcImp::getStateToken() {
if (m_off) { if (m_off) {
goto next_tok; goto next_tok;
} else { } else {
return (VP_TEXT); return VP_TEXT;
} }
} }
else { else {

View File

@ -23,7 +23,7 @@ module t ();
function integer func (output bit [PAYLOAD_MAX_BITS-1:0] data); function integer func (output bit [PAYLOAD_MAX_BITS-1:0] data);
/*verilator no_inline_task*/ /*verilator no_inline_task*/
data = {PAYLOAD_MAX_BITS{1'b1}}; data = {PAYLOAD_MAX_BITS{1'b1}};
return (1); return 1;
endfunction endfunction
endmodule endmodule

View File

@ -26,7 +26,7 @@ package config_pkg;
case (selector) case (selector)
1: return_config.mac.USE_QUAD1 = 5; 1: return_config.mac.USE_QUAD1 = 5;
endcase endcase
return (return_config); return return_config;
endfunction endfunction
endpackage : config_pkg endpackage : config_pkg