add hierarchy path to inlined interface hash

This commit is contained in:
Zachary Snow 2025-02-17 15:29:45 -05:00
parent aa0a885699
commit 4ec99fcffd
4 changed files with 22 additions and 1 deletions

View File

@ -16,6 +16,8 @@
* Fixed `logic` incorrectly converted to `wire` even when provided to a task or
function output port
* Fixed conversion of fields accessed from explicitly-cast structs
* Fixed generated parameter name collisions when inlining interfaces and
interfaced-bound modules
* Fixed conversion of enum item names and typenames nested deeply within the
left-hand side of an assignment
* Fixed `input signed` ports of interface-using modules producing invalid

View File

@ -422,7 +422,7 @@ inlineInstance global ranges modportBindings items partName
scoper = scopeModuleItem
traverseDeclM traverseModuleItemM traverseGenItemM traverseStmtM
key = shortHash (partName, instanceName)
key = shortHash (partName, instanceName, hierarchyPath global)
-- synthetic modports to be collected and removed after inlining
bundleModport = Modport "" (impliedModport items)

View File

@ -0,0 +1,16 @@
interface Interface;
parameter P;
logic [P - 1:0] x;
endinterface
module Module1(Interface i);
localparam P = i.P;
initial $display("Module1 P=%0d", P);
endmodule
module Module2(Interface i);
Interface #(i.P) i();
Module1 m(i);
endmodule
module top;
Interface #(5) i();
Module2 m(i);
endmodule

View File

@ -0,0 +1,3 @@
module top;
initial $display("Module1 P=%0d", 5);
endmodule