mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-06 11:20:27 +00:00
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:
parent
bd16d01c0e
commit
e833c6a418
15 changed files with 397 additions and 42 deletions
13
tests/simple/memwr_port_connection.sv
Normal file
13
tests/simple/memwr_port_connection.sv
Normal file
|
@ -0,0 +1,13 @@
|
|||
module producer(
|
||||
output logic [3:0] out
|
||||
);
|
||||
assign out = 4'hA;
|
||||
endmodule
|
||||
|
||||
module top(
|
||||
output logic [3:0] out
|
||||
);
|
||||
logic [3:0] v[0:0];
|
||||
producer p(v[0]);
|
||||
assign out = v[0];
|
||||
endmodule
|
29
tests/simple/signed_full_slice.v
Normal file
29
tests/simple/signed_full_slice.v
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue