Skip to content

Commit

Permalink
Assign a correct access to a new pin
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Nov 14, 2023
1 parent d2e85cc commit 61a0104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/V3Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,9 +1851,9 @@ AstNodeFTask* V3Task::taskConnectWrapNew(AstNodeFTask* taskp, const string& newn
newTaskp->addStmtsp(newAssignp);
}
oldNewVars.emplace(portp, newPortp);
AstArg* const newArgp
= new AstArg{portp->fileline(), portp->name(),
new AstVarRef{portp->fileline(), newPortp, VAccess::READ}};
const VAccess pinAccess = portp->isWritable() ? VAccess::WRITE : VAccess::READ;
AstArg* const newArgp = new AstArg{portp->fileline(), portp->name(),
new AstVarRef{portp->fileline(), newPortp, pinAccess}};
newCallp->addPinsp(newArgp);
}
// Create wrapper call to original, passing arguments, adding setting of return value
Expand Down

0 comments on commit 61a0104

Please sign in to comment.