verilog: use derived module info to elaborate cell connections

- Attempt to lookup a derived module if it potentially contains a port
  connection with elaboration ambiguities
- Mark the cell if module has not yet been derived
- This can be extended to implement automatic hierarchical port
  connections in a future change
This commit is contained in:
Zachary Snow
2021-10-25 18:25:50 -07:00
committed by Zachary Snow
parent bd16d01c0e
commit e833c6a418
15 changed files with 397 additions and 42 deletions
+29
View File
@@ -0,0 +1,29 @@
module pass_through_a(
input wire [31:0] inp,
output wire [31:0] out
);
assign out[31:0] = inp[31:0];
endmodule
module top_a(
input wire signed [31:0] inp,
output wire signed [31:0] out
);
pass_through_a pt(inp[31:0], out[31:0]);
endmodule
// tests both module declaration orderings
module top_b(
input wire signed [31:0] inp,
output wire signed [31:0] out
);
pass_through_b pt(inp[31:0], out[31:0]);
endmodule
module pass_through_b(
input wire [31:0] inp,
output wire [31:0] out
);
assign out[31:0] = inp[31:0];
endmodule