Skip to content

Commit 8d98343

Browse files
committed
Set port_id for Verific bus ports
1 parent 37875fd commit 8d98343

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

frontends/verific/verific.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,7 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
15761576
SetIter si ;
15771577
Port *port ;
15781578
FOREACH_PORT_OF_PORTBUS(portbus, si, port) {
1579+
wire->port_id = nl->IndexOf(port) + 1;
15791580
import_attributes(wire->attributes, port->GetNet(), nl, portbus->Size());
15801581
break;
15811582
}

tests/verific/port_bus_order.ys

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
verific -sv <<EOT
2+
module simple (
3+
input [3:0] I2,
4+
input [3:0] I1,
5+
output [3:0] result
6+
);
7+
assign result = I2 & I1;
8+
endmodule
9+
EOT
10+
verific -import simple
11+
12+
write_verilog verilog_port_bus_order.out
13+
!grep -qF 'simple(I2, I1, result)' verilog_port_bus_order.out

0 commit comments

Comments
 (0)