Commit afc3ea43 by Zachary Snow

fix interface conversion erroneously renaming colliding pattern names

parent a15b0c73
......@@ -468,7 +468,16 @@ inlineInstance global ranges modportBindings items partName
case lookup (Bit expr Tag) exprReplacements of
Just resolved -> replaceArrTag (replaceExpr' local elt) resolved
Nothing -> Bit (replaceExpr' local expr) (replaceExpr' local elt)
replaceExpr' local expr =
replaceExpr' local (expr @ (Dot Ident{} _)) =
case lookup expr exprReplacements of
Just expr' -> expr'
Nothing -> checkExprResolution local expr $
traverseSinglyNestedExprs (replaceExprAny local) expr
replaceExpr' local (Ident x) =
checkExprResolution local (Ident x) (Ident x)
replaceExpr' local expr = replaceExprAny local expr
replaceExprAny :: Scopes Expr -> Expr -> Expr
replaceExprAny local expr =
case lookup expr exprReplacements of
Just expr' -> expr'
Nothing -> checkExprResolution local expr $
......
interface Interface;
logic x;
endinterface
module Module (
Interface p
);
typedef struct packed {
integer p;
} S;
S s = '{ p: 1 };
initial $display("%0d %0d", s, s.p);
endmodule
module top;
Interface intf();
Module mod(intf);
endmodule
module top;
initial $display("%0d %0d", 1, 1);
endmodule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment