Fix internal error if always block without begin-end has concat (#2640) (#2641)

This commit is contained in:
Yutetsu TAKATSUKASA 2020-11-13 23:50:09 +09:00 committed by GitHub
parent 7eac788306
commit e8c03650ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -460,13 +460,17 @@ class SplitUnpackedVarVisitor : public AstNVisitor, public SplitVarImpl {
if (nodep->sensesp()) { // When visiting sensitivity list, always is the context
setContextAndIterate(nodep, nodep->sensesp());
}
if (AstNode* bodysp = nodep->bodysp()) iterate(bodysp);
for (AstNode* bodysp = nodep->bodysp(); bodysp; bodysp = bodysp->nextp()) {
iterate(bodysp);
}
};
virtual void visit(AstAlwaysPublic* nodep) override {
if (nodep->sensesp()) { // When visiting sensitivity list, always is the context
setContextAndIterate(nodep, nodep->sensesp());
}
if (AstNode* bodysp = nodep->bodysp()) iterate(bodysp);
for (AstNode* bodysp = nodep->bodysp(); bodysp; bodysp = bodysp->nextp()) {
iterate(bodysp);
}
}
virtual void visit(AstNodeFTaskRef* nodep) override {
VL_RESTORER(m_contextp);

View File

@ -166,7 +166,8 @@ module barshift_1d_unpacked_struct1 #(parameter DEPTH = 2, localparam WIDTH = 2*
end
endgenerate
assign tmp[0+OFFSET] = {pad, in};
assign out = tmp[DEPTH+OFFSET][WIDTH-1:0];
logic _dummy;
always_comb {_dummy, out[WIDTH-1:1], out[0]} = tmp[DEPTH+OFFSET][WIDTH:0];
endmodule