File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -854,6 +854,18 @@ class verilog_inst_baset : public verilog_module_itemt
854
854
return operands ();
855
855
}
856
856
857
+ bool positional_port_connections () const
858
+ {
859
+ return !named_port_connections ();
860
+ }
861
+
862
+ bool named_port_connections () const
863
+ {
864
+ auto &connections = this ->connections ();
865
+ return connections.empty () ||
866
+ connections.front ().id () == ID_named_port_connection;
867
+ }
868
+
857
869
protected:
858
870
using exprt::operands;
859
871
};
Original file line number Diff line number Diff line change @@ -1419,7 +1419,7 @@ void verilog_synthesist::instantiate_ports(
1419
1419
1420
1420
// named port connection?
1421
1421
1422
- if (inst.connections (). front (). id () == ID_named_port_connection )
1422
+ if (inst.named_port_connections () )
1423
1423
{
1424
1424
const irept::subt &ports = symbol.type .find (ID_ports).get_sub ();
1425
1425
Original file line number Diff line number Diff line change @@ -110,9 +110,7 @@ void verilog_typecheckt::typecheck_port_connections(
110
110
}
111
111
112
112
// named port connection?
113
- if (
114
- inst.connections ().empty () ||
115
- inst.connections ().front ().id () == ID_named_port_connection)
113
+ if (inst.named_port_connections ())
116
114
{
117
115
// We don't require that all ports are connected.
118
116
You can’t perform that action at this time.
0 commit comments